xref: /aosp_15_r20/external/libpcap/configure (revision 8b26181f966a6af5cf6981a6f474313de533bb28)
1*8b26181fSAndroid Build Coastguard Worker#! /bin/sh
2*8b26181fSAndroid Build Coastguard Worker# Guess values for system-dependent variables and create Makefiles.
3*8b26181fSAndroid Build Coastguard Worker# Generated by GNU Autoconf 2.69 for pcap 1.10.4.
4*8b26181fSAndroid Build Coastguard Worker#
5*8b26181fSAndroid Build Coastguard Worker#
6*8b26181fSAndroid Build Coastguard Worker# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7*8b26181fSAndroid Build Coastguard Worker#
8*8b26181fSAndroid Build Coastguard Worker#
9*8b26181fSAndroid Build Coastguard Worker# This configure script is free software; the Free Software Foundation
10*8b26181fSAndroid Build Coastguard Worker# gives unlimited permission to copy, distribute and modify it.
11*8b26181fSAndroid Build Coastguard Worker## -------------------- ##
12*8b26181fSAndroid Build Coastguard Worker## M4sh Initialization. ##
13*8b26181fSAndroid Build Coastguard Worker## -------------------- ##
14*8b26181fSAndroid Build Coastguard Worker
15*8b26181fSAndroid Build Coastguard Worker# Be more Bourne compatible
16*8b26181fSAndroid Build Coastguard WorkerDUALCASE=1; export DUALCASE # for MKS sh
17*8b26181fSAndroid Build Coastguard Workerif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18*8b26181fSAndroid Build Coastguard Worker  emulate sh
19*8b26181fSAndroid Build Coastguard Worker  NULLCMD=:
20*8b26181fSAndroid Build Coastguard Worker  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21*8b26181fSAndroid Build Coastguard Worker  # is contrary to our usage.  Disable this feature.
22*8b26181fSAndroid Build Coastguard Worker  alias -g '${1+"$@"}'='"$@"'
23*8b26181fSAndroid Build Coastguard Worker  setopt NO_GLOB_SUBST
24*8b26181fSAndroid Build Coastguard Workerelse
25*8b26181fSAndroid Build Coastguard Worker  case `(set -o) 2>/dev/null` in #(
26*8b26181fSAndroid Build Coastguard Worker  *posix*) :
27*8b26181fSAndroid Build Coastguard Worker    set -o posix ;; #(
28*8b26181fSAndroid Build Coastguard Worker  *) :
29*8b26181fSAndroid Build Coastguard Worker     ;;
30*8b26181fSAndroid Build Coastguard Workeresac
31*8b26181fSAndroid Build Coastguard Workerfi
32*8b26181fSAndroid Build Coastguard Worker
33*8b26181fSAndroid Build Coastguard Worker
34*8b26181fSAndroid Build Coastguard Workeras_nl='
35*8b26181fSAndroid Build Coastguard Worker'
36*8b26181fSAndroid Build Coastguard Workerexport as_nl
37*8b26181fSAndroid Build Coastguard Worker# Printing a long string crashes Solaris 7 /usr/bin/printf.
38*8b26181fSAndroid Build Coastguard Workeras_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39*8b26181fSAndroid Build Coastguard Workeras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40*8b26181fSAndroid Build Coastguard Workeras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41*8b26181fSAndroid Build Coastguard Worker# Prefer a ksh shell builtin over an external printf program on Solaris,
42*8b26181fSAndroid Build Coastguard Worker# but without wasting forks for bash or zsh.
43*8b26181fSAndroid Build Coastguard Workerif test -z "$BASH_VERSION$ZSH_VERSION" \
44*8b26181fSAndroid Build Coastguard Worker    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45*8b26181fSAndroid Build Coastguard Worker  as_echo='print -r --'
46*8b26181fSAndroid Build Coastguard Worker  as_echo_n='print -rn --'
47*8b26181fSAndroid Build Coastguard Workerelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48*8b26181fSAndroid Build Coastguard Worker  as_echo='printf %s\n'
49*8b26181fSAndroid Build Coastguard Worker  as_echo_n='printf %s'
50*8b26181fSAndroid Build Coastguard Workerelse
51*8b26181fSAndroid Build Coastguard Worker  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52*8b26181fSAndroid Build Coastguard Worker    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53*8b26181fSAndroid Build Coastguard Worker    as_echo_n='/usr/ucb/echo -n'
54*8b26181fSAndroid Build Coastguard Worker  else
55*8b26181fSAndroid Build Coastguard Worker    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56*8b26181fSAndroid Build Coastguard Worker    as_echo_n_body='eval
57*8b26181fSAndroid Build Coastguard Worker      arg=$1;
58*8b26181fSAndroid Build Coastguard Worker      case $arg in #(
59*8b26181fSAndroid Build Coastguard Worker      *"$as_nl"*)
60*8b26181fSAndroid Build Coastguard Worker	expr "X$arg" : "X\\(.*\\)$as_nl";
61*8b26181fSAndroid Build Coastguard Worker	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62*8b26181fSAndroid Build Coastguard Worker      esac;
63*8b26181fSAndroid Build Coastguard Worker      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64*8b26181fSAndroid Build Coastguard Worker    '
65*8b26181fSAndroid Build Coastguard Worker    export as_echo_n_body
66*8b26181fSAndroid Build Coastguard Worker    as_echo_n='sh -c $as_echo_n_body as_echo'
67*8b26181fSAndroid Build Coastguard Worker  fi
68*8b26181fSAndroid Build Coastguard Worker  export as_echo_body
69*8b26181fSAndroid Build Coastguard Worker  as_echo='sh -c $as_echo_body as_echo'
70*8b26181fSAndroid Build Coastguard Workerfi
71*8b26181fSAndroid Build Coastguard Worker
72*8b26181fSAndroid Build Coastguard Worker# The user is always right.
73*8b26181fSAndroid Build Coastguard Workerif test "${PATH_SEPARATOR+set}" != set; then
74*8b26181fSAndroid Build Coastguard Worker  PATH_SEPARATOR=:
75*8b26181fSAndroid Build Coastguard Worker  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76*8b26181fSAndroid Build Coastguard Worker    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77*8b26181fSAndroid Build Coastguard Worker      PATH_SEPARATOR=';'
78*8b26181fSAndroid Build Coastguard Worker  }
79*8b26181fSAndroid Build Coastguard Workerfi
80*8b26181fSAndroid Build Coastguard Worker
81*8b26181fSAndroid Build Coastguard Worker
82*8b26181fSAndroid Build Coastguard Worker# IFS
83*8b26181fSAndroid Build Coastguard Worker# We need space, tab and new line, in precisely that order.  Quoting is
84*8b26181fSAndroid Build Coastguard Worker# there to prevent editors from complaining about space-tab.
85*8b26181fSAndroid Build Coastguard Worker# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86*8b26181fSAndroid Build Coastguard Worker# splitting by setting IFS to empty value.)
87*8b26181fSAndroid Build Coastguard WorkerIFS=" ""	$as_nl"
88*8b26181fSAndroid Build Coastguard Worker
89*8b26181fSAndroid Build Coastguard Worker# Find who we are.  Look in the path if we contain no directory separator.
90*8b26181fSAndroid Build Coastguard Workeras_myself=
91*8b26181fSAndroid Build Coastguard Workercase $0 in #((
92*8b26181fSAndroid Build Coastguard Worker  *[\\/]* ) as_myself=$0 ;;
93*8b26181fSAndroid Build Coastguard Worker  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
95*8b26181fSAndroid Build Coastguard Workerdo
96*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
97*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
98*8b26181fSAndroid Build Coastguard Worker    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99*8b26181fSAndroid Build Coastguard Worker  done
100*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
101*8b26181fSAndroid Build Coastguard Worker
102*8b26181fSAndroid Build Coastguard Worker     ;;
103*8b26181fSAndroid Build Coastguard Workeresac
104*8b26181fSAndroid Build Coastguard Worker# We did not find ourselves, most probably we were run as `sh COMMAND'
105*8b26181fSAndroid Build Coastguard Worker# in which case we are not to be found in the path.
106*8b26181fSAndroid Build Coastguard Workerif test "x$as_myself" = x; then
107*8b26181fSAndroid Build Coastguard Worker  as_myself=$0
108*8b26181fSAndroid Build Coastguard Workerfi
109*8b26181fSAndroid Build Coastguard Workerif test ! -f "$as_myself"; then
110*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111*8b26181fSAndroid Build Coastguard Worker  exit 1
112*8b26181fSAndroid Build Coastguard Workerfi
113*8b26181fSAndroid Build Coastguard Worker
114*8b26181fSAndroid Build Coastguard Worker# Unset variables that we do not need and which cause bugs (e.g. in
115*8b26181fSAndroid Build Coastguard Worker# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
116*8b26181fSAndroid Build Coastguard Worker# suppresses any "Segmentation fault" message there.  '((' could
117*8b26181fSAndroid Build Coastguard Worker# trigger a bug in pdksh 5.2.14.
118*8b26181fSAndroid Build Coastguard Workerfor as_var in BASH_ENV ENV MAIL MAILPATH
119*8b26181fSAndroid Build Coastguard Workerdo eval test x\${$as_var+set} = xset \
120*8b26181fSAndroid Build Coastguard Worker  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121*8b26181fSAndroid Build Coastguard Workerdone
122*8b26181fSAndroid Build Coastguard WorkerPS1='$ '
123*8b26181fSAndroid Build Coastguard WorkerPS2='> '
124*8b26181fSAndroid Build Coastguard WorkerPS4='+ '
125*8b26181fSAndroid Build Coastguard Worker
126*8b26181fSAndroid Build Coastguard Worker# NLS nuisances.
127*8b26181fSAndroid Build Coastguard WorkerLC_ALL=C
128*8b26181fSAndroid Build Coastguard Workerexport LC_ALL
129*8b26181fSAndroid Build Coastguard WorkerLANGUAGE=C
130*8b26181fSAndroid Build Coastguard Workerexport LANGUAGE
131*8b26181fSAndroid Build Coastguard Worker
132*8b26181fSAndroid Build Coastguard Worker# CDPATH.
133*8b26181fSAndroid Build Coastguard Worker(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134*8b26181fSAndroid Build Coastguard Worker
135*8b26181fSAndroid Build Coastguard Worker# Use a proper internal environment variable to ensure we don't fall
136*8b26181fSAndroid Build Coastguard Worker  # into an infinite loop, continuously re-executing ourselves.
137*8b26181fSAndroid Build Coastguard Worker  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138*8b26181fSAndroid Build Coastguard Worker    _as_can_reexec=no; export _as_can_reexec;
139*8b26181fSAndroid Build Coastguard Worker    # We cannot yet assume a decent shell, so we have to provide a
140*8b26181fSAndroid Build Coastguard Worker# neutralization value for shells without unset; and this also
141*8b26181fSAndroid Build Coastguard Worker# works around shells that cannot unset nonexistent variables.
142*8b26181fSAndroid Build Coastguard Worker# Preserve -v and -x to the replacement shell.
143*8b26181fSAndroid Build Coastguard WorkerBASH_ENV=/dev/null
144*8b26181fSAndroid Build Coastguard WorkerENV=/dev/null
145*8b26181fSAndroid Build Coastguard Worker(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146*8b26181fSAndroid Build Coastguard Workercase $- in # ((((
147*8b26181fSAndroid Build Coastguard Worker  *v*x* | *x*v* ) as_opts=-vx ;;
148*8b26181fSAndroid Build Coastguard Worker  *v* ) as_opts=-v ;;
149*8b26181fSAndroid Build Coastguard Worker  *x* ) as_opts=-x ;;
150*8b26181fSAndroid Build Coastguard Worker  * ) as_opts= ;;
151*8b26181fSAndroid Build Coastguard Workeresac
152*8b26181fSAndroid Build Coastguard Workerexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153*8b26181fSAndroid Build Coastguard Worker# Admittedly, this is quite paranoid, since all the known shells bail
154*8b26181fSAndroid Build Coastguard Worker# out after a failed `exec'.
155*8b26181fSAndroid Build Coastguard Worker$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156*8b26181fSAndroid Build Coastguard Workeras_fn_exit 255
157*8b26181fSAndroid Build Coastguard Worker  fi
158*8b26181fSAndroid Build Coastguard Worker  # We don't want this to propagate to other subprocesses.
159*8b26181fSAndroid Build Coastguard Worker          { _as_can_reexec=; unset _as_can_reexec;}
160*8b26181fSAndroid Build Coastguard Workerif test "x$CONFIG_SHELL" = x; then
161*8b26181fSAndroid Build Coastguard Worker  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162*8b26181fSAndroid Build Coastguard Worker  emulate sh
163*8b26181fSAndroid Build Coastguard Worker  NULLCMD=:
164*8b26181fSAndroid Build Coastguard Worker  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165*8b26181fSAndroid Build Coastguard Worker  # is contrary to our usage.  Disable this feature.
166*8b26181fSAndroid Build Coastguard Worker  alias -g '\${1+\"\$@\"}'='\"\$@\"'
167*8b26181fSAndroid Build Coastguard Worker  setopt NO_GLOB_SUBST
168*8b26181fSAndroid Build Coastguard Workerelse
169*8b26181fSAndroid Build Coastguard Worker  case \`(set -o) 2>/dev/null\` in #(
170*8b26181fSAndroid Build Coastguard Worker  *posix*) :
171*8b26181fSAndroid Build Coastguard Worker    set -o posix ;; #(
172*8b26181fSAndroid Build Coastguard Worker  *) :
173*8b26181fSAndroid Build Coastguard Worker     ;;
174*8b26181fSAndroid Build Coastguard Workeresac
175*8b26181fSAndroid Build Coastguard Workerfi
176*8b26181fSAndroid Build Coastguard Worker"
177*8b26181fSAndroid Build Coastguard Worker  as_required="as_fn_return () { (exit \$1); }
178*8b26181fSAndroid Build Coastguard Workeras_fn_success () { as_fn_return 0; }
179*8b26181fSAndroid Build Coastguard Workeras_fn_failure () { as_fn_return 1; }
180*8b26181fSAndroid Build Coastguard Workeras_fn_ret_success () { return 0; }
181*8b26181fSAndroid Build Coastguard Workeras_fn_ret_failure () { return 1; }
182*8b26181fSAndroid Build Coastguard Worker
183*8b26181fSAndroid Build Coastguard Workerexitcode=0
184*8b26181fSAndroid Build Coastguard Workeras_fn_success || { exitcode=1; echo as_fn_success failed.; }
185*8b26181fSAndroid Build Coastguard Workeras_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186*8b26181fSAndroid Build Coastguard Workeras_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187*8b26181fSAndroid Build Coastguard Workeras_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188*8b26181fSAndroid Build Coastguard Workerif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189*8b26181fSAndroid Build Coastguard Worker
190*8b26181fSAndroid Build Coastguard Workerelse
191*8b26181fSAndroid Build Coastguard Worker  exitcode=1; echo positional parameters were not saved.
192*8b26181fSAndroid Build Coastguard Workerfi
193*8b26181fSAndroid Build Coastguard Workertest x\$exitcode = x0 || exit 1
194*8b26181fSAndroid Build Coastguard Workertest -x / || exit 1"
195*8b26181fSAndroid Build Coastguard Worker  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196*8b26181fSAndroid Build Coastguard Worker  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197*8b26181fSAndroid Build Coastguard Worker  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198*8b26181fSAndroid Build Coastguard Worker  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199*8b26181fSAndroid Build Coastguard Workertest \$(( 1 + 1 )) = 2 || exit 1"
200*8b26181fSAndroid Build Coastguard Worker  if (eval "$as_required") 2>/dev/null; then :
201*8b26181fSAndroid Build Coastguard Worker  as_have_required=yes
202*8b26181fSAndroid Build Coastguard Workerelse
203*8b26181fSAndroid Build Coastguard Worker  as_have_required=no
204*8b26181fSAndroid Build Coastguard Workerfi
205*8b26181fSAndroid Build Coastguard Worker  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206*8b26181fSAndroid Build Coastguard Worker
207*8b26181fSAndroid Build Coastguard Workerelse
208*8b26181fSAndroid Build Coastguard Worker  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209*8b26181fSAndroid Build Coastguard Workeras_found=false
210*8b26181fSAndroid Build Coastguard Workerfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211*8b26181fSAndroid Build Coastguard Workerdo
212*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
213*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
214*8b26181fSAndroid Build Coastguard Worker  as_found=:
215*8b26181fSAndroid Build Coastguard Worker  case $as_dir in #(
216*8b26181fSAndroid Build Coastguard Worker	 /*)
217*8b26181fSAndroid Build Coastguard Worker	   for as_base in sh bash ksh sh5; do
218*8b26181fSAndroid Build Coastguard Worker	     # Try only shells that exist, to save several forks.
219*8b26181fSAndroid Build Coastguard Worker	     as_shell=$as_dir/$as_base
220*8b26181fSAndroid Build Coastguard Worker	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222*8b26181fSAndroid Build Coastguard Worker  CONFIG_SHELL=$as_shell as_have_required=yes
223*8b26181fSAndroid Build Coastguard Worker		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224*8b26181fSAndroid Build Coastguard Worker  break 2
225*8b26181fSAndroid Build Coastguard Workerfi
226*8b26181fSAndroid Build Coastguard Workerfi
227*8b26181fSAndroid Build Coastguard Worker	   done;;
228*8b26181fSAndroid Build Coastguard Worker       esac
229*8b26181fSAndroid Build Coastguard Worker  as_found=false
230*8b26181fSAndroid Build Coastguard Workerdone
231*8b26181fSAndroid Build Coastguard Worker$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232*8b26181fSAndroid Build Coastguard Worker	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233*8b26181fSAndroid Build Coastguard Worker  CONFIG_SHELL=$SHELL as_have_required=yes
234*8b26181fSAndroid Build Coastguard Workerfi; }
235*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
236*8b26181fSAndroid Build Coastguard Worker
237*8b26181fSAndroid Build Coastguard Worker
238*8b26181fSAndroid Build Coastguard Worker      if test "x$CONFIG_SHELL" != x; then :
239*8b26181fSAndroid Build Coastguard Worker  export CONFIG_SHELL
240*8b26181fSAndroid Build Coastguard Worker             # We cannot yet assume a decent shell, so we have to provide a
241*8b26181fSAndroid Build Coastguard Worker# neutralization value for shells without unset; and this also
242*8b26181fSAndroid Build Coastguard Worker# works around shells that cannot unset nonexistent variables.
243*8b26181fSAndroid Build Coastguard Worker# Preserve -v and -x to the replacement shell.
244*8b26181fSAndroid Build Coastguard WorkerBASH_ENV=/dev/null
245*8b26181fSAndroid Build Coastguard WorkerENV=/dev/null
246*8b26181fSAndroid Build Coastguard Worker(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247*8b26181fSAndroid Build Coastguard Workercase $- in # ((((
248*8b26181fSAndroid Build Coastguard Worker  *v*x* | *x*v* ) as_opts=-vx ;;
249*8b26181fSAndroid Build Coastguard Worker  *v* ) as_opts=-v ;;
250*8b26181fSAndroid Build Coastguard Worker  *x* ) as_opts=-x ;;
251*8b26181fSAndroid Build Coastguard Worker  * ) as_opts= ;;
252*8b26181fSAndroid Build Coastguard Workeresac
253*8b26181fSAndroid Build Coastguard Workerexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254*8b26181fSAndroid Build Coastguard Worker# Admittedly, this is quite paranoid, since all the known shells bail
255*8b26181fSAndroid Build Coastguard Worker# out after a failed `exec'.
256*8b26181fSAndroid Build Coastguard Worker$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257*8b26181fSAndroid Build Coastguard Workerexit 255
258*8b26181fSAndroid Build Coastguard Workerfi
259*8b26181fSAndroid Build Coastguard Worker
260*8b26181fSAndroid Build Coastguard Worker    if test x$as_have_required = xno; then :
261*8b26181fSAndroid Build Coastguard Worker  $as_echo "$0: This script requires a shell more modern than all"
262*8b26181fSAndroid Build Coastguard Worker  $as_echo "$0: the shells that I found on your system."
263*8b26181fSAndroid Build Coastguard Worker  if test x${ZSH_VERSION+set} = xset ; then
264*8b26181fSAndroid Build Coastguard Worker    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265*8b26181fSAndroid Build Coastguard Worker    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266*8b26181fSAndroid Build Coastguard Worker  else
267*8b26181fSAndroid Build Coastguard Worker    $as_echo "$0: Please tell [email protected] about your system,
268*8b26181fSAndroid Build Coastguard Worker$0: including any error possibly output before this
269*8b26181fSAndroid Build Coastguard Worker$0: message. Then install a modern shell, or manually run
270*8b26181fSAndroid Build Coastguard Worker$0: the script under such a shell if you do have one."
271*8b26181fSAndroid Build Coastguard Worker  fi
272*8b26181fSAndroid Build Coastguard Worker  exit 1
273*8b26181fSAndroid Build Coastguard Workerfi
274*8b26181fSAndroid Build Coastguard Workerfi
275*8b26181fSAndroid Build Coastguard Workerfi
276*8b26181fSAndroid Build Coastguard WorkerSHELL=${CONFIG_SHELL-/bin/sh}
277*8b26181fSAndroid Build Coastguard Workerexport SHELL
278*8b26181fSAndroid Build Coastguard Worker# Unset more variables known to interfere with behavior of common tools.
279*8b26181fSAndroid Build Coastguard WorkerCLICOLOR_FORCE= GREP_OPTIONS=
280*8b26181fSAndroid Build Coastguard Workerunset CLICOLOR_FORCE GREP_OPTIONS
281*8b26181fSAndroid Build Coastguard Worker
282*8b26181fSAndroid Build Coastguard Worker## --------------------- ##
283*8b26181fSAndroid Build Coastguard Worker## M4sh Shell Functions. ##
284*8b26181fSAndroid Build Coastguard Worker## --------------------- ##
285*8b26181fSAndroid Build Coastguard Worker# as_fn_unset VAR
286*8b26181fSAndroid Build Coastguard Worker# ---------------
287*8b26181fSAndroid Build Coastguard Worker# Portably unset VAR.
288*8b26181fSAndroid Build Coastguard Workeras_fn_unset ()
289*8b26181fSAndroid Build Coastguard Worker{
290*8b26181fSAndroid Build Coastguard Worker  { eval $1=; unset $1;}
291*8b26181fSAndroid Build Coastguard Worker}
292*8b26181fSAndroid Build Coastguard Workeras_unset=as_fn_unset
293*8b26181fSAndroid Build Coastguard Worker
294*8b26181fSAndroid Build Coastguard Worker# as_fn_set_status STATUS
295*8b26181fSAndroid Build Coastguard Worker# -----------------------
296*8b26181fSAndroid Build Coastguard Worker# Set $? to STATUS, without forking.
297*8b26181fSAndroid Build Coastguard Workeras_fn_set_status ()
298*8b26181fSAndroid Build Coastguard Worker{
299*8b26181fSAndroid Build Coastguard Worker  return $1
300*8b26181fSAndroid Build Coastguard Worker} # as_fn_set_status
301*8b26181fSAndroid Build Coastguard Worker
302*8b26181fSAndroid Build Coastguard Worker# as_fn_exit STATUS
303*8b26181fSAndroid Build Coastguard Worker# -----------------
304*8b26181fSAndroid Build Coastguard Worker# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305*8b26181fSAndroid Build Coastguard Workeras_fn_exit ()
306*8b26181fSAndroid Build Coastguard Worker{
307*8b26181fSAndroid Build Coastguard Worker  set +e
308*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $1
309*8b26181fSAndroid Build Coastguard Worker  exit $1
310*8b26181fSAndroid Build Coastguard Worker} # as_fn_exit
311*8b26181fSAndroid Build Coastguard Worker
312*8b26181fSAndroid Build Coastguard Worker# as_fn_mkdir_p
313*8b26181fSAndroid Build Coastguard Worker# -------------
314*8b26181fSAndroid Build Coastguard Worker# Create "$as_dir" as a directory, including parents if necessary.
315*8b26181fSAndroid Build Coastguard Workeras_fn_mkdir_p ()
316*8b26181fSAndroid Build Coastguard Worker{
317*8b26181fSAndroid Build Coastguard Worker
318*8b26181fSAndroid Build Coastguard Worker  case $as_dir in #(
319*8b26181fSAndroid Build Coastguard Worker  -*) as_dir=./$as_dir;;
320*8b26181fSAndroid Build Coastguard Worker  esac
321*8b26181fSAndroid Build Coastguard Worker  test -d "$as_dir" || eval $as_mkdir_p || {
322*8b26181fSAndroid Build Coastguard Worker    as_dirs=
323*8b26181fSAndroid Build Coastguard Worker    while :; do
324*8b26181fSAndroid Build Coastguard Worker      case $as_dir in #(
325*8b26181fSAndroid Build Coastguard Worker      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326*8b26181fSAndroid Build Coastguard Worker      *) as_qdir=$as_dir;;
327*8b26181fSAndroid Build Coastguard Worker      esac
328*8b26181fSAndroid Build Coastguard Worker      as_dirs="'$as_qdir' $as_dirs"
329*8b26181fSAndroid Build Coastguard Worker      as_dir=`$as_dirname -- "$as_dir" ||
330*8b26181fSAndroid Build Coastguard Worker$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331*8b26181fSAndroid Build Coastguard Worker	 X"$as_dir" : 'X\(//\)[^/]' \| \
332*8b26181fSAndroid Build Coastguard Worker	 X"$as_dir" : 'X\(//\)$' \| \
333*8b26181fSAndroid Build Coastguard Worker	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334*8b26181fSAndroid Build Coastguard Worker$as_echo X"$as_dir" |
335*8b26181fSAndroid Build Coastguard Worker    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336*8b26181fSAndroid Build Coastguard Worker	    s//\1/
337*8b26181fSAndroid Build Coastguard Worker	    q
338*8b26181fSAndroid Build Coastguard Worker	  }
339*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)[^/].*/{
340*8b26181fSAndroid Build Coastguard Worker	    s//\1/
341*8b26181fSAndroid Build Coastguard Worker	    q
342*8b26181fSAndroid Build Coastguard Worker	  }
343*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)$/{
344*8b26181fSAndroid Build Coastguard Worker	    s//\1/
345*8b26181fSAndroid Build Coastguard Worker	    q
346*8b26181fSAndroid Build Coastguard Worker	  }
347*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\).*/{
348*8b26181fSAndroid Build Coastguard Worker	    s//\1/
349*8b26181fSAndroid Build Coastguard Worker	    q
350*8b26181fSAndroid Build Coastguard Worker	  }
351*8b26181fSAndroid Build Coastguard Worker	  s/.*/./; q'`
352*8b26181fSAndroid Build Coastguard Worker      test -d "$as_dir" && break
353*8b26181fSAndroid Build Coastguard Worker    done
354*8b26181fSAndroid Build Coastguard Worker    test -z "$as_dirs" || eval "mkdir $as_dirs"
355*8b26181fSAndroid Build Coastguard Worker  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356*8b26181fSAndroid Build Coastguard Worker
357*8b26181fSAndroid Build Coastguard Worker
358*8b26181fSAndroid Build Coastguard Worker} # as_fn_mkdir_p
359*8b26181fSAndroid Build Coastguard Worker
360*8b26181fSAndroid Build Coastguard Worker# as_fn_executable_p FILE
361*8b26181fSAndroid Build Coastguard Worker# -----------------------
362*8b26181fSAndroid Build Coastguard Worker# Test if FILE is an executable regular file.
363*8b26181fSAndroid Build Coastguard Workeras_fn_executable_p ()
364*8b26181fSAndroid Build Coastguard Worker{
365*8b26181fSAndroid Build Coastguard Worker  test -f "$1" && test -x "$1"
366*8b26181fSAndroid Build Coastguard Worker} # as_fn_executable_p
367*8b26181fSAndroid Build Coastguard Worker# as_fn_append VAR VALUE
368*8b26181fSAndroid Build Coastguard Worker# ----------------------
369*8b26181fSAndroid Build Coastguard Worker# Append the text in VALUE to the end of the definition contained in VAR. Take
370*8b26181fSAndroid Build Coastguard Worker# advantage of any shell optimizations that allow amortized linear growth over
371*8b26181fSAndroid Build Coastguard Worker# repeated appends, instead of the typical quadratic growth present in naive
372*8b26181fSAndroid Build Coastguard Worker# implementations.
373*8b26181fSAndroid Build Coastguard Workerif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374*8b26181fSAndroid Build Coastguard Worker  eval 'as_fn_append ()
375*8b26181fSAndroid Build Coastguard Worker  {
376*8b26181fSAndroid Build Coastguard Worker    eval $1+=\$2
377*8b26181fSAndroid Build Coastguard Worker  }'
378*8b26181fSAndroid Build Coastguard Workerelse
379*8b26181fSAndroid Build Coastguard Worker  as_fn_append ()
380*8b26181fSAndroid Build Coastguard Worker  {
381*8b26181fSAndroid Build Coastguard Worker    eval $1=\$$1\$2
382*8b26181fSAndroid Build Coastguard Worker  }
383*8b26181fSAndroid Build Coastguard Workerfi # as_fn_append
384*8b26181fSAndroid Build Coastguard Worker
385*8b26181fSAndroid Build Coastguard Worker# as_fn_arith ARG...
386*8b26181fSAndroid Build Coastguard Worker# ------------------
387*8b26181fSAndroid Build Coastguard Worker# Perform arithmetic evaluation on the ARGs, and store the result in the
388*8b26181fSAndroid Build Coastguard Worker# global $as_val. Take advantage of shells that can avoid forks. The arguments
389*8b26181fSAndroid Build Coastguard Worker# must be portable across $(()) and expr.
390*8b26181fSAndroid Build Coastguard Workerif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391*8b26181fSAndroid Build Coastguard Worker  eval 'as_fn_arith ()
392*8b26181fSAndroid Build Coastguard Worker  {
393*8b26181fSAndroid Build Coastguard Worker    as_val=$(( $* ))
394*8b26181fSAndroid Build Coastguard Worker  }'
395*8b26181fSAndroid Build Coastguard Workerelse
396*8b26181fSAndroid Build Coastguard Worker  as_fn_arith ()
397*8b26181fSAndroid Build Coastguard Worker  {
398*8b26181fSAndroid Build Coastguard Worker    as_val=`expr "$@" || test $? -eq 1`
399*8b26181fSAndroid Build Coastguard Worker  }
400*8b26181fSAndroid Build Coastguard Workerfi # as_fn_arith
401*8b26181fSAndroid Build Coastguard Worker
402*8b26181fSAndroid Build Coastguard Worker
403*8b26181fSAndroid Build Coastguard Worker# as_fn_error STATUS ERROR [LINENO LOG_FD]
404*8b26181fSAndroid Build Coastguard Worker# ----------------------------------------
405*8b26181fSAndroid Build Coastguard Worker# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406*8b26181fSAndroid Build Coastguard Worker# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407*8b26181fSAndroid Build Coastguard Worker# script with STATUS, using 1 if that was 0.
408*8b26181fSAndroid Build Coastguard Workeras_fn_error ()
409*8b26181fSAndroid Build Coastguard Worker{
410*8b26181fSAndroid Build Coastguard Worker  as_status=$1; test $as_status -eq 0 && as_status=1
411*8b26181fSAndroid Build Coastguard Worker  if test "$4"; then
412*8b26181fSAndroid Build Coastguard Worker    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414*8b26181fSAndroid Build Coastguard Worker  fi
415*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: error: $2" >&2
416*8b26181fSAndroid Build Coastguard Worker  as_fn_exit $as_status
417*8b26181fSAndroid Build Coastguard Worker} # as_fn_error
418*8b26181fSAndroid Build Coastguard Worker
419*8b26181fSAndroid Build Coastguard Workerif expr a : '\(a\)' >/dev/null 2>&1 &&
420*8b26181fSAndroid Build Coastguard Worker   test "X`expr 00001 : '.*\(...\)'`" = X001; then
421*8b26181fSAndroid Build Coastguard Worker  as_expr=expr
422*8b26181fSAndroid Build Coastguard Workerelse
423*8b26181fSAndroid Build Coastguard Worker  as_expr=false
424*8b26181fSAndroid Build Coastguard Workerfi
425*8b26181fSAndroid Build Coastguard Worker
426*8b26181fSAndroid Build Coastguard Workerif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427*8b26181fSAndroid Build Coastguard Worker  as_basename=basename
428*8b26181fSAndroid Build Coastguard Workerelse
429*8b26181fSAndroid Build Coastguard Worker  as_basename=false
430*8b26181fSAndroid Build Coastguard Workerfi
431*8b26181fSAndroid Build Coastguard Worker
432*8b26181fSAndroid Build Coastguard Workerif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433*8b26181fSAndroid Build Coastguard Worker  as_dirname=dirname
434*8b26181fSAndroid Build Coastguard Workerelse
435*8b26181fSAndroid Build Coastguard Worker  as_dirname=false
436*8b26181fSAndroid Build Coastguard Workerfi
437*8b26181fSAndroid Build Coastguard Worker
438*8b26181fSAndroid Build Coastguard Workeras_me=`$as_basename -- "$0" ||
439*8b26181fSAndroid Build Coastguard Worker$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440*8b26181fSAndroid Build Coastguard Worker	 X"$0" : 'X\(//\)$' \| \
441*8b26181fSAndroid Build Coastguard Worker	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
442*8b26181fSAndroid Build Coastguard Worker$as_echo X/"$0" |
443*8b26181fSAndroid Build Coastguard Worker    sed '/^.*\/\([^/][^/]*\)\/*$/{
444*8b26181fSAndroid Build Coastguard Worker	    s//\1/
445*8b26181fSAndroid Build Coastguard Worker	    q
446*8b26181fSAndroid Build Coastguard Worker	  }
447*8b26181fSAndroid Build Coastguard Worker	  /^X\/\(\/\/\)$/{
448*8b26181fSAndroid Build Coastguard Worker	    s//\1/
449*8b26181fSAndroid Build Coastguard Worker	    q
450*8b26181fSAndroid Build Coastguard Worker	  }
451*8b26181fSAndroid Build Coastguard Worker	  /^X\/\(\/\).*/{
452*8b26181fSAndroid Build Coastguard Worker	    s//\1/
453*8b26181fSAndroid Build Coastguard Worker	    q
454*8b26181fSAndroid Build Coastguard Worker	  }
455*8b26181fSAndroid Build Coastguard Worker	  s/.*/./; q'`
456*8b26181fSAndroid Build Coastguard Worker
457*8b26181fSAndroid Build Coastguard Worker# Avoid depending upon Character Ranges.
458*8b26181fSAndroid Build Coastguard Workeras_cr_letters='abcdefghijklmnopqrstuvwxyz'
459*8b26181fSAndroid Build Coastguard Workeras_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460*8b26181fSAndroid Build Coastguard Workeras_cr_Letters=$as_cr_letters$as_cr_LETTERS
461*8b26181fSAndroid Build Coastguard Workeras_cr_digits='0123456789'
462*8b26181fSAndroid Build Coastguard Workeras_cr_alnum=$as_cr_Letters$as_cr_digits
463*8b26181fSAndroid Build Coastguard Worker
464*8b26181fSAndroid Build Coastguard Worker
465*8b26181fSAndroid Build Coastguard Worker  as_lineno_1=$LINENO as_lineno_1a=$LINENO
466*8b26181fSAndroid Build Coastguard Worker  as_lineno_2=$LINENO as_lineno_2a=$LINENO
467*8b26181fSAndroid Build Coastguard Worker  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468*8b26181fSAndroid Build Coastguard Worker  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469*8b26181fSAndroid Build Coastguard Worker  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
470*8b26181fSAndroid Build Coastguard Worker  sed -n '
471*8b26181fSAndroid Build Coastguard Worker    p
472*8b26181fSAndroid Build Coastguard Worker    /[$]LINENO/=
473*8b26181fSAndroid Build Coastguard Worker  ' <$as_myself |
474*8b26181fSAndroid Build Coastguard Worker    sed '
475*8b26181fSAndroid Build Coastguard Worker      s/[$]LINENO.*/&-/
476*8b26181fSAndroid Build Coastguard Worker      t lineno
477*8b26181fSAndroid Build Coastguard Worker      b
478*8b26181fSAndroid Build Coastguard Worker      :lineno
479*8b26181fSAndroid Build Coastguard Worker      N
480*8b26181fSAndroid Build Coastguard Worker      :loop
481*8b26181fSAndroid Build Coastguard Worker      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482*8b26181fSAndroid Build Coastguard Worker      t loop
483*8b26181fSAndroid Build Coastguard Worker      s/-\n.*//
484*8b26181fSAndroid Build Coastguard Worker    ' >$as_me.lineno &&
485*8b26181fSAndroid Build Coastguard Worker  chmod +x "$as_me.lineno" ||
486*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487*8b26181fSAndroid Build Coastguard Worker
488*8b26181fSAndroid Build Coastguard Worker  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489*8b26181fSAndroid Build Coastguard Worker  # already done that, so ensure we don't try to do so again and fall
490*8b26181fSAndroid Build Coastguard Worker  # in an infinite loop.  This has already happened in practice.
491*8b26181fSAndroid Build Coastguard Worker  _as_can_reexec=no; export _as_can_reexec
492*8b26181fSAndroid Build Coastguard Worker  # Don't try to exec as it changes $[0], causing all sort of problems
493*8b26181fSAndroid Build Coastguard Worker  # (the dirname of $[0] is not the place where we might find the
494*8b26181fSAndroid Build Coastguard Worker  # original and so on.  Autoconf is especially sensitive to this).
495*8b26181fSAndroid Build Coastguard Worker  . "./$as_me.lineno"
496*8b26181fSAndroid Build Coastguard Worker  # Exit status is that of the last command.
497*8b26181fSAndroid Build Coastguard Worker  exit
498*8b26181fSAndroid Build Coastguard Worker}
499*8b26181fSAndroid Build Coastguard Worker
500*8b26181fSAndroid Build Coastguard WorkerECHO_C= ECHO_N= ECHO_T=
501*8b26181fSAndroid Build Coastguard Workercase `echo -n x` in #(((((
502*8b26181fSAndroid Build Coastguard Worker-n*)
503*8b26181fSAndroid Build Coastguard Worker  case `echo 'xy\c'` in
504*8b26181fSAndroid Build Coastguard Worker  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
505*8b26181fSAndroid Build Coastguard Worker  xy)  ECHO_C='\c';;
506*8b26181fSAndroid Build Coastguard Worker  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
507*8b26181fSAndroid Build Coastguard Worker       ECHO_T='	';;
508*8b26181fSAndroid Build Coastguard Worker  esac;;
509*8b26181fSAndroid Build Coastguard Worker*)
510*8b26181fSAndroid Build Coastguard Worker  ECHO_N='-n';;
511*8b26181fSAndroid Build Coastguard Workeresac
512*8b26181fSAndroid Build Coastguard Worker
513*8b26181fSAndroid Build Coastguard Workerrm -f conf$$ conf$$.exe conf$$.file
514*8b26181fSAndroid Build Coastguard Workerif test -d conf$$.dir; then
515*8b26181fSAndroid Build Coastguard Worker  rm -f conf$$.dir/conf$$.file
516*8b26181fSAndroid Build Coastguard Workerelse
517*8b26181fSAndroid Build Coastguard Worker  rm -f conf$$.dir
518*8b26181fSAndroid Build Coastguard Worker  mkdir conf$$.dir 2>/dev/null
519*8b26181fSAndroid Build Coastguard Workerfi
520*8b26181fSAndroid Build Coastguard Workerif (echo >conf$$.file) 2>/dev/null; then
521*8b26181fSAndroid Build Coastguard Worker  if ln -s conf$$.file conf$$ 2>/dev/null; then
522*8b26181fSAndroid Build Coastguard Worker    as_ln_s='ln -s'
523*8b26181fSAndroid Build Coastguard Worker    # ... but there are two gotchas:
524*8b26181fSAndroid Build Coastguard Worker    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525*8b26181fSAndroid Build Coastguard Worker    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526*8b26181fSAndroid Build Coastguard Worker    # In both cases, we have to default to `cp -pR'.
527*8b26181fSAndroid Build Coastguard Worker    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528*8b26181fSAndroid Build Coastguard Worker      as_ln_s='cp -pR'
529*8b26181fSAndroid Build Coastguard Worker  elif ln conf$$.file conf$$ 2>/dev/null; then
530*8b26181fSAndroid Build Coastguard Worker    as_ln_s=ln
531*8b26181fSAndroid Build Coastguard Worker  else
532*8b26181fSAndroid Build Coastguard Worker    as_ln_s='cp -pR'
533*8b26181fSAndroid Build Coastguard Worker  fi
534*8b26181fSAndroid Build Coastguard Workerelse
535*8b26181fSAndroid Build Coastguard Worker  as_ln_s='cp -pR'
536*8b26181fSAndroid Build Coastguard Workerfi
537*8b26181fSAndroid Build Coastguard Workerrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538*8b26181fSAndroid Build Coastguard Workerrmdir conf$$.dir 2>/dev/null
539*8b26181fSAndroid Build Coastguard Worker
540*8b26181fSAndroid Build Coastguard Workerif mkdir -p . 2>/dev/null; then
541*8b26181fSAndroid Build Coastguard Worker  as_mkdir_p='mkdir -p "$as_dir"'
542*8b26181fSAndroid Build Coastguard Workerelse
543*8b26181fSAndroid Build Coastguard Worker  test -d ./-p && rmdir ./-p
544*8b26181fSAndroid Build Coastguard Worker  as_mkdir_p=false
545*8b26181fSAndroid Build Coastguard Workerfi
546*8b26181fSAndroid Build Coastguard Worker
547*8b26181fSAndroid Build Coastguard Workeras_test_x='test -x'
548*8b26181fSAndroid Build Coastguard Workeras_executable_p=as_fn_executable_p
549*8b26181fSAndroid Build Coastguard Worker
550*8b26181fSAndroid Build Coastguard Worker# Sed expression to map a string onto a valid CPP name.
551*8b26181fSAndroid Build Coastguard Workeras_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552*8b26181fSAndroid Build Coastguard Worker
553*8b26181fSAndroid Build Coastguard Worker# Sed expression to map a string onto a valid variable name.
554*8b26181fSAndroid Build Coastguard Workeras_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555*8b26181fSAndroid Build Coastguard Worker
556*8b26181fSAndroid Build Coastguard Worker
557*8b26181fSAndroid Build Coastguard Workertest -n "$DJDIR" || exec 7<&0 </dev/null
558*8b26181fSAndroid Build Coastguard Workerexec 6>&1
559*8b26181fSAndroid Build Coastguard Worker
560*8b26181fSAndroid Build Coastguard Worker# Name of the host.
561*8b26181fSAndroid Build Coastguard Worker# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562*8b26181fSAndroid Build Coastguard Worker# so uname gets run too.
563*8b26181fSAndroid Build Coastguard Workerac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564*8b26181fSAndroid Build Coastguard Worker
565*8b26181fSAndroid Build Coastguard Worker#
566*8b26181fSAndroid Build Coastguard Worker# Initializations.
567*8b26181fSAndroid Build Coastguard Worker#
568*8b26181fSAndroid Build Coastguard Workerac_default_prefix=/usr/local
569*8b26181fSAndroid Build Coastguard Workerac_clean_files=
570*8b26181fSAndroid Build Coastguard Workerac_config_libobj_dir=.
571*8b26181fSAndroid Build Coastguard WorkerLIBOBJS=
572*8b26181fSAndroid Build Coastguard Workercross_compiling=no
573*8b26181fSAndroid Build Coastguard Workersubdirs=
574*8b26181fSAndroid Build Coastguard WorkerMFLAGS=
575*8b26181fSAndroid Build Coastguard WorkerMAKEFLAGS=
576*8b26181fSAndroid Build Coastguard Worker
577*8b26181fSAndroid Build Coastguard Worker# Identity of this package.
578*8b26181fSAndroid Build Coastguard WorkerPACKAGE_NAME='pcap'
579*8b26181fSAndroid Build Coastguard WorkerPACKAGE_TARNAME='pcap'
580*8b26181fSAndroid Build Coastguard WorkerPACKAGE_VERSION='1.10.4'
581*8b26181fSAndroid Build Coastguard WorkerPACKAGE_STRING='pcap 1.10.4'
582*8b26181fSAndroid Build Coastguard WorkerPACKAGE_BUGREPORT=''
583*8b26181fSAndroid Build Coastguard WorkerPACKAGE_URL=''
584*8b26181fSAndroid Build Coastguard Worker
585*8b26181fSAndroid Build Coastguard Workerac_unique_file="pcap.c"
586*8b26181fSAndroid Build Coastguard Worker# Factoring default headers for most tests.
587*8b26181fSAndroid Build Coastguard Workerac_includes_default="\
588*8b26181fSAndroid Build Coastguard Worker#include <stdio.h>
589*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_SYS_TYPES_H
590*8b26181fSAndroid Build Coastguard Worker# include <sys/types.h>
591*8b26181fSAndroid Build Coastguard Worker#endif
592*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_SYS_STAT_H
593*8b26181fSAndroid Build Coastguard Worker# include <sys/stat.h>
594*8b26181fSAndroid Build Coastguard Worker#endif
595*8b26181fSAndroid Build Coastguard Worker#ifdef STDC_HEADERS
596*8b26181fSAndroid Build Coastguard Worker# include <stdlib.h>
597*8b26181fSAndroid Build Coastguard Worker# include <stddef.h>
598*8b26181fSAndroid Build Coastguard Worker#else
599*8b26181fSAndroid Build Coastguard Worker# ifdef HAVE_STDLIB_H
600*8b26181fSAndroid Build Coastguard Worker#  include <stdlib.h>
601*8b26181fSAndroid Build Coastguard Worker# endif
602*8b26181fSAndroid Build Coastguard Worker#endif
603*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_STRING_H
604*8b26181fSAndroid Build Coastguard Worker# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605*8b26181fSAndroid Build Coastguard Worker#  include <memory.h>
606*8b26181fSAndroid Build Coastguard Worker# endif
607*8b26181fSAndroid Build Coastguard Worker# include <string.h>
608*8b26181fSAndroid Build Coastguard Worker#endif
609*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_STRINGS_H
610*8b26181fSAndroid Build Coastguard Worker# include <strings.h>
611*8b26181fSAndroid Build Coastguard Worker#endif
612*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_INTTYPES_H
613*8b26181fSAndroid Build Coastguard Worker# include <inttypes.h>
614*8b26181fSAndroid Build Coastguard Worker#endif
615*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_STDINT_H
616*8b26181fSAndroid Build Coastguard Worker# include <stdint.h>
617*8b26181fSAndroid Build Coastguard Worker#endif
618*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_UNISTD_H
619*8b26181fSAndroid Build Coastguard Worker# include <unistd.h>
620*8b26181fSAndroid Build Coastguard Worker#endif"
621*8b26181fSAndroid Build Coastguard Worker
622*8b26181fSAndroid Build Coastguard Workerac_subst_vars='LTLIBOBJS
623*8b26181fSAndroid Build Coastguard WorkerRPCAPD_LIBS
624*8b26181fSAndroid Build Coastguard WorkerINSTALL_RPCAPD
625*8b26181fSAndroid Build Coastguard WorkerBUILD_RPCAPD
626*8b26181fSAndroid Build Coastguard WorkerPTHREAD_LIBS
627*8b26181fSAndroid Build Coastguard WorkerREMOTE_C_SRC
628*8b26181fSAndroid Build Coastguard WorkerMODULE_C_SRC
629*8b26181fSAndroid Build Coastguard WorkerPLATFORM_CXX_SRC
630*8b26181fSAndroid Build Coastguard WorkerPLATFORM_C_SRC
631*8b26181fSAndroid Build Coastguard WorkerADDLARCHIVEOBJS
632*8b26181fSAndroid Build Coastguard WorkerADDLOBJS
633*8b26181fSAndroid Build Coastguard WorkerRPATH
634*8b26181fSAndroid Build Coastguard WorkerV_SONAME_OPT
635*8b26181fSAndroid Build Coastguard WorkerV_SHLIB_OPT
636*8b26181fSAndroid Build Coastguard WorkerV_SHLIB_CMD
637*8b26181fSAndroid Build Coastguard WorkerV_SHLIB_CCOPT
638*8b26181fSAndroid Build Coastguard WorkerINSTALL_DATA
639*8b26181fSAndroid Build Coastguard WorkerINSTALL_SCRIPT
640*8b26181fSAndroid Build Coastguard WorkerINSTALL_PROGRAM
641*8b26181fSAndroid Build Coastguard WorkerPCAP_SUPPORT_RDMASNIFF
642*8b26181fSAndroid Build Coastguard WorkerLIBIBVERBS_LIBS_STATIC
643*8b26181fSAndroid Build Coastguard WorkerLIBIBVERBS_LIBS
644*8b26181fSAndroid Build Coastguard WorkerLIBIBVERBS_CFLAGS
645*8b26181fSAndroid Build Coastguard WorkerPCAP_SUPPORT_DBUS
646*8b26181fSAndroid Build Coastguard WorkerDBUS_LIBS_STATIC
647*8b26181fSAndroid Build Coastguard WorkerDBUS_LIBS
648*8b26181fSAndroid Build Coastguard WorkerDBUS_CFLAGS
649*8b26181fSAndroid Build Coastguard WorkerPCAP_SUPPORT_BT
650*8b26181fSAndroid Build Coastguard WorkerPCAP_SUPPORT_DPDK
651*8b26181fSAndroid Build Coastguard WorkerDPDK_LIBS_STATIC
652*8b26181fSAndroid Build Coastguard WorkerDPDK_LIBS
653*8b26181fSAndroid Build Coastguard WorkerDPDK_CFLAGS
654*8b26181fSAndroid Build Coastguard WorkerPCAP_SUPPORT_NETMAP
655*8b26181fSAndroid Build Coastguard WorkerPCAP_SUPPORT_NETFILTER
656*8b26181fSAndroid Build Coastguard WorkerPCAP_SUPPORT_LINUX_USBMON
657*8b26181fSAndroid Build Coastguard WorkerMKDEP
658*8b26181fSAndroid Build Coastguard WorkerDEPENDENCY_CFLAG
659*8b26181fSAndroid Build Coastguard WorkerLN_S
660*8b26181fSAndroid Build Coastguard WorkerAR
661*8b26181fSAndroid Build Coastguard WorkerRANLIB
662*8b26181fSAndroid Build Coastguard WorkerMAN_ADMIN_COMMANDS
663*8b26181fSAndroid Build Coastguard WorkerMAN_MISC_INFO
664*8b26181fSAndroid Build Coastguard WorkerMAN_FILE_FORMATS
665*8b26181fSAndroid Build Coastguard WorkerMAN_DEVICES
666*8b26181fSAndroid Build Coastguard WorkerDYEXT
667*8b26181fSAndroid Build Coastguard WorkerV_PROG_LDFLAGS_FAT
668*8b26181fSAndroid Build Coastguard WorkerV_PROG_CCOPT_FAT
669*8b26181fSAndroid Build Coastguard WorkerV_LIB_LDFLAGS_FAT
670*8b26181fSAndroid Build Coastguard WorkerV_LIB_CCOPT_FAT
671*8b26181fSAndroid Build Coastguard WorkerREENTRANT_PARSER
672*8b26181fSAndroid Build Coastguard WorkerBISON_BYACC
673*8b26181fSAndroid Build Coastguard WorkerLEXLIB
674*8b26181fSAndroid Build Coastguard WorkerLEX_OUTPUT_ROOT
675*8b26181fSAndroid Build Coastguard WorkerLEX
676*8b26181fSAndroid Build Coastguard WorkerOPENSSL_LIBS_STATIC
677*8b26181fSAndroid Build Coastguard WorkerOPENSSL_LIBS
678*8b26181fSAndroid Build Coastguard WorkerOPENSSL_CFLAGS
679*8b26181fSAndroid Build Coastguard WorkerLIBNL_LIBS_STATIC
680*8b26181fSAndroid Build Coastguard WorkerLIBNL_LIBS
681*8b26181fSAndroid Build Coastguard WorkerLIBNL_CFLAGS
682*8b26181fSAndroid Build Coastguard WorkerBREW
683*8b26181fSAndroid Build Coastguard WorkerPKG_CONFIG_LIBDIR
684*8b26181fSAndroid Build Coastguard WorkerPKG_CONFIG_PATH
685*8b26181fSAndroid Build Coastguard WorkerPKG_CONFIG
686*8b26181fSAndroid Build Coastguard WorkerVALGRINDTEST_SRC
687*8b26181fSAndroid Build Coastguard WorkerLIBOBJS
688*8b26181fSAndroid Build Coastguard Workerac_ct_CXX
689*8b26181fSAndroid Build Coastguard WorkerCXXFLAGS
690*8b26181fSAndroid Build Coastguard WorkerCXX
691*8b26181fSAndroid Build Coastguard WorkerEGREP
692*8b26181fSAndroid Build Coastguard WorkerGREP
693*8b26181fSAndroid Build Coastguard WorkerCPP
694*8b26181fSAndroid Build Coastguard WorkerOBJEXT
695*8b26181fSAndroid Build Coastguard WorkerEXEEXT
696*8b26181fSAndroid Build Coastguard Workerac_ct_CC
697*8b26181fSAndroid Build Coastguard WorkerCPPFLAGS
698*8b26181fSAndroid Build Coastguard WorkerLDFLAGS
699*8b26181fSAndroid Build Coastguard WorkerCFLAGS
700*8b26181fSAndroid Build Coastguard WorkerCC
701*8b26181fSAndroid Build Coastguard WorkerSHLICC2
702*8b26181fSAndroid Build Coastguard Workertarget_os
703*8b26181fSAndroid Build Coastguard Workertarget_vendor
704*8b26181fSAndroid Build Coastguard Workertarget_cpu
705*8b26181fSAndroid Build Coastguard Workertarget
706*8b26181fSAndroid Build Coastguard Workerhost_os
707*8b26181fSAndroid Build Coastguard Workerhost_vendor
708*8b26181fSAndroid Build Coastguard Workerhost_cpu
709*8b26181fSAndroid Build Coastguard Workerhost
710*8b26181fSAndroid Build Coastguard Workerbuild_os
711*8b26181fSAndroid Build Coastguard Workerbuild_vendor
712*8b26181fSAndroid Build Coastguard Workerbuild_cpu
713*8b26181fSAndroid Build Coastguard Workerbuild
714*8b26181fSAndroid Build Coastguard WorkerLIBS_PRIVATE
715*8b26181fSAndroid Build Coastguard WorkerREQUIRES_PRIVATE
716*8b26181fSAndroid Build Coastguard WorkerLIBS_STATIC
717*8b26181fSAndroid Build Coastguard WorkerV_INCLS
718*8b26181fSAndroid Build Coastguard WorkerV_DEFS
719*8b26181fSAndroid Build Coastguard WorkerV_CCOPT
720*8b26181fSAndroid Build Coastguard Workertarget_alias
721*8b26181fSAndroid Build Coastguard Workerhost_alias
722*8b26181fSAndroid Build Coastguard Workerbuild_alias
723*8b26181fSAndroid Build Coastguard WorkerLIBS
724*8b26181fSAndroid Build Coastguard WorkerECHO_T
725*8b26181fSAndroid Build Coastguard WorkerECHO_N
726*8b26181fSAndroid Build Coastguard WorkerECHO_C
727*8b26181fSAndroid Build Coastguard WorkerDEFS
728*8b26181fSAndroid Build Coastguard Workermandir
729*8b26181fSAndroid Build Coastguard Workerlocaledir
730*8b26181fSAndroid Build Coastguard Workerlibdir
731*8b26181fSAndroid Build Coastguard Workerpsdir
732*8b26181fSAndroid Build Coastguard Workerpdfdir
733*8b26181fSAndroid Build Coastguard Workerdvidir
734*8b26181fSAndroid Build Coastguard Workerhtmldir
735*8b26181fSAndroid Build Coastguard Workerinfodir
736*8b26181fSAndroid Build Coastguard Workerdocdir
737*8b26181fSAndroid Build Coastguard Workeroldincludedir
738*8b26181fSAndroid Build Coastguard Workerincludedir
739*8b26181fSAndroid Build Coastguard Workerlocalstatedir
740*8b26181fSAndroid Build Coastguard Workersharedstatedir
741*8b26181fSAndroid Build Coastguard Workersysconfdir
742*8b26181fSAndroid Build Coastguard Workerdatadir
743*8b26181fSAndroid Build Coastguard Workerdatarootdir
744*8b26181fSAndroid Build Coastguard Workerlibexecdir
745*8b26181fSAndroid Build Coastguard Workersbindir
746*8b26181fSAndroid Build Coastguard Workerbindir
747*8b26181fSAndroid Build Coastguard Workerprogram_transform_name
748*8b26181fSAndroid Build Coastguard Workerprefix
749*8b26181fSAndroid Build Coastguard Workerexec_prefix
750*8b26181fSAndroid Build Coastguard WorkerPACKAGE_URL
751*8b26181fSAndroid Build Coastguard WorkerPACKAGE_BUGREPORT
752*8b26181fSAndroid Build Coastguard WorkerPACKAGE_STRING
753*8b26181fSAndroid Build Coastguard WorkerPACKAGE_VERSION
754*8b26181fSAndroid Build Coastguard WorkerPACKAGE_TARNAME
755*8b26181fSAndroid Build Coastguard WorkerPACKAGE_NAME
756*8b26181fSAndroid Build Coastguard WorkerPATH_SEPARATOR
757*8b26181fSAndroid Build Coastguard WorkerSHELL'
758*8b26181fSAndroid Build Coastguard Workerac_subst_files=''
759*8b26181fSAndroid Build Coastguard Workerac_user_opts='
760*8b26181fSAndroid Build Coastguard Workerenable_option_checking
761*8b26181fSAndroid Build Coastguard Workerwith_gcc
762*8b26181fSAndroid Build Coastguard Workerenable_largefile
763*8b26181fSAndroid Build Coastguard Workerenable_protochain
764*8b26181fSAndroid Build Coastguard Workerwith_pcap
765*8b26181fSAndroid Build Coastguard Workerwith_libnl
766*8b26181fSAndroid Build Coastguard Workerenable_ipv6
767*8b26181fSAndroid Build Coastguard Workerwith_dag
768*8b26181fSAndroid Build Coastguard Workerwith_dag_includes
769*8b26181fSAndroid Build Coastguard Workerwith_dag_libraries
770*8b26181fSAndroid Build Coastguard Workerwith_septel
771*8b26181fSAndroid Build Coastguard Workerwith_snf
772*8b26181fSAndroid Build Coastguard Workerwith_snf_includes
773*8b26181fSAndroid Build Coastguard Workerwith_snf_libraries
774*8b26181fSAndroid Build Coastguard Workerwith_turbocap
775*8b26181fSAndroid Build Coastguard Workerenable_remote
776*8b26181fSAndroid Build Coastguard Workerenable_optimizer_dbg
777*8b26181fSAndroid Build Coastguard Workerenable_yydebug
778*8b26181fSAndroid Build Coastguard Workerenable_universal
779*8b26181fSAndroid Build Coastguard Workerenable_shared
780*8b26181fSAndroid Build Coastguard Workerenable_usb
781*8b26181fSAndroid Build Coastguard Workerenable_netmap
782*8b26181fSAndroid Build Coastguard Workerwith_dpdk
783*8b26181fSAndroid Build Coastguard Workerenable_bluetooth
784*8b26181fSAndroid Build Coastguard Workerenable_dbus
785*8b26181fSAndroid Build Coastguard Workerenable_rdma
786*8b26181fSAndroid Build Coastguard Worker'
787*8b26181fSAndroid Build Coastguard Worker      ac_precious_vars='build_alias
788*8b26181fSAndroid Build Coastguard Workerhost_alias
789*8b26181fSAndroid Build Coastguard Workertarget_alias
790*8b26181fSAndroid Build Coastguard WorkerCC
791*8b26181fSAndroid Build Coastguard WorkerCFLAGS
792*8b26181fSAndroid Build Coastguard WorkerLDFLAGS
793*8b26181fSAndroid Build Coastguard WorkerLIBS
794*8b26181fSAndroid Build Coastguard WorkerCPPFLAGS
795*8b26181fSAndroid Build Coastguard WorkerCPP
796*8b26181fSAndroid Build Coastguard WorkerCXX
797*8b26181fSAndroid Build Coastguard WorkerCXXFLAGS
798*8b26181fSAndroid Build Coastguard WorkerCCC
799*8b26181fSAndroid Build Coastguard WorkerPKG_CONFIG
800*8b26181fSAndroid Build Coastguard WorkerPKG_CONFIG_PATH
801*8b26181fSAndroid Build Coastguard WorkerPKG_CONFIG_LIBDIR
802*8b26181fSAndroid Build Coastguard WorkerLIBNL_CFLAGS
803*8b26181fSAndroid Build Coastguard WorkerLIBNL_LIBS
804*8b26181fSAndroid Build Coastguard WorkerLIBNL_LIBS_STATIC
805*8b26181fSAndroid Build Coastguard WorkerOPENSSL_CFLAGS
806*8b26181fSAndroid Build Coastguard WorkerOPENSSL_LIBS
807*8b26181fSAndroid Build Coastguard WorkerOPENSSL_LIBS_STATIC
808*8b26181fSAndroid Build Coastguard WorkerDPDK_CFLAGS
809*8b26181fSAndroid Build Coastguard WorkerDPDK_LIBS
810*8b26181fSAndroid Build Coastguard WorkerDPDK_LIBS_STATIC
811*8b26181fSAndroid Build Coastguard WorkerDBUS_CFLAGS
812*8b26181fSAndroid Build Coastguard WorkerDBUS_LIBS
813*8b26181fSAndroid Build Coastguard WorkerDBUS_LIBS_STATIC
814*8b26181fSAndroid Build Coastguard WorkerLIBIBVERBS_CFLAGS
815*8b26181fSAndroid Build Coastguard WorkerLIBIBVERBS_LIBS
816*8b26181fSAndroid Build Coastguard WorkerLIBIBVERBS_LIBS_STATIC'
817*8b26181fSAndroid Build Coastguard Worker
818*8b26181fSAndroid Build Coastguard Worker
819*8b26181fSAndroid Build Coastguard Worker# Initialize some variables set by options.
820*8b26181fSAndroid Build Coastguard Workerac_init_help=
821*8b26181fSAndroid Build Coastguard Workerac_init_version=false
822*8b26181fSAndroid Build Coastguard Workerac_unrecognized_opts=
823*8b26181fSAndroid Build Coastguard Workerac_unrecognized_sep=
824*8b26181fSAndroid Build Coastguard Worker# The variables have the same names as the options, with
825*8b26181fSAndroid Build Coastguard Worker# dashes changed to underlines.
826*8b26181fSAndroid Build Coastguard Workercache_file=/dev/null
827*8b26181fSAndroid Build Coastguard Workerexec_prefix=NONE
828*8b26181fSAndroid Build Coastguard Workerno_create=
829*8b26181fSAndroid Build Coastguard Workerno_recursion=
830*8b26181fSAndroid Build Coastguard Workerprefix=NONE
831*8b26181fSAndroid Build Coastguard Workerprogram_prefix=NONE
832*8b26181fSAndroid Build Coastguard Workerprogram_suffix=NONE
833*8b26181fSAndroid Build Coastguard Workerprogram_transform_name=s,x,x,
834*8b26181fSAndroid Build Coastguard Workersilent=
835*8b26181fSAndroid Build Coastguard Workersite=
836*8b26181fSAndroid Build Coastguard Workersrcdir=
837*8b26181fSAndroid Build Coastguard Workerverbose=
838*8b26181fSAndroid Build Coastguard Workerx_includes=NONE
839*8b26181fSAndroid Build Coastguard Workerx_libraries=NONE
840*8b26181fSAndroid Build Coastguard Worker
841*8b26181fSAndroid Build Coastguard Worker# Installation directory options.
842*8b26181fSAndroid Build Coastguard Worker# These are left unexpanded so users can "make install exec_prefix=/foo"
843*8b26181fSAndroid Build Coastguard Worker# and all the variables that are supposed to be based on exec_prefix
844*8b26181fSAndroid Build Coastguard Worker# by default will actually change.
845*8b26181fSAndroid Build Coastguard Worker# Use braces instead of parens because sh, perl, etc. also accept them.
846*8b26181fSAndroid Build Coastguard Worker# (The list follows the same order as the GNU Coding Standards.)
847*8b26181fSAndroid Build Coastguard Workerbindir='${exec_prefix}/bin'
848*8b26181fSAndroid Build Coastguard Workersbindir='${exec_prefix}/sbin'
849*8b26181fSAndroid Build Coastguard Workerlibexecdir='${exec_prefix}/libexec'
850*8b26181fSAndroid Build Coastguard Workerdatarootdir='${prefix}/share'
851*8b26181fSAndroid Build Coastguard Workerdatadir='${datarootdir}'
852*8b26181fSAndroid Build Coastguard Workersysconfdir='${prefix}/etc'
853*8b26181fSAndroid Build Coastguard Workersharedstatedir='${prefix}/com'
854*8b26181fSAndroid Build Coastguard Workerlocalstatedir='${prefix}/var'
855*8b26181fSAndroid Build Coastguard Workerincludedir='${prefix}/include'
856*8b26181fSAndroid Build Coastguard Workeroldincludedir='/usr/include'
857*8b26181fSAndroid Build Coastguard Workerdocdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
858*8b26181fSAndroid Build Coastguard Workerinfodir='${datarootdir}/info'
859*8b26181fSAndroid Build Coastguard Workerhtmldir='${docdir}'
860*8b26181fSAndroid Build Coastguard Workerdvidir='${docdir}'
861*8b26181fSAndroid Build Coastguard Workerpdfdir='${docdir}'
862*8b26181fSAndroid Build Coastguard Workerpsdir='${docdir}'
863*8b26181fSAndroid Build Coastguard Workerlibdir='${exec_prefix}/lib'
864*8b26181fSAndroid Build Coastguard Workerlocaledir='${datarootdir}/locale'
865*8b26181fSAndroid Build Coastguard Workermandir='${datarootdir}/man'
866*8b26181fSAndroid Build Coastguard Worker
867*8b26181fSAndroid Build Coastguard Workerac_prev=
868*8b26181fSAndroid Build Coastguard Workerac_dashdash=
869*8b26181fSAndroid Build Coastguard Workerfor ac_option
870*8b26181fSAndroid Build Coastguard Workerdo
871*8b26181fSAndroid Build Coastguard Worker  # If the previous option needs an argument, assign it.
872*8b26181fSAndroid Build Coastguard Worker  if test -n "$ac_prev"; then
873*8b26181fSAndroid Build Coastguard Worker    eval $ac_prev=\$ac_option
874*8b26181fSAndroid Build Coastguard Worker    ac_prev=
875*8b26181fSAndroid Build Coastguard Worker    continue
876*8b26181fSAndroid Build Coastguard Worker  fi
877*8b26181fSAndroid Build Coastguard Worker
878*8b26181fSAndroid Build Coastguard Worker  case $ac_option in
879*8b26181fSAndroid Build Coastguard Worker  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
880*8b26181fSAndroid Build Coastguard Worker  *=)   ac_optarg= ;;
881*8b26181fSAndroid Build Coastguard Worker  *)    ac_optarg=yes ;;
882*8b26181fSAndroid Build Coastguard Worker  esac
883*8b26181fSAndroid Build Coastguard Worker
884*8b26181fSAndroid Build Coastguard Worker  # Accept the important Cygnus configure options, so we can diagnose typos.
885*8b26181fSAndroid Build Coastguard Worker
886*8b26181fSAndroid Build Coastguard Worker  case $ac_dashdash$ac_option in
887*8b26181fSAndroid Build Coastguard Worker  --)
888*8b26181fSAndroid Build Coastguard Worker    ac_dashdash=yes ;;
889*8b26181fSAndroid Build Coastguard Worker
890*8b26181fSAndroid Build Coastguard Worker  -bindir | --bindir | --bindi | --bind | --bin | --bi)
891*8b26181fSAndroid Build Coastguard Worker    ac_prev=bindir ;;
892*8b26181fSAndroid Build Coastguard Worker  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
893*8b26181fSAndroid Build Coastguard Worker    bindir=$ac_optarg ;;
894*8b26181fSAndroid Build Coastguard Worker
895*8b26181fSAndroid Build Coastguard Worker  -build | --build | --buil | --bui | --bu)
896*8b26181fSAndroid Build Coastguard Worker    ac_prev=build_alias ;;
897*8b26181fSAndroid Build Coastguard Worker  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
898*8b26181fSAndroid Build Coastguard Worker    build_alias=$ac_optarg ;;
899*8b26181fSAndroid Build Coastguard Worker
900*8b26181fSAndroid Build Coastguard Worker  -cache-file | --cache-file | --cache-fil | --cache-fi \
901*8b26181fSAndroid Build Coastguard Worker  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
902*8b26181fSAndroid Build Coastguard Worker    ac_prev=cache_file ;;
903*8b26181fSAndroid Build Coastguard Worker  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
904*8b26181fSAndroid Build Coastguard Worker  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
905*8b26181fSAndroid Build Coastguard Worker    cache_file=$ac_optarg ;;
906*8b26181fSAndroid Build Coastguard Worker
907*8b26181fSAndroid Build Coastguard Worker  --config-cache | -C)
908*8b26181fSAndroid Build Coastguard Worker    cache_file=config.cache ;;
909*8b26181fSAndroid Build Coastguard Worker
910*8b26181fSAndroid Build Coastguard Worker  -datadir | --datadir | --datadi | --datad)
911*8b26181fSAndroid Build Coastguard Worker    ac_prev=datadir ;;
912*8b26181fSAndroid Build Coastguard Worker  -datadir=* | --datadir=* | --datadi=* | --datad=*)
913*8b26181fSAndroid Build Coastguard Worker    datadir=$ac_optarg ;;
914*8b26181fSAndroid Build Coastguard Worker
915*8b26181fSAndroid Build Coastguard Worker  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
916*8b26181fSAndroid Build Coastguard Worker  | --dataroo | --dataro | --datar)
917*8b26181fSAndroid Build Coastguard Worker    ac_prev=datarootdir ;;
918*8b26181fSAndroid Build Coastguard Worker  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
919*8b26181fSAndroid Build Coastguard Worker  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
920*8b26181fSAndroid Build Coastguard Worker    datarootdir=$ac_optarg ;;
921*8b26181fSAndroid Build Coastguard Worker
922*8b26181fSAndroid Build Coastguard Worker  -disable-* | --disable-*)
923*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
924*8b26181fSAndroid Build Coastguard Worker    # Reject names that are not valid shell variable names.
925*8b26181fSAndroid Build Coastguard Worker    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
926*8b26181fSAndroid Build Coastguard Worker      as_fn_error $? "invalid feature name: $ac_useropt"
927*8b26181fSAndroid Build Coastguard Worker    ac_useropt_orig=$ac_useropt
928*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
929*8b26181fSAndroid Build Coastguard Worker    case $ac_user_opts in
930*8b26181fSAndroid Build Coastguard Worker      *"
931*8b26181fSAndroid Build Coastguard Worker"enable_$ac_useropt"
932*8b26181fSAndroid Build Coastguard Worker"*) ;;
933*8b26181fSAndroid Build Coastguard Worker      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
934*8b26181fSAndroid Build Coastguard Worker	 ac_unrecognized_sep=', ';;
935*8b26181fSAndroid Build Coastguard Worker    esac
936*8b26181fSAndroid Build Coastguard Worker    eval enable_$ac_useropt=no ;;
937*8b26181fSAndroid Build Coastguard Worker
938*8b26181fSAndroid Build Coastguard Worker  -docdir | --docdir | --docdi | --doc | --do)
939*8b26181fSAndroid Build Coastguard Worker    ac_prev=docdir ;;
940*8b26181fSAndroid Build Coastguard Worker  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
941*8b26181fSAndroid Build Coastguard Worker    docdir=$ac_optarg ;;
942*8b26181fSAndroid Build Coastguard Worker
943*8b26181fSAndroid Build Coastguard Worker  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
944*8b26181fSAndroid Build Coastguard Worker    ac_prev=dvidir ;;
945*8b26181fSAndroid Build Coastguard Worker  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
946*8b26181fSAndroid Build Coastguard Worker    dvidir=$ac_optarg ;;
947*8b26181fSAndroid Build Coastguard Worker
948*8b26181fSAndroid Build Coastguard Worker  -enable-* | --enable-*)
949*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
950*8b26181fSAndroid Build Coastguard Worker    # Reject names that are not valid shell variable names.
951*8b26181fSAndroid Build Coastguard Worker    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
952*8b26181fSAndroid Build Coastguard Worker      as_fn_error $? "invalid feature name: $ac_useropt"
953*8b26181fSAndroid Build Coastguard Worker    ac_useropt_orig=$ac_useropt
954*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
955*8b26181fSAndroid Build Coastguard Worker    case $ac_user_opts in
956*8b26181fSAndroid Build Coastguard Worker      *"
957*8b26181fSAndroid Build Coastguard Worker"enable_$ac_useropt"
958*8b26181fSAndroid Build Coastguard Worker"*) ;;
959*8b26181fSAndroid Build Coastguard Worker      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
960*8b26181fSAndroid Build Coastguard Worker	 ac_unrecognized_sep=', ';;
961*8b26181fSAndroid Build Coastguard Worker    esac
962*8b26181fSAndroid Build Coastguard Worker    eval enable_$ac_useropt=\$ac_optarg ;;
963*8b26181fSAndroid Build Coastguard Worker
964*8b26181fSAndroid Build Coastguard Worker  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
965*8b26181fSAndroid Build Coastguard Worker  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
966*8b26181fSAndroid Build Coastguard Worker  | --exec | --exe | --ex)
967*8b26181fSAndroid Build Coastguard Worker    ac_prev=exec_prefix ;;
968*8b26181fSAndroid Build Coastguard Worker  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
969*8b26181fSAndroid Build Coastguard Worker  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
970*8b26181fSAndroid Build Coastguard Worker  | --exec=* | --exe=* | --ex=*)
971*8b26181fSAndroid Build Coastguard Worker    exec_prefix=$ac_optarg ;;
972*8b26181fSAndroid Build Coastguard Worker
973*8b26181fSAndroid Build Coastguard Worker  -gas | --gas | --ga | --g)
974*8b26181fSAndroid Build Coastguard Worker    # Obsolete; use --with-gas.
975*8b26181fSAndroid Build Coastguard Worker    with_gas=yes ;;
976*8b26181fSAndroid Build Coastguard Worker
977*8b26181fSAndroid Build Coastguard Worker  -help | --help | --hel | --he | -h)
978*8b26181fSAndroid Build Coastguard Worker    ac_init_help=long ;;
979*8b26181fSAndroid Build Coastguard Worker  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
980*8b26181fSAndroid Build Coastguard Worker    ac_init_help=recursive ;;
981*8b26181fSAndroid Build Coastguard Worker  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
982*8b26181fSAndroid Build Coastguard Worker    ac_init_help=short ;;
983*8b26181fSAndroid Build Coastguard Worker
984*8b26181fSAndroid Build Coastguard Worker  -host | --host | --hos | --ho)
985*8b26181fSAndroid Build Coastguard Worker    ac_prev=host_alias ;;
986*8b26181fSAndroid Build Coastguard Worker  -host=* | --host=* | --hos=* | --ho=*)
987*8b26181fSAndroid Build Coastguard Worker    host_alias=$ac_optarg ;;
988*8b26181fSAndroid Build Coastguard Worker
989*8b26181fSAndroid Build Coastguard Worker  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
990*8b26181fSAndroid Build Coastguard Worker    ac_prev=htmldir ;;
991*8b26181fSAndroid Build Coastguard Worker  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
992*8b26181fSAndroid Build Coastguard Worker  | --ht=*)
993*8b26181fSAndroid Build Coastguard Worker    htmldir=$ac_optarg ;;
994*8b26181fSAndroid Build Coastguard Worker
995*8b26181fSAndroid Build Coastguard Worker  -includedir | --includedir | --includedi | --included | --include \
996*8b26181fSAndroid Build Coastguard Worker  | --includ | --inclu | --incl | --inc)
997*8b26181fSAndroid Build Coastguard Worker    ac_prev=includedir ;;
998*8b26181fSAndroid Build Coastguard Worker  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
999*8b26181fSAndroid Build Coastguard Worker  | --includ=* | --inclu=* | --incl=* | --inc=*)
1000*8b26181fSAndroid Build Coastguard Worker    includedir=$ac_optarg ;;
1001*8b26181fSAndroid Build Coastguard Worker
1002*8b26181fSAndroid Build Coastguard Worker  -infodir | --infodir | --infodi | --infod | --info | --inf)
1003*8b26181fSAndroid Build Coastguard Worker    ac_prev=infodir ;;
1004*8b26181fSAndroid Build Coastguard Worker  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1005*8b26181fSAndroid Build Coastguard Worker    infodir=$ac_optarg ;;
1006*8b26181fSAndroid Build Coastguard Worker
1007*8b26181fSAndroid Build Coastguard Worker  -libdir | --libdir | --libdi | --libd)
1008*8b26181fSAndroid Build Coastguard Worker    ac_prev=libdir ;;
1009*8b26181fSAndroid Build Coastguard Worker  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1010*8b26181fSAndroid Build Coastguard Worker    libdir=$ac_optarg ;;
1011*8b26181fSAndroid Build Coastguard Worker
1012*8b26181fSAndroid Build Coastguard Worker  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1013*8b26181fSAndroid Build Coastguard Worker  | --libexe | --libex | --libe)
1014*8b26181fSAndroid Build Coastguard Worker    ac_prev=libexecdir ;;
1015*8b26181fSAndroid Build Coastguard Worker  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1016*8b26181fSAndroid Build Coastguard Worker  | --libexe=* | --libex=* | --libe=*)
1017*8b26181fSAndroid Build Coastguard Worker    libexecdir=$ac_optarg ;;
1018*8b26181fSAndroid Build Coastguard Worker
1019*8b26181fSAndroid Build Coastguard Worker  -localedir | --localedir | --localedi | --localed | --locale)
1020*8b26181fSAndroid Build Coastguard Worker    ac_prev=localedir ;;
1021*8b26181fSAndroid Build Coastguard Worker  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1022*8b26181fSAndroid Build Coastguard Worker    localedir=$ac_optarg ;;
1023*8b26181fSAndroid Build Coastguard Worker
1024*8b26181fSAndroid Build Coastguard Worker  -localstatedir | --localstatedir | --localstatedi | --localstated \
1025*8b26181fSAndroid Build Coastguard Worker  | --localstate | --localstat | --localsta | --localst | --locals)
1026*8b26181fSAndroid Build Coastguard Worker    ac_prev=localstatedir ;;
1027*8b26181fSAndroid Build Coastguard Worker  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1028*8b26181fSAndroid Build Coastguard Worker  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1029*8b26181fSAndroid Build Coastguard Worker    localstatedir=$ac_optarg ;;
1030*8b26181fSAndroid Build Coastguard Worker
1031*8b26181fSAndroid Build Coastguard Worker  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1032*8b26181fSAndroid Build Coastguard Worker    ac_prev=mandir ;;
1033*8b26181fSAndroid Build Coastguard Worker  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1034*8b26181fSAndroid Build Coastguard Worker    mandir=$ac_optarg ;;
1035*8b26181fSAndroid Build Coastguard Worker
1036*8b26181fSAndroid Build Coastguard Worker  -nfp | --nfp | --nf)
1037*8b26181fSAndroid Build Coastguard Worker    # Obsolete; use --without-fp.
1038*8b26181fSAndroid Build Coastguard Worker    with_fp=no ;;
1039*8b26181fSAndroid Build Coastguard Worker
1040*8b26181fSAndroid Build Coastguard Worker  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1041*8b26181fSAndroid Build Coastguard Worker  | --no-cr | --no-c | -n)
1042*8b26181fSAndroid Build Coastguard Worker    no_create=yes ;;
1043*8b26181fSAndroid Build Coastguard Worker
1044*8b26181fSAndroid Build Coastguard Worker  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1045*8b26181fSAndroid Build Coastguard Worker  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1046*8b26181fSAndroid Build Coastguard Worker    no_recursion=yes ;;
1047*8b26181fSAndroid Build Coastguard Worker
1048*8b26181fSAndroid Build Coastguard Worker  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1049*8b26181fSAndroid Build Coastguard Worker  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1050*8b26181fSAndroid Build Coastguard Worker  | --oldin | --oldi | --old | --ol | --o)
1051*8b26181fSAndroid Build Coastguard Worker    ac_prev=oldincludedir ;;
1052*8b26181fSAndroid Build Coastguard Worker  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1053*8b26181fSAndroid Build Coastguard Worker  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1054*8b26181fSAndroid Build Coastguard Worker  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1055*8b26181fSAndroid Build Coastguard Worker    oldincludedir=$ac_optarg ;;
1056*8b26181fSAndroid Build Coastguard Worker
1057*8b26181fSAndroid Build Coastguard Worker  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1058*8b26181fSAndroid Build Coastguard Worker    ac_prev=prefix ;;
1059*8b26181fSAndroid Build Coastguard Worker  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1060*8b26181fSAndroid Build Coastguard Worker    prefix=$ac_optarg ;;
1061*8b26181fSAndroid Build Coastguard Worker
1062*8b26181fSAndroid Build Coastguard Worker  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1063*8b26181fSAndroid Build Coastguard Worker  | --program-pre | --program-pr | --program-p)
1064*8b26181fSAndroid Build Coastguard Worker    ac_prev=program_prefix ;;
1065*8b26181fSAndroid Build Coastguard Worker  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1066*8b26181fSAndroid Build Coastguard Worker  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1067*8b26181fSAndroid Build Coastguard Worker    program_prefix=$ac_optarg ;;
1068*8b26181fSAndroid Build Coastguard Worker
1069*8b26181fSAndroid Build Coastguard Worker  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1070*8b26181fSAndroid Build Coastguard Worker  | --program-suf | --program-su | --program-s)
1071*8b26181fSAndroid Build Coastguard Worker    ac_prev=program_suffix ;;
1072*8b26181fSAndroid Build Coastguard Worker  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1073*8b26181fSAndroid Build Coastguard Worker  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1074*8b26181fSAndroid Build Coastguard Worker    program_suffix=$ac_optarg ;;
1075*8b26181fSAndroid Build Coastguard Worker
1076*8b26181fSAndroid Build Coastguard Worker  -program-transform-name | --program-transform-name \
1077*8b26181fSAndroid Build Coastguard Worker  | --program-transform-nam | --program-transform-na \
1078*8b26181fSAndroid Build Coastguard Worker  | --program-transform-n | --program-transform- \
1079*8b26181fSAndroid Build Coastguard Worker  | --program-transform | --program-transfor \
1080*8b26181fSAndroid Build Coastguard Worker  | --program-transfo | --program-transf \
1081*8b26181fSAndroid Build Coastguard Worker  | --program-trans | --program-tran \
1082*8b26181fSAndroid Build Coastguard Worker  | --progr-tra | --program-tr | --program-t)
1083*8b26181fSAndroid Build Coastguard Worker    ac_prev=program_transform_name ;;
1084*8b26181fSAndroid Build Coastguard Worker  -program-transform-name=* | --program-transform-name=* \
1085*8b26181fSAndroid Build Coastguard Worker  | --program-transform-nam=* | --program-transform-na=* \
1086*8b26181fSAndroid Build Coastguard Worker  | --program-transform-n=* | --program-transform-=* \
1087*8b26181fSAndroid Build Coastguard Worker  | --program-transform=* | --program-transfor=* \
1088*8b26181fSAndroid Build Coastguard Worker  | --program-transfo=* | --program-transf=* \
1089*8b26181fSAndroid Build Coastguard Worker  | --program-trans=* | --program-tran=* \
1090*8b26181fSAndroid Build Coastguard Worker  | --progr-tra=* | --program-tr=* | --program-t=*)
1091*8b26181fSAndroid Build Coastguard Worker    program_transform_name=$ac_optarg ;;
1092*8b26181fSAndroid Build Coastguard Worker
1093*8b26181fSAndroid Build Coastguard Worker  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1094*8b26181fSAndroid Build Coastguard Worker    ac_prev=pdfdir ;;
1095*8b26181fSAndroid Build Coastguard Worker  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1096*8b26181fSAndroid Build Coastguard Worker    pdfdir=$ac_optarg ;;
1097*8b26181fSAndroid Build Coastguard Worker
1098*8b26181fSAndroid Build Coastguard Worker  -psdir | --psdir | --psdi | --psd | --ps)
1099*8b26181fSAndroid Build Coastguard Worker    ac_prev=psdir ;;
1100*8b26181fSAndroid Build Coastguard Worker  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1101*8b26181fSAndroid Build Coastguard Worker    psdir=$ac_optarg ;;
1102*8b26181fSAndroid Build Coastguard Worker
1103*8b26181fSAndroid Build Coastguard Worker  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1104*8b26181fSAndroid Build Coastguard Worker  | -silent | --silent | --silen | --sile | --sil)
1105*8b26181fSAndroid Build Coastguard Worker    silent=yes ;;
1106*8b26181fSAndroid Build Coastguard Worker
1107*8b26181fSAndroid Build Coastguard Worker  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1108*8b26181fSAndroid Build Coastguard Worker    ac_prev=sbindir ;;
1109*8b26181fSAndroid Build Coastguard Worker  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1110*8b26181fSAndroid Build Coastguard Worker  | --sbi=* | --sb=*)
1111*8b26181fSAndroid Build Coastguard Worker    sbindir=$ac_optarg ;;
1112*8b26181fSAndroid Build Coastguard Worker
1113*8b26181fSAndroid Build Coastguard Worker  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1114*8b26181fSAndroid Build Coastguard Worker  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1115*8b26181fSAndroid Build Coastguard Worker  | --sharedst | --shareds | --shared | --share | --shar \
1116*8b26181fSAndroid Build Coastguard Worker  | --sha | --sh)
1117*8b26181fSAndroid Build Coastguard Worker    ac_prev=sharedstatedir ;;
1118*8b26181fSAndroid Build Coastguard Worker  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1119*8b26181fSAndroid Build Coastguard Worker  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1120*8b26181fSAndroid Build Coastguard Worker  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1121*8b26181fSAndroid Build Coastguard Worker  | --sha=* | --sh=*)
1122*8b26181fSAndroid Build Coastguard Worker    sharedstatedir=$ac_optarg ;;
1123*8b26181fSAndroid Build Coastguard Worker
1124*8b26181fSAndroid Build Coastguard Worker  -site | --site | --sit)
1125*8b26181fSAndroid Build Coastguard Worker    ac_prev=site ;;
1126*8b26181fSAndroid Build Coastguard Worker  -site=* | --site=* | --sit=*)
1127*8b26181fSAndroid Build Coastguard Worker    site=$ac_optarg ;;
1128*8b26181fSAndroid Build Coastguard Worker
1129*8b26181fSAndroid Build Coastguard Worker  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1130*8b26181fSAndroid Build Coastguard Worker    ac_prev=srcdir ;;
1131*8b26181fSAndroid Build Coastguard Worker  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1132*8b26181fSAndroid Build Coastguard Worker    srcdir=$ac_optarg ;;
1133*8b26181fSAndroid Build Coastguard Worker
1134*8b26181fSAndroid Build Coastguard Worker  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1135*8b26181fSAndroid Build Coastguard Worker  | --syscon | --sysco | --sysc | --sys | --sy)
1136*8b26181fSAndroid Build Coastguard Worker    ac_prev=sysconfdir ;;
1137*8b26181fSAndroid Build Coastguard Worker  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1138*8b26181fSAndroid Build Coastguard Worker  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1139*8b26181fSAndroid Build Coastguard Worker    sysconfdir=$ac_optarg ;;
1140*8b26181fSAndroid Build Coastguard Worker
1141*8b26181fSAndroid Build Coastguard Worker  -target | --target | --targe | --targ | --tar | --ta | --t)
1142*8b26181fSAndroid Build Coastguard Worker    ac_prev=target_alias ;;
1143*8b26181fSAndroid Build Coastguard Worker  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1144*8b26181fSAndroid Build Coastguard Worker    target_alias=$ac_optarg ;;
1145*8b26181fSAndroid Build Coastguard Worker
1146*8b26181fSAndroid Build Coastguard Worker  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1147*8b26181fSAndroid Build Coastguard Worker    verbose=yes ;;
1148*8b26181fSAndroid Build Coastguard Worker
1149*8b26181fSAndroid Build Coastguard Worker  -version | --version | --versio | --versi | --vers | -V)
1150*8b26181fSAndroid Build Coastguard Worker    ac_init_version=: ;;
1151*8b26181fSAndroid Build Coastguard Worker
1152*8b26181fSAndroid Build Coastguard Worker  -with-* | --with-*)
1153*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1154*8b26181fSAndroid Build Coastguard Worker    # Reject names that are not valid shell variable names.
1155*8b26181fSAndroid Build Coastguard Worker    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1156*8b26181fSAndroid Build Coastguard Worker      as_fn_error $? "invalid package name: $ac_useropt"
1157*8b26181fSAndroid Build Coastguard Worker    ac_useropt_orig=$ac_useropt
1158*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1159*8b26181fSAndroid Build Coastguard Worker    case $ac_user_opts in
1160*8b26181fSAndroid Build Coastguard Worker      *"
1161*8b26181fSAndroid Build Coastguard Worker"with_$ac_useropt"
1162*8b26181fSAndroid Build Coastguard Worker"*) ;;
1163*8b26181fSAndroid Build Coastguard Worker      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1164*8b26181fSAndroid Build Coastguard Worker	 ac_unrecognized_sep=', ';;
1165*8b26181fSAndroid Build Coastguard Worker    esac
1166*8b26181fSAndroid Build Coastguard Worker    eval with_$ac_useropt=\$ac_optarg ;;
1167*8b26181fSAndroid Build Coastguard Worker
1168*8b26181fSAndroid Build Coastguard Worker  -without-* | --without-*)
1169*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1170*8b26181fSAndroid Build Coastguard Worker    # Reject names that are not valid shell variable names.
1171*8b26181fSAndroid Build Coastguard Worker    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1172*8b26181fSAndroid Build Coastguard Worker      as_fn_error $? "invalid package name: $ac_useropt"
1173*8b26181fSAndroid Build Coastguard Worker    ac_useropt_orig=$ac_useropt
1174*8b26181fSAndroid Build Coastguard Worker    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1175*8b26181fSAndroid Build Coastguard Worker    case $ac_user_opts in
1176*8b26181fSAndroid Build Coastguard Worker      *"
1177*8b26181fSAndroid Build Coastguard Worker"with_$ac_useropt"
1178*8b26181fSAndroid Build Coastguard Worker"*) ;;
1179*8b26181fSAndroid Build Coastguard Worker      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1180*8b26181fSAndroid Build Coastguard Worker	 ac_unrecognized_sep=', ';;
1181*8b26181fSAndroid Build Coastguard Worker    esac
1182*8b26181fSAndroid Build Coastguard Worker    eval with_$ac_useropt=no ;;
1183*8b26181fSAndroid Build Coastguard Worker
1184*8b26181fSAndroid Build Coastguard Worker  --x)
1185*8b26181fSAndroid Build Coastguard Worker    # Obsolete; use --with-x.
1186*8b26181fSAndroid Build Coastguard Worker    with_x=yes ;;
1187*8b26181fSAndroid Build Coastguard Worker
1188*8b26181fSAndroid Build Coastguard Worker  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1189*8b26181fSAndroid Build Coastguard Worker  | --x-incl | --x-inc | --x-in | --x-i)
1190*8b26181fSAndroid Build Coastguard Worker    ac_prev=x_includes ;;
1191*8b26181fSAndroid Build Coastguard Worker  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1192*8b26181fSAndroid Build Coastguard Worker  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1193*8b26181fSAndroid Build Coastguard Worker    x_includes=$ac_optarg ;;
1194*8b26181fSAndroid Build Coastguard Worker
1195*8b26181fSAndroid Build Coastguard Worker  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1196*8b26181fSAndroid Build Coastguard Worker  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1197*8b26181fSAndroid Build Coastguard Worker    ac_prev=x_libraries ;;
1198*8b26181fSAndroid Build Coastguard Worker  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1199*8b26181fSAndroid Build Coastguard Worker  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1200*8b26181fSAndroid Build Coastguard Worker    x_libraries=$ac_optarg ;;
1201*8b26181fSAndroid Build Coastguard Worker
1202*8b26181fSAndroid Build Coastguard Worker  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1203*8b26181fSAndroid Build Coastguard WorkerTry \`$0 --help' for more information"
1204*8b26181fSAndroid Build Coastguard Worker    ;;
1205*8b26181fSAndroid Build Coastguard Worker
1206*8b26181fSAndroid Build Coastguard Worker  *=*)
1207*8b26181fSAndroid Build Coastguard Worker    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1208*8b26181fSAndroid Build Coastguard Worker    # Reject names that are not valid shell variable names.
1209*8b26181fSAndroid Build Coastguard Worker    case $ac_envvar in #(
1210*8b26181fSAndroid Build Coastguard Worker      '' | [0-9]* | *[!_$as_cr_alnum]* )
1211*8b26181fSAndroid Build Coastguard Worker      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1212*8b26181fSAndroid Build Coastguard Worker    esac
1213*8b26181fSAndroid Build Coastguard Worker    eval $ac_envvar=\$ac_optarg
1214*8b26181fSAndroid Build Coastguard Worker    export $ac_envvar ;;
1215*8b26181fSAndroid Build Coastguard Worker
1216*8b26181fSAndroid Build Coastguard Worker  *)
1217*8b26181fSAndroid Build Coastguard Worker    # FIXME: should be removed in autoconf 3.0.
1218*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1219*8b26181fSAndroid Build Coastguard Worker    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1220*8b26181fSAndroid Build Coastguard Worker      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1221*8b26181fSAndroid Build Coastguard Worker    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1222*8b26181fSAndroid Build Coastguard Worker    ;;
1223*8b26181fSAndroid Build Coastguard Worker
1224*8b26181fSAndroid Build Coastguard Worker  esac
1225*8b26181fSAndroid Build Coastguard Workerdone
1226*8b26181fSAndroid Build Coastguard Worker
1227*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_prev"; then
1228*8b26181fSAndroid Build Coastguard Worker  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1229*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "missing argument to $ac_option"
1230*8b26181fSAndroid Build Coastguard Workerfi
1231*8b26181fSAndroid Build Coastguard Worker
1232*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_unrecognized_opts"; then
1233*8b26181fSAndroid Build Coastguard Worker  case $enable_option_checking in
1234*8b26181fSAndroid Build Coastguard Worker    no) ;;
1235*8b26181fSAndroid Build Coastguard Worker    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1236*8b26181fSAndroid Build Coastguard Worker    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1237*8b26181fSAndroid Build Coastguard Worker  esac
1238*8b26181fSAndroid Build Coastguard Workerfi
1239*8b26181fSAndroid Build Coastguard Worker
1240*8b26181fSAndroid Build Coastguard Worker# Check all directory arguments for consistency.
1241*8b26181fSAndroid Build Coastguard Workerfor ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1242*8b26181fSAndroid Build Coastguard Worker		datadir sysconfdir sharedstatedir localstatedir includedir \
1243*8b26181fSAndroid Build Coastguard Worker		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1244*8b26181fSAndroid Build Coastguard Worker		libdir localedir mandir
1245*8b26181fSAndroid Build Coastguard Workerdo
1246*8b26181fSAndroid Build Coastguard Worker  eval ac_val=\$$ac_var
1247*8b26181fSAndroid Build Coastguard Worker  # Remove trailing slashes.
1248*8b26181fSAndroid Build Coastguard Worker  case $ac_val in
1249*8b26181fSAndroid Build Coastguard Worker    */ )
1250*8b26181fSAndroid Build Coastguard Worker      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1251*8b26181fSAndroid Build Coastguard Worker      eval $ac_var=\$ac_val;;
1252*8b26181fSAndroid Build Coastguard Worker  esac
1253*8b26181fSAndroid Build Coastguard Worker  # Be sure to have absolute directory names.
1254*8b26181fSAndroid Build Coastguard Worker  case $ac_val in
1255*8b26181fSAndroid Build Coastguard Worker    [\\/$]* | ?:[\\/]* )  continue;;
1256*8b26181fSAndroid Build Coastguard Worker    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1257*8b26181fSAndroid Build Coastguard Worker  esac
1258*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1259*8b26181fSAndroid Build Coastguard Workerdone
1260*8b26181fSAndroid Build Coastguard Worker
1261*8b26181fSAndroid Build Coastguard Worker# There might be people who depend on the old broken behavior: `$host'
1262*8b26181fSAndroid Build Coastguard Worker# used to hold the argument of --host etc.
1263*8b26181fSAndroid Build Coastguard Worker# FIXME: To remove some day.
1264*8b26181fSAndroid Build Coastguard Workerbuild=$build_alias
1265*8b26181fSAndroid Build Coastguard Workerhost=$host_alias
1266*8b26181fSAndroid Build Coastguard Workertarget=$target_alias
1267*8b26181fSAndroid Build Coastguard Worker
1268*8b26181fSAndroid Build Coastguard Worker# FIXME: To remove some day.
1269*8b26181fSAndroid Build Coastguard Workerif test "x$host_alias" != x; then
1270*8b26181fSAndroid Build Coastguard Worker  if test "x$build_alias" = x; then
1271*8b26181fSAndroid Build Coastguard Worker    cross_compiling=maybe
1272*8b26181fSAndroid Build Coastguard Worker  elif test "x$build_alias" != "x$host_alias"; then
1273*8b26181fSAndroid Build Coastguard Worker    cross_compiling=yes
1274*8b26181fSAndroid Build Coastguard Worker  fi
1275*8b26181fSAndroid Build Coastguard Workerfi
1276*8b26181fSAndroid Build Coastguard Worker
1277*8b26181fSAndroid Build Coastguard Workerac_tool_prefix=
1278*8b26181fSAndroid Build Coastguard Workertest -n "$host_alias" && ac_tool_prefix=$host_alias-
1279*8b26181fSAndroid Build Coastguard Worker
1280*8b26181fSAndroid Build Coastguard Workertest "$silent" = yes && exec 6>/dev/null
1281*8b26181fSAndroid Build Coastguard Worker
1282*8b26181fSAndroid Build Coastguard Worker
1283*8b26181fSAndroid Build Coastguard Workerac_pwd=`pwd` && test -n "$ac_pwd" &&
1284*8b26181fSAndroid Build Coastguard Workerac_ls_di=`ls -di .` &&
1285*8b26181fSAndroid Build Coastguard Workerac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1286*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "working directory cannot be determined"
1287*8b26181fSAndroid Build Coastguard Workertest "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1288*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "pwd does not report name of working directory"
1289*8b26181fSAndroid Build Coastguard Worker
1290*8b26181fSAndroid Build Coastguard Worker
1291*8b26181fSAndroid Build Coastguard Worker# Find the source files, if location was not specified.
1292*8b26181fSAndroid Build Coastguard Workerif test -z "$srcdir"; then
1293*8b26181fSAndroid Build Coastguard Worker  ac_srcdir_defaulted=yes
1294*8b26181fSAndroid Build Coastguard Worker  # Try the directory containing this script, then the parent directory.
1295*8b26181fSAndroid Build Coastguard Worker  ac_confdir=`$as_dirname -- "$as_myself" ||
1296*8b26181fSAndroid Build Coastguard Worker$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1297*8b26181fSAndroid Build Coastguard Worker	 X"$as_myself" : 'X\(//\)[^/]' \| \
1298*8b26181fSAndroid Build Coastguard Worker	 X"$as_myself" : 'X\(//\)$' \| \
1299*8b26181fSAndroid Build Coastguard Worker	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1300*8b26181fSAndroid Build Coastguard Worker$as_echo X"$as_myself" |
1301*8b26181fSAndroid Build Coastguard Worker    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1302*8b26181fSAndroid Build Coastguard Worker	    s//\1/
1303*8b26181fSAndroid Build Coastguard Worker	    q
1304*8b26181fSAndroid Build Coastguard Worker	  }
1305*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)[^/].*/{
1306*8b26181fSAndroid Build Coastguard Worker	    s//\1/
1307*8b26181fSAndroid Build Coastguard Worker	    q
1308*8b26181fSAndroid Build Coastguard Worker	  }
1309*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)$/{
1310*8b26181fSAndroid Build Coastguard Worker	    s//\1/
1311*8b26181fSAndroid Build Coastguard Worker	    q
1312*8b26181fSAndroid Build Coastguard Worker	  }
1313*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\).*/{
1314*8b26181fSAndroid Build Coastguard Worker	    s//\1/
1315*8b26181fSAndroid Build Coastguard Worker	    q
1316*8b26181fSAndroid Build Coastguard Worker	  }
1317*8b26181fSAndroid Build Coastguard Worker	  s/.*/./; q'`
1318*8b26181fSAndroid Build Coastguard Worker  srcdir=$ac_confdir
1319*8b26181fSAndroid Build Coastguard Worker  if test ! -r "$srcdir/$ac_unique_file"; then
1320*8b26181fSAndroid Build Coastguard Worker    srcdir=..
1321*8b26181fSAndroid Build Coastguard Worker  fi
1322*8b26181fSAndroid Build Coastguard Workerelse
1323*8b26181fSAndroid Build Coastguard Worker  ac_srcdir_defaulted=no
1324*8b26181fSAndroid Build Coastguard Workerfi
1325*8b26181fSAndroid Build Coastguard Workerif test ! -r "$srcdir/$ac_unique_file"; then
1326*8b26181fSAndroid Build Coastguard Worker  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1327*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1328*8b26181fSAndroid Build Coastguard Workerfi
1329*8b26181fSAndroid Build Coastguard Workerac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1330*8b26181fSAndroid Build Coastguard Workerac_abs_confdir=`(
1331*8b26181fSAndroid Build Coastguard Worker	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1332*8b26181fSAndroid Build Coastguard Worker	pwd)`
1333*8b26181fSAndroid Build Coastguard Worker# When building in place, set srcdir=.
1334*8b26181fSAndroid Build Coastguard Workerif test "$ac_abs_confdir" = "$ac_pwd"; then
1335*8b26181fSAndroid Build Coastguard Worker  srcdir=.
1336*8b26181fSAndroid Build Coastguard Workerfi
1337*8b26181fSAndroid Build Coastguard Worker# Remove unnecessary trailing slashes from srcdir.
1338*8b26181fSAndroid Build Coastguard Worker# Double slashes in file names in object file debugging info
1339*8b26181fSAndroid Build Coastguard Worker# mess up M-x gdb in Emacs.
1340*8b26181fSAndroid Build Coastguard Workercase $srcdir in
1341*8b26181fSAndroid Build Coastguard Worker*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1342*8b26181fSAndroid Build Coastguard Workeresac
1343*8b26181fSAndroid Build Coastguard Workerfor ac_var in $ac_precious_vars; do
1344*8b26181fSAndroid Build Coastguard Worker  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1345*8b26181fSAndroid Build Coastguard Worker  eval ac_env_${ac_var}_value=\$${ac_var}
1346*8b26181fSAndroid Build Coastguard Worker  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1347*8b26181fSAndroid Build Coastguard Worker  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1348*8b26181fSAndroid Build Coastguard Workerdone
1349*8b26181fSAndroid Build Coastguard Worker
1350*8b26181fSAndroid Build Coastguard Worker#
1351*8b26181fSAndroid Build Coastguard Worker# Report the --help message.
1352*8b26181fSAndroid Build Coastguard Worker#
1353*8b26181fSAndroid Build Coastguard Workerif test "$ac_init_help" = "long"; then
1354*8b26181fSAndroid Build Coastguard Worker  # Omit some internal or obsolete options to make the list less imposing.
1355*8b26181fSAndroid Build Coastguard Worker  # This message is too long to be a string in the A/UX 3.1 sh.
1356*8b26181fSAndroid Build Coastguard Worker  cat <<_ACEOF
1357*8b26181fSAndroid Build Coastguard Worker\`configure' configures pcap 1.10.4 to adapt to many kinds of systems.
1358*8b26181fSAndroid Build Coastguard Worker
1359*8b26181fSAndroid Build Coastguard WorkerUsage: $0 [OPTION]... [VAR=VALUE]...
1360*8b26181fSAndroid Build Coastguard Worker
1361*8b26181fSAndroid Build Coastguard WorkerTo assign environment variables (e.g., CC, CFLAGS...), specify them as
1362*8b26181fSAndroid Build Coastguard WorkerVAR=VALUE.  See below for descriptions of some of the useful variables.
1363*8b26181fSAndroid Build Coastguard Worker
1364*8b26181fSAndroid Build Coastguard WorkerDefaults for the options are specified in brackets.
1365*8b26181fSAndroid Build Coastguard Worker
1366*8b26181fSAndroid Build Coastguard WorkerConfiguration:
1367*8b26181fSAndroid Build Coastguard Worker  -h, --help              display this help and exit
1368*8b26181fSAndroid Build Coastguard Worker      --help=short        display options specific to this package
1369*8b26181fSAndroid Build Coastguard Worker      --help=recursive    display the short help of all the included packages
1370*8b26181fSAndroid Build Coastguard Worker  -V, --version           display version information and exit
1371*8b26181fSAndroid Build Coastguard Worker  -q, --quiet, --silent   do not print \`checking ...' messages
1372*8b26181fSAndroid Build Coastguard Worker      --cache-file=FILE   cache test results in FILE [disabled]
1373*8b26181fSAndroid Build Coastguard Worker  -C, --config-cache      alias for \`--cache-file=config.cache'
1374*8b26181fSAndroid Build Coastguard Worker  -n, --no-create         do not create output files
1375*8b26181fSAndroid Build Coastguard Worker      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1376*8b26181fSAndroid Build Coastguard Worker
1377*8b26181fSAndroid Build Coastguard WorkerInstallation directories:
1378*8b26181fSAndroid Build Coastguard Worker  --prefix=PREFIX         install architecture-independent files in PREFIX
1379*8b26181fSAndroid Build Coastguard Worker                          [$ac_default_prefix]
1380*8b26181fSAndroid Build Coastguard Worker  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1381*8b26181fSAndroid Build Coastguard Worker                          [PREFIX]
1382*8b26181fSAndroid Build Coastguard Worker
1383*8b26181fSAndroid Build Coastguard WorkerBy default, \`make install' will install all the files in
1384*8b26181fSAndroid Build Coastguard Worker\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1385*8b26181fSAndroid Build Coastguard Workeran installation prefix other than \`$ac_default_prefix' using \`--prefix',
1386*8b26181fSAndroid Build Coastguard Workerfor instance \`--prefix=\$HOME'.
1387*8b26181fSAndroid Build Coastguard Worker
1388*8b26181fSAndroid Build Coastguard WorkerFor better control, use the options below.
1389*8b26181fSAndroid Build Coastguard Worker
1390*8b26181fSAndroid Build Coastguard WorkerFine tuning of the installation directories:
1391*8b26181fSAndroid Build Coastguard Worker  --bindir=DIR            user executables [EPREFIX/bin]
1392*8b26181fSAndroid Build Coastguard Worker  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1393*8b26181fSAndroid Build Coastguard Worker  --libexecdir=DIR        program executables [EPREFIX/libexec]
1394*8b26181fSAndroid Build Coastguard Worker  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1395*8b26181fSAndroid Build Coastguard Worker  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1396*8b26181fSAndroid Build Coastguard Worker  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1397*8b26181fSAndroid Build Coastguard Worker  --libdir=DIR            object code libraries [EPREFIX/lib]
1398*8b26181fSAndroid Build Coastguard Worker  --includedir=DIR        C header files [PREFIX/include]
1399*8b26181fSAndroid Build Coastguard Worker  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1400*8b26181fSAndroid Build Coastguard Worker  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1401*8b26181fSAndroid Build Coastguard Worker  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1402*8b26181fSAndroid Build Coastguard Worker  --infodir=DIR           info documentation [DATAROOTDIR/info]
1403*8b26181fSAndroid Build Coastguard Worker  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1404*8b26181fSAndroid Build Coastguard Worker  --mandir=DIR            man documentation [DATAROOTDIR/man]
1405*8b26181fSAndroid Build Coastguard Worker  --docdir=DIR            documentation root [DATAROOTDIR/doc/pcap]
1406*8b26181fSAndroid Build Coastguard Worker  --htmldir=DIR           html documentation [DOCDIR]
1407*8b26181fSAndroid Build Coastguard Worker  --dvidir=DIR            dvi documentation [DOCDIR]
1408*8b26181fSAndroid Build Coastguard Worker  --pdfdir=DIR            pdf documentation [DOCDIR]
1409*8b26181fSAndroid Build Coastguard Worker  --psdir=DIR             ps documentation [DOCDIR]
1410*8b26181fSAndroid Build Coastguard Worker_ACEOF
1411*8b26181fSAndroid Build Coastguard Worker
1412*8b26181fSAndroid Build Coastguard Worker  cat <<\_ACEOF
1413*8b26181fSAndroid Build Coastguard Worker
1414*8b26181fSAndroid Build Coastguard WorkerSystem types:
1415*8b26181fSAndroid Build Coastguard Worker  --build=BUILD     configure for building on BUILD [guessed]
1416*8b26181fSAndroid Build Coastguard Worker  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1417*8b26181fSAndroid Build Coastguard Worker  --target=TARGET   configure for building compilers for TARGET [HOST]
1418*8b26181fSAndroid Build Coastguard Worker_ACEOF
1419*8b26181fSAndroid Build Coastguard Workerfi
1420*8b26181fSAndroid Build Coastguard Worker
1421*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_init_help"; then
1422*8b26181fSAndroid Build Coastguard Worker  case $ac_init_help in
1423*8b26181fSAndroid Build Coastguard Worker     short | recursive ) echo "Configuration of pcap 1.10.4:";;
1424*8b26181fSAndroid Build Coastguard Worker   esac
1425*8b26181fSAndroid Build Coastguard Worker  cat <<\_ACEOF
1426*8b26181fSAndroid Build Coastguard Worker
1427*8b26181fSAndroid Build Coastguard WorkerOptional Features:
1428*8b26181fSAndroid Build Coastguard Worker  --disable-option-checking  ignore unrecognized --enable/--with options
1429*8b26181fSAndroid Build Coastguard Worker  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1430*8b26181fSAndroid Build Coastguard Worker  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1431*8b26181fSAndroid Build Coastguard Worker  --disable-largefile     omit support for large files
1432*8b26181fSAndroid Build Coastguard Worker  --disable-protochain    disable \"protochain\" insn
1433*8b26181fSAndroid Build Coastguard Worker  --enable-ipv6           build IPv6-capable version [default=yes]
1434*8b26181fSAndroid Build Coastguard Worker  --enable-remote         enable remote packet capture [default=no]
1435*8b26181fSAndroid Build Coastguard Worker  --enable-optimizer-dbg  build optimizer debugging code
1436*8b26181fSAndroid Build Coastguard Worker  --enable-yydebug        build parser debugging code
1437*8b26181fSAndroid Build Coastguard Worker  --disable-universal     don't build universal on macOS
1438*8b26181fSAndroid Build Coastguard Worker  --enable-shared         build shared libraries [default=yes, if support
1439*8b26181fSAndroid Build Coastguard Worker                          available]
1440*8b26181fSAndroid Build Coastguard Worker  --enable-usb            enable Linux usbmon USB capture support
1441*8b26181fSAndroid Build Coastguard Worker                          [default=yes, if support available]
1442*8b26181fSAndroid Build Coastguard Worker  --enable-netmap         enable netmap support [default=yes, if support
1443*8b26181fSAndroid Build Coastguard Worker                          available]
1444*8b26181fSAndroid Build Coastguard Worker  --enable-bluetooth      enable Bluetooth support [default=yes, if support
1445*8b26181fSAndroid Build Coastguard Worker                          available]
1446*8b26181fSAndroid Build Coastguard Worker  --enable-dbus           enable D-Bus capture support [default=yes, if
1447*8b26181fSAndroid Build Coastguard Worker                          support available]
1448*8b26181fSAndroid Build Coastguard Worker  --enable-rdma           enable RDMA capture support [default=yes, if support
1449*8b26181fSAndroid Build Coastguard Worker                          available]
1450*8b26181fSAndroid Build Coastguard Worker
1451*8b26181fSAndroid Build Coastguard WorkerOptional Packages:
1452*8b26181fSAndroid Build Coastguard Worker  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1453*8b26181fSAndroid Build Coastguard Worker  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1454*8b26181fSAndroid Build Coastguard Worker  --without-gcc           don't use gcc
1455*8b26181fSAndroid Build Coastguard Worker  --with-pcap=TYPE        use packet capture TYPE
1456*8b26181fSAndroid Build Coastguard Worker  --without-libnl         disable libnl support [default=yes, on Linux, if
1457*8b26181fSAndroid Build Coastguard Worker                          present]
1458*8b26181fSAndroid Build Coastguard Worker  --with-dag[=DIR]        include Endace DAG support (located in directory
1459*8b26181fSAndroid Build Coastguard Worker                          DIR, if supplied). [default=yes, if present]
1460*8b26181fSAndroid Build Coastguard Worker  --with-dag-includes=IDIR
1461*8b26181fSAndroid Build Coastguard Worker                          Endace DAG include directory, if not DIR/include
1462*8b26181fSAndroid Build Coastguard Worker  --with-dag-libraries=LDIR
1463*8b26181fSAndroid Build Coastguard Worker                          Endace DAG library directory, if not DIR/lib
1464*8b26181fSAndroid Build Coastguard Worker  --with-septel[=DIR]     include Septel support (located in directory DIR, if
1465*8b26181fSAndroid Build Coastguard Worker                          supplied). [default=yes, if present]
1466*8b26181fSAndroid Build Coastguard Worker  --with-snf[=DIR]        include Myricom SNF support (located in directory
1467*8b26181fSAndroid Build Coastguard Worker                          DIR, if supplied). [default=yes, if present]
1468*8b26181fSAndroid Build Coastguard Worker  --with-snf-includes=IDIR
1469*8b26181fSAndroid Build Coastguard Worker                          Myricom SNF include directory, if not DIR/include
1470*8b26181fSAndroid Build Coastguard Worker  --with-snf-libraries=LDIR
1471*8b26181fSAndroid Build Coastguard Worker                          Myricom SNF library directory, if not DIR/lib
1472*8b26181fSAndroid Build Coastguard Worker  --with-turbocap[=DIR]   include Riverbed TurboCap support (located in
1473*8b26181fSAndroid Build Coastguard Worker                          directory DIR, if supplied). [default=yes, if
1474*8b26181fSAndroid Build Coastguard Worker                          present]
1475*8b26181fSAndroid Build Coastguard Worker  --with-dpdk[=DIR]       include DPDK support (located in directory DIR, if
1476*8b26181fSAndroid Build Coastguard Worker                          supplied). [default=yes, if present]
1477*8b26181fSAndroid Build Coastguard Worker
1478*8b26181fSAndroid Build Coastguard WorkerSome influential environment variables:
1479*8b26181fSAndroid Build Coastguard Worker  CC          C compiler command
1480*8b26181fSAndroid Build Coastguard Worker  CFLAGS      C compiler flags
1481*8b26181fSAndroid Build Coastguard Worker  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1482*8b26181fSAndroid Build Coastguard Worker              nonstandard directory <lib dir>
1483*8b26181fSAndroid Build Coastguard Worker  LIBS        libraries to pass to the linker, e.g. -l<library>
1484*8b26181fSAndroid Build Coastguard Worker  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1485*8b26181fSAndroid Build Coastguard Worker              you have headers in a nonstandard directory <include dir>
1486*8b26181fSAndroid Build Coastguard Worker  CPP         C preprocessor
1487*8b26181fSAndroid Build Coastguard Worker  CXX         C++ compiler command
1488*8b26181fSAndroid Build Coastguard Worker  CXXFLAGS    C++ compiler flags
1489*8b26181fSAndroid Build Coastguard Worker  PKG_CONFIG  path to pkg-config utility
1490*8b26181fSAndroid Build Coastguard Worker  PKG_CONFIG_PATH
1491*8b26181fSAndroid Build Coastguard Worker              directories to add to pkg-config's search path
1492*8b26181fSAndroid Build Coastguard Worker  PKG_CONFIG_LIBDIR
1493*8b26181fSAndroid Build Coastguard Worker              path overriding pkg-config's built-in search path
1494*8b26181fSAndroid Build Coastguard Worker  LIBNL_CFLAGS
1495*8b26181fSAndroid Build Coastguard Worker              C compiler flags for libnl-genl-3.0, overriding pkg-config
1496*8b26181fSAndroid Build Coastguard Worker  LIBNL_LIBS  linker flags for libnl-genl-3.0, overriding pkg-config
1497*8b26181fSAndroid Build Coastguard Worker  LIBNL_LIBS_STATIC
1498*8b26181fSAndroid Build Coastguard Worker              static-link linker flags for libnl-genl-3.0, overriding
1499*8b26181fSAndroid Build Coastguard Worker              pkg-config
1500*8b26181fSAndroid Build Coastguard Worker  OPENSSL_CFLAGS
1501*8b26181fSAndroid Build Coastguard Worker              C compiler flags for openssl, overriding pkg-config
1502*8b26181fSAndroid Build Coastguard Worker  OPENSSL_LIBS
1503*8b26181fSAndroid Build Coastguard Worker              linker flags for openssl, overriding pkg-config
1504*8b26181fSAndroid Build Coastguard Worker  OPENSSL_LIBS_STATIC
1505*8b26181fSAndroid Build Coastguard Worker              static-link linker flags for openssl, overriding pkg-config
1506*8b26181fSAndroid Build Coastguard Worker  DPDK_CFLAGS C compiler flags for libdpdk, overriding pkg-config
1507*8b26181fSAndroid Build Coastguard Worker  DPDK_LIBS   linker flags for libdpdk, overriding pkg-config
1508*8b26181fSAndroid Build Coastguard Worker  DPDK_LIBS_STATIC
1509*8b26181fSAndroid Build Coastguard Worker              static-link linker flags for libdpdk, overriding pkg-config
1510*8b26181fSAndroid Build Coastguard Worker  DBUS_CFLAGS C compiler flags for dbus-1, overriding pkg-config
1511*8b26181fSAndroid Build Coastguard Worker  DBUS_LIBS   linker flags for dbus-1, overriding pkg-config
1512*8b26181fSAndroid Build Coastguard Worker  DBUS_LIBS_STATIC
1513*8b26181fSAndroid Build Coastguard Worker              static-link linker flags for dbus-1, overriding pkg-config
1514*8b26181fSAndroid Build Coastguard Worker  LIBIBVERBS_CFLAGS
1515*8b26181fSAndroid Build Coastguard Worker              C compiler flags for libibverbs, overriding pkg-config
1516*8b26181fSAndroid Build Coastguard Worker  LIBIBVERBS_LIBS
1517*8b26181fSAndroid Build Coastguard Worker              linker flags for libibverbs, overriding pkg-config
1518*8b26181fSAndroid Build Coastguard Worker  LIBIBVERBS_LIBS_STATIC
1519*8b26181fSAndroid Build Coastguard Worker              static-link linker flags for libibverbs, overriding pkg-config
1520*8b26181fSAndroid Build Coastguard Worker
1521*8b26181fSAndroid Build Coastguard WorkerUse these variables to override the choices made by `configure' or to help
1522*8b26181fSAndroid Build Coastguard Workerit to find libraries and programs with nonstandard names/locations.
1523*8b26181fSAndroid Build Coastguard Worker
1524*8b26181fSAndroid Build Coastguard WorkerReport bugs to the package provider.
1525*8b26181fSAndroid Build Coastguard Worker_ACEOF
1526*8b26181fSAndroid Build Coastguard Workerac_status=$?
1527*8b26181fSAndroid Build Coastguard Workerfi
1528*8b26181fSAndroid Build Coastguard Worker
1529*8b26181fSAndroid Build Coastguard Workerif test "$ac_init_help" = "recursive"; then
1530*8b26181fSAndroid Build Coastguard Worker  # If there are subdirs, report their specific --help.
1531*8b26181fSAndroid Build Coastguard Worker  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1532*8b26181fSAndroid Build Coastguard Worker    test -d "$ac_dir" ||
1533*8b26181fSAndroid Build Coastguard Worker      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1534*8b26181fSAndroid Build Coastguard Worker      continue
1535*8b26181fSAndroid Build Coastguard Worker    ac_builddir=.
1536*8b26181fSAndroid Build Coastguard Worker
1537*8b26181fSAndroid Build Coastguard Workercase "$ac_dir" in
1538*8b26181fSAndroid Build Coastguard Worker.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1539*8b26181fSAndroid Build Coastguard Worker*)
1540*8b26181fSAndroid Build Coastguard Worker  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1541*8b26181fSAndroid Build Coastguard Worker  # A ".." for each directory in $ac_dir_suffix.
1542*8b26181fSAndroid Build Coastguard Worker  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1543*8b26181fSAndroid Build Coastguard Worker  case $ac_top_builddir_sub in
1544*8b26181fSAndroid Build Coastguard Worker  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1545*8b26181fSAndroid Build Coastguard Worker  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1546*8b26181fSAndroid Build Coastguard Worker  esac ;;
1547*8b26181fSAndroid Build Coastguard Workeresac
1548*8b26181fSAndroid Build Coastguard Workerac_abs_top_builddir=$ac_pwd
1549*8b26181fSAndroid Build Coastguard Workerac_abs_builddir=$ac_pwd$ac_dir_suffix
1550*8b26181fSAndroid Build Coastguard Worker# for backward compatibility:
1551*8b26181fSAndroid Build Coastguard Workerac_top_builddir=$ac_top_build_prefix
1552*8b26181fSAndroid Build Coastguard Worker
1553*8b26181fSAndroid Build Coastguard Workercase $srcdir in
1554*8b26181fSAndroid Build Coastguard Worker  .)  # We are building in place.
1555*8b26181fSAndroid Build Coastguard Worker    ac_srcdir=.
1556*8b26181fSAndroid Build Coastguard Worker    ac_top_srcdir=$ac_top_builddir_sub
1557*8b26181fSAndroid Build Coastguard Worker    ac_abs_top_srcdir=$ac_pwd ;;
1558*8b26181fSAndroid Build Coastguard Worker  [\\/]* | ?:[\\/]* )  # Absolute name.
1559*8b26181fSAndroid Build Coastguard Worker    ac_srcdir=$srcdir$ac_dir_suffix;
1560*8b26181fSAndroid Build Coastguard Worker    ac_top_srcdir=$srcdir
1561*8b26181fSAndroid Build Coastguard Worker    ac_abs_top_srcdir=$srcdir ;;
1562*8b26181fSAndroid Build Coastguard Worker  *) # Relative name.
1563*8b26181fSAndroid Build Coastguard Worker    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1564*8b26181fSAndroid Build Coastguard Worker    ac_top_srcdir=$ac_top_build_prefix$srcdir
1565*8b26181fSAndroid Build Coastguard Worker    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1566*8b26181fSAndroid Build Coastguard Workeresac
1567*8b26181fSAndroid Build Coastguard Workerac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1568*8b26181fSAndroid Build Coastguard Worker
1569*8b26181fSAndroid Build Coastguard Worker    cd "$ac_dir" || { ac_status=$?; continue; }
1570*8b26181fSAndroid Build Coastguard Worker    # Check for guested configure.
1571*8b26181fSAndroid Build Coastguard Worker    if test -f "$ac_srcdir/configure.gnu"; then
1572*8b26181fSAndroid Build Coastguard Worker      echo &&
1573*8b26181fSAndroid Build Coastguard Worker      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1574*8b26181fSAndroid Build Coastguard Worker    elif test -f "$ac_srcdir/configure"; then
1575*8b26181fSAndroid Build Coastguard Worker      echo &&
1576*8b26181fSAndroid Build Coastguard Worker      $SHELL "$ac_srcdir/configure" --help=recursive
1577*8b26181fSAndroid Build Coastguard Worker    else
1578*8b26181fSAndroid Build Coastguard Worker      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1579*8b26181fSAndroid Build Coastguard Worker    fi || ac_status=$?
1580*8b26181fSAndroid Build Coastguard Worker    cd "$ac_pwd" || { ac_status=$?; break; }
1581*8b26181fSAndroid Build Coastguard Worker  done
1582*8b26181fSAndroid Build Coastguard Workerfi
1583*8b26181fSAndroid Build Coastguard Worker
1584*8b26181fSAndroid Build Coastguard Workertest -n "$ac_init_help" && exit $ac_status
1585*8b26181fSAndroid Build Coastguard Workerif $ac_init_version; then
1586*8b26181fSAndroid Build Coastguard Worker  cat <<\_ACEOF
1587*8b26181fSAndroid Build Coastguard Workerpcap configure 1.10.4
1588*8b26181fSAndroid Build Coastguard Workergenerated by GNU Autoconf 2.69
1589*8b26181fSAndroid Build Coastguard Worker
1590*8b26181fSAndroid Build Coastguard WorkerCopyright (C) 2012 Free Software Foundation, Inc.
1591*8b26181fSAndroid Build Coastguard WorkerThis configure script is free software; the Free Software Foundation
1592*8b26181fSAndroid Build Coastguard Workergives unlimited permission to copy, distribute and modify it.
1593*8b26181fSAndroid Build Coastguard Worker_ACEOF
1594*8b26181fSAndroid Build Coastguard Worker  exit
1595*8b26181fSAndroid Build Coastguard Workerfi
1596*8b26181fSAndroid Build Coastguard Worker
1597*8b26181fSAndroid Build Coastguard Worker## ------------------------ ##
1598*8b26181fSAndroid Build Coastguard Worker## Autoconf initialization. ##
1599*8b26181fSAndroid Build Coastguard Worker## ------------------------ ##
1600*8b26181fSAndroid Build Coastguard Worker
1601*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_try_compile LINENO
1602*8b26181fSAndroid Build Coastguard Worker# --------------------------
1603*8b26181fSAndroid Build Coastguard Worker# Try to compile conftest.$ac_ext, and return whether this succeeded.
1604*8b26181fSAndroid Build Coastguard Workerac_fn_c_try_compile ()
1605*8b26181fSAndroid Build Coastguard Worker{
1606*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1607*8b26181fSAndroid Build Coastguard Worker  rm -f conftest.$ac_objext
1608*8b26181fSAndroid Build Coastguard Worker  if { { ac_try="$ac_compile"
1609*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
1610*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1611*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
1612*8b26181fSAndroid Build Coastguard Workeresac
1613*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1614*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
1615*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_compile") 2>conftest.err
1616*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
1617*8b26181fSAndroid Build Coastguard Worker  if test -s conftest.err; then
1618*8b26181fSAndroid Build Coastguard Worker    grep -v '^ *+' conftest.err >conftest.er1
1619*8b26181fSAndroid Build Coastguard Worker    cat conftest.er1 >&5
1620*8b26181fSAndroid Build Coastguard Worker    mv -f conftest.er1 conftest.err
1621*8b26181fSAndroid Build Coastguard Worker  fi
1622*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; } && {
1624*8b26181fSAndroid Build Coastguard Worker	 test -z "$ac_c_werror_flag" ||
1625*8b26181fSAndroid Build Coastguard Worker	 test ! -s conftest.err
1626*8b26181fSAndroid Build Coastguard Worker       } && test -s conftest.$ac_objext; then :
1627*8b26181fSAndroid Build Coastguard Worker  ac_retval=0
1628*8b26181fSAndroid Build Coastguard Workerelse
1629*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: failed program was:" >&5
1630*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
1631*8b26181fSAndroid Build Coastguard Worker
1632*8b26181fSAndroid Build Coastguard Worker	ac_retval=1
1633*8b26181fSAndroid Build Coastguard Workerfi
1634*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1635*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
1636*8b26181fSAndroid Build Coastguard Worker
1637*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_try_compile
1638*8b26181fSAndroid Build Coastguard Worker
1639*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_try_run LINENO
1640*8b26181fSAndroid Build Coastguard Worker# ----------------------
1641*8b26181fSAndroid Build Coastguard Worker# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1642*8b26181fSAndroid Build Coastguard Worker# that executables *can* be run.
1643*8b26181fSAndroid Build Coastguard Workerac_fn_c_try_run ()
1644*8b26181fSAndroid Build Coastguard Worker{
1645*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1646*8b26181fSAndroid Build Coastguard Worker  if { { ac_try="$ac_link"
1647*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
1648*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1649*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
1650*8b26181fSAndroid Build Coastguard Workeresac
1651*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1652*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
1653*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_link") 2>&5
1654*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
1655*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1656*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1657*8b26181fSAndroid Build Coastguard Worker  { { case "(($ac_try" in
1658*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
1660*8b26181fSAndroid Build Coastguard Workeresac
1661*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
1663*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_try") 2>&5
1664*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
1665*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1666*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; }; then :
1667*8b26181fSAndroid Build Coastguard Worker  ac_retval=0
1668*8b26181fSAndroid Build Coastguard Workerelse
1669*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: program exited with status $ac_status" >&5
1670*8b26181fSAndroid Build Coastguard Worker       $as_echo "$as_me: failed program was:" >&5
1671*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
1672*8b26181fSAndroid Build Coastguard Worker
1673*8b26181fSAndroid Build Coastguard Worker       ac_retval=$ac_status
1674*8b26181fSAndroid Build Coastguard Workerfi
1675*8b26181fSAndroid Build Coastguard Worker  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1676*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1677*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
1678*8b26181fSAndroid Build Coastguard Worker
1679*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_try_run
1680*8b26181fSAndroid Build Coastguard Worker
1681*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1682*8b26181fSAndroid Build Coastguard Worker# --------------------------------------------
1683*8b26181fSAndroid Build Coastguard Worker# Tries to find the compile-time value of EXPR in a program that includes
1684*8b26181fSAndroid Build Coastguard Worker# INCLUDES, setting VAR accordingly. Returns whether the value could be
1685*8b26181fSAndroid Build Coastguard Worker# computed
1686*8b26181fSAndroid Build Coastguard Workerac_fn_c_compute_int ()
1687*8b26181fSAndroid Build Coastguard Worker{
1688*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1689*8b26181fSAndroid Build Coastguard Worker  if test "$cross_compiling" = yes; then
1690*8b26181fSAndroid Build Coastguard Worker    # Depending upon the size, compute the lo and hi bounds.
1691*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
1692*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
1693*8b26181fSAndroid Build Coastguard Worker$4
1694*8b26181fSAndroid Build Coastguard Workerint
1695*8b26181fSAndroid Build Coastguard Workermain ()
1696*8b26181fSAndroid Build Coastguard Worker{
1697*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) >= 0)];
1698*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
1699*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
1700*8b26181fSAndroid Build Coastguard Worker
1701*8b26181fSAndroid Build Coastguard Worker  ;
1702*8b26181fSAndroid Build Coastguard Worker  return 0;
1703*8b26181fSAndroid Build Coastguard Worker}
1704*8b26181fSAndroid Build Coastguard Worker_ACEOF
1705*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
1706*8b26181fSAndroid Build Coastguard Worker  ac_lo=0 ac_mid=0
1707*8b26181fSAndroid Build Coastguard Worker  while :; do
1708*8b26181fSAndroid Build Coastguard Worker    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1709*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
1710*8b26181fSAndroid Build Coastguard Worker$4
1711*8b26181fSAndroid Build Coastguard Workerint
1712*8b26181fSAndroid Build Coastguard Workermain ()
1713*8b26181fSAndroid Build Coastguard Worker{
1714*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];
1715*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
1716*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
1717*8b26181fSAndroid Build Coastguard Worker
1718*8b26181fSAndroid Build Coastguard Worker  ;
1719*8b26181fSAndroid Build Coastguard Worker  return 0;
1720*8b26181fSAndroid Build Coastguard Worker}
1721*8b26181fSAndroid Build Coastguard Worker_ACEOF
1722*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
1723*8b26181fSAndroid Build Coastguard Worker  ac_hi=$ac_mid; break
1724*8b26181fSAndroid Build Coastguard Workerelse
1725*8b26181fSAndroid Build Coastguard Worker  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
1726*8b26181fSAndroid Build Coastguard Worker			if test $ac_lo -le $ac_mid; then
1727*8b26181fSAndroid Build Coastguard Worker			  ac_lo= ac_hi=
1728*8b26181fSAndroid Build Coastguard Worker			  break
1729*8b26181fSAndroid Build Coastguard Worker			fi
1730*8b26181fSAndroid Build Coastguard Worker			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
1731*8b26181fSAndroid Build Coastguard Workerfi
1732*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1733*8b26181fSAndroid Build Coastguard Worker  done
1734*8b26181fSAndroid Build Coastguard Workerelse
1735*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1736*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
1737*8b26181fSAndroid Build Coastguard Worker$4
1738*8b26181fSAndroid Build Coastguard Workerint
1739*8b26181fSAndroid Build Coastguard Workermain ()
1740*8b26181fSAndroid Build Coastguard Worker{
1741*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) < 0)];
1742*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
1743*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
1744*8b26181fSAndroid Build Coastguard Worker
1745*8b26181fSAndroid Build Coastguard Worker  ;
1746*8b26181fSAndroid Build Coastguard Worker  return 0;
1747*8b26181fSAndroid Build Coastguard Worker}
1748*8b26181fSAndroid Build Coastguard Worker_ACEOF
1749*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
1750*8b26181fSAndroid Build Coastguard Worker  ac_hi=-1 ac_mid=-1
1751*8b26181fSAndroid Build Coastguard Worker  while :; do
1752*8b26181fSAndroid Build Coastguard Worker    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1753*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
1754*8b26181fSAndroid Build Coastguard Worker$4
1755*8b26181fSAndroid Build Coastguard Workerint
1756*8b26181fSAndroid Build Coastguard Workermain ()
1757*8b26181fSAndroid Build Coastguard Worker{
1758*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) >= $ac_mid)];
1759*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
1760*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
1761*8b26181fSAndroid Build Coastguard Worker
1762*8b26181fSAndroid Build Coastguard Worker  ;
1763*8b26181fSAndroid Build Coastguard Worker  return 0;
1764*8b26181fSAndroid Build Coastguard Worker}
1765*8b26181fSAndroid Build Coastguard Worker_ACEOF
1766*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
1767*8b26181fSAndroid Build Coastguard Worker  ac_lo=$ac_mid; break
1768*8b26181fSAndroid Build Coastguard Workerelse
1769*8b26181fSAndroid Build Coastguard Worker  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
1770*8b26181fSAndroid Build Coastguard Worker			if test $ac_mid -le $ac_hi; then
1771*8b26181fSAndroid Build Coastguard Worker			  ac_lo= ac_hi=
1772*8b26181fSAndroid Build Coastguard Worker			  break
1773*8b26181fSAndroid Build Coastguard Worker			fi
1774*8b26181fSAndroid Build Coastguard Worker			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
1775*8b26181fSAndroid Build Coastguard Workerfi
1776*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1777*8b26181fSAndroid Build Coastguard Worker  done
1778*8b26181fSAndroid Build Coastguard Workerelse
1779*8b26181fSAndroid Build Coastguard Worker  ac_lo= ac_hi=
1780*8b26181fSAndroid Build Coastguard Workerfi
1781*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1782*8b26181fSAndroid Build Coastguard Workerfi
1783*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1784*8b26181fSAndroid Build Coastguard Worker# Binary search between lo and hi bounds.
1785*8b26181fSAndroid Build Coastguard Workerwhile test "x$ac_lo" != "x$ac_hi"; do
1786*8b26181fSAndroid Build Coastguard Worker  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
1787*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1788*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
1789*8b26181fSAndroid Build Coastguard Worker$4
1790*8b26181fSAndroid Build Coastguard Workerint
1791*8b26181fSAndroid Build Coastguard Workermain ()
1792*8b26181fSAndroid Build Coastguard Worker{
1793*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];
1794*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
1795*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
1796*8b26181fSAndroid Build Coastguard Worker
1797*8b26181fSAndroid Build Coastguard Worker  ;
1798*8b26181fSAndroid Build Coastguard Worker  return 0;
1799*8b26181fSAndroid Build Coastguard Worker}
1800*8b26181fSAndroid Build Coastguard Worker_ACEOF
1801*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
1802*8b26181fSAndroid Build Coastguard Worker  ac_hi=$ac_mid
1803*8b26181fSAndroid Build Coastguard Workerelse
1804*8b26181fSAndroid Build Coastguard Worker  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
1805*8b26181fSAndroid Build Coastguard Workerfi
1806*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1807*8b26181fSAndroid Build Coastguard Workerdone
1808*8b26181fSAndroid Build Coastguard Workercase $ac_lo in #((
1809*8b26181fSAndroid Build Coastguard Worker?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
1810*8b26181fSAndroid Build Coastguard Worker'') ac_retval=1 ;;
1811*8b26181fSAndroid Build Coastguard Workeresac
1812*8b26181fSAndroid Build Coastguard Worker  else
1813*8b26181fSAndroid Build Coastguard Worker    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1814*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
1815*8b26181fSAndroid Build Coastguard Worker$4
1816*8b26181fSAndroid Build Coastguard Workerstatic long int longval () { return $2; }
1817*8b26181fSAndroid Build Coastguard Workerstatic unsigned long int ulongval () { return $2; }
1818*8b26181fSAndroid Build Coastguard Worker#include <stdio.h>
1819*8b26181fSAndroid Build Coastguard Worker#include <stdlib.h>
1820*8b26181fSAndroid Build Coastguard Workerint
1821*8b26181fSAndroid Build Coastguard Workermain ()
1822*8b26181fSAndroid Build Coastguard Worker{
1823*8b26181fSAndroid Build Coastguard Worker
1824*8b26181fSAndroid Build Coastguard Worker  FILE *f = fopen ("conftest.val", "w");
1825*8b26181fSAndroid Build Coastguard Worker  if (! f)
1826*8b26181fSAndroid Build Coastguard Worker    return 1;
1827*8b26181fSAndroid Build Coastguard Worker  if (($2) < 0)
1828*8b26181fSAndroid Build Coastguard Worker    {
1829*8b26181fSAndroid Build Coastguard Worker      long int i = longval ();
1830*8b26181fSAndroid Build Coastguard Worker      if (i != ($2))
1831*8b26181fSAndroid Build Coastguard Worker	return 1;
1832*8b26181fSAndroid Build Coastguard Worker      fprintf (f, "%ld", i);
1833*8b26181fSAndroid Build Coastguard Worker    }
1834*8b26181fSAndroid Build Coastguard Worker  else
1835*8b26181fSAndroid Build Coastguard Worker    {
1836*8b26181fSAndroid Build Coastguard Worker      unsigned long int i = ulongval ();
1837*8b26181fSAndroid Build Coastguard Worker      if (i != ($2))
1838*8b26181fSAndroid Build Coastguard Worker	return 1;
1839*8b26181fSAndroid Build Coastguard Worker      fprintf (f, "%lu", i);
1840*8b26181fSAndroid Build Coastguard Worker    }
1841*8b26181fSAndroid Build Coastguard Worker  /* Do not output a trailing newline, as this causes \r\n confusion
1842*8b26181fSAndroid Build Coastguard Worker     on some platforms.  */
1843*8b26181fSAndroid Build Coastguard Worker  return ferror (f) || fclose (f) != 0;
1844*8b26181fSAndroid Build Coastguard Worker
1845*8b26181fSAndroid Build Coastguard Worker  ;
1846*8b26181fSAndroid Build Coastguard Worker  return 0;
1847*8b26181fSAndroid Build Coastguard Worker}
1848*8b26181fSAndroid Build Coastguard Worker_ACEOF
1849*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_run "$LINENO"; then :
1850*8b26181fSAndroid Build Coastguard Worker  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
1851*8b26181fSAndroid Build Coastguard Workerelse
1852*8b26181fSAndroid Build Coastguard Worker  ac_retval=1
1853*8b26181fSAndroid Build Coastguard Workerfi
1854*8b26181fSAndroid Build Coastguard Workerrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
1855*8b26181fSAndroid Build Coastguard Worker  conftest.$ac_objext conftest.beam conftest.$ac_ext
1856*8b26181fSAndroid Build Coastguard Workerrm -f conftest.val
1857*8b26181fSAndroid Build Coastguard Worker
1858*8b26181fSAndroid Build Coastguard Worker  fi
1859*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1860*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
1861*8b26181fSAndroid Build Coastguard Worker
1862*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_compute_int
1863*8b26181fSAndroid Build Coastguard Worker
1864*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_try_cpp LINENO
1865*8b26181fSAndroid Build Coastguard Worker# ----------------------
1866*8b26181fSAndroid Build Coastguard Worker# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1867*8b26181fSAndroid Build Coastguard Workerac_fn_c_try_cpp ()
1868*8b26181fSAndroid Build Coastguard Worker{
1869*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1870*8b26181fSAndroid Build Coastguard Worker  if { { ac_try="$ac_cpp conftest.$ac_ext"
1871*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
1872*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1873*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
1874*8b26181fSAndroid Build Coastguard Workeresac
1875*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1876*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
1877*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1878*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
1879*8b26181fSAndroid Build Coastguard Worker  if test -s conftest.err; then
1880*8b26181fSAndroid Build Coastguard Worker    grep -v '^ *+' conftest.err >conftest.er1
1881*8b26181fSAndroid Build Coastguard Worker    cat conftest.er1 >&5
1882*8b26181fSAndroid Build Coastguard Worker    mv -f conftest.er1 conftest.err
1883*8b26181fSAndroid Build Coastguard Worker  fi
1884*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1885*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; } > conftest.i && {
1886*8b26181fSAndroid Build Coastguard Worker	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1887*8b26181fSAndroid Build Coastguard Worker	 test ! -s conftest.err
1888*8b26181fSAndroid Build Coastguard Worker       }; then :
1889*8b26181fSAndroid Build Coastguard Worker  ac_retval=0
1890*8b26181fSAndroid Build Coastguard Workerelse
1891*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: failed program was:" >&5
1892*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
1893*8b26181fSAndroid Build Coastguard Worker
1894*8b26181fSAndroid Build Coastguard Worker    ac_retval=1
1895*8b26181fSAndroid Build Coastguard Workerfi
1896*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1897*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
1898*8b26181fSAndroid Build Coastguard Worker
1899*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_try_cpp
1900*8b26181fSAndroid Build Coastguard Worker
1901*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1902*8b26181fSAndroid Build Coastguard Worker# -------------------------------------------------------
1903*8b26181fSAndroid Build Coastguard Worker# Tests whether HEADER exists and can be compiled using the include files in
1904*8b26181fSAndroid Build Coastguard Worker# INCLUDES, setting the cache variable VAR accordingly.
1905*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_compile ()
1906*8b26181fSAndroid Build Coastguard Worker{
1907*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1908*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1909*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $2... " >&6; }
1910*8b26181fSAndroid Build Coastguard Workerif eval \${$3+:} false; then :
1911*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
1912*8b26181fSAndroid Build Coastguard Workerelse
1913*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1914*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
1915*8b26181fSAndroid Build Coastguard Worker$4
1916*8b26181fSAndroid Build Coastguard Worker#include <$2>
1917*8b26181fSAndroid Build Coastguard Worker_ACEOF
1918*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
1919*8b26181fSAndroid Build Coastguard Worker  eval "$3=yes"
1920*8b26181fSAndroid Build Coastguard Workerelse
1921*8b26181fSAndroid Build Coastguard Worker  eval "$3=no"
1922*8b26181fSAndroid Build Coastguard Workerfi
1923*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1924*8b26181fSAndroid Build Coastguard Workerfi
1925*8b26181fSAndroid Build Coastguard Workereval ac_res=\$$3
1926*8b26181fSAndroid Build Coastguard Worker	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1927*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_res" >&6; }
1928*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1929*8b26181fSAndroid Build Coastguard Worker
1930*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_check_header_compile
1931*8b26181fSAndroid Build Coastguard Worker
1932*8b26181fSAndroid Build Coastguard Worker# ac_fn_cxx_try_compile LINENO
1933*8b26181fSAndroid Build Coastguard Worker# ----------------------------
1934*8b26181fSAndroid Build Coastguard Worker# Try to compile conftest.$ac_ext, and return whether this succeeded.
1935*8b26181fSAndroid Build Coastguard Workerac_fn_cxx_try_compile ()
1936*8b26181fSAndroid Build Coastguard Worker{
1937*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938*8b26181fSAndroid Build Coastguard Worker  rm -f conftest.$ac_objext
1939*8b26181fSAndroid Build Coastguard Worker  if { { ac_try="$ac_compile"
1940*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
1941*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1942*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
1943*8b26181fSAndroid Build Coastguard Workeresac
1944*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1945*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
1946*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_compile") 2>conftest.err
1947*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
1948*8b26181fSAndroid Build Coastguard Worker  if test -s conftest.err; then
1949*8b26181fSAndroid Build Coastguard Worker    grep -v '^ *+' conftest.err >conftest.er1
1950*8b26181fSAndroid Build Coastguard Worker    cat conftest.er1 >&5
1951*8b26181fSAndroid Build Coastguard Worker    mv -f conftest.er1 conftest.err
1952*8b26181fSAndroid Build Coastguard Worker  fi
1953*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1954*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; } && {
1955*8b26181fSAndroid Build Coastguard Worker	 test -z "$ac_cxx_werror_flag" ||
1956*8b26181fSAndroid Build Coastguard Worker	 test ! -s conftest.err
1957*8b26181fSAndroid Build Coastguard Worker       } && test -s conftest.$ac_objext; then :
1958*8b26181fSAndroid Build Coastguard Worker  ac_retval=0
1959*8b26181fSAndroid Build Coastguard Workerelse
1960*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: failed program was:" >&5
1961*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
1962*8b26181fSAndroid Build Coastguard Worker
1963*8b26181fSAndroid Build Coastguard Worker	ac_retval=1
1964*8b26181fSAndroid Build Coastguard Workerfi
1965*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1966*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
1967*8b26181fSAndroid Build Coastguard Worker
1968*8b26181fSAndroid Build Coastguard Worker} # ac_fn_cxx_try_compile
1969*8b26181fSAndroid Build Coastguard Worker
1970*8b26181fSAndroid Build Coastguard Worker# ac_fn_cxx_try_run LINENO
1971*8b26181fSAndroid Build Coastguard Worker# ------------------------
1972*8b26181fSAndroid Build Coastguard Worker# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1973*8b26181fSAndroid Build Coastguard Worker# that executables *can* be run.
1974*8b26181fSAndroid Build Coastguard Workerac_fn_cxx_try_run ()
1975*8b26181fSAndroid Build Coastguard Worker{
1976*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1977*8b26181fSAndroid Build Coastguard Worker  if { { ac_try="$ac_link"
1978*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
1979*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1980*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
1981*8b26181fSAndroid Build Coastguard Workeresac
1982*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1983*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
1984*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_link") 2>&5
1985*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
1986*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1987*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1988*8b26181fSAndroid Build Coastguard Worker  { { case "(($ac_try" in
1989*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1990*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
1991*8b26181fSAndroid Build Coastguard Workeresac
1992*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1993*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
1994*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_try") 2>&5
1995*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
1996*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1997*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; }; then :
1998*8b26181fSAndroid Build Coastguard Worker  ac_retval=0
1999*8b26181fSAndroid Build Coastguard Workerelse
2000*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: program exited with status $ac_status" >&5
2001*8b26181fSAndroid Build Coastguard Worker       $as_echo "$as_me: failed program was:" >&5
2002*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
2003*8b26181fSAndroid Build Coastguard Worker
2004*8b26181fSAndroid Build Coastguard Worker       ac_retval=$ac_status
2005*8b26181fSAndroid Build Coastguard Workerfi
2006*8b26181fSAndroid Build Coastguard Worker  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2007*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2008*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
2009*8b26181fSAndroid Build Coastguard Worker
2010*8b26181fSAndroid Build Coastguard Worker} # ac_fn_cxx_try_run
2011*8b26181fSAndroid Build Coastguard Worker
2012*8b26181fSAndroid Build Coastguard Worker# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2013*8b26181fSAndroid Build Coastguard Worker# ----------------------------------------------
2014*8b26181fSAndroid Build Coastguard Worker# Tries to find the compile-time value of EXPR in a program that includes
2015*8b26181fSAndroid Build Coastguard Worker# INCLUDES, setting VAR accordingly. Returns whether the value could be
2016*8b26181fSAndroid Build Coastguard Worker# computed
2017*8b26181fSAndroid Build Coastguard Workerac_fn_cxx_compute_int ()
2018*8b26181fSAndroid Build Coastguard Worker{
2019*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2020*8b26181fSAndroid Build Coastguard Worker  if test "$cross_compiling" = yes; then
2021*8b26181fSAndroid Build Coastguard Worker    # Depending upon the size, compute the lo and hi bounds.
2022*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
2023*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2024*8b26181fSAndroid Build Coastguard Worker$4
2025*8b26181fSAndroid Build Coastguard Workerint
2026*8b26181fSAndroid Build Coastguard Workermain ()
2027*8b26181fSAndroid Build Coastguard Worker{
2028*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) >= 0)];
2029*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
2030*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
2031*8b26181fSAndroid Build Coastguard Worker
2032*8b26181fSAndroid Build Coastguard Worker  ;
2033*8b26181fSAndroid Build Coastguard Worker  return 0;
2034*8b26181fSAndroid Build Coastguard Worker}
2035*8b26181fSAndroid Build Coastguard Worker_ACEOF
2036*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
2037*8b26181fSAndroid Build Coastguard Worker  ac_lo=0 ac_mid=0
2038*8b26181fSAndroid Build Coastguard Worker  while :; do
2039*8b26181fSAndroid Build Coastguard Worker    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2041*8b26181fSAndroid Build Coastguard Worker$4
2042*8b26181fSAndroid Build Coastguard Workerint
2043*8b26181fSAndroid Build Coastguard Workermain ()
2044*8b26181fSAndroid Build Coastguard Worker{
2045*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];
2046*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
2047*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
2048*8b26181fSAndroid Build Coastguard Worker
2049*8b26181fSAndroid Build Coastguard Worker  ;
2050*8b26181fSAndroid Build Coastguard Worker  return 0;
2051*8b26181fSAndroid Build Coastguard Worker}
2052*8b26181fSAndroid Build Coastguard Worker_ACEOF
2053*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
2054*8b26181fSAndroid Build Coastguard Worker  ac_hi=$ac_mid; break
2055*8b26181fSAndroid Build Coastguard Workerelse
2056*8b26181fSAndroid Build Coastguard Worker  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2057*8b26181fSAndroid Build Coastguard Worker			if test $ac_lo -le $ac_mid; then
2058*8b26181fSAndroid Build Coastguard Worker			  ac_lo= ac_hi=
2059*8b26181fSAndroid Build Coastguard Worker			  break
2060*8b26181fSAndroid Build Coastguard Worker			fi
2061*8b26181fSAndroid Build Coastguard Worker			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2062*8b26181fSAndroid Build Coastguard Workerfi
2063*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2064*8b26181fSAndroid Build Coastguard Worker  done
2065*8b26181fSAndroid Build Coastguard Workerelse
2066*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2067*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2068*8b26181fSAndroid Build Coastguard Worker$4
2069*8b26181fSAndroid Build Coastguard Workerint
2070*8b26181fSAndroid Build Coastguard Workermain ()
2071*8b26181fSAndroid Build Coastguard Worker{
2072*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) < 0)];
2073*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
2074*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
2075*8b26181fSAndroid Build Coastguard Worker
2076*8b26181fSAndroid Build Coastguard Worker  ;
2077*8b26181fSAndroid Build Coastguard Worker  return 0;
2078*8b26181fSAndroid Build Coastguard Worker}
2079*8b26181fSAndroid Build Coastguard Worker_ACEOF
2080*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
2081*8b26181fSAndroid Build Coastguard Worker  ac_hi=-1 ac_mid=-1
2082*8b26181fSAndroid Build Coastguard Worker  while :; do
2083*8b26181fSAndroid Build Coastguard Worker    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2085*8b26181fSAndroid Build Coastguard Worker$4
2086*8b26181fSAndroid Build Coastguard Workerint
2087*8b26181fSAndroid Build Coastguard Workermain ()
2088*8b26181fSAndroid Build Coastguard Worker{
2089*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) >= $ac_mid)];
2090*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
2091*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
2092*8b26181fSAndroid Build Coastguard Worker
2093*8b26181fSAndroid Build Coastguard Worker  ;
2094*8b26181fSAndroid Build Coastguard Worker  return 0;
2095*8b26181fSAndroid Build Coastguard Worker}
2096*8b26181fSAndroid Build Coastguard Worker_ACEOF
2097*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
2098*8b26181fSAndroid Build Coastguard Worker  ac_lo=$ac_mid; break
2099*8b26181fSAndroid Build Coastguard Workerelse
2100*8b26181fSAndroid Build Coastguard Worker  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2101*8b26181fSAndroid Build Coastguard Worker			if test $ac_mid -le $ac_hi; then
2102*8b26181fSAndroid Build Coastguard Worker			  ac_lo= ac_hi=
2103*8b26181fSAndroid Build Coastguard Worker			  break
2104*8b26181fSAndroid Build Coastguard Worker			fi
2105*8b26181fSAndroid Build Coastguard Worker			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2106*8b26181fSAndroid Build Coastguard Workerfi
2107*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108*8b26181fSAndroid Build Coastguard Worker  done
2109*8b26181fSAndroid Build Coastguard Workerelse
2110*8b26181fSAndroid Build Coastguard Worker  ac_lo= ac_hi=
2111*8b26181fSAndroid Build Coastguard Workerfi
2112*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2113*8b26181fSAndroid Build Coastguard Workerfi
2114*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2115*8b26181fSAndroid Build Coastguard Worker# Binary search between lo and hi bounds.
2116*8b26181fSAndroid Build Coastguard Workerwhile test "x$ac_lo" != "x$ac_hi"; do
2117*8b26181fSAndroid Build Coastguard Worker  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2118*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2119*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2120*8b26181fSAndroid Build Coastguard Worker$4
2121*8b26181fSAndroid Build Coastguard Workerint
2122*8b26181fSAndroid Build Coastguard Workermain ()
2123*8b26181fSAndroid Build Coastguard Worker{
2124*8b26181fSAndroid Build Coastguard Workerstatic int test_array [1 - 2 * !(($2) <= $ac_mid)];
2125*8b26181fSAndroid Build Coastguard Workertest_array [0] = 0;
2126*8b26181fSAndroid Build Coastguard Workerreturn test_array [0];
2127*8b26181fSAndroid Build Coastguard Worker
2128*8b26181fSAndroid Build Coastguard Worker  ;
2129*8b26181fSAndroid Build Coastguard Worker  return 0;
2130*8b26181fSAndroid Build Coastguard Worker}
2131*8b26181fSAndroid Build Coastguard Worker_ACEOF
2132*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
2133*8b26181fSAndroid Build Coastguard Worker  ac_hi=$ac_mid
2134*8b26181fSAndroid Build Coastguard Workerelse
2135*8b26181fSAndroid Build Coastguard Worker  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2136*8b26181fSAndroid Build Coastguard Workerfi
2137*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2138*8b26181fSAndroid Build Coastguard Workerdone
2139*8b26181fSAndroid Build Coastguard Workercase $ac_lo in #((
2140*8b26181fSAndroid Build Coastguard Worker?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2141*8b26181fSAndroid Build Coastguard Worker'') ac_retval=1 ;;
2142*8b26181fSAndroid Build Coastguard Workeresac
2143*8b26181fSAndroid Build Coastguard Worker  else
2144*8b26181fSAndroid Build Coastguard Worker    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2145*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2146*8b26181fSAndroid Build Coastguard Worker$4
2147*8b26181fSAndroid Build Coastguard Workerstatic long int longval () { return $2; }
2148*8b26181fSAndroid Build Coastguard Workerstatic unsigned long int ulongval () { return $2; }
2149*8b26181fSAndroid Build Coastguard Worker#include <stdio.h>
2150*8b26181fSAndroid Build Coastguard Worker#include <stdlib.h>
2151*8b26181fSAndroid Build Coastguard Workerint
2152*8b26181fSAndroid Build Coastguard Workermain ()
2153*8b26181fSAndroid Build Coastguard Worker{
2154*8b26181fSAndroid Build Coastguard Worker
2155*8b26181fSAndroid Build Coastguard Worker  FILE *f = fopen ("conftest.val", "w");
2156*8b26181fSAndroid Build Coastguard Worker  if (! f)
2157*8b26181fSAndroid Build Coastguard Worker    return 1;
2158*8b26181fSAndroid Build Coastguard Worker  if (($2) < 0)
2159*8b26181fSAndroid Build Coastguard Worker    {
2160*8b26181fSAndroid Build Coastguard Worker      long int i = longval ();
2161*8b26181fSAndroid Build Coastguard Worker      if (i != ($2))
2162*8b26181fSAndroid Build Coastguard Worker	return 1;
2163*8b26181fSAndroid Build Coastguard Worker      fprintf (f, "%ld", i);
2164*8b26181fSAndroid Build Coastguard Worker    }
2165*8b26181fSAndroid Build Coastguard Worker  else
2166*8b26181fSAndroid Build Coastguard Worker    {
2167*8b26181fSAndroid Build Coastguard Worker      unsigned long int i = ulongval ();
2168*8b26181fSAndroid Build Coastguard Worker      if (i != ($2))
2169*8b26181fSAndroid Build Coastguard Worker	return 1;
2170*8b26181fSAndroid Build Coastguard Worker      fprintf (f, "%lu", i);
2171*8b26181fSAndroid Build Coastguard Worker    }
2172*8b26181fSAndroid Build Coastguard Worker  /* Do not output a trailing newline, as this causes \r\n confusion
2173*8b26181fSAndroid Build Coastguard Worker     on some platforms.  */
2174*8b26181fSAndroid Build Coastguard Worker  return ferror (f) || fclose (f) != 0;
2175*8b26181fSAndroid Build Coastguard Worker
2176*8b26181fSAndroid Build Coastguard Worker  ;
2177*8b26181fSAndroid Build Coastguard Worker  return 0;
2178*8b26181fSAndroid Build Coastguard Worker}
2179*8b26181fSAndroid Build Coastguard Worker_ACEOF
2180*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_run "$LINENO"; then :
2181*8b26181fSAndroid Build Coastguard Worker  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2182*8b26181fSAndroid Build Coastguard Workerelse
2183*8b26181fSAndroid Build Coastguard Worker  ac_retval=1
2184*8b26181fSAndroid Build Coastguard Workerfi
2185*8b26181fSAndroid Build Coastguard Workerrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2186*8b26181fSAndroid Build Coastguard Worker  conftest.$ac_objext conftest.beam conftest.$ac_ext
2187*8b26181fSAndroid Build Coastguard Workerrm -f conftest.val
2188*8b26181fSAndroid Build Coastguard Worker
2189*8b26181fSAndroid Build Coastguard Worker  fi
2190*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2191*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
2192*8b26181fSAndroid Build Coastguard Worker
2193*8b26181fSAndroid Build Coastguard Worker} # ac_fn_cxx_compute_int
2194*8b26181fSAndroid Build Coastguard Worker
2195*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2196*8b26181fSAndroid Build Coastguard Worker# -------------------------------------------------------
2197*8b26181fSAndroid Build Coastguard Worker# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2198*8b26181fSAndroid Build Coastguard Worker# the include files in INCLUDES and setting the cache variable VAR
2199*8b26181fSAndroid Build Coastguard Worker# accordingly.
2200*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel ()
2201*8b26181fSAndroid Build Coastguard Worker{
2202*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2203*8b26181fSAndroid Build Coastguard Worker  if eval \${$3+:} false; then :
2204*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2205*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $2... " >&6; }
2206*8b26181fSAndroid Build Coastguard Workerif eval \${$3+:} false; then :
2207*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
2208*8b26181fSAndroid Build Coastguard Workerfi
2209*8b26181fSAndroid Build Coastguard Workereval ac_res=\$$3
2210*8b26181fSAndroid Build Coastguard Worker	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2211*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_res" >&6; }
2212*8b26181fSAndroid Build Coastguard Workerelse
2213*8b26181fSAndroid Build Coastguard Worker  # Is the header compilable?
2214*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2215*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking $2 usability... " >&6; }
2216*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
2217*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2218*8b26181fSAndroid Build Coastguard Worker$4
2219*8b26181fSAndroid Build Coastguard Worker#include <$2>
2220*8b26181fSAndroid Build Coastguard Worker_ACEOF
2221*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
2222*8b26181fSAndroid Build Coastguard Worker  ac_header_compiler=yes
2223*8b26181fSAndroid Build Coastguard Workerelse
2224*8b26181fSAndroid Build Coastguard Worker  ac_header_compiler=no
2225*8b26181fSAndroid Build Coastguard Workerfi
2226*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2227*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2228*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_header_compiler" >&6; }
2229*8b26181fSAndroid Build Coastguard Worker
2230*8b26181fSAndroid Build Coastguard Worker# Is the header present?
2231*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2232*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking $2 presence... " >&6; }
2233*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2235*8b26181fSAndroid Build Coastguard Worker#include <$2>
2236*8b26181fSAndroid Build Coastguard Worker_ACEOF
2237*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_cpp "$LINENO"; then :
2238*8b26181fSAndroid Build Coastguard Worker  ac_header_preproc=yes
2239*8b26181fSAndroid Build Coastguard Workerelse
2240*8b26181fSAndroid Build Coastguard Worker  ac_header_preproc=no
2241*8b26181fSAndroid Build Coastguard Workerfi
2242*8b26181fSAndroid Build Coastguard Workerrm -f conftest.err conftest.i conftest.$ac_ext
2243*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2244*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_header_preproc" >&6; }
2245*8b26181fSAndroid Build Coastguard Worker
2246*8b26181fSAndroid Build Coastguard Worker# So?  What about this header?
2247*8b26181fSAndroid Build Coastguard Workercase $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2248*8b26181fSAndroid Build Coastguard Worker  yes:no: )
2249*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2250*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2251*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2252*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2253*8b26181fSAndroid Build Coastguard Worker    ;;
2254*8b26181fSAndroid Build Coastguard Worker  no:yes:* )
2255*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2256*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2257*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2258*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2259*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2260*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2261*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2262*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2263*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2264*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2265*8b26181fSAndroid Build Coastguard Worker    ;;
2266*8b26181fSAndroid Build Coastguard Workeresac
2267*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2268*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $2... " >&6; }
2269*8b26181fSAndroid Build Coastguard Workerif eval \${$3+:} false; then :
2270*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
2271*8b26181fSAndroid Build Coastguard Workerelse
2272*8b26181fSAndroid Build Coastguard Worker  eval "$3=\$ac_header_compiler"
2273*8b26181fSAndroid Build Coastguard Workerfi
2274*8b26181fSAndroid Build Coastguard Workereval ac_res=\$$3
2275*8b26181fSAndroid Build Coastguard Worker	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2276*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_res" >&6; }
2277*8b26181fSAndroid Build Coastguard Workerfi
2278*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279*8b26181fSAndroid Build Coastguard Worker
2280*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_check_header_mongrel
2281*8b26181fSAndroid Build Coastguard Worker
2282*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_check_func LINENO FUNC VAR
2283*8b26181fSAndroid Build Coastguard Worker# ----------------------------------
2284*8b26181fSAndroid Build Coastguard Worker# Tests whether FUNC exists, setting the cache variable VAR accordingly
2285*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_func ()
2286*8b26181fSAndroid Build Coastguard Worker{
2287*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2288*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2289*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $2... " >&6; }
2290*8b26181fSAndroid Build Coastguard Workerif eval \${$3+:} false; then :
2291*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
2292*8b26181fSAndroid Build Coastguard Workerelse
2293*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2294*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2295*8b26181fSAndroid Build Coastguard Worker/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2296*8b26181fSAndroid Build Coastguard Worker   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2297*8b26181fSAndroid Build Coastguard Worker#define $2 innocuous_$2
2298*8b26181fSAndroid Build Coastguard Worker
2299*8b26181fSAndroid Build Coastguard Worker/* System header to define __stub macros and hopefully few prototypes,
2300*8b26181fSAndroid Build Coastguard Worker    which can conflict with char $2 (); below.
2301*8b26181fSAndroid Build Coastguard Worker    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2302*8b26181fSAndroid Build Coastguard Worker    <limits.h> exists even on freestanding compilers.  */
2303*8b26181fSAndroid Build Coastguard Worker
2304*8b26181fSAndroid Build Coastguard Worker#ifdef __STDC__
2305*8b26181fSAndroid Build Coastguard Worker# include <limits.h>
2306*8b26181fSAndroid Build Coastguard Worker#else
2307*8b26181fSAndroid Build Coastguard Worker# include <assert.h>
2308*8b26181fSAndroid Build Coastguard Worker#endif
2309*8b26181fSAndroid Build Coastguard Worker
2310*8b26181fSAndroid Build Coastguard Worker#undef $2
2311*8b26181fSAndroid Build Coastguard Worker
2312*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
2313*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
2314*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
2315*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
2316*8b26181fSAndroid Build Coastguard Workerextern "C"
2317*8b26181fSAndroid Build Coastguard Worker#endif
2318*8b26181fSAndroid Build Coastguard Workerchar $2 ();
2319*8b26181fSAndroid Build Coastguard Worker/* The GNU C library defines this for functions which it implements
2320*8b26181fSAndroid Build Coastguard Worker    to always fail with ENOSYS.  Some functions are actually named
2321*8b26181fSAndroid Build Coastguard Worker    something starting with __ and the normal name is an alias.  */
2322*8b26181fSAndroid Build Coastguard Worker#if defined __stub_$2 || defined __stub___$2
2323*8b26181fSAndroid Build Coastguard Workerchoke me
2324*8b26181fSAndroid Build Coastguard Worker#endif
2325*8b26181fSAndroid Build Coastguard Worker
2326*8b26181fSAndroid Build Coastguard Workerint
2327*8b26181fSAndroid Build Coastguard Workermain ()
2328*8b26181fSAndroid Build Coastguard Worker{
2329*8b26181fSAndroid Build Coastguard Workerreturn $2 ();
2330*8b26181fSAndroid Build Coastguard Worker  ;
2331*8b26181fSAndroid Build Coastguard Worker  return 0;
2332*8b26181fSAndroid Build Coastguard Worker}
2333*8b26181fSAndroid Build Coastguard Worker_ACEOF
2334*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
2335*8b26181fSAndroid Build Coastguard Worker  eval "$3=yes"
2336*8b26181fSAndroid Build Coastguard Workerelse
2337*8b26181fSAndroid Build Coastguard Worker  eval "$3=no"
2338*8b26181fSAndroid Build Coastguard Workerfi
2339*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
2340*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
2341*8b26181fSAndroid Build Coastguard Workerfi
2342*8b26181fSAndroid Build Coastguard Workereval ac_res=\$$3
2343*8b26181fSAndroid Build Coastguard Worker	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2344*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_res" >&6; }
2345*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2346*8b26181fSAndroid Build Coastguard Worker
2347*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_check_func
2348*8b26181fSAndroid Build Coastguard Worker
2349*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2350*8b26181fSAndroid Build Coastguard Worker# ---------------------------------------------
2351*8b26181fSAndroid Build Coastguard Worker# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2352*8b26181fSAndroid Build Coastguard Worker# accordingly.
2353*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_decl ()
2354*8b26181fSAndroid Build Coastguard Worker{
2355*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356*8b26181fSAndroid Build Coastguard Worker  as_decl_name=`echo $2|sed 's/ *(.*//'`
2357*8b26181fSAndroid Build Coastguard Worker  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2358*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2359*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2360*8b26181fSAndroid Build Coastguard Workerif eval \${$3+:} false; then :
2361*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
2362*8b26181fSAndroid Build Coastguard Workerelse
2363*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2364*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2365*8b26181fSAndroid Build Coastguard Worker$4
2366*8b26181fSAndroid Build Coastguard Workerint
2367*8b26181fSAndroid Build Coastguard Workermain ()
2368*8b26181fSAndroid Build Coastguard Worker{
2369*8b26181fSAndroid Build Coastguard Worker#ifndef $as_decl_name
2370*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
2371*8b26181fSAndroid Build Coastguard Worker  (void) $as_decl_use;
2372*8b26181fSAndroid Build Coastguard Worker#else
2373*8b26181fSAndroid Build Coastguard Worker  (void) $as_decl_name;
2374*8b26181fSAndroid Build Coastguard Worker#endif
2375*8b26181fSAndroid Build Coastguard Worker#endif
2376*8b26181fSAndroid Build Coastguard Worker
2377*8b26181fSAndroid Build Coastguard Worker  ;
2378*8b26181fSAndroid Build Coastguard Worker  return 0;
2379*8b26181fSAndroid Build Coastguard Worker}
2380*8b26181fSAndroid Build Coastguard Worker_ACEOF
2381*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
2382*8b26181fSAndroid Build Coastguard Worker  eval "$3=yes"
2383*8b26181fSAndroid Build Coastguard Workerelse
2384*8b26181fSAndroid Build Coastguard Worker  eval "$3=no"
2385*8b26181fSAndroid Build Coastguard Workerfi
2386*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2387*8b26181fSAndroid Build Coastguard Workerfi
2388*8b26181fSAndroid Build Coastguard Workereval ac_res=\$$3
2389*8b26181fSAndroid Build Coastguard Worker	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2390*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_res" >&6; }
2391*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2392*8b26181fSAndroid Build Coastguard Worker
2393*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_check_decl
2394*8b26181fSAndroid Build Coastguard Worker
2395*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2396*8b26181fSAndroid Build Coastguard Worker# -------------------------------------------
2397*8b26181fSAndroid Build Coastguard Worker# Tests whether TYPE exists after having included INCLUDES, setting cache
2398*8b26181fSAndroid Build Coastguard Worker# variable VAR accordingly.
2399*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_type ()
2400*8b26181fSAndroid Build Coastguard Worker{
2401*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2402*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2403*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $2... " >&6; }
2404*8b26181fSAndroid Build Coastguard Workerif eval \${$3+:} false; then :
2405*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
2406*8b26181fSAndroid Build Coastguard Workerelse
2407*8b26181fSAndroid Build Coastguard Worker  eval "$3=no"
2408*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2409*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2410*8b26181fSAndroid Build Coastguard Worker$4
2411*8b26181fSAndroid Build Coastguard Workerint
2412*8b26181fSAndroid Build Coastguard Workermain ()
2413*8b26181fSAndroid Build Coastguard Worker{
2414*8b26181fSAndroid Build Coastguard Workerif (sizeof ($2))
2415*8b26181fSAndroid Build Coastguard Worker	 return 0;
2416*8b26181fSAndroid Build Coastguard Worker  ;
2417*8b26181fSAndroid Build Coastguard Worker  return 0;
2418*8b26181fSAndroid Build Coastguard Worker}
2419*8b26181fSAndroid Build Coastguard Worker_ACEOF
2420*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
2421*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2422*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2423*8b26181fSAndroid Build Coastguard Worker$4
2424*8b26181fSAndroid Build Coastguard Workerint
2425*8b26181fSAndroid Build Coastguard Workermain ()
2426*8b26181fSAndroid Build Coastguard Worker{
2427*8b26181fSAndroid Build Coastguard Workerif (sizeof (($2)))
2428*8b26181fSAndroid Build Coastguard Worker	    return 0;
2429*8b26181fSAndroid Build Coastguard Worker  ;
2430*8b26181fSAndroid Build Coastguard Worker  return 0;
2431*8b26181fSAndroid Build Coastguard Worker}
2432*8b26181fSAndroid Build Coastguard Worker_ACEOF
2433*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
2434*8b26181fSAndroid Build Coastguard Worker
2435*8b26181fSAndroid Build Coastguard Workerelse
2436*8b26181fSAndroid Build Coastguard Worker  eval "$3=yes"
2437*8b26181fSAndroid Build Coastguard Workerfi
2438*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2439*8b26181fSAndroid Build Coastguard Workerfi
2440*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2441*8b26181fSAndroid Build Coastguard Workerfi
2442*8b26181fSAndroid Build Coastguard Workereval ac_res=\$$3
2443*8b26181fSAndroid Build Coastguard Worker	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2444*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_res" >&6; }
2445*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2446*8b26181fSAndroid Build Coastguard Worker
2447*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_check_type
2448*8b26181fSAndroid Build Coastguard Worker
2449*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2450*8b26181fSAndroid Build Coastguard Worker# ----------------------------------------------------
2451*8b26181fSAndroid Build Coastguard Worker# Tries to find if the field MEMBER exists in type AGGR, after including
2452*8b26181fSAndroid Build Coastguard Worker# INCLUDES, setting cache variable VAR accordingly.
2453*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_member ()
2454*8b26181fSAndroid Build Coastguard Worker{
2455*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2456*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2457*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $2.$3... " >&6; }
2458*8b26181fSAndroid Build Coastguard Workerif eval \${$4+:} false; then :
2459*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
2460*8b26181fSAndroid Build Coastguard Workerelse
2461*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2462*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2463*8b26181fSAndroid Build Coastguard Worker$5
2464*8b26181fSAndroid Build Coastguard Workerint
2465*8b26181fSAndroid Build Coastguard Workermain ()
2466*8b26181fSAndroid Build Coastguard Worker{
2467*8b26181fSAndroid Build Coastguard Workerstatic $2 ac_aggr;
2468*8b26181fSAndroid Build Coastguard Workerif (ac_aggr.$3)
2469*8b26181fSAndroid Build Coastguard Workerreturn 0;
2470*8b26181fSAndroid Build Coastguard Worker  ;
2471*8b26181fSAndroid Build Coastguard Worker  return 0;
2472*8b26181fSAndroid Build Coastguard Worker}
2473*8b26181fSAndroid Build Coastguard Worker_ACEOF
2474*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
2475*8b26181fSAndroid Build Coastguard Worker  eval "$4=yes"
2476*8b26181fSAndroid Build Coastguard Workerelse
2477*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2478*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
2479*8b26181fSAndroid Build Coastguard Worker$5
2480*8b26181fSAndroid Build Coastguard Workerint
2481*8b26181fSAndroid Build Coastguard Workermain ()
2482*8b26181fSAndroid Build Coastguard Worker{
2483*8b26181fSAndroid Build Coastguard Workerstatic $2 ac_aggr;
2484*8b26181fSAndroid Build Coastguard Workerif (sizeof ac_aggr.$3)
2485*8b26181fSAndroid Build Coastguard Workerreturn 0;
2486*8b26181fSAndroid Build Coastguard Worker  ;
2487*8b26181fSAndroid Build Coastguard Worker  return 0;
2488*8b26181fSAndroid Build Coastguard Worker}
2489*8b26181fSAndroid Build Coastguard Worker_ACEOF
2490*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
2491*8b26181fSAndroid Build Coastguard Worker  eval "$4=yes"
2492*8b26181fSAndroid Build Coastguard Workerelse
2493*8b26181fSAndroid Build Coastguard Worker  eval "$4=no"
2494*8b26181fSAndroid Build Coastguard Workerfi
2495*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2496*8b26181fSAndroid Build Coastguard Workerfi
2497*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2498*8b26181fSAndroid Build Coastguard Workerfi
2499*8b26181fSAndroid Build Coastguard Workereval ac_res=\$$4
2500*8b26181fSAndroid Build Coastguard Worker	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2501*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_res" >&6; }
2502*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2503*8b26181fSAndroid Build Coastguard Worker
2504*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_check_member
2505*8b26181fSAndroid Build Coastguard Workercat >config.log <<_ACEOF
2506*8b26181fSAndroid Build Coastguard WorkerThis file contains any messages produced by compilers while
2507*8b26181fSAndroid Build Coastguard Workerrunning configure, to aid debugging if configure makes a mistake.
2508*8b26181fSAndroid Build Coastguard Worker
2509*8b26181fSAndroid Build Coastguard WorkerIt was created by pcap $as_me 1.10.4, which was
2510*8b26181fSAndroid Build Coastguard Workergenerated by GNU Autoconf 2.69.  Invocation command line was
2511*8b26181fSAndroid Build Coastguard Worker
2512*8b26181fSAndroid Build Coastguard Worker  $ $0 $@
2513*8b26181fSAndroid Build Coastguard Worker
2514*8b26181fSAndroid Build Coastguard Worker_ACEOF
2515*8b26181fSAndroid Build Coastguard Workerexec 5>>config.log
2516*8b26181fSAndroid Build Coastguard Worker{
2517*8b26181fSAndroid Build Coastguard Workercat <<_ASUNAME
2518*8b26181fSAndroid Build Coastguard Worker## --------- ##
2519*8b26181fSAndroid Build Coastguard Worker## Platform. ##
2520*8b26181fSAndroid Build Coastguard Worker## --------- ##
2521*8b26181fSAndroid Build Coastguard Worker
2522*8b26181fSAndroid Build Coastguard Workerhostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2523*8b26181fSAndroid Build Coastguard Workeruname -m = `(uname -m) 2>/dev/null || echo unknown`
2524*8b26181fSAndroid Build Coastguard Workeruname -r = `(uname -r) 2>/dev/null || echo unknown`
2525*8b26181fSAndroid Build Coastguard Workeruname -s = `(uname -s) 2>/dev/null || echo unknown`
2526*8b26181fSAndroid Build Coastguard Workeruname -v = `(uname -v) 2>/dev/null || echo unknown`
2527*8b26181fSAndroid Build Coastguard Worker
2528*8b26181fSAndroid Build Coastguard Worker/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2529*8b26181fSAndroid Build Coastguard Worker/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2530*8b26181fSAndroid Build Coastguard Worker
2531*8b26181fSAndroid Build Coastguard Worker/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2532*8b26181fSAndroid Build Coastguard Worker/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2533*8b26181fSAndroid Build Coastguard Worker/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2534*8b26181fSAndroid Build Coastguard Worker/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2535*8b26181fSAndroid Build Coastguard Worker/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2536*8b26181fSAndroid Build Coastguard Worker/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2537*8b26181fSAndroid Build Coastguard Worker/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2538*8b26181fSAndroid Build Coastguard Worker
2539*8b26181fSAndroid Build Coastguard Worker_ASUNAME
2540*8b26181fSAndroid Build Coastguard Worker
2541*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2542*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
2543*8b26181fSAndroid Build Coastguard Workerdo
2544*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
2545*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
2546*8b26181fSAndroid Build Coastguard Worker    $as_echo "PATH: $as_dir"
2547*8b26181fSAndroid Build Coastguard Worker  done
2548*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
2549*8b26181fSAndroid Build Coastguard Worker
2550*8b26181fSAndroid Build Coastguard Worker} >&5
2551*8b26181fSAndroid Build Coastguard Worker
2552*8b26181fSAndroid Build Coastguard Workercat >&5 <<_ACEOF
2553*8b26181fSAndroid Build Coastguard Worker
2554*8b26181fSAndroid Build Coastguard Worker
2555*8b26181fSAndroid Build Coastguard Worker## ----------- ##
2556*8b26181fSAndroid Build Coastguard Worker## Core tests. ##
2557*8b26181fSAndroid Build Coastguard Worker## ----------- ##
2558*8b26181fSAndroid Build Coastguard Worker
2559*8b26181fSAndroid Build Coastguard Worker_ACEOF
2560*8b26181fSAndroid Build Coastguard Worker
2561*8b26181fSAndroid Build Coastguard Worker
2562*8b26181fSAndroid Build Coastguard Worker# Keep a trace of the command line.
2563*8b26181fSAndroid Build Coastguard Worker# Strip out --no-create and --no-recursion so they do not pile up.
2564*8b26181fSAndroid Build Coastguard Worker# Strip out --silent because we don't want to record it for future runs.
2565*8b26181fSAndroid Build Coastguard Worker# Also quote any args containing shell meta-characters.
2566*8b26181fSAndroid Build Coastguard Worker# Make two passes to allow for proper duplicate-argument suppression.
2567*8b26181fSAndroid Build Coastguard Workerac_configure_args=
2568*8b26181fSAndroid Build Coastguard Workerac_configure_args0=
2569*8b26181fSAndroid Build Coastguard Workerac_configure_args1=
2570*8b26181fSAndroid Build Coastguard Workerac_must_keep_next=false
2571*8b26181fSAndroid Build Coastguard Workerfor ac_pass in 1 2
2572*8b26181fSAndroid Build Coastguard Workerdo
2573*8b26181fSAndroid Build Coastguard Worker  for ac_arg
2574*8b26181fSAndroid Build Coastguard Worker  do
2575*8b26181fSAndroid Build Coastguard Worker    case $ac_arg in
2576*8b26181fSAndroid Build Coastguard Worker    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2577*8b26181fSAndroid Build Coastguard Worker    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2578*8b26181fSAndroid Build Coastguard Worker    | -silent | --silent | --silen | --sile | --sil)
2579*8b26181fSAndroid Build Coastguard Worker      continue ;;
2580*8b26181fSAndroid Build Coastguard Worker    *\'*)
2581*8b26181fSAndroid Build Coastguard Worker      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2582*8b26181fSAndroid Build Coastguard Worker    esac
2583*8b26181fSAndroid Build Coastguard Worker    case $ac_pass in
2584*8b26181fSAndroid Build Coastguard Worker    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2585*8b26181fSAndroid Build Coastguard Worker    2)
2586*8b26181fSAndroid Build Coastguard Worker      as_fn_append ac_configure_args1 " '$ac_arg'"
2587*8b26181fSAndroid Build Coastguard Worker      if test $ac_must_keep_next = true; then
2588*8b26181fSAndroid Build Coastguard Worker	ac_must_keep_next=false # Got value, back to normal.
2589*8b26181fSAndroid Build Coastguard Worker      else
2590*8b26181fSAndroid Build Coastguard Worker	case $ac_arg in
2591*8b26181fSAndroid Build Coastguard Worker	  *=* | --config-cache | -C | -disable-* | --disable-* \
2592*8b26181fSAndroid Build Coastguard Worker	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2593*8b26181fSAndroid Build Coastguard Worker	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2594*8b26181fSAndroid Build Coastguard Worker	  | -with-* | --with-* | -without-* | --without-* | --x)
2595*8b26181fSAndroid Build Coastguard Worker	    case "$ac_configure_args0 " in
2596*8b26181fSAndroid Build Coastguard Worker	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2597*8b26181fSAndroid Build Coastguard Worker	    esac
2598*8b26181fSAndroid Build Coastguard Worker	    ;;
2599*8b26181fSAndroid Build Coastguard Worker	  -* ) ac_must_keep_next=true ;;
2600*8b26181fSAndroid Build Coastguard Worker	esac
2601*8b26181fSAndroid Build Coastguard Worker      fi
2602*8b26181fSAndroid Build Coastguard Worker      as_fn_append ac_configure_args " '$ac_arg'"
2603*8b26181fSAndroid Build Coastguard Worker      ;;
2604*8b26181fSAndroid Build Coastguard Worker    esac
2605*8b26181fSAndroid Build Coastguard Worker  done
2606*8b26181fSAndroid Build Coastguard Workerdone
2607*8b26181fSAndroid Build Coastguard Worker{ ac_configure_args0=; unset ac_configure_args0;}
2608*8b26181fSAndroid Build Coastguard Worker{ ac_configure_args1=; unset ac_configure_args1;}
2609*8b26181fSAndroid Build Coastguard Worker
2610*8b26181fSAndroid Build Coastguard Worker# When interrupted or exit'd, cleanup temporary files, and complete
2611*8b26181fSAndroid Build Coastguard Worker# config.log.  We remove comments because anyway the quotes in there
2612*8b26181fSAndroid Build Coastguard Worker# would cause problems or look ugly.
2613*8b26181fSAndroid Build Coastguard Worker# WARNING: Use '\'' to represent an apostrophe within the trap.
2614*8b26181fSAndroid Build Coastguard Worker# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2615*8b26181fSAndroid Build Coastguard Workertrap 'exit_status=$?
2616*8b26181fSAndroid Build Coastguard Worker  # Save into config.log some information that might help in debugging.
2617*8b26181fSAndroid Build Coastguard Worker  {
2618*8b26181fSAndroid Build Coastguard Worker    echo
2619*8b26181fSAndroid Build Coastguard Worker
2620*8b26181fSAndroid Build Coastguard Worker    $as_echo "## ---------------- ##
2621*8b26181fSAndroid Build Coastguard Worker## Cache variables. ##
2622*8b26181fSAndroid Build Coastguard Worker## ---------------- ##"
2623*8b26181fSAndroid Build Coastguard Worker    echo
2624*8b26181fSAndroid Build Coastguard Worker    # The following way of writing the cache mishandles newlines in values,
2625*8b26181fSAndroid Build Coastguard Worker(
2626*8b26181fSAndroid Build Coastguard Worker  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2627*8b26181fSAndroid Build Coastguard Worker    eval ac_val=\$$ac_var
2628*8b26181fSAndroid Build Coastguard Worker    case $ac_val in #(
2629*8b26181fSAndroid Build Coastguard Worker    *${as_nl}*)
2630*8b26181fSAndroid Build Coastguard Worker      case $ac_var in #(
2631*8b26181fSAndroid Build Coastguard Worker      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2632*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2633*8b26181fSAndroid Build Coastguard Worker      esac
2634*8b26181fSAndroid Build Coastguard Worker      case $ac_var in #(
2635*8b26181fSAndroid Build Coastguard Worker      _ | IFS | as_nl) ;; #(
2636*8b26181fSAndroid Build Coastguard Worker      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2637*8b26181fSAndroid Build Coastguard Worker      *) { eval $ac_var=; unset $ac_var;} ;;
2638*8b26181fSAndroid Build Coastguard Worker      esac ;;
2639*8b26181fSAndroid Build Coastguard Worker    esac
2640*8b26181fSAndroid Build Coastguard Worker  done
2641*8b26181fSAndroid Build Coastguard Worker  (set) 2>&1 |
2642*8b26181fSAndroid Build Coastguard Worker    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2643*8b26181fSAndroid Build Coastguard Worker    *${as_nl}ac_space=\ *)
2644*8b26181fSAndroid Build Coastguard Worker      sed -n \
2645*8b26181fSAndroid Build Coastguard Worker	"s/'\''/'\''\\\\'\'''\''/g;
2646*8b26181fSAndroid Build Coastguard Worker	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2647*8b26181fSAndroid Build Coastguard Worker      ;; #(
2648*8b26181fSAndroid Build Coastguard Worker    *)
2649*8b26181fSAndroid Build Coastguard Worker      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2650*8b26181fSAndroid Build Coastguard Worker      ;;
2651*8b26181fSAndroid Build Coastguard Worker    esac |
2652*8b26181fSAndroid Build Coastguard Worker    sort
2653*8b26181fSAndroid Build Coastguard Worker)
2654*8b26181fSAndroid Build Coastguard Worker    echo
2655*8b26181fSAndroid Build Coastguard Worker
2656*8b26181fSAndroid Build Coastguard Worker    $as_echo "## ----------------- ##
2657*8b26181fSAndroid Build Coastguard Worker## Output variables. ##
2658*8b26181fSAndroid Build Coastguard Worker## ----------------- ##"
2659*8b26181fSAndroid Build Coastguard Worker    echo
2660*8b26181fSAndroid Build Coastguard Worker    for ac_var in $ac_subst_vars
2661*8b26181fSAndroid Build Coastguard Worker    do
2662*8b26181fSAndroid Build Coastguard Worker      eval ac_val=\$$ac_var
2663*8b26181fSAndroid Build Coastguard Worker      case $ac_val in
2664*8b26181fSAndroid Build Coastguard Worker      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2665*8b26181fSAndroid Build Coastguard Worker      esac
2666*8b26181fSAndroid Build Coastguard Worker      $as_echo "$ac_var='\''$ac_val'\''"
2667*8b26181fSAndroid Build Coastguard Worker    done | sort
2668*8b26181fSAndroid Build Coastguard Worker    echo
2669*8b26181fSAndroid Build Coastguard Worker
2670*8b26181fSAndroid Build Coastguard Worker    if test -n "$ac_subst_files"; then
2671*8b26181fSAndroid Build Coastguard Worker      $as_echo "## ------------------- ##
2672*8b26181fSAndroid Build Coastguard Worker## File substitutions. ##
2673*8b26181fSAndroid Build Coastguard Worker## ------------------- ##"
2674*8b26181fSAndroid Build Coastguard Worker      echo
2675*8b26181fSAndroid Build Coastguard Worker      for ac_var in $ac_subst_files
2676*8b26181fSAndroid Build Coastguard Worker      do
2677*8b26181fSAndroid Build Coastguard Worker	eval ac_val=\$$ac_var
2678*8b26181fSAndroid Build Coastguard Worker	case $ac_val in
2679*8b26181fSAndroid Build Coastguard Worker	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2680*8b26181fSAndroid Build Coastguard Worker	esac
2681*8b26181fSAndroid Build Coastguard Worker	$as_echo "$ac_var='\''$ac_val'\''"
2682*8b26181fSAndroid Build Coastguard Worker      done | sort
2683*8b26181fSAndroid Build Coastguard Worker      echo
2684*8b26181fSAndroid Build Coastguard Worker    fi
2685*8b26181fSAndroid Build Coastguard Worker
2686*8b26181fSAndroid Build Coastguard Worker    if test -s confdefs.h; then
2687*8b26181fSAndroid Build Coastguard Worker      $as_echo "## ----------- ##
2688*8b26181fSAndroid Build Coastguard Worker## confdefs.h. ##
2689*8b26181fSAndroid Build Coastguard Worker## ----------- ##"
2690*8b26181fSAndroid Build Coastguard Worker      echo
2691*8b26181fSAndroid Build Coastguard Worker      cat confdefs.h
2692*8b26181fSAndroid Build Coastguard Worker      echo
2693*8b26181fSAndroid Build Coastguard Worker    fi
2694*8b26181fSAndroid Build Coastguard Worker    test "$ac_signal" != 0 &&
2695*8b26181fSAndroid Build Coastguard Worker      $as_echo "$as_me: caught signal $ac_signal"
2696*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me: exit $exit_status"
2697*8b26181fSAndroid Build Coastguard Worker  } >&5
2698*8b26181fSAndroid Build Coastguard Worker  rm -f core *.core core.conftest.* &&
2699*8b26181fSAndroid Build Coastguard Worker    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2700*8b26181fSAndroid Build Coastguard Worker    exit $exit_status
2701*8b26181fSAndroid Build Coastguard Worker' 0
2702*8b26181fSAndroid Build Coastguard Workerfor ac_signal in 1 2 13 15; do
2703*8b26181fSAndroid Build Coastguard Worker  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2704*8b26181fSAndroid Build Coastguard Workerdone
2705*8b26181fSAndroid Build Coastguard Workerac_signal=0
2706*8b26181fSAndroid Build Coastguard Worker
2707*8b26181fSAndroid Build Coastguard Worker# confdefs.h avoids OS command line length limits that DEFS can exceed.
2708*8b26181fSAndroid Build Coastguard Workerrm -f -r conftest* confdefs.h
2709*8b26181fSAndroid Build Coastguard Worker
2710*8b26181fSAndroid Build Coastguard Worker$as_echo "/* confdefs.h */" > confdefs.h
2711*8b26181fSAndroid Build Coastguard Worker
2712*8b26181fSAndroid Build Coastguard Worker# Predefined preprocessor variables.
2713*8b26181fSAndroid Build Coastguard Worker
2714*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
2715*8b26181fSAndroid Build Coastguard Worker#define PACKAGE_NAME "$PACKAGE_NAME"
2716*8b26181fSAndroid Build Coastguard Worker_ACEOF
2717*8b26181fSAndroid Build Coastguard Worker
2718*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
2719*8b26181fSAndroid Build Coastguard Worker#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2720*8b26181fSAndroid Build Coastguard Worker_ACEOF
2721*8b26181fSAndroid Build Coastguard Worker
2722*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
2723*8b26181fSAndroid Build Coastguard Worker#define PACKAGE_VERSION "$PACKAGE_VERSION"
2724*8b26181fSAndroid Build Coastguard Worker_ACEOF
2725*8b26181fSAndroid Build Coastguard Worker
2726*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
2727*8b26181fSAndroid Build Coastguard Worker#define PACKAGE_STRING "$PACKAGE_STRING"
2728*8b26181fSAndroid Build Coastguard Worker_ACEOF
2729*8b26181fSAndroid Build Coastguard Worker
2730*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
2731*8b26181fSAndroid Build Coastguard Worker#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2732*8b26181fSAndroid Build Coastguard Worker_ACEOF
2733*8b26181fSAndroid Build Coastguard Worker
2734*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
2735*8b26181fSAndroid Build Coastguard Worker#define PACKAGE_URL "$PACKAGE_URL"
2736*8b26181fSAndroid Build Coastguard Worker_ACEOF
2737*8b26181fSAndroid Build Coastguard Worker
2738*8b26181fSAndroid Build Coastguard Worker
2739*8b26181fSAndroid Build Coastguard Worker# Let the site file select an alternate cache file if it wants to.
2740*8b26181fSAndroid Build Coastguard Worker# Prefer an explicitly selected file to automatically selected ones.
2741*8b26181fSAndroid Build Coastguard Workerac_site_file1=NONE
2742*8b26181fSAndroid Build Coastguard Workerac_site_file2=NONE
2743*8b26181fSAndroid Build Coastguard Workerif test -n "$CONFIG_SITE"; then
2744*8b26181fSAndroid Build Coastguard Worker  # We do not want a PATH search for config.site.
2745*8b26181fSAndroid Build Coastguard Worker  case $CONFIG_SITE in #((
2746*8b26181fSAndroid Build Coastguard Worker    -*)  ac_site_file1=./$CONFIG_SITE;;
2747*8b26181fSAndroid Build Coastguard Worker    */*) ac_site_file1=$CONFIG_SITE;;
2748*8b26181fSAndroid Build Coastguard Worker    *)   ac_site_file1=./$CONFIG_SITE;;
2749*8b26181fSAndroid Build Coastguard Worker  esac
2750*8b26181fSAndroid Build Coastguard Workerelif test "x$prefix" != xNONE; then
2751*8b26181fSAndroid Build Coastguard Worker  ac_site_file1=$prefix/share/config.site
2752*8b26181fSAndroid Build Coastguard Worker  ac_site_file2=$prefix/etc/config.site
2753*8b26181fSAndroid Build Coastguard Workerelse
2754*8b26181fSAndroid Build Coastguard Worker  ac_site_file1=$ac_default_prefix/share/config.site
2755*8b26181fSAndroid Build Coastguard Worker  ac_site_file2=$ac_default_prefix/etc/config.site
2756*8b26181fSAndroid Build Coastguard Workerfi
2757*8b26181fSAndroid Build Coastguard Workerfor ac_site_file in "$ac_site_file1" "$ac_site_file2"
2758*8b26181fSAndroid Build Coastguard Workerdo
2759*8b26181fSAndroid Build Coastguard Worker  test "x$ac_site_file" = xNONE && continue
2760*8b26181fSAndroid Build Coastguard Worker  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2761*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2762*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2763*8b26181fSAndroid Build Coastguard Worker    sed 's/^/| /' "$ac_site_file" >&5
2764*8b26181fSAndroid Build Coastguard Worker    . "$ac_site_file" \
2765*8b26181fSAndroid Build Coastguard Worker      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2766*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2767*8b26181fSAndroid Build Coastguard Workeras_fn_error $? "failed to load site script $ac_site_file
2768*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
2769*8b26181fSAndroid Build Coastguard Worker  fi
2770*8b26181fSAndroid Build Coastguard Workerdone
2771*8b26181fSAndroid Build Coastguard Worker
2772*8b26181fSAndroid Build Coastguard Workerif test -r "$cache_file"; then
2773*8b26181fSAndroid Build Coastguard Worker  # Some versions of bash will fail to source /dev/null (special files
2774*8b26181fSAndroid Build Coastguard Worker  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2775*8b26181fSAndroid Build Coastguard Worker  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2776*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2777*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: loading cache $cache_file" >&6;}
2778*8b26181fSAndroid Build Coastguard Worker    case $cache_file in
2779*8b26181fSAndroid Build Coastguard Worker      [\\/]* | ?:[\\/]* ) . "$cache_file";;
2780*8b26181fSAndroid Build Coastguard Worker      *)                      . "./$cache_file";;
2781*8b26181fSAndroid Build Coastguard Worker    esac
2782*8b26181fSAndroid Build Coastguard Worker  fi
2783*8b26181fSAndroid Build Coastguard Workerelse
2784*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2785*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: creating cache $cache_file" >&6;}
2786*8b26181fSAndroid Build Coastguard Worker  >$cache_file
2787*8b26181fSAndroid Build Coastguard Workerfi
2788*8b26181fSAndroid Build Coastguard Worker
2789*8b26181fSAndroid Build Coastguard Worker# Check that the precious variables saved in the cache have kept the same
2790*8b26181fSAndroid Build Coastguard Worker# value.
2791*8b26181fSAndroid Build Coastguard Workerac_cache_corrupted=false
2792*8b26181fSAndroid Build Coastguard Workerfor ac_var in $ac_precious_vars; do
2793*8b26181fSAndroid Build Coastguard Worker  eval ac_old_set=\$ac_cv_env_${ac_var}_set
2794*8b26181fSAndroid Build Coastguard Worker  eval ac_new_set=\$ac_env_${ac_var}_set
2795*8b26181fSAndroid Build Coastguard Worker  eval ac_old_val=\$ac_cv_env_${ac_var}_value
2796*8b26181fSAndroid Build Coastguard Worker  eval ac_new_val=\$ac_env_${ac_var}_value
2797*8b26181fSAndroid Build Coastguard Worker  case $ac_old_set,$ac_new_set in
2798*8b26181fSAndroid Build Coastguard Worker    set,)
2799*8b26181fSAndroid Build Coastguard Worker      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2800*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2801*8b26181fSAndroid Build Coastguard Worker      ac_cache_corrupted=: ;;
2802*8b26181fSAndroid Build Coastguard Worker    ,set)
2803*8b26181fSAndroid Build Coastguard Worker      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2804*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2805*8b26181fSAndroid Build Coastguard Worker      ac_cache_corrupted=: ;;
2806*8b26181fSAndroid Build Coastguard Worker    ,);;
2807*8b26181fSAndroid Build Coastguard Worker    *)
2808*8b26181fSAndroid Build Coastguard Worker      if test "x$ac_old_val" != "x$ac_new_val"; then
2809*8b26181fSAndroid Build Coastguard Worker	# differences in whitespace do not lead to failure.
2810*8b26181fSAndroid Build Coastguard Worker	ac_old_val_w=`echo x $ac_old_val`
2811*8b26181fSAndroid Build Coastguard Worker	ac_new_val_w=`echo x $ac_new_val`
2812*8b26181fSAndroid Build Coastguard Worker	if test "$ac_old_val_w" != "$ac_new_val_w"; then
2813*8b26181fSAndroid Build Coastguard Worker	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2814*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2815*8b26181fSAndroid Build Coastguard Worker	  ac_cache_corrupted=:
2816*8b26181fSAndroid Build Coastguard Worker	else
2817*8b26181fSAndroid Build Coastguard Worker	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2818*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2819*8b26181fSAndroid Build Coastguard Worker	  eval $ac_var=\$ac_old_val
2820*8b26181fSAndroid Build Coastguard Worker	fi
2821*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2822*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2823*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2824*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2825*8b26181fSAndroid Build Coastguard Worker      fi;;
2826*8b26181fSAndroid Build Coastguard Worker  esac
2827*8b26181fSAndroid Build Coastguard Worker  # Pass precious variables to config.status.
2828*8b26181fSAndroid Build Coastguard Worker  if test "$ac_new_set" = set; then
2829*8b26181fSAndroid Build Coastguard Worker    case $ac_new_val in
2830*8b26181fSAndroid Build Coastguard Worker    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2831*8b26181fSAndroid Build Coastguard Worker    *) ac_arg=$ac_var=$ac_new_val ;;
2832*8b26181fSAndroid Build Coastguard Worker    esac
2833*8b26181fSAndroid Build Coastguard Worker    case " $ac_configure_args " in
2834*8b26181fSAndroid Build Coastguard Worker      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2835*8b26181fSAndroid Build Coastguard Worker      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2836*8b26181fSAndroid Build Coastguard Worker    esac
2837*8b26181fSAndroid Build Coastguard Worker  fi
2838*8b26181fSAndroid Build Coastguard Workerdone
2839*8b26181fSAndroid Build Coastguard Workerif $ac_cache_corrupted; then
2840*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2841*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2842*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2843*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2844*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2845*8b26181fSAndroid Build Coastguard Workerfi
2846*8b26181fSAndroid Build Coastguard Worker## -------------------- ##
2847*8b26181fSAndroid Build Coastguard Worker## Main body of script. ##
2848*8b26181fSAndroid Build Coastguard Worker## -------------------- ##
2849*8b26181fSAndroid Build Coastguard Worker
2850*8b26181fSAndroid Build Coastguard Workerac_ext=c
2851*8b26181fSAndroid Build Coastguard Workerac_cpp='$CPP $CPPFLAGS'
2852*8b26181fSAndroid Build Coastguard Workerac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2853*8b26181fSAndroid Build Coastguard Workerac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2854*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_c_compiler_gnu
2855*8b26181fSAndroid Build Coastguard Worker
2856*8b26181fSAndroid Build Coastguard Worker
2857*8b26181fSAndroid Build Coastguard Worker
2858*8b26181fSAndroid Build Coastguard Worker
2859*8b26181fSAndroid Build Coastguard Worker
2860*8b26181fSAndroid Build Coastguard Worker#
2861*8b26181fSAndroid Build Coastguard Worker# These are the variables that are used in Makefile, pcap-config, and
2862*8b26181fSAndroid Build Coastguard Worker# libpcap.pc.
2863*8b26181fSAndroid Build Coastguard Worker#
2864*8b26181fSAndroid Build Coastguard Worker# CFLAGS: inherited from the environment, not modified by us (except
2865*8b26181fSAndroid Build Coastguard Worker# temporarily during tests that involve compilation).  Used only when
2866*8b26181fSAndroid Build Coastguard Worker# compiling C source.
2867*8b26181fSAndroid Build Coastguard Worker#
2868*8b26181fSAndroid Build Coastguard Worker# CXXFLAGS: inherited from the environment, not modified by us.  Used only
2869*8b26181fSAndroid Build Coastguard Worker# when compiling C++ source.
2870*8b26181fSAndroid Build Coastguard Worker#
2871*8b26181fSAndroid Build Coastguard Worker# LDFLAGS: inherited from the environment, not modified by us.
2872*8b26181fSAndroid Build Coastguard Worker#
2873*8b26181fSAndroid Build Coastguard Worker# LIBS: inherited from the environment; we add libraries required by
2874*8b26181fSAndroid Build Coastguard Worker# libpcap.  Librares that the core libpcap code requires are added
2875*8b26181fSAndroid Build Coastguard Worker# first; libraries required by additional pcap modules are first
2876*8b26181fSAndroid Build Coastguard Worker# added to ADDITIONAL_LIBS, and only added to LIBS at the end, after
2877*8b26181fSAndroid Build Coastguard Worker# we're finished doing configuration tests for the modules.
2878*8b26181fSAndroid Build Coastguard Worker#
2879*8b26181fSAndroid Build Coastguard Worker# LIBS_STATIC: libraries with which a program using the libpcap *static*
2880*8b26181fSAndroid Build Coastguard Worker# library needs to be linked.  This is a superset of LIBS, used in
2881*8b26181fSAndroid Build Coastguard Worker# pcap-config, so that "pcap-config --libs --static" will report them.
2882*8b26181fSAndroid Build Coastguard Worker# Initialized to LIBS.
2883*8b26181fSAndroid Build Coastguard Worker#
2884*8b26181fSAndroid Build Coastguard Worker# REQUIRES_PRIVATE: pkg-config package names for additional libraries
2885*8b26181fSAndroid Build Coastguard Worker# with which a program using the libpcap *static* library needs to be
2886*8b26181fSAndroid Build Coastguard Worker# linked and for which a .pc file exists.  This is used in libpcap.pc,
2887*8b26181fSAndroid Build Coastguard Worker# so that "pkg-config --libs --static" will report them, and so that
2888*8b26181fSAndroid Build Coastguard Worker# those libraries will be determined using the library's .pc file, not
2889*8b26181fSAndroid Build Coastguard Worker# from our .pc file.  Initialized to an empty string.
2890*8b26181fSAndroid Build Coastguard Worker#
2891*8b26181fSAndroid Build Coastguard Worker# V_CCOPT: additional compiler flags other than -I and -D flags
2892*8b26181fSAndroid Build Coastguard Worker# needed when compiling libpcap.  Used in Makefile for both C and
2893*8b26181fSAndroid Build Coastguard Worker# C++ source.
2894*8b26181fSAndroid Build Coastguard Worker#
2895*8b26181fSAndroid Build Coastguard Worker# V_DEFS: additional -D compiler flags needed when compiling
2896*8b26181fSAndroid Build Coastguard Worker# libpcap.  Used in Makefile for both C and C++ source.
2897*8b26181fSAndroid Build Coastguard Worker#
2898*8b26181fSAndroid Build Coastguard Worker# V_INCLS: additional -I compiler flags needed when compiling
2899*8b26181fSAndroid Build Coastguard Worker# libpcap.  Used in Makefile for both C and C++ source.
2900*8b26181fSAndroid Build Coastguard Worker#
2901*8b26181fSAndroid Build Coastguard Worker# ADDITIONAL_LIBS: additional libraries with which the libpcap dynamic
2902*8b26181fSAndroid Build Coastguard Worker# library needs to be linked.  Used in Makwfile; not used in pcap-config
2903*8b26181fSAndroid Build Coastguard Worker# or libpcap.pc, as, in all platforms on which we run, if a dynamic
2904*8b26181fSAndroid Build Coastguard Worker# library is linked with other dynamic libraries, a program using
2905*8b26181fSAndroid Build Coastguard Worker# that dynamic library doesn't have to link with those libraries -
2906*8b26181fSAndroid Build Coastguard Worker# they will be automatically loaded at run time.  Initialized to an
2907*8b26181fSAndroid Build Coastguard Worker# empty string.
2908*8b26181fSAndroid Build Coastguard Worker#
2909*8b26181fSAndroid Build Coastguard Worker# ADDITIONAL_LIBS_STATIC: additional libraries with which a program
2910*8b26181fSAndroid Build Coastguard Worker# using the libpcap *static* library needs to be linked.  This is used
2911*8b26181fSAndroid Build Coastguard Worker# in pcap-config, so that "pcap-config --libs --static" will report
2912*8b26181fSAndroid Build Coastguard Worker# them.  Initialized to an empty string.
2913*8b26181fSAndroid Build Coastguard Worker#
2914*8b26181fSAndroid Build Coastguard Worker# REQUIRES_PRIVATE: pkg-config package names for additional libraries
2915*8b26181fSAndroid Build Coastguard Worker# with which a program using the libpcap *static* library needs to be
2916*8b26181fSAndroid Build Coastguard Worker# linked and for which a .pc file exists.  This is used in libpcap.pc,
2917*8b26181fSAndroid Build Coastguard Worker# so that "pkg-config --libs --static" will report them, and so that
2918*8b26181fSAndroid Build Coastguard Worker# those libraries will be determined using the library's .pc file, not
2919*8b26181fSAndroid Build Coastguard Worker# from our .pc file.  Initialized to an empty string.
2920*8b26181fSAndroid Build Coastguard Worker#
2921*8b26181fSAndroid Build Coastguard Worker# LIBS_PRIVATE: pkg-config package names for additional libraries with
2922*8b26181fSAndroid Build Coastguard Worker# which a program using the libpcap *static* library needs to be linked
2923*8b26181fSAndroid Build Coastguard Worker# and for which a .pc file does not exist.  This is used in libpcap.pc,
2924*8b26181fSAndroid Build Coastguard Worker# so that "pkg-config --libs --static" will report them (those libraries
2925*8b26181fSAndroid Build Coastguard Worker# cannot be determined using the library's .pc file, as there is no such
2926*8b26181fSAndroid Build Coastguard Worker# file, so it has to come from our .pc file.  Initialized to an empty
2927*8b26181fSAndroid Build Coastguard Worker# string.
2928*8b26181fSAndroid Build Coastguard Worker#
2929*8b26181fSAndroid Build Coastguard WorkerLIBS_STATIC=""
2930*8b26181fSAndroid Build Coastguard WorkerREQUIRES_PRIVATE=""
2931*8b26181fSAndroid Build Coastguard WorkerLIBS_PRIVATE=""
2932*8b26181fSAndroid Build Coastguard Worker
2933*8b26181fSAndroid Build Coastguard Worker
2934*8b26181fSAndroid Build Coastguard Worker
2935*8b26181fSAndroid Build Coastguard Worker
2936*8b26181fSAndroid Build Coastguard Worker
2937*8b26181fSAndroid Build Coastguard Worker
2938*8b26181fSAndroid Build Coastguard Worker
2939*8b26181fSAndroid Build Coastguard Worker
2940*8b26181fSAndroid Build Coastguard Workerac_aux_dir=
2941*8b26181fSAndroid Build Coastguard Workerfor ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2942*8b26181fSAndroid Build Coastguard Worker  if test -f "$ac_dir/install-sh"; then
2943*8b26181fSAndroid Build Coastguard Worker    ac_aux_dir=$ac_dir
2944*8b26181fSAndroid Build Coastguard Worker    ac_install_sh="$ac_aux_dir/install-sh -c"
2945*8b26181fSAndroid Build Coastguard Worker    break
2946*8b26181fSAndroid Build Coastguard Worker  elif test -f "$ac_dir/install.sh"; then
2947*8b26181fSAndroid Build Coastguard Worker    ac_aux_dir=$ac_dir
2948*8b26181fSAndroid Build Coastguard Worker    ac_install_sh="$ac_aux_dir/install.sh -c"
2949*8b26181fSAndroid Build Coastguard Worker    break
2950*8b26181fSAndroid Build Coastguard Worker  elif test -f "$ac_dir/shtool"; then
2951*8b26181fSAndroid Build Coastguard Worker    ac_aux_dir=$ac_dir
2952*8b26181fSAndroid Build Coastguard Worker    ac_install_sh="$ac_aux_dir/shtool install -c"
2953*8b26181fSAndroid Build Coastguard Worker    break
2954*8b26181fSAndroid Build Coastguard Worker  fi
2955*8b26181fSAndroid Build Coastguard Workerdone
2956*8b26181fSAndroid Build Coastguard Workerif test -z "$ac_aux_dir"; then
2957*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2958*8b26181fSAndroid Build Coastguard Workerfi
2959*8b26181fSAndroid Build Coastguard Worker
2960*8b26181fSAndroid Build Coastguard Worker# These three variables are undocumented and unsupported,
2961*8b26181fSAndroid Build Coastguard Worker# and are intended to be withdrawn in a future Autoconf release.
2962*8b26181fSAndroid Build Coastguard Worker# They can cause serious problems if a builder's source tree is in a directory
2963*8b26181fSAndroid Build Coastguard Worker# whose full name contains unusual characters.
2964*8b26181fSAndroid Build Coastguard Workerac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
2965*8b26181fSAndroid Build Coastguard Workerac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
2966*8b26181fSAndroid Build Coastguard Workerac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
2967*8b26181fSAndroid Build Coastguard Worker
2968*8b26181fSAndroid Build Coastguard Worker
2969*8b26181fSAndroid Build Coastguard Worker# Make sure we can run config.sub.
2970*8b26181fSAndroid Build Coastguard Worker$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2971*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2972*8b26181fSAndroid Build Coastguard Worker
2973*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2974*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking build system type... " >&6; }
2975*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_build+:} false; then :
2976*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
2977*8b26181fSAndroid Build Coastguard Workerelse
2978*8b26181fSAndroid Build Coastguard Worker  ac_build_alias=$build_alias
2979*8b26181fSAndroid Build Coastguard Workertest "x$ac_build_alias" = x &&
2980*8b26181fSAndroid Build Coastguard Worker  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2981*8b26181fSAndroid Build Coastguard Workertest "x$ac_build_alias" = x &&
2982*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2983*8b26181fSAndroid Build Coastguard Workerac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2984*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2985*8b26181fSAndroid Build Coastguard Worker
2986*8b26181fSAndroid Build Coastguard Workerfi
2987*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2988*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_build" >&6; }
2989*8b26181fSAndroid Build Coastguard Workercase $ac_cv_build in
2990*8b26181fSAndroid Build Coastguard Worker*-*-*) ;;
2991*8b26181fSAndroid Build Coastguard Worker*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2992*8b26181fSAndroid Build Coastguard Workeresac
2993*8b26181fSAndroid Build Coastguard Workerbuild=$ac_cv_build
2994*8b26181fSAndroid Build Coastguard Workerac_save_IFS=$IFS; IFS='-'
2995*8b26181fSAndroid Build Coastguard Workerset x $ac_cv_build
2996*8b26181fSAndroid Build Coastguard Workershift
2997*8b26181fSAndroid Build Coastguard Workerbuild_cpu=$1
2998*8b26181fSAndroid Build Coastguard Workerbuild_vendor=$2
2999*8b26181fSAndroid Build Coastguard Workershift; shift
3000*8b26181fSAndroid Build Coastguard Worker# Remember, the first character of IFS is used to create $*,
3001*8b26181fSAndroid Build Coastguard Worker# except with old shells:
3002*8b26181fSAndroid Build Coastguard Workerbuild_os=$*
3003*8b26181fSAndroid Build Coastguard WorkerIFS=$ac_save_IFS
3004*8b26181fSAndroid Build Coastguard Workercase $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3005*8b26181fSAndroid Build Coastguard Worker
3006*8b26181fSAndroid Build Coastguard Worker
3007*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3008*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking host system type... " >&6; }
3009*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_host+:} false; then :
3010*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3011*8b26181fSAndroid Build Coastguard Workerelse
3012*8b26181fSAndroid Build Coastguard Worker  if test "x$host_alias" = x; then
3013*8b26181fSAndroid Build Coastguard Worker  ac_cv_host=$ac_cv_build
3014*8b26181fSAndroid Build Coastguard Workerelse
3015*8b26181fSAndroid Build Coastguard Worker  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3016*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3017*8b26181fSAndroid Build Coastguard Workerfi
3018*8b26181fSAndroid Build Coastguard Worker
3019*8b26181fSAndroid Build Coastguard Workerfi
3020*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3021*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_host" >&6; }
3022*8b26181fSAndroid Build Coastguard Workercase $ac_cv_host in
3023*8b26181fSAndroid Build Coastguard Worker*-*-*) ;;
3024*8b26181fSAndroid Build Coastguard Worker*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3025*8b26181fSAndroid Build Coastguard Workeresac
3026*8b26181fSAndroid Build Coastguard Workerhost=$ac_cv_host
3027*8b26181fSAndroid Build Coastguard Workerac_save_IFS=$IFS; IFS='-'
3028*8b26181fSAndroid Build Coastguard Workerset x $ac_cv_host
3029*8b26181fSAndroid Build Coastguard Workershift
3030*8b26181fSAndroid Build Coastguard Workerhost_cpu=$1
3031*8b26181fSAndroid Build Coastguard Workerhost_vendor=$2
3032*8b26181fSAndroid Build Coastguard Workershift; shift
3033*8b26181fSAndroid Build Coastguard Worker# Remember, the first character of IFS is used to create $*,
3034*8b26181fSAndroid Build Coastguard Worker# except with old shells:
3035*8b26181fSAndroid Build Coastguard Workerhost_os=$*
3036*8b26181fSAndroid Build Coastguard WorkerIFS=$ac_save_IFS
3037*8b26181fSAndroid Build Coastguard Workercase $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3038*8b26181fSAndroid Build Coastguard Worker
3039*8b26181fSAndroid Build Coastguard Worker
3040*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
3041*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking target system type... " >&6; }
3042*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_target+:} false; then :
3043*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3044*8b26181fSAndroid Build Coastguard Workerelse
3045*8b26181fSAndroid Build Coastguard Worker  if test "x$target_alias" = x; then
3046*8b26181fSAndroid Build Coastguard Worker  ac_cv_target=$ac_cv_host
3047*8b26181fSAndroid Build Coastguard Workerelse
3048*8b26181fSAndroid Build Coastguard Worker  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
3049*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
3050*8b26181fSAndroid Build Coastguard Workerfi
3051*8b26181fSAndroid Build Coastguard Worker
3052*8b26181fSAndroid Build Coastguard Workerfi
3053*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
3054*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_target" >&6; }
3055*8b26181fSAndroid Build Coastguard Workercase $ac_cv_target in
3056*8b26181fSAndroid Build Coastguard Worker*-*-*) ;;
3057*8b26181fSAndroid Build Coastguard Worker*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
3058*8b26181fSAndroid Build Coastguard Workeresac
3059*8b26181fSAndroid Build Coastguard Workertarget=$ac_cv_target
3060*8b26181fSAndroid Build Coastguard Workerac_save_IFS=$IFS; IFS='-'
3061*8b26181fSAndroid Build Coastguard Workerset x $ac_cv_target
3062*8b26181fSAndroid Build Coastguard Workershift
3063*8b26181fSAndroid Build Coastguard Workertarget_cpu=$1
3064*8b26181fSAndroid Build Coastguard Workertarget_vendor=$2
3065*8b26181fSAndroid Build Coastguard Workershift; shift
3066*8b26181fSAndroid Build Coastguard Worker# Remember, the first character of IFS is used to create $*,
3067*8b26181fSAndroid Build Coastguard Worker# except with old shells:
3068*8b26181fSAndroid Build Coastguard Workertarget_os=$*
3069*8b26181fSAndroid Build Coastguard WorkerIFS=$ac_save_IFS
3070*8b26181fSAndroid Build Coastguard Workercase $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
3071*8b26181fSAndroid Build Coastguard Worker
3072*8b26181fSAndroid Build Coastguard Worker
3073*8b26181fSAndroid Build Coastguard Worker# The aliases save the names the user supplied, while $host etc.
3074*8b26181fSAndroid Build Coastguard Worker# will get canonicalized.
3075*8b26181fSAndroid Build Coastguard Workertest -n "$target_alias" &&
3076*8b26181fSAndroid Build Coastguard Worker  test "$program_prefix$program_suffix$program_transform_name" = \
3077*8b26181fSAndroid Build Coastguard Worker    NONENONEs,x,x, &&
3078*8b26181fSAndroid Build Coastguard Worker  program_prefix=${target_alias}-
3079*8b26181fSAndroid Build Coastguard Worker
3080*8b26181fSAndroid Build Coastguard Worker
3081*8b26181fSAndroid Build Coastguard Worker
3082*8b26181fSAndroid Build Coastguard Worker
3083*8b26181fSAndroid Build Coastguard Worker
3084*8b26181fSAndroid Build Coastguard Worker
3085*8b26181fSAndroid Build Coastguard Worker
3086*8b26181fSAndroid Build Coastguard Worker
3087*8b26181fSAndroid Build Coastguard Worker# Check whether --with-gcc was given.
3088*8b26181fSAndroid Build Coastguard Workerif test "${with_gcc+set}" = set; then :
3089*8b26181fSAndroid Build Coastguard Worker  withval=$with_gcc;
3090*8b26181fSAndroid Build Coastguard Workerfi
3091*8b26181fSAndroid Build Coastguard Worker
3092*8b26181fSAndroid Build Coastguard Worker    V_CCOPT=""
3093*8b26181fSAndroid Build Coastguard Worker    if test "${srcdir}" != "." ; then
3094*8b26181fSAndroid Build Coastguard Worker	    V_CCOPT="-I\$(srcdir)"
3095*8b26181fSAndroid Build Coastguard Worker    fi
3096*8b26181fSAndroid Build Coastguard Worker    if test "${CFLAGS+set}" = set; then
3097*8b26181fSAndroid Build Coastguard Worker	    LBL_CFLAGS="$CFLAGS"
3098*8b26181fSAndroid Build Coastguard Worker    fi
3099*8b26181fSAndroid Build Coastguard Worker    if test -z "$CC" ; then
3100*8b26181fSAndroid Build Coastguard Worker	    case "$host_os" in
3101*8b26181fSAndroid Build Coastguard Worker
3102*8b26181fSAndroid Build Coastguard Worker	    bsdi*)
3103*8b26181fSAndroid Build Coastguard Worker		    # Extract the first word of "shlicc2", so it can be a program name with args.
3104*8b26181fSAndroid Build Coastguard Workerset dummy shlicc2; ac_word=$2
3105*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3106*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
3107*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_SHLICC2+:} false; then :
3108*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3109*8b26181fSAndroid Build Coastguard Workerelse
3110*8b26181fSAndroid Build Coastguard Worker  if test -n "$SHLICC2"; then
3111*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
3112*8b26181fSAndroid Build Coastguard Workerelse
3113*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
3115*8b26181fSAndroid Build Coastguard Workerdo
3116*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
3117*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
3118*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
3119*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3120*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_SHLICC2="yes"
3121*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3122*8b26181fSAndroid Build Coastguard Worker    break 2
3123*8b26181fSAndroid Build Coastguard Worker  fi
3124*8b26181fSAndroid Build Coastguard Workerdone
3125*8b26181fSAndroid Build Coastguard Worker  done
3126*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
3127*8b26181fSAndroid Build Coastguard Worker
3128*8b26181fSAndroid Build Coastguard Worker  test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
3129*8b26181fSAndroid Build Coastguard Workerfi
3130*8b26181fSAndroid Build Coastguard Workerfi
3131*8b26181fSAndroid Build Coastguard WorkerSHLICC2=$ac_cv_prog_SHLICC2
3132*8b26181fSAndroid Build Coastguard Workerif test -n "$SHLICC2"; then
3133*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
3134*8b26181fSAndroid Build Coastguard Worker$as_echo "$SHLICC2" >&6; }
3135*8b26181fSAndroid Build Coastguard Workerelse
3136*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3137*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3138*8b26181fSAndroid Build Coastguard Workerfi
3139*8b26181fSAndroid Build Coastguard Worker
3140*8b26181fSAndroid Build Coastguard Worker
3141*8b26181fSAndroid Build Coastguard Worker		    if test $SHLICC2 = yes ; then
3142*8b26181fSAndroid Build Coastguard Worker			    CC=shlicc2
3143*8b26181fSAndroid Build Coastguard Worker			    export CC
3144*8b26181fSAndroid Build Coastguard Worker		    fi
3145*8b26181fSAndroid Build Coastguard Worker		    ;;
3146*8b26181fSAndroid Build Coastguard Worker	    esac
3147*8b26181fSAndroid Build Coastguard Worker    fi
3148*8b26181fSAndroid Build Coastguard Worker    if test -z "$CC" -a "$with_gcc" = no ; then
3149*8b26181fSAndroid Build Coastguard Worker	    CC=cc
3150*8b26181fSAndroid Build Coastguard Worker	    export CC
3151*8b26181fSAndroid Build Coastguard Worker    fi
3152*8b26181fSAndroid Build Coastguard Worker
3153*8b26181fSAndroid Build Coastguard Worker#
3154*8b26181fSAndroid Build Coastguard Worker# We require C99 or later.
3155*8b26181fSAndroid Build Coastguard Worker# Try to get it, which may involve adding compiler flags;
3156*8b26181fSAndroid Build Coastguard Worker# if that fails, give up.
3157*8b26181fSAndroid Build Coastguard Worker#
3158*8b26181fSAndroid Build Coastguard Workerac_ext=c
3159*8b26181fSAndroid Build Coastguard Workerac_cpp='$CPP $CPPFLAGS'
3160*8b26181fSAndroid Build Coastguard Workerac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3161*8b26181fSAndroid Build Coastguard Workerac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3162*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_c_compiler_gnu
3163*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_tool_prefix"; then
3164*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3165*8b26181fSAndroid Build Coastguard Workerset dummy ${ac_tool_prefix}gcc; ac_word=$2
3166*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3167*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
3168*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_CC+:} false; then :
3169*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3170*8b26181fSAndroid Build Coastguard Workerelse
3171*8b26181fSAndroid Build Coastguard Worker  if test -n "$CC"; then
3172*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_CC="$CC" # Let the user override the test.
3173*8b26181fSAndroid Build Coastguard Workerelse
3174*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3175*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
3176*8b26181fSAndroid Build Coastguard Workerdo
3177*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
3178*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
3179*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
3180*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3181*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_CC="${ac_tool_prefix}gcc"
3182*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3183*8b26181fSAndroid Build Coastguard Worker    break 2
3184*8b26181fSAndroid Build Coastguard Worker  fi
3185*8b26181fSAndroid Build Coastguard Workerdone
3186*8b26181fSAndroid Build Coastguard Worker  done
3187*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
3188*8b26181fSAndroid Build Coastguard Worker
3189*8b26181fSAndroid Build Coastguard Workerfi
3190*8b26181fSAndroid Build Coastguard Workerfi
3191*8b26181fSAndroid Build Coastguard WorkerCC=$ac_cv_prog_CC
3192*8b26181fSAndroid Build Coastguard Workerif test -n "$CC"; then
3193*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3194*8b26181fSAndroid Build Coastguard Worker$as_echo "$CC" >&6; }
3195*8b26181fSAndroid Build Coastguard Workerelse
3196*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3197*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3198*8b26181fSAndroid Build Coastguard Workerfi
3199*8b26181fSAndroid Build Coastguard Worker
3200*8b26181fSAndroid Build Coastguard Worker
3201*8b26181fSAndroid Build Coastguard Workerfi
3202*8b26181fSAndroid Build Coastguard Workerif test -z "$ac_cv_prog_CC"; then
3203*8b26181fSAndroid Build Coastguard Worker  ac_ct_CC=$CC
3204*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "gcc", so it can be a program name with args.
3205*8b26181fSAndroid Build Coastguard Workerset dummy gcc; ac_word=$2
3206*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3207*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
3208*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_ac_ct_CC+:} false; then :
3209*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3210*8b26181fSAndroid Build Coastguard Workerelse
3211*8b26181fSAndroid Build Coastguard Worker  if test -n "$ac_ct_CC"; then
3212*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3213*8b26181fSAndroid Build Coastguard Workerelse
3214*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3215*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
3216*8b26181fSAndroid Build Coastguard Workerdo
3217*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
3218*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
3219*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
3220*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3221*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_ac_ct_CC="gcc"
3222*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3223*8b26181fSAndroid Build Coastguard Worker    break 2
3224*8b26181fSAndroid Build Coastguard Worker  fi
3225*8b26181fSAndroid Build Coastguard Workerdone
3226*8b26181fSAndroid Build Coastguard Worker  done
3227*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
3228*8b26181fSAndroid Build Coastguard Worker
3229*8b26181fSAndroid Build Coastguard Workerfi
3230*8b26181fSAndroid Build Coastguard Workerfi
3231*8b26181fSAndroid Build Coastguard Workerac_ct_CC=$ac_cv_prog_ac_ct_CC
3232*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_ct_CC"; then
3233*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3234*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_ct_CC" >&6; }
3235*8b26181fSAndroid Build Coastguard Workerelse
3236*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3237*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3238*8b26181fSAndroid Build Coastguard Workerfi
3239*8b26181fSAndroid Build Coastguard Worker
3240*8b26181fSAndroid Build Coastguard Worker  if test "x$ac_ct_CC" = x; then
3241*8b26181fSAndroid Build Coastguard Worker    CC=""
3242*8b26181fSAndroid Build Coastguard Worker  else
3243*8b26181fSAndroid Build Coastguard Worker    case $cross_compiling:$ac_tool_warned in
3244*8b26181fSAndroid Build Coastguard Workeryes:)
3245*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3246*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3247*8b26181fSAndroid Build Coastguard Workerac_tool_warned=yes ;;
3248*8b26181fSAndroid Build Coastguard Workeresac
3249*8b26181fSAndroid Build Coastguard Worker    CC=$ac_ct_CC
3250*8b26181fSAndroid Build Coastguard Worker  fi
3251*8b26181fSAndroid Build Coastguard Workerelse
3252*8b26181fSAndroid Build Coastguard Worker  CC="$ac_cv_prog_CC"
3253*8b26181fSAndroid Build Coastguard Workerfi
3254*8b26181fSAndroid Build Coastguard Worker
3255*8b26181fSAndroid Build Coastguard Workerif test -z "$CC"; then
3256*8b26181fSAndroid Build Coastguard Worker          if test -n "$ac_tool_prefix"; then
3257*8b26181fSAndroid Build Coastguard Worker    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3258*8b26181fSAndroid Build Coastguard Workerset dummy ${ac_tool_prefix}cc; ac_word=$2
3259*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3260*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
3261*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_CC+:} false; then :
3262*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3263*8b26181fSAndroid Build Coastguard Workerelse
3264*8b26181fSAndroid Build Coastguard Worker  if test -n "$CC"; then
3265*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_CC="$CC" # Let the user override the test.
3266*8b26181fSAndroid Build Coastguard Workerelse
3267*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3268*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
3269*8b26181fSAndroid Build Coastguard Workerdo
3270*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
3271*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
3272*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
3273*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3274*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_CC="${ac_tool_prefix}cc"
3275*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3276*8b26181fSAndroid Build Coastguard Worker    break 2
3277*8b26181fSAndroid Build Coastguard Worker  fi
3278*8b26181fSAndroid Build Coastguard Workerdone
3279*8b26181fSAndroid Build Coastguard Worker  done
3280*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
3281*8b26181fSAndroid Build Coastguard Worker
3282*8b26181fSAndroid Build Coastguard Workerfi
3283*8b26181fSAndroid Build Coastguard Workerfi
3284*8b26181fSAndroid Build Coastguard WorkerCC=$ac_cv_prog_CC
3285*8b26181fSAndroid Build Coastguard Workerif test -n "$CC"; then
3286*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3287*8b26181fSAndroid Build Coastguard Worker$as_echo "$CC" >&6; }
3288*8b26181fSAndroid Build Coastguard Workerelse
3289*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3290*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3291*8b26181fSAndroid Build Coastguard Workerfi
3292*8b26181fSAndroid Build Coastguard Worker
3293*8b26181fSAndroid Build Coastguard Worker
3294*8b26181fSAndroid Build Coastguard Worker  fi
3295*8b26181fSAndroid Build Coastguard Workerfi
3296*8b26181fSAndroid Build Coastguard Workerif test -z "$CC"; then
3297*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "cc", so it can be a program name with args.
3298*8b26181fSAndroid Build Coastguard Workerset dummy cc; ac_word=$2
3299*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3300*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
3301*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_CC+:} false; then :
3302*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3303*8b26181fSAndroid Build Coastguard Workerelse
3304*8b26181fSAndroid Build Coastguard Worker  if test -n "$CC"; then
3305*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_CC="$CC" # Let the user override the test.
3306*8b26181fSAndroid Build Coastguard Workerelse
3307*8b26181fSAndroid Build Coastguard Worker  ac_prog_rejected=no
3308*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3309*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
3310*8b26181fSAndroid Build Coastguard Workerdo
3311*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
3312*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
3313*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
3314*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3315*8b26181fSAndroid Build Coastguard Worker    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3316*8b26181fSAndroid Build Coastguard Worker       ac_prog_rejected=yes
3317*8b26181fSAndroid Build Coastguard Worker       continue
3318*8b26181fSAndroid Build Coastguard Worker     fi
3319*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_CC="cc"
3320*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3321*8b26181fSAndroid Build Coastguard Worker    break 2
3322*8b26181fSAndroid Build Coastguard Worker  fi
3323*8b26181fSAndroid Build Coastguard Workerdone
3324*8b26181fSAndroid Build Coastguard Worker  done
3325*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
3326*8b26181fSAndroid Build Coastguard Worker
3327*8b26181fSAndroid Build Coastguard Workerif test $ac_prog_rejected = yes; then
3328*8b26181fSAndroid Build Coastguard Worker  # We found a bogon in the path, so make sure we never use it.
3329*8b26181fSAndroid Build Coastguard Worker  set dummy $ac_cv_prog_CC
3330*8b26181fSAndroid Build Coastguard Worker  shift
3331*8b26181fSAndroid Build Coastguard Worker  if test $# != 0; then
3332*8b26181fSAndroid Build Coastguard Worker    # We chose a different compiler from the bogus one.
3333*8b26181fSAndroid Build Coastguard Worker    # However, it has the same basename, so the bogon will be chosen
3334*8b26181fSAndroid Build Coastguard Worker    # first if we set CC to just the basename; use the full file name.
3335*8b26181fSAndroid Build Coastguard Worker    shift
3336*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3337*8b26181fSAndroid Build Coastguard Worker  fi
3338*8b26181fSAndroid Build Coastguard Workerfi
3339*8b26181fSAndroid Build Coastguard Workerfi
3340*8b26181fSAndroid Build Coastguard Workerfi
3341*8b26181fSAndroid Build Coastguard WorkerCC=$ac_cv_prog_CC
3342*8b26181fSAndroid Build Coastguard Workerif test -n "$CC"; then
3343*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3344*8b26181fSAndroid Build Coastguard Worker$as_echo "$CC" >&6; }
3345*8b26181fSAndroid Build Coastguard Workerelse
3346*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3347*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3348*8b26181fSAndroid Build Coastguard Workerfi
3349*8b26181fSAndroid Build Coastguard Worker
3350*8b26181fSAndroid Build Coastguard Worker
3351*8b26181fSAndroid Build Coastguard Workerfi
3352*8b26181fSAndroid Build Coastguard Workerif test -z "$CC"; then
3353*8b26181fSAndroid Build Coastguard Worker  if test -n "$ac_tool_prefix"; then
3354*8b26181fSAndroid Build Coastguard Worker  for ac_prog in cl.exe
3355*8b26181fSAndroid Build Coastguard Worker  do
3356*8b26181fSAndroid Build Coastguard Worker    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3357*8b26181fSAndroid Build Coastguard Workerset dummy $ac_tool_prefix$ac_prog; ac_word=$2
3358*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3359*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
3360*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_CC+:} false; then :
3361*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3362*8b26181fSAndroid Build Coastguard Workerelse
3363*8b26181fSAndroid Build Coastguard Worker  if test -n "$CC"; then
3364*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_CC="$CC" # Let the user override the test.
3365*8b26181fSAndroid Build Coastguard Workerelse
3366*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3367*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
3368*8b26181fSAndroid Build Coastguard Workerdo
3369*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
3370*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
3371*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
3372*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3373*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3374*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3375*8b26181fSAndroid Build Coastguard Worker    break 2
3376*8b26181fSAndroid Build Coastguard Worker  fi
3377*8b26181fSAndroid Build Coastguard Workerdone
3378*8b26181fSAndroid Build Coastguard Worker  done
3379*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
3380*8b26181fSAndroid Build Coastguard Worker
3381*8b26181fSAndroid Build Coastguard Workerfi
3382*8b26181fSAndroid Build Coastguard Workerfi
3383*8b26181fSAndroid Build Coastguard WorkerCC=$ac_cv_prog_CC
3384*8b26181fSAndroid Build Coastguard Workerif test -n "$CC"; then
3385*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3386*8b26181fSAndroid Build Coastguard Worker$as_echo "$CC" >&6; }
3387*8b26181fSAndroid Build Coastguard Workerelse
3388*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3389*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3390*8b26181fSAndroid Build Coastguard Workerfi
3391*8b26181fSAndroid Build Coastguard Worker
3392*8b26181fSAndroid Build Coastguard Worker
3393*8b26181fSAndroid Build Coastguard Worker    test -n "$CC" && break
3394*8b26181fSAndroid Build Coastguard Worker  done
3395*8b26181fSAndroid Build Coastguard Workerfi
3396*8b26181fSAndroid Build Coastguard Workerif test -z "$CC"; then
3397*8b26181fSAndroid Build Coastguard Worker  ac_ct_CC=$CC
3398*8b26181fSAndroid Build Coastguard Worker  for ac_prog in cl.exe
3399*8b26181fSAndroid Build Coastguard Workerdo
3400*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "$ac_prog", so it can be a program name with args.
3401*8b26181fSAndroid Build Coastguard Workerset dummy $ac_prog; ac_word=$2
3402*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3403*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
3404*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_ac_ct_CC+:} false; then :
3405*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3406*8b26181fSAndroid Build Coastguard Workerelse
3407*8b26181fSAndroid Build Coastguard Worker  if test -n "$ac_ct_CC"; then
3408*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3409*8b26181fSAndroid Build Coastguard Workerelse
3410*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3411*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
3412*8b26181fSAndroid Build Coastguard Workerdo
3413*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
3414*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
3415*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
3416*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3417*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_ac_ct_CC="$ac_prog"
3418*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3419*8b26181fSAndroid Build Coastguard Worker    break 2
3420*8b26181fSAndroid Build Coastguard Worker  fi
3421*8b26181fSAndroid Build Coastguard Workerdone
3422*8b26181fSAndroid Build Coastguard Worker  done
3423*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
3424*8b26181fSAndroid Build Coastguard Worker
3425*8b26181fSAndroid Build Coastguard Workerfi
3426*8b26181fSAndroid Build Coastguard Workerfi
3427*8b26181fSAndroid Build Coastguard Workerac_ct_CC=$ac_cv_prog_ac_ct_CC
3428*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_ct_CC"; then
3429*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3430*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_ct_CC" >&6; }
3431*8b26181fSAndroid Build Coastguard Workerelse
3432*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3434*8b26181fSAndroid Build Coastguard Workerfi
3435*8b26181fSAndroid Build Coastguard Worker
3436*8b26181fSAndroid Build Coastguard Worker
3437*8b26181fSAndroid Build Coastguard Worker  test -n "$ac_ct_CC" && break
3438*8b26181fSAndroid Build Coastguard Workerdone
3439*8b26181fSAndroid Build Coastguard Worker
3440*8b26181fSAndroid Build Coastguard Worker  if test "x$ac_ct_CC" = x; then
3441*8b26181fSAndroid Build Coastguard Worker    CC=""
3442*8b26181fSAndroid Build Coastguard Worker  else
3443*8b26181fSAndroid Build Coastguard Worker    case $cross_compiling:$ac_tool_warned in
3444*8b26181fSAndroid Build Coastguard Workeryes:)
3445*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3446*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3447*8b26181fSAndroid Build Coastguard Workerac_tool_warned=yes ;;
3448*8b26181fSAndroid Build Coastguard Workeresac
3449*8b26181fSAndroid Build Coastguard Worker    CC=$ac_ct_CC
3450*8b26181fSAndroid Build Coastguard Worker  fi
3451*8b26181fSAndroid Build Coastguard Workerfi
3452*8b26181fSAndroid Build Coastguard Worker
3453*8b26181fSAndroid Build Coastguard Workerfi
3454*8b26181fSAndroid Build Coastguard Worker
3455*8b26181fSAndroid Build Coastguard Worker
3456*8b26181fSAndroid Build Coastguard Workertest -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3457*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3458*8b26181fSAndroid Build Coastguard Workeras_fn_error $? "no acceptable C compiler found in \$PATH
3459*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
3460*8b26181fSAndroid Build Coastguard Worker
3461*8b26181fSAndroid Build Coastguard Worker# Provide some information about the compiler.
3462*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3463*8b26181fSAndroid Build Coastguard Workerset X $ac_compile
3464*8b26181fSAndroid Build Coastguard Workerac_compiler=$2
3465*8b26181fSAndroid Build Coastguard Workerfor ac_option in --version -v -V -qversion; do
3466*8b26181fSAndroid Build Coastguard Worker  { { ac_try="$ac_compiler $ac_option >&5"
3467*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
3468*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3469*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
3470*8b26181fSAndroid Build Coastguard Workeresac
3471*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3472*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
3473*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3474*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
3475*8b26181fSAndroid Build Coastguard Worker  if test -s conftest.err; then
3476*8b26181fSAndroid Build Coastguard Worker    sed '10a\
3477*8b26181fSAndroid Build Coastguard Worker... rest of stderr output deleted ...
3478*8b26181fSAndroid Build Coastguard Worker         10q' conftest.err >conftest.er1
3479*8b26181fSAndroid Build Coastguard Worker    cat conftest.er1 >&5
3480*8b26181fSAndroid Build Coastguard Worker  fi
3481*8b26181fSAndroid Build Coastguard Worker  rm -f conftest.er1 conftest.err
3482*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3483*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }
3484*8b26181fSAndroid Build Coastguard Workerdone
3485*8b26181fSAndroid Build Coastguard Worker
3486*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
3487*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3488*8b26181fSAndroid Build Coastguard Worker
3489*8b26181fSAndroid Build Coastguard Workerint
3490*8b26181fSAndroid Build Coastguard Workermain ()
3491*8b26181fSAndroid Build Coastguard Worker{
3492*8b26181fSAndroid Build Coastguard Worker
3493*8b26181fSAndroid Build Coastguard Worker  ;
3494*8b26181fSAndroid Build Coastguard Worker  return 0;
3495*8b26181fSAndroid Build Coastguard Worker}
3496*8b26181fSAndroid Build Coastguard Worker_ACEOF
3497*8b26181fSAndroid Build Coastguard Workerac_clean_files_save=$ac_clean_files
3498*8b26181fSAndroid Build Coastguard Workerac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3499*8b26181fSAndroid Build Coastguard Worker# Try to create an executable without -o first, disregard a.out.
3500*8b26181fSAndroid Build Coastguard Worker# It will help us diagnose broken compilers, and finding out an intuition
3501*8b26181fSAndroid Build Coastguard Worker# of exeext.
3502*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3503*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the C compiler works... " >&6; }
3504*8b26181fSAndroid Build Coastguard Workerac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3505*8b26181fSAndroid Build Coastguard Worker
3506*8b26181fSAndroid Build Coastguard Worker# The possible output files:
3507*8b26181fSAndroid Build Coastguard Workerac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3508*8b26181fSAndroid Build Coastguard Worker
3509*8b26181fSAndroid Build Coastguard Workerac_rmfiles=
3510*8b26181fSAndroid Build Coastguard Workerfor ac_file in $ac_files
3511*8b26181fSAndroid Build Coastguard Workerdo
3512*8b26181fSAndroid Build Coastguard Worker  case $ac_file in
3513*8b26181fSAndroid Build Coastguard Worker    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3514*8b26181fSAndroid Build Coastguard Worker    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3515*8b26181fSAndroid Build Coastguard Worker  esac
3516*8b26181fSAndroid Build Coastguard Workerdone
3517*8b26181fSAndroid Build Coastguard Workerrm -f $ac_rmfiles
3518*8b26181fSAndroid Build Coastguard Worker
3519*8b26181fSAndroid Build Coastguard Workerif { { ac_try="$ac_link_default"
3520*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
3521*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3522*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
3523*8b26181fSAndroid Build Coastguard Workeresac
3524*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3525*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
3526*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_link_default") 2>&5
3527*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
3528*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3529*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then :
3530*8b26181fSAndroid Build Coastguard Worker  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3531*8b26181fSAndroid Build Coastguard Worker# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3532*8b26181fSAndroid Build Coastguard Worker# in a Makefile.  We should not override ac_cv_exeext if it was cached,
3533*8b26181fSAndroid Build Coastguard Worker# so that the user can short-circuit this test for compilers unknown to
3534*8b26181fSAndroid Build Coastguard Worker# Autoconf.
3535*8b26181fSAndroid Build Coastguard Workerfor ac_file in $ac_files ''
3536*8b26181fSAndroid Build Coastguard Workerdo
3537*8b26181fSAndroid Build Coastguard Worker  test -f "$ac_file" || continue
3538*8b26181fSAndroid Build Coastguard Worker  case $ac_file in
3539*8b26181fSAndroid Build Coastguard Worker    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3540*8b26181fSAndroid Build Coastguard Worker	;;
3541*8b26181fSAndroid Build Coastguard Worker    [ab].out )
3542*8b26181fSAndroid Build Coastguard Worker	# We found the default executable, but exeext='' is most
3543*8b26181fSAndroid Build Coastguard Worker	# certainly right.
3544*8b26181fSAndroid Build Coastguard Worker	break;;
3545*8b26181fSAndroid Build Coastguard Worker    *.* )
3546*8b26181fSAndroid Build Coastguard Worker	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3547*8b26181fSAndroid Build Coastguard Worker	then :; else
3548*8b26181fSAndroid Build Coastguard Worker	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3549*8b26181fSAndroid Build Coastguard Worker	fi
3550*8b26181fSAndroid Build Coastguard Worker	# We set ac_cv_exeext here because the later test for it is not
3551*8b26181fSAndroid Build Coastguard Worker	# safe: cross compilers may not add the suffix if given an `-o'
3552*8b26181fSAndroid Build Coastguard Worker	# argument, so we may need to know it at that point already.
3553*8b26181fSAndroid Build Coastguard Worker	# Even if this section looks crufty: it has the advantage of
3554*8b26181fSAndroid Build Coastguard Worker	# actually working.
3555*8b26181fSAndroid Build Coastguard Worker	break;;
3556*8b26181fSAndroid Build Coastguard Worker    * )
3557*8b26181fSAndroid Build Coastguard Worker	break;;
3558*8b26181fSAndroid Build Coastguard Worker  esac
3559*8b26181fSAndroid Build Coastguard Workerdone
3560*8b26181fSAndroid Build Coastguard Workertest "$ac_cv_exeext" = no && ac_cv_exeext=
3561*8b26181fSAndroid Build Coastguard Worker
3562*8b26181fSAndroid Build Coastguard Workerelse
3563*8b26181fSAndroid Build Coastguard Worker  ac_file=''
3564*8b26181fSAndroid Build Coastguard Workerfi
3565*8b26181fSAndroid Build Coastguard Workerif test -z "$ac_file"; then :
3566*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3567*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
3568*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: failed program was:" >&5
3569*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
3570*8b26181fSAndroid Build Coastguard Worker
3571*8b26181fSAndroid Build Coastguard Worker{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3572*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3573*8b26181fSAndroid Build Coastguard Workeras_fn_error 77 "C compiler cannot create executables
3574*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
3575*8b26181fSAndroid Build Coastguard Workerelse
3576*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3577*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
3578*8b26181fSAndroid Build Coastguard Workerfi
3579*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3580*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for C compiler default output file name... " >&6; }
3581*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3582*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_file" >&6; }
3583*8b26181fSAndroid Build Coastguard Workerac_exeext=$ac_cv_exeext
3584*8b26181fSAndroid Build Coastguard Worker
3585*8b26181fSAndroid Build Coastguard Workerrm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3586*8b26181fSAndroid Build Coastguard Workerac_clean_files=$ac_clean_files_save
3587*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3588*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for suffix of executables... " >&6; }
3589*8b26181fSAndroid Build Coastguard Workerif { { ac_try="$ac_link"
3590*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
3591*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3592*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
3593*8b26181fSAndroid Build Coastguard Workeresac
3594*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3595*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
3596*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_link") 2>&5
3597*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
3598*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3599*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then :
3600*8b26181fSAndroid Build Coastguard Worker  # If both `conftest.exe' and `conftest' are `present' (well, observable)
3601*8b26181fSAndroid Build Coastguard Worker# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3602*8b26181fSAndroid Build Coastguard Worker# work properly (i.e., refer to `conftest.exe'), while it won't with
3603*8b26181fSAndroid Build Coastguard Worker# `rm'.
3604*8b26181fSAndroid Build Coastguard Workerfor ac_file in conftest.exe conftest conftest.*; do
3605*8b26181fSAndroid Build Coastguard Worker  test -f "$ac_file" || continue
3606*8b26181fSAndroid Build Coastguard Worker  case $ac_file in
3607*8b26181fSAndroid Build Coastguard Worker    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3608*8b26181fSAndroid Build Coastguard Worker    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3609*8b26181fSAndroid Build Coastguard Worker	  break;;
3610*8b26181fSAndroid Build Coastguard Worker    * ) break;;
3611*8b26181fSAndroid Build Coastguard Worker  esac
3612*8b26181fSAndroid Build Coastguard Workerdone
3613*8b26181fSAndroid Build Coastguard Workerelse
3614*8b26181fSAndroid Build Coastguard Worker  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3615*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3616*8b26181fSAndroid Build Coastguard Workeras_fn_error $? "cannot compute suffix of executables: cannot compile and link
3617*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
3618*8b26181fSAndroid Build Coastguard Workerfi
3619*8b26181fSAndroid Build Coastguard Workerrm -f conftest conftest$ac_cv_exeext
3620*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3621*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_exeext" >&6; }
3622*8b26181fSAndroid Build Coastguard Worker
3623*8b26181fSAndroid Build Coastguard Workerrm -f conftest.$ac_ext
3624*8b26181fSAndroid Build Coastguard WorkerEXEEXT=$ac_cv_exeext
3625*8b26181fSAndroid Build Coastguard Workerac_exeext=$EXEEXT
3626*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
3627*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3628*8b26181fSAndroid Build Coastguard Worker#include <stdio.h>
3629*8b26181fSAndroid Build Coastguard Workerint
3630*8b26181fSAndroid Build Coastguard Workermain ()
3631*8b26181fSAndroid Build Coastguard Worker{
3632*8b26181fSAndroid Build Coastguard WorkerFILE *f = fopen ("conftest.out", "w");
3633*8b26181fSAndroid Build Coastguard Worker return ferror (f) || fclose (f) != 0;
3634*8b26181fSAndroid Build Coastguard Worker
3635*8b26181fSAndroid Build Coastguard Worker  ;
3636*8b26181fSAndroid Build Coastguard Worker  return 0;
3637*8b26181fSAndroid Build Coastguard Worker}
3638*8b26181fSAndroid Build Coastguard Worker_ACEOF
3639*8b26181fSAndroid Build Coastguard Workerac_clean_files="$ac_clean_files conftest.out"
3640*8b26181fSAndroid Build Coastguard Worker# Check that the compiler produces executables we can run.  If not, either
3641*8b26181fSAndroid Build Coastguard Worker# the compiler is broken, or we cross compile.
3642*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3643*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we are cross compiling... " >&6; }
3644*8b26181fSAndroid Build Coastguard Workerif test "$cross_compiling" != yes; then
3645*8b26181fSAndroid Build Coastguard Worker  { { ac_try="$ac_link"
3646*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
3647*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3648*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
3649*8b26181fSAndroid Build Coastguard Workeresac
3650*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3651*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
3652*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_link") 2>&5
3653*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
3654*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3655*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }
3656*8b26181fSAndroid Build Coastguard Worker  if { ac_try='./conftest$ac_cv_exeext'
3657*8b26181fSAndroid Build Coastguard Worker  { { case "(($ac_try" in
3658*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
3660*8b26181fSAndroid Build Coastguard Workeresac
3661*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3662*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
3663*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_try") 2>&5
3664*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
3665*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3666*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; }; then
3667*8b26181fSAndroid Build Coastguard Worker    cross_compiling=no
3668*8b26181fSAndroid Build Coastguard Worker  else
3669*8b26181fSAndroid Build Coastguard Worker    if test "$cross_compiling" = maybe; then
3670*8b26181fSAndroid Build Coastguard Worker	cross_compiling=yes
3671*8b26181fSAndroid Build Coastguard Worker    else
3672*8b26181fSAndroid Build Coastguard Worker	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3673*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3674*8b26181fSAndroid Build Coastguard Workeras_fn_error $? "cannot run C compiled programs.
3675*8b26181fSAndroid Build Coastguard WorkerIf you meant to cross compile, use \`--host'.
3676*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
3677*8b26181fSAndroid Build Coastguard Worker    fi
3678*8b26181fSAndroid Build Coastguard Worker  fi
3679*8b26181fSAndroid Build Coastguard Workerfi
3680*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3681*8b26181fSAndroid Build Coastguard Worker$as_echo "$cross_compiling" >&6; }
3682*8b26181fSAndroid Build Coastguard Worker
3683*8b26181fSAndroid Build Coastguard Workerrm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3684*8b26181fSAndroid Build Coastguard Workerac_clean_files=$ac_clean_files_save
3685*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3686*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for suffix of object files... " >&6; }
3687*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_objext+:} false; then :
3688*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3689*8b26181fSAndroid Build Coastguard Workerelse
3690*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3691*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3692*8b26181fSAndroid Build Coastguard Worker
3693*8b26181fSAndroid Build Coastguard Workerint
3694*8b26181fSAndroid Build Coastguard Workermain ()
3695*8b26181fSAndroid Build Coastguard Worker{
3696*8b26181fSAndroid Build Coastguard Worker
3697*8b26181fSAndroid Build Coastguard Worker  ;
3698*8b26181fSAndroid Build Coastguard Worker  return 0;
3699*8b26181fSAndroid Build Coastguard Worker}
3700*8b26181fSAndroid Build Coastguard Worker_ACEOF
3701*8b26181fSAndroid Build Coastguard Workerrm -f conftest.o conftest.obj
3702*8b26181fSAndroid Build Coastguard Workerif { { ac_try="$ac_compile"
3703*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
3704*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3705*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
3706*8b26181fSAndroid Build Coastguard Workeresac
3707*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3708*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
3709*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_compile") 2>&5
3710*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
3711*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3712*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then :
3713*8b26181fSAndroid Build Coastguard Worker  for ac_file in conftest.o conftest.obj conftest.*; do
3714*8b26181fSAndroid Build Coastguard Worker  test -f "$ac_file" || continue;
3715*8b26181fSAndroid Build Coastguard Worker  case $ac_file in
3716*8b26181fSAndroid Build Coastguard Worker    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3717*8b26181fSAndroid Build Coastguard Worker    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3718*8b26181fSAndroid Build Coastguard Worker       break;;
3719*8b26181fSAndroid Build Coastguard Worker  esac
3720*8b26181fSAndroid Build Coastguard Workerdone
3721*8b26181fSAndroid Build Coastguard Workerelse
3722*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: failed program was:" >&5
3723*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
3724*8b26181fSAndroid Build Coastguard Worker
3725*8b26181fSAndroid Build Coastguard Worker{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3726*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3727*8b26181fSAndroid Build Coastguard Workeras_fn_error $? "cannot compute suffix of object files: cannot compile
3728*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
3729*8b26181fSAndroid Build Coastguard Workerfi
3730*8b26181fSAndroid Build Coastguard Workerrm -f conftest.$ac_cv_objext conftest.$ac_ext
3731*8b26181fSAndroid Build Coastguard Workerfi
3732*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3733*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_objext" >&6; }
3734*8b26181fSAndroid Build Coastguard WorkerOBJEXT=$ac_cv_objext
3735*8b26181fSAndroid Build Coastguard Workerac_objext=$OBJEXT
3736*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3737*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3738*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_c_compiler_gnu+:} false; then :
3739*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3740*8b26181fSAndroid Build Coastguard Workerelse
3741*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3742*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3743*8b26181fSAndroid Build Coastguard Worker
3744*8b26181fSAndroid Build Coastguard Workerint
3745*8b26181fSAndroid Build Coastguard Workermain ()
3746*8b26181fSAndroid Build Coastguard Worker{
3747*8b26181fSAndroid Build Coastguard Worker#ifndef __GNUC__
3748*8b26181fSAndroid Build Coastguard Worker       choke me
3749*8b26181fSAndroid Build Coastguard Worker#endif
3750*8b26181fSAndroid Build Coastguard Worker
3751*8b26181fSAndroid Build Coastguard Worker  ;
3752*8b26181fSAndroid Build Coastguard Worker  return 0;
3753*8b26181fSAndroid Build Coastguard Worker}
3754*8b26181fSAndroid Build Coastguard Worker_ACEOF
3755*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
3756*8b26181fSAndroid Build Coastguard Worker  ac_compiler_gnu=yes
3757*8b26181fSAndroid Build Coastguard Workerelse
3758*8b26181fSAndroid Build Coastguard Worker  ac_compiler_gnu=no
3759*8b26181fSAndroid Build Coastguard Workerfi
3760*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3761*8b26181fSAndroid Build Coastguard Workerac_cv_c_compiler_gnu=$ac_compiler_gnu
3762*8b26181fSAndroid Build Coastguard Worker
3763*8b26181fSAndroid Build Coastguard Workerfi
3764*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3765*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3766*8b26181fSAndroid Build Coastguard Workerif test $ac_compiler_gnu = yes; then
3767*8b26181fSAndroid Build Coastguard Worker  GCC=yes
3768*8b26181fSAndroid Build Coastguard Workerelse
3769*8b26181fSAndroid Build Coastguard Worker  GCC=
3770*8b26181fSAndroid Build Coastguard Workerfi
3771*8b26181fSAndroid Build Coastguard Workerac_test_CFLAGS=${CFLAGS+set}
3772*8b26181fSAndroid Build Coastguard Workerac_save_CFLAGS=$CFLAGS
3773*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3774*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether $CC accepts -g... " >&6; }
3775*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_cc_g+:} false; then :
3776*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3777*8b26181fSAndroid Build Coastguard Workerelse
3778*8b26181fSAndroid Build Coastguard Worker  ac_save_c_werror_flag=$ac_c_werror_flag
3779*8b26181fSAndroid Build Coastguard Worker   ac_c_werror_flag=yes
3780*8b26181fSAndroid Build Coastguard Worker   ac_cv_prog_cc_g=no
3781*8b26181fSAndroid Build Coastguard Worker   CFLAGS="-g"
3782*8b26181fSAndroid Build Coastguard Worker   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3783*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3784*8b26181fSAndroid Build Coastguard Worker
3785*8b26181fSAndroid Build Coastguard Workerint
3786*8b26181fSAndroid Build Coastguard Workermain ()
3787*8b26181fSAndroid Build Coastguard Worker{
3788*8b26181fSAndroid Build Coastguard Worker
3789*8b26181fSAndroid Build Coastguard Worker  ;
3790*8b26181fSAndroid Build Coastguard Worker  return 0;
3791*8b26181fSAndroid Build Coastguard Worker}
3792*8b26181fSAndroid Build Coastguard Worker_ACEOF
3793*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
3794*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cc_g=yes
3795*8b26181fSAndroid Build Coastguard Workerelse
3796*8b26181fSAndroid Build Coastguard Worker  CFLAGS=""
3797*8b26181fSAndroid Build Coastguard Worker      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3798*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3799*8b26181fSAndroid Build Coastguard Worker
3800*8b26181fSAndroid Build Coastguard Workerint
3801*8b26181fSAndroid Build Coastguard Workermain ()
3802*8b26181fSAndroid Build Coastguard Worker{
3803*8b26181fSAndroid Build Coastguard Worker
3804*8b26181fSAndroid Build Coastguard Worker  ;
3805*8b26181fSAndroid Build Coastguard Worker  return 0;
3806*8b26181fSAndroid Build Coastguard Worker}
3807*8b26181fSAndroid Build Coastguard Worker_ACEOF
3808*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
3809*8b26181fSAndroid Build Coastguard Worker
3810*8b26181fSAndroid Build Coastguard Workerelse
3811*8b26181fSAndroid Build Coastguard Worker  ac_c_werror_flag=$ac_save_c_werror_flag
3812*8b26181fSAndroid Build Coastguard Worker	 CFLAGS="-g"
3813*8b26181fSAndroid Build Coastguard Worker	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3814*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3815*8b26181fSAndroid Build Coastguard Worker
3816*8b26181fSAndroid Build Coastguard Workerint
3817*8b26181fSAndroid Build Coastguard Workermain ()
3818*8b26181fSAndroid Build Coastguard Worker{
3819*8b26181fSAndroid Build Coastguard Worker
3820*8b26181fSAndroid Build Coastguard Worker  ;
3821*8b26181fSAndroid Build Coastguard Worker  return 0;
3822*8b26181fSAndroid Build Coastguard Worker}
3823*8b26181fSAndroid Build Coastguard Worker_ACEOF
3824*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
3825*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cc_g=yes
3826*8b26181fSAndroid Build Coastguard Workerfi
3827*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3828*8b26181fSAndroid Build Coastguard Workerfi
3829*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3830*8b26181fSAndroid Build Coastguard Workerfi
3831*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3832*8b26181fSAndroid Build Coastguard Worker   ac_c_werror_flag=$ac_save_c_werror_flag
3833*8b26181fSAndroid Build Coastguard Workerfi
3834*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3835*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_prog_cc_g" >&6; }
3836*8b26181fSAndroid Build Coastguard Workerif test "$ac_test_CFLAGS" = set; then
3837*8b26181fSAndroid Build Coastguard Worker  CFLAGS=$ac_save_CFLAGS
3838*8b26181fSAndroid Build Coastguard Workerelif test $ac_cv_prog_cc_g = yes; then
3839*8b26181fSAndroid Build Coastguard Worker  if test "$GCC" = yes; then
3840*8b26181fSAndroid Build Coastguard Worker    CFLAGS="-g -O2"
3841*8b26181fSAndroid Build Coastguard Worker  else
3842*8b26181fSAndroid Build Coastguard Worker    CFLAGS="-g"
3843*8b26181fSAndroid Build Coastguard Worker  fi
3844*8b26181fSAndroid Build Coastguard Workerelse
3845*8b26181fSAndroid Build Coastguard Worker  if test "$GCC" = yes; then
3846*8b26181fSAndroid Build Coastguard Worker    CFLAGS="-O2"
3847*8b26181fSAndroid Build Coastguard Worker  else
3848*8b26181fSAndroid Build Coastguard Worker    CFLAGS=
3849*8b26181fSAndroid Build Coastguard Worker  fi
3850*8b26181fSAndroid Build Coastguard Workerfi
3851*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3852*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3853*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_cc_c89+:} false; then :
3854*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3855*8b26181fSAndroid Build Coastguard Workerelse
3856*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cc_c89=no
3857*8b26181fSAndroid Build Coastguard Workerac_save_CC=$CC
3858*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
3859*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3860*8b26181fSAndroid Build Coastguard Worker#include <stdarg.h>
3861*8b26181fSAndroid Build Coastguard Worker#include <stdio.h>
3862*8b26181fSAndroid Build Coastguard Workerstruct stat;
3863*8b26181fSAndroid Build Coastguard Worker/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3864*8b26181fSAndroid Build Coastguard Workerstruct buf { int x; };
3865*8b26181fSAndroid Build Coastguard WorkerFILE * (*rcsopen) (struct buf *, struct stat *, int);
3866*8b26181fSAndroid Build Coastguard Workerstatic char *e (p, i)
3867*8b26181fSAndroid Build Coastguard Worker     char **p;
3868*8b26181fSAndroid Build Coastguard Worker     int i;
3869*8b26181fSAndroid Build Coastguard Worker{
3870*8b26181fSAndroid Build Coastguard Worker  return p[i];
3871*8b26181fSAndroid Build Coastguard Worker}
3872*8b26181fSAndroid Build Coastguard Workerstatic char *f (char * (*g) (char **, int), char **p, ...)
3873*8b26181fSAndroid Build Coastguard Worker{
3874*8b26181fSAndroid Build Coastguard Worker  char *s;
3875*8b26181fSAndroid Build Coastguard Worker  va_list v;
3876*8b26181fSAndroid Build Coastguard Worker  va_start (v,p);
3877*8b26181fSAndroid Build Coastguard Worker  s = g (p, va_arg (v,int));
3878*8b26181fSAndroid Build Coastguard Worker  va_end (v);
3879*8b26181fSAndroid Build Coastguard Worker  return s;
3880*8b26181fSAndroid Build Coastguard Worker}
3881*8b26181fSAndroid Build Coastguard Worker
3882*8b26181fSAndroid Build Coastguard Worker/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3883*8b26181fSAndroid Build Coastguard Worker   function prototypes and stuff, but not '\xHH' hex character constants.
3884*8b26181fSAndroid Build Coastguard Worker   These don't provoke an error unfortunately, instead are silently treated
3885*8b26181fSAndroid Build Coastguard Worker   as 'x'.  The following induces an error, until -std is added to get
3886*8b26181fSAndroid Build Coastguard Worker   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3887*8b26181fSAndroid Build Coastguard Worker   array size at least.  It's necessary to write '\x00'==0 to get something
3888*8b26181fSAndroid Build Coastguard Worker   that's true only with -std.  */
3889*8b26181fSAndroid Build Coastguard Workerint osf4_cc_array ['\x00' == 0 ? 1 : -1];
3890*8b26181fSAndroid Build Coastguard Worker
3891*8b26181fSAndroid Build Coastguard Worker/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3892*8b26181fSAndroid Build Coastguard Worker   inside strings and character constants.  */
3893*8b26181fSAndroid Build Coastguard Worker#define FOO(x) 'x'
3894*8b26181fSAndroid Build Coastguard Workerint xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3895*8b26181fSAndroid Build Coastguard Worker
3896*8b26181fSAndroid Build Coastguard Workerint test (int i, double x);
3897*8b26181fSAndroid Build Coastguard Workerstruct s1 {int (*f) (int a);};
3898*8b26181fSAndroid Build Coastguard Workerstruct s2 {int (*f) (double a);};
3899*8b26181fSAndroid Build Coastguard Workerint pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3900*8b26181fSAndroid Build Coastguard Workerint argc;
3901*8b26181fSAndroid Build Coastguard Workerchar **argv;
3902*8b26181fSAndroid Build Coastguard Workerint
3903*8b26181fSAndroid Build Coastguard Workermain ()
3904*8b26181fSAndroid Build Coastguard Worker{
3905*8b26181fSAndroid Build Coastguard Workerreturn f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3906*8b26181fSAndroid Build Coastguard Worker  ;
3907*8b26181fSAndroid Build Coastguard Worker  return 0;
3908*8b26181fSAndroid Build Coastguard Worker}
3909*8b26181fSAndroid Build Coastguard Worker_ACEOF
3910*8b26181fSAndroid Build Coastguard Workerfor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3911*8b26181fSAndroid Build Coastguard Worker	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3912*8b26181fSAndroid Build Coastguard Workerdo
3913*8b26181fSAndroid Build Coastguard Worker  CC="$ac_save_CC $ac_arg"
3914*8b26181fSAndroid Build Coastguard Worker  if ac_fn_c_try_compile "$LINENO"; then :
3915*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cc_c89=$ac_arg
3916*8b26181fSAndroid Build Coastguard Workerfi
3917*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext
3918*8b26181fSAndroid Build Coastguard Worker  test "x$ac_cv_prog_cc_c89" != "xno" && break
3919*8b26181fSAndroid Build Coastguard Workerdone
3920*8b26181fSAndroid Build Coastguard Workerrm -f conftest.$ac_ext
3921*8b26181fSAndroid Build Coastguard WorkerCC=$ac_save_CC
3922*8b26181fSAndroid Build Coastguard Worker
3923*8b26181fSAndroid Build Coastguard Workerfi
3924*8b26181fSAndroid Build Coastguard Worker# AC_CACHE_VAL
3925*8b26181fSAndroid Build Coastguard Workercase "x$ac_cv_prog_cc_c89" in
3926*8b26181fSAndroid Build Coastguard Worker  x)
3927*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3928*8b26181fSAndroid Build Coastguard Worker$as_echo "none needed" >&6; } ;;
3929*8b26181fSAndroid Build Coastguard Worker  xno)
3930*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3931*8b26181fSAndroid Build Coastguard Worker$as_echo "unsupported" >&6; } ;;
3932*8b26181fSAndroid Build Coastguard Worker  *)
3933*8b26181fSAndroid Build Coastguard Worker    CC="$CC $ac_cv_prog_cc_c89"
3934*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3935*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3936*8b26181fSAndroid Build Coastguard Workeresac
3937*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_prog_cc_c89" != xno; then :
3938*8b26181fSAndroid Build Coastguard Worker
3939*8b26181fSAndroid Build Coastguard Workerfi
3940*8b26181fSAndroid Build Coastguard Worker
3941*8b26181fSAndroid Build Coastguard Workerac_ext=c
3942*8b26181fSAndroid Build Coastguard Workerac_cpp='$CPP $CPPFLAGS'
3943*8b26181fSAndroid Build Coastguard Workerac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3944*8b26181fSAndroid Build Coastguard Workerac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3945*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_c_compiler_gnu
3946*8b26181fSAndroid Build Coastguard Worker
3947*8b26181fSAndroid Build Coastguard Worker   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3948*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3949*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_cc_c99+:} false; then :
3950*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
3951*8b26181fSAndroid Build Coastguard Workerelse
3952*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cc_c99=no
3953*8b26181fSAndroid Build Coastguard Workerac_save_CC=$CC
3954*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
3955*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
3956*8b26181fSAndroid Build Coastguard Worker#include <stdarg.h>
3957*8b26181fSAndroid Build Coastguard Worker#include <stdbool.h>
3958*8b26181fSAndroid Build Coastguard Worker#include <stdlib.h>
3959*8b26181fSAndroid Build Coastguard Worker#include <wchar.h>
3960*8b26181fSAndroid Build Coastguard Worker#include <stdio.h>
3961*8b26181fSAndroid Build Coastguard Worker
3962*8b26181fSAndroid Build Coastguard Worker// Check varargs macros.  These examples are taken from C99 6.10.3.5.
3963*8b26181fSAndroid Build Coastguard Worker#define debug(...) fprintf (stderr, __VA_ARGS__)
3964*8b26181fSAndroid Build Coastguard Worker#define showlist(...) puts (#__VA_ARGS__)
3965*8b26181fSAndroid Build Coastguard Worker#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3966*8b26181fSAndroid Build Coastguard Workerstatic void
3967*8b26181fSAndroid Build Coastguard Workertest_varargs_macros (void)
3968*8b26181fSAndroid Build Coastguard Worker{
3969*8b26181fSAndroid Build Coastguard Worker  int x = 1234;
3970*8b26181fSAndroid Build Coastguard Worker  int y = 5678;
3971*8b26181fSAndroid Build Coastguard Worker  debug ("Flag");
3972*8b26181fSAndroid Build Coastguard Worker  debug ("X = %d\n", x);
3973*8b26181fSAndroid Build Coastguard Worker  showlist (The first, second, and third items.);
3974*8b26181fSAndroid Build Coastguard Worker  report (x>y, "x is %d but y is %d", x, y);
3975*8b26181fSAndroid Build Coastguard Worker}
3976*8b26181fSAndroid Build Coastguard Worker
3977*8b26181fSAndroid Build Coastguard Worker// Check long long types.
3978*8b26181fSAndroid Build Coastguard Worker#define BIG64 18446744073709551615ull
3979*8b26181fSAndroid Build Coastguard Worker#define BIG32 4294967295ul
3980*8b26181fSAndroid Build Coastguard Worker#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3981*8b26181fSAndroid Build Coastguard Worker#if !BIG_OK
3982*8b26181fSAndroid Build Coastguard Worker  your preprocessor is broken;
3983*8b26181fSAndroid Build Coastguard Worker#endif
3984*8b26181fSAndroid Build Coastguard Worker#if BIG_OK
3985*8b26181fSAndroid Build Coastguard Worker#else
3986*8b26181fSAndroid Build Coastguard Worker  your preprocessor is broken;
3987*8b26181fSAndroid Build Coastguard Worker#endif
3988*8b26181fSAndroid Build Coastguard Workerstatic long long int bignum = -9223372036854775807LL;
3989*8b26181fSAndroid Build Coastguard Workerstatic unsigned long long int ubignum = BIG64;
3990*8b26181fSAndroid Build Coastguard Worker
3991*8b26181fSAndroid Build Coastguard Workerstruct incomplete_array
3992*8b26181fSAndroid Build Coastguard Worker{
3993*8b26181fSAndroid Build Coastguard Worker  int datasize;
3994*8b26181fSAndroid Build Coastguard Worker  double data[];
3995*8b26181fSAndroid Build Coastguard Worker};
3996*8b26181fSAndroid Build Coastguard Worker
3997*8b26181fSAndroid Build Coastguard Workerstruct named_init {
3998*8b26181fSAndroid Build Coastguard Worker  int number;
3999*8b26181fSAndroid Build Coastguard Worker  const wchar_t *name;
4000*8b26181fSAndroid Build Coastguard Worker  double average;
4001*8b26181fSAndroid Build Coastguard Worker};
4002*8b26181fSAndroid Build Coastguard Worker
4003*8b26181fSAndroid Build Coastguard Workertypedef const char *ccp;
4004*8b26181fSAndroid Build Coastguard Worker
4005*8b26181fSAndroid Build Coastguard Workerstatic inline int
4006*8b26181fSAndroid Build Coastguard Workertest_restrict (ccp restrict text)
4007*8b26181fSAndroid Build Coastguard Worker{
4008*8b26181fSAndroid Build Coastguard Worker  // See if C++-style comments work.
4009*8b26181fSAndroid Build Coastguard Worker  // Iterate through items via the restricted pointer.
4010*8b26181fSAndroid Build Coastguard Worker  // Also check for declarations in for loops.
4011*8b26181fSAndroid Build Coastguard Worker  for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4012*8b26181fSAndroid Build Coastguard Worker    continue;
4013*8b26181fSAndroid Build Coastguard Worker  return 0;
4014*8b26181fSAndroid Build Coastguard Worker}
4015*8b26181fSAndroid Build Coastguard Worker
4016*8b26181fSAndroid Build Coastguard Worker// Check varargs and va_copy.
4017*8b26181fSAndroid Build Coastguard Workerstatic void
4018*8b26181fSAndroid Build Coastguard Workertest_varargs (const char *format, ...)
4019*8b26181fSAndroid Build Coastguard Worker{
4020*8b26181fSAndroid Build Coastguard Worker  va_list args;
4021*8b26181fSAndroid Build Coastguard Worker  va_start (args, format);
4022*8b26181fSAndroid Build Coastguard Worker  va_list args_copy;
4023*8b26181fSAndroid Build Coastguard Worker  va_copy (args_copy, args);
4024*8b26181fSAndroid Build Coastguard Worker
4025*8b26181fSAndroid Build Coastguard Worker  const char *str;
4026*8b26181fSAndroid Build Coastguard Worker  int number;
4027*8b26181fSAndroid Build Coastguard Worker  float fnumber;
4028*8b26181fSAndroid Build Coastguard Worker
4029*8b26181fSAndroid Build Coastguard Worker  while (*format)
4030*8b26181fSAndroid Build Coastguard Worker    {
4031*8b26181fSAndroid Build Coastguard Worker      switch (*format++)
4032*8b26181fSAndroid Build Coastguard Worker	{
4033*8b26181fSAndroid Build Coastguard Worker	case 's': // string
4034*8b26181fSAndroid Build Coastguard Worker	  str = va_arg (args_copy, const char *);
4035*8b26181fSAndroid Build Coastguard Worker	  break;
4036*8b26181fSAndroid Build Coastguard Worker	case 'd': // int
4037*8b26181fSAndroid Build Coastguard Worker	  number = va_arg (args_copy, int);
4038*8b26181fSAndroid Build Coastguard Worker	  break;
4039*8b26181fSAndroid Build Coastguard Worker	case 'f': // float
4040*8b26181fSAndroid Build Coastguard Worker	  fnumber = va_arg (args_copy, double);
4041*8b26181fSAndroid Build Coastguard Worker	  break;
4042*8b26181fSAndroid Build Coastguard Worker	default:
4043*8b26181fSAndroid Build Coastguard Worker	  break;
4044*8b26181fSAndroid Build Coastguard Worker	}
4045*8b26181fSAndroid Build Coastguard Worker    }
4046*8b26181fSAndroid Build Coastguard Worker  va_end (args_copy);
4047*8b26181fSAndroid Build Coastguard Worker  va_end (args);
4048*8b26181fSAndroid Build Coastguard Worker}
4049*8b26181fSAndroid Build Coastguard Worker
4050*8b26181fSAndroid Build Coastguard Workerint
4051*8b26181fSAndroid Build Coastguard Workermain ()
4052*8b26181fSAndroid Build Coastguard Worker{
4053*8b26181fSAndroid Build Coastguard Worker
4054*8b26181fSAndroid Build Coastguard Worker  // Check bool.
4055*8b26181fSAndroid Build Coastguard Worker  _Bool success = false;
4056*8b26181fSAndroid Build Coastguard Worker
4057*8b26181fSAndroid Build Coastguard Worker  // Check restrict.
4058*8b26181fSAndroid Build Coastguard Worker  if (test_restrict ("String literal") == 0)
4059*8b26181fSAndroid Build Coastguard Worker    success = true;
4060*8b26181fSAndroid Build Coastguard Worker  char *restrict newvar = "Another string";
4061*8b26181fSAndroid Build Coastguard Worker
4062*8b26181fSAndroid Build Coastguard Worker  // Check varargs.
4063*8b26181fSAndroid Build Coastguard Worker  test_varargs ("s, d' f .", "string", 65, 34.234);
4064*8b26181fSAndroid Build Coastguard Worker  test_varargs_macros ();
4065*8b26181fSAndroid Build Coastguard Worker
4066*8b26181fSAndroid Build Coastguard Worker  // Check flexible array members.
4067*8b26181fSAndroid Build Coastguard Worker  struct incomplete_array *ia =
4068*8b26181fSAndroid Build Coastguard Worker    malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4069*8b26181fSAndroid Build Coastguard Worker  ia->datasize = 10;
4070*8b26181fSAndroid Build Coastguard Worker  for (int i = 0; i < ia->datasize; ++i)
4071*8b26181fSAndroid Build Coastguard Worker    ia->data[i] = i * 1.234;
4072*8b26181fSAndroid Build Coastguard Worker
4073*8b26181fSAndroid Build Coastguard Worker  // Check named initializers.
4074*8b26181fSAndroid Build Coastguard Worker  struct named_init ni = {
4075*8b26181fSAndroid Build Coastguard Worker    .number = 34,
4076*8b26181fSAndroid Build Coastguard Worker    .name = L"Test wide string",
4077*8b26181fSAndroid Build Coastguard Worker    .average = 543.34343,
4078*8b26181fSAndroid Build Coastguard Worker  };
4079*8b26181fSAndroid Build Coastguard Worker
4080*8b26181fSAndroid Build Coastguard Worker  ni.number = 58;
4081*8b26181fSAndroid Build Coastguard Worker
4082*8b26181fSAndroid Build Coastguard Worker  int dynamic_array[ni.number];
4083*8b26181fSAndroid Build Coastguard Worker  dynamic_array[ni.number - 1] = 543;
4084*8b26181fSAndroid Build Coastguard Worker
4085*8b26181fSAndroid Build Coastguard Worker  // work around unused variable warnings
4086*8b26181fSAndroid Build Coastguard Worker  return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4087*8b26181fSAndroid Build Coastguard Worker	  || dynamic_array[ni.number - 1] != 543);
4088*8b26181fSAndroid Build Coastguard Worker
4089*8b26181fSAndroid Build Coastguard Worker  ;
4090*8b26181fSAndroid Build Coastguard Worker  return 0;
4091*8b26181fSAndroid Build Coastguard Worker}
4092*8b26181fSAndroid Build Coastguard Worker_ACEOF
4093*8b26181fSAndroid Build Coastguard Workerfor ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
4094*8b26181fSAndroid Build Coastguard Workerdo
4095*8b26181fSAndroid Build Coastguard Worker  CC="$ac_save_CC $ac_arg"
4096*8b26181fSAndroid Build Coastguard Worker  if ac_fn_c_try_compile "$LINENO"; then :
4097*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cc_c99=$ac_arg
4098*8b26181fSAndroid Build Coastguard Workerfi
4099*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext
4100*8b26181fSAndroid Build Coastguard Worker  test "x$ac_cv_prog_cc_c99" != "xno" && break
4101*8b26181fSAndroid Build Coastguard Workerdone
4102*8b26181fSAndroid Build Coastguard Workerrm -f conftest.$ac_ext
4103*8b26181fSAndroid Build Coastguard WorkerCC=$ac_save_CC
4104*8b26181fSAndroid Build Coastguard Worker
4105*8b26181fSAndroid Build Coastguard Workerfi
4106*8b26181fSAndroid Build Coastguard Worker# AC_CACHE_VAL
4107*8b26181fSAndroid Build Coastguard Workercase "x$ac_cv_prog_cc_c99" in
4108*8b26181fSAndroid Build Coastguard Worker  x)
4109*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4110*8b26181fSAndroid Build Coastguard Worker$as_echo "none needed" >&6; } ;;
4111*8b26181fSAndroid Build Coastguard Worker  xno)
4112*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4113*8b26181fSAndroid Build Coastguard Worker$as_echo "unsupported" >&6; } ;;
4114*8b26181fSAndroid Build Coastguard Worker  *)
4115*8b26181fSAndroid Build Coastguard Worker    CC="$CC $ac_cv_prog_cc_c99"
4116*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4117*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4118*8b26181fSAndroid Build Coastguard Workeresac
4119*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_prog_cc_c99" != xno; then :
4120*8b26181fSAndroid Build Coastguard Worker
4121*8b26181fSAndroid Build Coastguard Workerfi
4122*8b26181fSAndroid Build Coastguard Worker
4123*8b26181fSAndroid Build Coastguard Worker
4124*8b26181fSAndroid Build Coastguard Workerif test "$ac_cv_prog_cc_c99" = "no"; then
4125*8b26181fSAndroid Build Coastguard Worker	as_fn_error $? "The C compiler does not support C99" "$LINENO" 5
4126*8b26181fSAndroid Build Coastguard Workerfi
4127*8b26181fSAndroid Build Coastguard Worker
4128*8b26181fSAndroid Build Coastguard Worker#
4129*8b26181fSAndroid Build Coastguard Worker# Get the size of a void *, to determine whether this is a 32-bit
4130*8b26181fSAndroid Build Coastguard Worker# or 64-bit build.
4131*8b26181fSAndroid Build Coastguard Worker#
4132*8b26181fSAndroid Build Coastguard Worker
4133*8b26181fSAndroid Build Coastguard Workerac_ext=c
4134*8b26181fSAndroid Build Coastguard Workerac_cpp='$CPP $CPPFLAGS'
4135*8b26181fSAndroid Build Coastguard Workerac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4136*8b26181fSAndroid Build Coastguard Workerac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4137*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_c_compiler_gnu
4138*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4139*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking how to run the C preprocessor... " >&6; }
4140*8b26181fSAndroid Build Coastguard Worker# On Suns, sometimes $CPP names a directory.
4141*8b26181fSAndroid Build Coastguard Workerif test -n "$CPP" && test -d "$CPP"; then
4142*8b26181fSAndroid Build Coastguard Worker  CPP=
4143*8b26181fSAndroid Build Coastguard Workerfi
4144*8b26181fSAndroid Build Coastguard Workerif test -z "$CPP"; then
4145*8b26181fSAndroid Build Coastguard Worker  if ${ac_cv_prog_CPP+:} false; then :
4146*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4147*8b26181fSAndroid Build Coastguard Workerelse
4148*8b26181fSAndroid Build Coastguard Worker      # Double quotes because CPP needs to be expanded
4149*8b26181fSAndroid Build Coastguard Worker    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4150*8b26181fSAndroid Build Coastguard Worker    do
4151*8b26181fSAndroid Build Coastguard Worker      ac_preproc_ok=false
4152*8b26181fSAndroid Build Coastguard Workerfor ac_c_preproc_warn_flag in '' yes
4153*8b26181fSAndroid Build Coastguard Workerdo
4154*8b26181fSAndroid Build Coastguard Worker  # Use a header file that comes with gcc, so configuring glibc
4155*8b26181fSAndroid Build Coastguard Worker  # with a fresh cross-compiler works.
4156*8b26181fSAndroid Build Coastguard Worker  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4157*8b26181fSAndroid Build Coastguard Worker  # <limits.h> exists even on freestanding compilers.
4158*8b26181fSAndroid Build Coastguard Worker  # On the NeXT, cc -E runs the code through the compiler's parser,
4159*8b26181fSAndroid Build Coastguard Worker  # not just through cpp. "Syntax error" is here to catch this case.
4160*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4161*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4162*8b26181fSAndroid Build Coastguard Worker#ifdef __STDC__
4163*8b26181fSAndroid Build Coastguard Worker# include <limits.h>
4164*8b26181fSAndroid Build Coastguard Worker#else
4165*8b26181fSAndroid Build Coastguard Worker# include <assert.h>
4166*8b26181fSAndroid Build Coastguard Worker#endif
4167*8b26181fSAndroid Build Coastguard Worker		     Syntax error
4168*8b26181fSAndroid Build Coastguard Worker_ACEOF
4169*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_cpp "$LINENO"; then :
4170*8b26181fSAndroid Build Coastguard Worker
4171*8b26181fSAndroid Build Coastguard Workerelse
4172*8b26181fSAndroid Build Coastguard Worker  # Broken: fails on valid input.
4173*8b26181fSAndroid Build Coastguard Workercontinue
4174*8b26181fSAndroid Build Coastguard Workerfi
4175*8b26181fSAndroid Build Coastguard Workerrm -f conftest.err conftest.i conftest.$ac_ext
4176*8b26181fSAndroid Build Coastguard Worker
4177*8b26181fSAndroid Build Coastguard Worker  # OK, works on sane cases.  Now check whether nonexistent headers
4178*8b26181fSAndroid Build Coastguard Worker  # can be detected and how.
4179*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4180*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4181*8b26181fSAndroid Build Coastguard Worker#include <ac_nonexistent.h>
4182*8b26181fSAndroid Build Coastguard Worker_ACEOF
4183*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_cpp "$LINENO"; then :
4184*8b26181fSAndroid Build Coastguard Worker  # Broken: success on invalid input.
4185*8b26181fSAndroid Build Coastguard Workercontinue
4186*8b26181fSAndroid Build Coastguard Workerelse
4187*8b26181fSAndroid Build Coastguard Worker  # Passes both tests.
4188*8b26181fSAndroid Build Coastguard Workerac_preproc_ok=:
4189*8b26181fSAndroid Build Coastguard Workerbreak
4190*8b26181fSAndroid Build Coastguard Workerfi
4191*8b26181fSAndroid Build Coastguard Workerrm -f conftest.err conftest.i conftest.$ac_ext
4192*8b26181fSAndroid Build Coastguard Worker
4193*8b26181fSAndroid Build Coastguard Workerdone
4194*8b26181fSAndroid Build Coastguard Worker# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4195*8b26181fSAndroid Build Coastguard Workerrm -f conftest.i conftest.err conftest.$ac_ext
4196*8b26181fSAndroid Build Coastguard Workerif $ac_preproc_ok; then :
4197*8b26181fSAndroid Build Coastguard Worker  break
4198*8b26181fSAndroid Build Coastguard Workerfi
4199*8b26181fSAndroid Build Coastguard Worker
4200*8b26181fSAndroid Build Coastguard Worker    done
4201*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_CPP=$CPP
4202*8b26181fSAndroid Build Coastguard Worker
4203*8b26181fSAndroid Build Coastguard Workerfi
4204*8b26181fSAndroid Build Coastguard Worker  CPP=$ac_cv_prog_CPP
4205*8b26181fSAndroid Build Coastguard Workerelse
4206*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_CPP=$CPP
4207*8b26181fSAndroid Build Coastguard Workerfi
4208*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4209*8b26181fSAndroid Build Coastguard Worker$as_echo "$CPP" >&6; }
4210*8b26181fSAndroid Build Coastguard Workerac_preproc_ok=false
4211*8b26181fSAndroid Build Coastguard Workerfor ac_c_preproc_warn_flag in '' yes
4212*8b26181fSAndroid Build Coastguard Workerdo
4213*8b26181fSAndroid Build Coastguard Worker  # Use a header file that comes with gcc, so configuring glibc
4214*8b26181fSAndroid Build Coastguard Worker  # with a fresh cross-compiler works.
4215*8b26181fSAndroid Build Coastguard Worker  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4216*8b26181fSAndroid Build Coastguard Worker  # <limits.h> exists even on freestanding compilers.
4217*8b26181fSAndroid Build Coastguard Worker  # On the NeXT, cc -E runs the code through the compiler's parser,
4218*8b26181fSAndroid Build Coastguard Worker  # not just through cpp. "Syntax error" is here to catch this case.
4219*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4220*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4221*8b26181fSAndroid Build Coastguard Worker#ifdef __STDC__
4222*8b26181fSAndroid Build Coastguard Worker# include <limits.h>
4223*8b26181fSAndroid Build Coastguard Worker#else
4224*8b26181fSAndroid Build Coastguard Worker# include <assert.h>
4225*8b26181fSAndroid Build Coastguard Worker#endif
4226*8b26181fSAndroid Build Coastguard Worker		     Syntax error
4227*8b26181fSAndroid Build Coastguard Worker_ACEOF
4228*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_cpp "$LINENO"; then :
4229*8b26181fSAndroid Build Coastguard Worker
4230*8b26181fSAndroid Build Coastguard Workerelse
4231*8b26181fSAndroid Build Coastguard Worker  # Broken: fails on valid input.
4232*8b26181fSAndroid Build Coastguard Workercontinue
4233*8b26181fSAndroid Build Coastguard Workerfi
4234*8b26181fSAndroid Build Coastguard Workerrm -f conftest.err conftest.i conftest.$ac_ext
4235*8b26181fSAndroid Build Coastguard Worker
4236*8b26181fSAndroid Build Coastguard Worker  # OK, works on sane cases.  Now check whether nonexistent headers
4237*8b26181fSAndroid Build Coastguard Worker  # can be detected and how.
4238*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4239*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4240*8b26181fSAndroid Build Coastguard Worker#include <ac_nonexistent.h>
4241*8b26181fSAndroid Build Coastguard Worker_ACEOF
4242*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_cpp "$LINENO"; then :
4243*8b26181fSAndroid Build Coastguard Worker  # Broken: success on invalid input.
4244*8b26181fSAndroid Build Coastguard Workercontinue
4245*8b26181fSAndroid Build Coastguard Workerelse
4246*8b26181fSAndroid Build Coastguard Worker  # Passes both tests.
4247*8b26181fSAndroid Build Coastguard Workerac_preproc_ok=:
4248*8b26181fSAndroid Build Coastguard Workerbreak
4249*8b26181fSAndroid Build Coastguard Workerfi
4250*8b26181fSAndroid Build Coastguard Workerrm -f conftest.err conftest.i conftest.$ac_ext
4251*8b26181fSAndroid Build Coastguard Worker
4252*8b26181fSAndroid Build Coastguard Workerdone
4253*8b26181fSAndroid Build Coastguard Worker# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4254*8b26181fSAndroid Build Coastguard Workerrm -f conftest.i conftest.err conftest.$ac_ext
4255*8b26181fSAndroid Build Coastguard Workerif $ac_preproc_ok; then :
4256*8b26181fSAndroid Build Coastguard Worker
4257*8b26181fSAndroid Build Coastguard Workerelse
4258*8b26181fSAndroid Build Coastguard Worker  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4259*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4260*8b26181fSAndroid Build Coastguard Workeras_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4261*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
4262*8b26181fSAndroid Build Coastguard Workerfi
4263*8b26181fSAndroid Build Coastguard Worker
4264*8b26181fSAndroid Build Coastguard Workerac_ext=c
4265*8b26181fSAndroid Build Coastguard Workerac_cpp='$CPP $CPPFLAGS'
4266*8b26181fSAndroid Build Coastguard Workerac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4267*8b26181fSAndroid Build Coastguard Workerac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4268*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_c_compiler_gnu
4269*8b26181fSAndroid Build Coastguard Worker
4270*8b26181fSAndroid Build Coastguard Worker
4271*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4272*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4273*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_path_GREP+:} false; then :
4274*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4275*8b26181fSAndroid Build Coastguard Workerelse
4276*8b26181fSAndroid Build Coastguard Worker  if test -z "$GREP"; then
4277*8b26181fSAndroid Build Coastguard Worker  ac_path_GREP_found=false
4278*8b26181fSAndroid Build Coastguard Worker  # Loop through the user's path and test for each of PROGNAME-LIST
4279*8b26181fSAndroid Build Coastguard Worker  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4280*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4281*8b26181fSAndroid Build Coastguard Workerdo
4282*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
4283*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
4284*8b26181fSAndroid Build Coastguard Worker    for ac_prog in grep ggrep; do
4285*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
4286*8b26181fSAndroid Build Coastguard Worker      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4287*8b26181fSAndroid Build Coastguard Worker      as_fn_executable_p "$ac_path_GREP" || continue
4288*8b26181fSAndroid Build Coastguard Worker# Check for GNU ac_path_GREP and select it if it is found.
4289*8b26181fSAndroid Build Coastguard Worker  # Check for GNU $ac_path_GREP
4290*8b26181fSAndroid Build Coastguard Workercase `"$ac_path_GREP" --version 2>&1` in
4291*8b26181fSAndroid Build Coastguard Worker*GNU*)
4292*8b26181fSAndroid Build Coastguard Worker  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4293*8b26181fSAndroid Build Coastguard Worker*)
4294*8b26181fSAndroid Build Coastguard Worker  ac_count=0
4295*8b26181fSAndroid Build Coastguard Worker  $as_echo_n 0123456789 >"conftest.in"
4296*8b26181fSAndroid Build Coastguard Worker  while :
4297*8b26181fSAndroid Build Coastguard Worker  do
4298*8b26181fSAndroid Build Coastguard Worker    cat "conftest.in" "conftest.in" >"conftest.tmp"
4299*8b26181fSAndroid Build Coastguard Worker    mv "conftest.tmp" "conftest.in"
4300*8b26181fSAndroid Build Coastguard Worker    cp "conftest.in" "conftest.nl"
4301*8b26181fSAndroid Build Coastguard Worker    $as_echo 'GREP' >> "conftest.nl"
4302*8b26181fSAndroid Build Coastguard Worker    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4303*8b26181fSAndroid Build Coastguard Worker    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4304*8b26181fSAndroid Build Coastguard Worker    as_fn_arith $ac_count + 1 && ac_count=$as_val
4305*8b26181fSAndroid Build Coastguard Worker    if test $ac_count -gt ${ac_path_GREP_max-0}; then
4306*8b26181fSAndroid Build Coastguard Worker      # Best one so far, save it but keep looking for a better one
4307*8b26181fSAndroid Build Coastguard Worker      ac_cv_path_GREP="$ac_path_GREP"
4308*8b26181fSAndroid Build Coastguard Worker      ac_path_GREP_max=$ac_count
4309*8b26181fSAndroid Build Coastguard Worker    fi
4310*8b26181fSAndroid Build Coastguard Worker    # 10*(2^10) chars as input seems more than enough
4311*8b26181fSAndroid Build Coastguard Worker    test $ac_count -gt 10 && break
4312*8b26181fSAndroid Build Coastguard Worker  done
4313*8b26181fSAndroid Build Coastguard Worker  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4314*8b26181fSAndroid Build Coastguard Workeresac
4315*8b26181fSAndroid Build Coastguard Worker
4316*8b26181fSAndroid Build Coastguard Worker      $ac_path_GREP_found && break 3
4317*8b26181fSAndroid Build Coastguard Worker    done
4318*8b26181fSAndroid Build Coastguard Worker  done
4319*8b26181fSAndroid Build Coastguard Worker  done
4320*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
4321*8b26181fSAndroid Build Coastguard Worker  if test -z "$ac_cv_path_GREP"; then
4322*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4323*8b26181fSAndroid Build Coastguard Worker  fi
4324*8b26181fSAndroid Build Coastguard Workerelse
4325*8b26181fSAndroid Build Coastguard Worker  ac_cv_path_GREP=$GREP
4326*8b26181fSAndroid Build Coastguard Workerfi
4327*8b26181fSAndroid Build Coastguard Worker
4328*8b26181fSAndroid Build Coastguard Workerfi
4329*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4330*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_path_GREP" >&6; }
4331*8b26181fSAndroid Build Coastguard Worker GREP="$ac_cv_path_GREP"
4332*8b26181fSAndroid Build Coastguard Worker
4333*8b26181fSAndroid Build Coastguard Worker
4334*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4335*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for egrep... " >&6; }
4336*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_path_EGREP+:} false; then :
4337*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4338*8b26181fSAndroid Build Coastguard Workerelse
4339*8b26181fSAndroid Build Coastguard Worker  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4340*8b26181fSAndroid Build Coastguard Worker   then ac_cv_path_EGREP="$GREP -E"
4341*8b26181fSAndroid Build Coastguard Worker   else
4342*8b26181fSAndroid Build Coastguard Worker     if test -z "$EGREP"; then
4343*8b26181fSAndroid Build Coastguard Worker  ac_path_EGREP_found=false
4344*8b26181fSAndroid Build Coastguard Worker  # Loop through the user's path and test for each of PROGNAME-LIST
4345*8b26181fSAndroid Build Coastguard Worker  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4346*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4347*8b26181fSAndroid Build Coastguard Workerdo
4348*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
4349*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
4350*8b26181fSAndroid Build Coastguard Worker    for ac_prog in egrep; do
4351*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
4352*8b26181fSAndroid Build Coastguard Worker      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4353*8b26181fSAndroid Build Coastguard Worker      as_fn_executable_p "$ac_path_EGREP" || continue
4354*8b26181fSAndroid Build Coastguard Worker# Check for GNU ac_path_EGREP and select it if it is found.
4355*8b26181fSAndroid Build Coastguard Worker  # Check for GNU $ac_path_EGREP
4356*8b26181fSAndroid Build Coastguard Workercase `"$ac_path_EGREP" --version 2>&1` in
4357*8b26181fSAndroid Build Coastguard Worker*GNU*)
4358*8b26181fSAndroid Build Coastguard Worker  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4359*8b26181fSAndroid Build Coastguard Worker*)
4360*8b26181fSAndroid Build Coastguard Worker  ac_count=0
4361*8b26181fSAndroid Build Coastguard Worker  $as_echo_n 0123456789 >"conftest.in"
4362*8b26181fSAndroid Build Coastguard Worker  while :
4363*8b26181fSAndroid Build Coastguard Worker  do
4364*8b26181fSAndroid Build Coastguard Worker    cat "conftest.in" "conftest.in" >"conftest.tmp"
4365*8b26181fSAndroid Build Coastguard Worker    mv "conftest.tmp" "conftest.in"
4366*8b26181fSAndroid Build Coastguard Worker    cp "conftest.in" "conftest.nl"
4367*8b26181fSAndroid Build Coastguard Worker    $as_echo 'EGREP' >> "conftest.nl"
4368*8b26181fSAndroid Build Coastguard Worker    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4369*8b26181fSAndroid Build Coastguard Worker    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4370*8b26181fSAndroid Build Coastguard Worker    as_fn_arith $ac_count + 1 && ac_count=$as_val
4371*8b26181fSAndroid Build Coastguard Worker    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4372*8b26181fSAndroid Build Coastguard Worker      # Best one so far, save it but keep looking for a better one
4373*8b26181fSAndroid Build Coastguard Worker      ac_cv_path_EGREP="$ac_path_EGREP"
4374*8b26181fSAndroid Build Coastguard Worker      ac_path_EGREP_max=$ac_count
4375*8b26181fSAndroid Build Coastguard Worker    fi
4376*8b26181fSAndroid Build Coastguard Worker    # 10*(2^10) chars as input seems more than enough
4377*8b26181fSAndroid Build Coastguard Worker    test $ac_count -gt 10 && break
4378*8b26181fSAndroid Build Coastguard Worker  done
4379*8b26181fSAndroid Build Coastguard Worker  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4380*8b26181fSAndroid Build Coastguard Workeresac
4381*8b26181fSAndroid Build Coastguard Worker
4382*8b26181fSAndroid Build Coastguard Worker      $ac_path_EGREP_found && break 3
4383*8b26181fSAndroid Build Coastguard Worker    done
4384*8b26181fSAndroid Build Coastguard Worker  done
4385*8b26181fSAndroid Build Coastguard Worker  done
4386*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
4387*8b26181fSAndroid Build Coastguard Worker  if test -z "$ac_cv_path_EGREP"; then
4388*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4389*8b26181fSAndroid Build Coastguard Worker  fi
4390*8b26181fSAndroid Build Coastguard Workerelse
4391*8b26181fSAndroid Build Coastguard Worker  ac_cv_path_EGREP=$EGREP
4392*8b26181fSAndroid Build Coastguard Workerfi
4393*8b26181fSAndroid Build Coastguard Worker
4394*8b26181fSAndroid Build Coastguard Worker   fi
4395*8b26181fSAndroid Build Coastguard Workerfi
4396*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4397*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_path_EGREP" >&6; }
4398*8b26181fSAndroid Build Coastguard Worker EGREP="$ac_cv_path_EGREP"
4399*8b26181fSAndroid Build Coastguard Worker
4400*8b26181fSAndroid Build Coastguard Worker
4401*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4402*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for ANSI C header files... " >&6; }
4403*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_header_stdc+:} false; then :
4404*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4405*8b26181fSAndroid Build Coastguard Workerelse
4406*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4407*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4408*8b26181fSAndroid Build Coastguard Worker#include <stdlib.h>
4409*8b26181fSAndroid Build Coastguard Worker#include <stdarg.h>
4410*8b26181fSAndroid Build Coastguard Worker#include <string.h>
4411*8b26181fSAndroid Build Coastguard Worker#include <float.h>
4412*8b26181fSAndroid Build Coastguard Worker
4413*8b26181fSAndroid Build Coastguard Workerint
4414*8b26181fSAndroid Build Coastguard Workermain ()
4415*8b26181fSAndroid Build Coastguard Worker{
4416*8b26181fSAndroid Build Coastguard Worker
4417*8b26181fSAndroid Build Coastguard Worker  ;
4418*8b26181fSAndroid Build Coastguard Worker  return 0;
4419*8b26181fSAndroid Build Coastguard Worker}
4420*8b26181fSAndroid Build Coastguard Worker_ACEOF
4421*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
4422*8b26181fSAndroid Build Coastguard Worker  ac_cv_header_stdc=yes
4423*8b26181fSAndroid Build Coastguard Workerelse
4424*8b26181fSAndroid Build Coastguard Worker  ac_cv_header_stdc=no
4425*8b26181fSAndroid Build Coastguard Workerfi
4426*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4427*8b26181fSAndroid Build Coastguard Worker
4428*8b26181fSAndroid Build Coastguard Workerif test $ac_cv_header_stdc = yes; then
4429*8b26181fSAndroid Build Coastguard Worker  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4430*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4431*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4432*8b26181fSAndroid Build Coastguard Worker#include <string.h>
4433*8b26181fSAndroid Build Coastguard Worker
4434*8b26181fSAndroid Build Coastguard Worker_ACEOF
4435*8b26181fSAndroid Build Coastguard Workerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4436*8b26181fSAndroid Build Coastguard Worker  $EGREP "memchr" >/dev/null 2>&1; then :
4437*8b26181fSAndroid Build Coastguard Worker
4438*8b26181fSAndroid Build Coastguard Workerelse
4439*8b26181fSAndroid Build Coastguard Worker  ac_cv_header_stdc=no
4440*8b26181fSAndroid Build Coastguard Workerfi
4441*8b26181fSAndroid Build Coastguard Workerrm -f conftest*
4442*8b26181fSAndroid Build Coastguard Worker
4443*8b26181fSAndroid Build Coastguard Workerfi
4444*8b26181fSAndroid Build Coastguard Worker
4445*8b26181fSAndroid Build Coastguard Workerif test $ac_cv_header_stdc = yes; then
4446*8b26181fSAndroid Build Coastguard Worker  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4447*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4448*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4449*8b26181fSAndroid Build Coastguard Worker#include <stdlib.h>
4450*8b26181fSAndroid Build Coastguard Worker
4451*8b26181fSAndroid Build Coastguard Worker_ACEOF
4452*8b26181fSAndroid Build Coastguard Workerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4453*8b26181fSAndroid Build Coastguard Worker  $EGREP "free" >/dev/null 2>&1; then :
4454*8b26181fSAndroid Build Coastguard Worker
4455*8b26181fSAndroid Build Coastguard Workerelse
4456*8b26181fSAndroid Build Coastguard Worker  ac_cv_header_stdc=no
4457*8b26181fSAndroid Build Coastguard Workerfi
4458*8b26181fSAndroid Build Coastguard Workerrm -f conftest*
4459*8b26181fSAndroid Build Coastguard Worker
4460*8b26181fSAndroid Build Coastguard Workerfi
4461*8b26181fSAndroid Build Coastguard Worker
4462*8b26181fSAndroid Build Coastguard Workerif test $ac_cv_header_stdc = yes; then
4463*8b26181fSAndroid Build Coastguard Worker  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4464*8b26181fSAndroid Build Coastguard Worker  if test "$cross_compiling" = yes; then :
4465*8b26181fSAndroid Build Coastguard Worker  :
4466*8b26181fSAndroid Build Coastguard Workerelse
4467*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4468*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4469*8b26181fSAndroid Build Coastguard Worker#include <ctype.h>
4470*8b26181fSAndroid Build Coastguard Worker#include <stdlib.h>
4471*8b26181fSAndroid Build Coastguard Worker#if ((' ' & 0x0FF) == 0x020)
4472*8b26181fSAndroid Build Coastguard Worker# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4473*8b26181fSAndroid Build Coastguard Worker# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4474*8b26181fSAndroid Build Coastguard Worker#else
4475*8b26181fSAndroid Build Coastguard Worker# define ISLOWER(c) \
4476*8b26181fSAndroid Build Coastguard Worker		   (('a' <= (c) && (c) <= 'i') \
4477*8b26181fSAndroid Build Coastguard Worker		     || ('j' <= (c) && (c) <= 'r') \
4478*8b26181fSAndroid Build Coastguard Worker		     || ('s' <= (c) && (c) <= 'z'))
4479*8b26181fSAndroid Build Coastguard Worker# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4480*8b26181fSAndroid Build Coastguard Worker#endif
4481*8b26181fSAndroid Build Coastguard Worker
4482*8b26181fSAndroid Build Coastguard Worker#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4483*8b26181fSAndroid Build Coastguard Workerint
4484*8b26181fSAndroid Build Coastguard Workermain ()
4485*8b26181fSAndroid Build Coastguard Worker{
4486*8b26181fSAndroid Build Coastguard Worker  int i;
4487*8b26181fSAndroid Build Coastguard Worker  for (i = 0; i < 256; i++)
4488*8b26181fSAndroid Build Coastguard Worker    if (XOR (islower (i), ISLOWER (i))
4489*8b26181fSAndroid Build Coastguard Worker	|| toupper (i) != TOUPPER (i))
4490*8b26181fSAndroid Build Coastguard Worker      return 2;
4491*8b26181fSAndroid Build Coastguard Worker  return 0;
4492*8b26181fSAndroid Build Coastguard Worker}
4493*8b26181fSAndroid Build Coastguard Worker_ACEOF
4494*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_run "$LINENO"; then :
4495*8b26181fSAndroid Build Coastguard Worker
4496*8b26181fSAndroid Build Coastguard Workerelse
4497*8b26181fSAndroid Build Coastguard Worker  ac_cv_header_stdc=no
4498*8b26181fSAndroid Build Coastguard Workerfi
4499*8b26181fSAndroid Build Coastguard Workerrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4500*8b26181fSAndroid Build Coastguard Worker  conftest.$ac_objext conftest.beam conftest.$ac_ext
4501*8b26181fSAndroid Build Coastguard Workerfi
4502*8b26181fSAndroid Build Coastguard Worker
4503*8b26181fSAndroid Build Coastguard Workerfi
4504*8b26181fSAndroid Build Coastguard Workerfi
4505*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4506*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_header_stdc" >&6; }
4507*8b26181fSAndroid Build Coastguard Workerif test $ac_cv_header_stdc = yes; then
4508*8b26181fSAndroid Build Coastguard Worker
4509*8b26181fSAndroid Build Coastguard Worker$as_echo "#define STDC_HEADERS 1" >>confdefs.h
4510*8b26181fSAndroid Build Coastguard Worker
4511*8b26181fSAndroid Build Coastguard Workerfi
4512*8b26181fSAndroid Build Coastguard Worker
4513*8b26181fSAndroid Build Coastguard Worker# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4514*8b26181fSAndroid Build Coastguard Workerfor ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4515*8b26181fSAndroid Build Coastguard Worker		  inttypes.h stdint.h unistd.h
4516*8b26181fSAndroid Build Coastguard Workerdo :
4517*8b26181fSAndroid Build Coastguard Worker  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4518*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4519*8b26181fSAndroid Build Coastguard Worker"
4520*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4521*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
4522*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4523*8b26181fSAndroid Build Coastguard Worker_ACEOF
4524*8b26181fSAndroid Build Coastguard Worker
4525*8b26181fSAndroid Build Coastguard Workerfi
4526*8b26181fSAndroid Build Coastguard Worker
4527*8b26181fSAndroid Build Coastguard Workerdone
4528*8b26181fSAndroid Build Coastguard Worker
4529*8b26181fSAndroid Build Coastguard Worker
4530*8b26181fSAndroid Build Coastguard Worker# The cast to long int works around a bug in the HP C Compiler
4531*8b26181fSAndroid Build Coastguard Worker# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4532*8b26181fSAndroid Build Coastguard Worker# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4533*8b26181fSAndroid Build Coastguard Worker# This bug is HP SR number 8606223364.
4534*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5
4535*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking size of void *... " >&6; }
4536*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_sizeof_void_p+:} false; then :
4537*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4538*8b26181fSAndroid Build Coastguard Workerelse
4539*8b26181fSAndroid Build Coastguard Worker  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p"        "$ac_includes_default"; then :
4540*8b26181fSAndroid Build Coastguard Worker
4541*8b26181fSAndroid Build Coastguard Workerelse
4542*8b26181fSAndroid Build Coastguard Worker  if test "$ac_cv_type_void_p" = yes; then
4543*8b26181fSAndroid Build Coastguard Worker     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4544*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4545*8b26181fSAndroid Build Coastguard Workeras_fn_error 77 "cannot compute sizeof (void *)
4546*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
4547*8b26181fSAndroid Build Coastguard Worker   else
4548*8b26181fSAndroid Build Coastguard Worker     ac_cv_sizeof_void_p=0
4549*8b26181fSAndroid Build Coastguard Worker   fi
4550*8b26181fSAndroid Build Coastguard Workerfi
4551*8b26181fSAndroid Build Coastguard Worker
4552*8b26181fSAndroid Build Coastguard Workerfi
4553*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5
4554*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_sizeof_void_p" >&6; }
4555*8b26181fSAndroid Build Coastguard Worker
4556*8b26181fSAndroid Build Coastguard Worker
4557*8b26181fSAndroid Build Coastguard Worker
4558*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
4559*8b26181fSAndroid Build Coastguard Worker#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
4560*8b26181fSAndroid Build Coastguard Worker_ACEOF
4561*8b26181fSAndroid Build Coastguard Worker
4562*8b26181fSAndroid Build Coastguard Worker
4563*8b26181fSAndroid Build Coastguard Workerac_lbl_c_sizeof_void_p="$ac_cv_sizeof_void_p"
4564*8b26181fSAndroid Build Coastguard Worker
4565*8b26181fSAndroid Build Coastguard Worker#
4566*8b26181fSAndroid Build Coastguard Worker# We only need a C++ compiler for Haiku; all code except for its
4567*8b26181fSAndroid Build Coastguard Worker# pcap module is in C.
4568*8b26181fSAndroid Build Coastguard Worker#
4569*8b26181fSAndroid Build Coastguard Workercase "$host_os" in
4570*8b26181fSAndroid Build Coastguard Workerhaiku*)
4571*8b26181fSAndroid Build Coastguard Worker	ac_ext=cpp
4572*8b26181fSAndroid Build Coastguard Workerac_cpp='$CXXCPP $CPPFLAGS'
4573*8b26181fSAndroid Build Coastguard Workerac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4574*8b26181fSAndroid Build Coastguard Workerac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4575*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4576*8b26181fSAndroid Build Coastguard Workerif test -z "$CXX"; then
4577*8b26181fSAndroid Build Coastguard Worker  if test -n "$CCC"; then
4578*8b26181fSAndroid Build Coastguard Worker    CXX=$CCC
4579*8b26181fSAndroid Build Coastguard Worker  else
4580*8b26181fSAndroid Build Coastguard Worker    if test -n "$ac_tool_prefix"; then
4581*8b26181fSAndroid Build Coastguard Worker  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4582*8b26181fSAndroid Build Coastguard Worker  do
4583*8b26181fSAndroid Build Coastguard Worker    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4584*8b26181fSAndroid Build Coastguard Workerset dummy $ac_tool_prefix$ac_prog; ac_word=$2
4585*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4586*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
4587*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_CXX+:} false; then :
4588*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4589*8b26181fSAndroid Build Coastguard Workerelse
4590*8b26181fSAndroid Build Coastguard Worker  if test -n "$CXX"; then
4591*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_CXX="$CXX" # Let the user override the test.
4592*8b26181fSAndroid Build Coastguard Workerelse
4593*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4594*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
4595*8b26181fSAndroid Build Coastguard Workerdo
4596*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
4597*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
4598*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
4599*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4600*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
4601*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4602*8b26181fSAndroid Build Coastguard Worker    break 2
4603*8b26181fSAndroid Build Coastguard Worker  fi
4604*8b26181fSAndroid Build Coastguard Workerdone
4605*8b26181fSAndroid Build Coastguard Worker  done
4606*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
4607*8b26181fSAndroid Build Coastguard Worker
4608*8b26181fSAndroid Build Coastguard Workerfi
4609*8b26181fSAndroid Build Coastguard Workerfi
4610*8b26181fSAndroid Build Coastguard WorkerCXX=$ac_cv_prog_CXX
4611*8b26181fSAndroid Build Coastguard Workerif test -n "$CXX"; then
4612*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4613*8b26181fSAndroid Build Coastguard Worker$as_echo "$CXX" >&6; }
4614*8b26181fSAndroid Build Coastguard Workerelse
4615*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4616*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
4617*8b26181fSAndroid Build Coastguard Workerfi
4618*8b26181fSAndroid Build Coastguard Worker
4619*8b26181fSAndroid Build Coastguard Worker
4620*8b26181fSAndroid Build Coastguard Worker    test -n "$CXX" && break
4621*8b26181fSAndroid Build Coastguard Worker  done
4622*8b26181fSAndroid Build Coastguard Workerfi
4623*8b26181fSAndroid Build Coastguard Workerif test -z "$CXX"; then
4624*8b26181fSAndroid Build Coastguard Worker  ac_ct_CXX=$CXX
4625*8b26181fSAndroid Build Coastguard Worker  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
4626*8b26181fSAndroid Build Coastguard Workerdo
4627*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "$ac_prog", so it can be a program name with args.
4628*8b26181fSAndroid Build Coastguard Workerset dummy $ac_prog; ac_word=$2
4629*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4630*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
4631*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_ac_ct_CXX+:} false; then :
4632*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4633*8b26181fSAndroid Build Coastguard Workerelse
4634*8b26181fSAndroid Build Coastguard Worker  if test -n "$ac_ct_CXX"; then
4635*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
4636*8b26181fSAndroid Build Coastguard Workerelse
4637*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
4639*8b26181fSAndroid Build Coastguard Workerdo
4640*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
4641*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
4642*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
4643*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_ac_ct_CXX="$ac_prog"
4645*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646*8b26181fSAndroid Build Coastguard Worker    break 2
4647*8b26181fSAndroid Build Coastguard Worker  fi
4648*8b26181fSAndroid Build Coastguard Workerdone
4649*8b26181fSAndroid Build Coastguard Worker  done
4650*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
4651*8b26181fSAndroid Build Coastguard Worker
4652*8b26181fSAndroid Build Coastguard Workerfi
4653*8b26181fSAndroid Build Coastguard Workerfi
4654*8b26181fSAndroid Build Coastguard Workerac_ct_CXX=$ac_cv_prog_ac_ct_CXX
4655*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_ct_CXX"; then
4656*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
4657*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_ct_CXX" >&6; }
4658*8b26181fSAndroid Build Coastguard Workerelse
4659*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4660*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
4661*8b26181fSAndroid Build Coastguard Workerfi
4662*8b26181fSAndroid Build Coastguard Worker
4663*8b26181fSAndroid Build Coastguard Worker
4664*8b26181fSAndroid Build Coastguard Worker  test -n "$ac_ct_CXX" && break
4665*8b26181fSAndroid Build Coastguard Workerdone
4666*8b26181fSAndroid Build Coastguard Worker
4667*8b26181fSAndroid Build Coastguard Worker  if test "x$ac_ct_CXX" = x; then
4668*8b26181fSAndroid Build Coastguard Worker    CXX="g++"
4669*8b26181fSAndroid Build Coastguard Worker  else
4670*8b26181fSAndroid Build Coastguard Worker    case $cross_compiling:$ac_tool_warned in
4671*8b26181fSAndroid Build Coastguard Workeryes:)
4672*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4673*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4674*8b26181fSAndroid Build Coastguard Workerac_tool_warned=yes ;;
4675*8b26181fSAndroid Build Coastguard Workeresac
4676*8b26181fSAndroid Build Coastguard Worker    CXX=$ac_ct_CXX
4677*8b26181fSAndroid Build Coastguard Worker  fi
4678*8b26181fSAndroid Build Coastguard Workerfi
4679*8b26181fSAndroid Build Coastguard Worker
4680*8b26181fSAndroid Build Coastguard Worker  fi
4681*8b26181fSAndroid Build Coastguard Workerfi
4682*8b26181fSAndroid Build Coastguard Worker# Provide some information about the compiler.
4683*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
4684*8b26181fSAndroid Build Coastguard Workerset X $ac_compile
4685*8b26181fSAndroid Build Coastguard Workerac_compiler=$2
4686*8b26181fSAndroid Build Coastguard Workerfor ac_option in --version -v -V -qversion; do
4687*8b26181fSAndroid Build Coastguard Worker  { { ac_try="$ac_compiler $ac_option >&5"
4688*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
4689*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4690*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
4691*8b26181fSAndroid Build Coastguard Workeresac
4692*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4693*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
4694*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4695*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
4696*8b26181fSAndroid Build Coastguard Worker  if test -s conftest.err; then
4697*8b26181fSAndroid Build Coastguard Worker    sed '10a\
4698*8b26181fSAndroid Build Coastguard Worker... rest of stderr output deleted ...
4699*8b26181fSAndroid Build Coastguard Worker         10q' conftest.err >conftest.er1
4700*8b26181fSAndroid Build Coastguard Worker    cat conftest.er1 >&5
4701*8b26181fSAndroid Build Coastguard Worker  fi
4702*8b26181fSAndroid Build Coastguard Worker  rm -f conftest.er1 conftest.err
4703*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4704*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }
4705*8b26181fSAndroid Build Coastguard Workerdone
4706*8b26181fSAndroid Build Coastguard Worker
4707*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
4708*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
4709*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_cxx_compiler_gnu+:} false; then :
4710*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4711*8b26181fSAndroid Build Coastguard Workerelse
4712*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4713*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4714*8b26181fSAndroid Build Coastguard Worker
4715*8b26181fSAndroid Build Coastguard Workerint
4716*8b26181fSAndroid Build Coastguard Workermain ()
4717*8b26181fSAndroid Build Coastguard Worker{
4718*8b26181fSAndroid Build Coastguard Worker#ifndef __GNUC__
4719*8b26181fSAndroid Build Coastguard Worker       choke me
4720*8b26181fSAndroid Build Coastguard Worker#endif
4721*8b26181fSAndroid Build Coastguard Worker
4722*8b26181fSAndroid Build Coastguard Worker  ;
4723*8b26181fSAndroid Build Coastguard Worker  return 0;
4724*8b26181fSAndroid Build Coastguard Worker}
4725*8b26181fSAndroid Build Coastguard Worker_ACEOF
4726*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
4727*8b26181fSAndroid Build Coastguard Worker  ac_compiler_gnu=yes
4728*8b26181fSAndroid Build Coastguard Workerelse
4729*8b26181fSAndroid Build Coastguard Worker  ac_compiler_gnu=no
4730*8b26181fSAndroid Build Coastguard Workerfi
4731*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4732*8b26181fSAndroid Build Coastguard Workerac_cv_cxx_compiler_gnu=$ac_compiler_gnu
4733*8b26181fSAndroid Build Coastguard Worker
4734*8b26181fSAndroid Build Coastguard Workerfi
4735*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
4736*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
4737*8b26181fSAndroid Build Coastguard Workerif test $ac_compiler_gnu = yes; then
4738*8b26181fSAndroid Build Coastguard Worker  GXX=yes
4739*8b26181fSAndroid Build Coastguard Workerelse
4740*8b26181fSAndroid Build Coastguard Worker  GXX=
4741*8b26181fSAndroid Build Coastguard Workerfi
4742*8b26181fSAndroid Build Coastguard Workerac_test_CXXFLAGS=${CXXFLAGS+set}
4743*8b26181fSAndroid Build Coastguard Workerac_save_CXXFLAGS=$CXXFLAGS
4744*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
4745*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether $CXX accepts -g... " >&6; }
4746*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_cxx_g+:} false; then :
4747*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4748*8b26181fSAndroid Build Coastguard Workerelse
4749*8b26181fSAndroid Build Coastguard Worker  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
4750*8b26181fSAndroid Build Coastguard Worker   ac_cxx_werror_flag=yes
4751*8b26181fSAndroid Build Coastguard Worker   ac_cv_prog_cxx_g=no
4752*8b26181fSAndroid Build Coastguard Worker   CXXFLAGS="-g"
4753*8b26181fSAndroid Build Coastguard Worker   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4754*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4755*8b26181fSAndroid Build Coastguard Worker
4756*8b26181fSAndroid Build Coastguard Workerint
4757*8b26181fSAndroid Build Coastguard Workermain ()
4758*8b26181fSAndroid Build Coastguard Worker{
4759*8b26181fSAndroid Build Coastguard Worker
4760*8b26181fSAndroid Build Coastguard Worker  ;
4761*8b26181fSAndroid Build Coastguard Worker  return 0;
4762*8b26181fSAndroid Build Coastguard Worker}
4763*8b26181fSAndroid Build Coastguard Worker_ACEOF
4764*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
4765*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cxx_g=yes
4766*8b26181fSAndroid Build Coastguard Workerelse
4767*8b26181fSAndroid Build Coastguard Worker  CXXFLAGS=""
4768*8b26181fSAndroid Build Coastguard Worker      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4769*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4770*8b26181fSAndroid Build Coastguard Worker
4771*8b26181fSAndroid Build Coastguard Workerint
4772*8b26181fSAndroid Build Coastguard Workermain ()
4773*8b26181fSAndroid Build Coastguard Worker{
4774*8b26181fSAndroid Build Coastguard Worker
4775*8b26181fSAndroid Build Coastguard Worker  ;
4776*8b26181fSAndroid Build Coastguard Worker  return 0;
4777*8b26181fSAndroid Build Coastguard Worker}
4778*8b26181fSAndroid Build Coastguard Worker_ACEOF
4779*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
4780*8b26181fSAndroid Build Coastguard Worker
4781*8b26181fSAndroid Build Coastguard Workerelse
4782*8b26181fSAndroid Build Coastguard Worker  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4783*8b26181fSAndroid Build Coastguard Worker	 CXXFLAGS="-g"
4784*8b26181fSAndroid Build Coastguard Worker	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4785*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4786*8b26181fSAndroid Build Coastguard Worker
4787*8b26181fSAndroid Build Coastguard Workerint
4788*8b26181fSAndroid Build Coastguard Workermain ()
4789*8b26181fSAndroid Build Coastguard Worker{
4790*8b26181fSAndroid Build Coastguard Worker
4791*8b26181fSAndroid Build Coastguard Worker  ;
4792*8b26181fSAndroid Build Coastguard Worker  return 0;
4793*8b26181fSAndroid Build Coastguard Worker}
4794*8b26181fSAndroid Build Coastguard Worker_ACEOF
4795*8b26181fSAndroid Build Coastguard Workerif ac_fn_cxx_try_compile "$LINENO"; then :
4796*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_cxx_g=yes
4797*8b26181fSAndroid Build Coastguard Workerfi
4798*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4799*8b26181fSAndroid Build Coastguard Workerfi
4800*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4801*8b26181fSAndroid Build Coastguard Workerfi
4802*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4803*8b26181fSAndroid Build Coastguard Worker   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
4804*8b26181fSAndroid Build Coastguard Workerfi
4805*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
4806*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_prog_cxx_g" >&6; }
4807*8b26181fSAndroid Build Coastguard Workerif test "$ac_test_CXXFLAGS" = set; then
4808*8b26181fSAndroid Build Coastguard Worker  CXXFLAGS=$ac_save_CXXFLAGS
4809*8b26181fSAndroid Build Coastguard Workerelif test $ac_cv_prog_cxx_g = yes; then
4810*8b26181fSAndroid Build Coastguard Worker  if test "$GXX" = yes; then
4811*8b26181fSAndroid Build Coastguard Worker    CXXFLAGS="-g -O2"
4812*8b26181fSAndroid Build Coastguard Worker  else
4813*8b26181fSAndroid Build Coastguard Worker    CXXFLAGS="-g"
4814*8b26181fSAndroid Build Coastguard Worker  fi
4815*8b26181fSAndroid Build Coastguard Workerelse
4816*8b26181fSAndroid Build Coastguard Worker  if test "$GXX" = yes; then
4817*8b26181fSAndroid Build Coastguard Worker    CXXFLAGS="-O2"
4818*8b26181fSAndroid Build Coastguard Worker  else
4819*8b26181fSAndroid Build Coastguard Worker    CXXFLAGS=
4820*8b26181fSAndroid Build Coastguard Worker  fi
4821*8b26181fSAndroid Build Coastguard Workerfi
4822*8b26181fSAndroid Build Coastguard Workerac_ext=c
4823*8b26181fSAndroid Build Coastguard Workerac_cpp='$CPP $CPPFLAGS'
4824*8b26181fSAndroid Build Coastguard Workerac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4825*8b26181fSAndroid Build Coastguard Workerac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4826*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_c_compiler_gnu
4827*8b26181fSAndroid Build Coastguard Worker
4828*8b26181fSAndroid Build Coastguard Worker
4829*8b26181fSAndroid Build Coastguard Worker	#
4830*8b26181fSAndroid Build Coastguard Worker	# Make sure C and C++ have the same pointer sizes with the flags
4831*8b26181fSAndroid Build Coastguard Worker	# they're given; if they don't, it means that the compilers for the
4832*8b26181fSAndroid Build Coastguard Worker	# languages will, with those flags, not produce code that can be
4833*8b26181fSAndroid Build Coastguard Worker	# linked together.
4834*8b26181fSAndroid Build Coastguard Worker	#
4835*8b26181fSAndroid Build Coastguard Worker	# We have to use different data types, because the results of
4836*8b26181fSAndroid Build Coastguard Worker	# a test are cached, so if we test for the size of a given type
4837*8b26181fSAndroid Build Coastguard Worker	# in C, the subsequent test in C++ will use the cached variable.
4838*8b26181fSAndroid Build Coastguard Worker	# We trick autoconf by testing the size of a "void *" in C and a
4839*8b26181fSAndroid Build Coastguard Worker	# "const void *" in C++.
4840*8b26181fSAndroid Build Coastguard Worker	#
4841*8b26181fSAndroid Build Coastguard Worker	ac_ext=cpp
4842*8b26181fSAndroid Build Coastguard Workerac_cpp='$CXXCPP $CPPFLAGS'
4843*8b26181fSAndroid Build Coastguard Workerac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4844*8b26181fSAndroid Build Coastguard Workerac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4845*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_cxx_compiler_gnu
4846*8b26181fSAndroid Build Coastguard Worker
4847*8b26181fSAndroid Build Coastguard Worker
4848*8b26181fSAndroid Build Coastguard Worker# The cast to long int works around a bug in the HP C Compiler
4849*8b26181fSAndroid Build Coastguard Worker# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
4850*8b26181fSAndroid Build Coastguard Worker# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
4851*8b26181fSAndroid Build Coastguard Worker# This bug is HP SR number 8606223364.
4852*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of const void *" >&5
4853*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking size of const void *... " >&6; }
4854*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_sizeof_const_void_p+:} false; then :
4855*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
4856*8b26181fSAndroid Build Coastguard Workerelse
4857*8b26181fSAndroid Build Coastguard Worker  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (const void *))" "ac_cv_sizeof_const_void_p"        "$ac_includes_default"; then :
4858*8b26181fSAndroid Build Coastguard Worker
4859*8b26181fSAndroid Build Coastguard Workerelse
4860*8b26181fSAndroid Build Coastguard Worker  if test "$ac_cv_type_const_void_p" = yes; then
4861*8b26181fSAndroid Build Coastguard Worker     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4862*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4863*8b26181fSAndroid Build Coastguard Workeras_fn_error 77 "cannot compute sizeof (const void *)
4864*8b26181fSAndroid Build Coastguard WorkerSee \`config.log' for more details" "$LINENO" 5; }
4865*8b26181fSAndroid Build Coastguard Worker   else
4866*8b26181fSAndroid Build Coastguard Worker     ac_cv_sizeof_const_void_p=0
4867*8b26181fSAndroid Build Coastguard Worker   fi
4868*8b26181fSAndroid Build Coastguard Workerfi
4869*8b26181fSAndroid Build Coastguard Worker
4870*8b26181fSAndroid Build Coastguard Workerfi
4871*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_const_void_p" >&5
4872*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_sizeof_const_void_p" >&6; }
4873*8b26181fSAndroid Build Coastguard Worker
4874*8b26181fSAndroid Build Coastguard Worker
4875*8b26181fSAndroid Build Coastguard Worker
4876*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
4877*8b26181fSAndroid Build Coastguard Worker#define SIZEOF_CONST_VOID_P $ac_cv_sizeof_const_void_p
4878*8b26181fSAndroid Build Coastguard Worker_ACEOF
4879*8b26181fSAndroid Build Coastguard Worker
4880*8b26181fSAndroid Build Coastguard Worker
4881*8b26181fSAndroid Build Coastguard Worker	ac_lbl_cxx_sizeof_void_p="$ac_cv_sizeof_const_void_p"
4882*8b26181fSAndroid Build Coastguard Worker	ac_ext=c
4883*8b26181fSAndroid Build Coastguard Workerac_cpp='$CPP $CPPFLAGS'
4884*8b26181fSAndroid Build Coastguard Workerac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4885*8b26181fSAndroid Build Coastguard Workerac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4886*8b26181fSAndroid Build Coastguard Workerac_compiler_gnu=$ac_cv_c_compiler_gnu
4887*8b26181fSAndroid Build Coastguard Worker
4888*8b26181fSAndroid Build Coastguard Worker	if test "$ac_lbl_cxx_sizeof_void_p" -eq 0; then
4889*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "No C++ compiler was found" "$LINENO" 5
4890*8b26181fSAndroid Build Coastguard Worker	fi
4891*8b26181fSAndroid Build Coastguard Worker	if test "$ac_lbl_c_sizeof_void_p" -ne "$ac_lbl_cxx_sizeof_void_p"; then
4892*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "C compiler $CC produces code with $ac_lbl_c_sizeof_void_p-byte pointers
4893*8b26181fSAndroid Build Coastguard Workerwhile C++ compiler $CXX produces code with $ac_lbl_cxx_sizeof_void_p-byte pointers.  This prevents
4894*8b26181fSAndroid Build Coastguard Workercode in those languages from being combined." "$LINENO" 5
4895*8b26181fSAndroid Build Coastguard Worker	fi
4896*8b26181fSAndroid Build Coastguard Worker	;;
4897*8b26181fSAndroid Build Coastguard Workeresac
4898*8b26181fSAndroid Build Coastguard Worker
4899*8b26181fSAndroid Build Coastguard Worker
4900*8b26181fSAndroid Build Coastguard Worker
4901*8b26181fSAndroid Build Coastguard Worker
4902*8b26181fSAndroid Build Coastguard Worker
4903*8b26181fSAndroid Build Coastguard Worker    if test "$GCC" = yes ; then
4904*8b26181fSAndroid Build Coastguard Worker	    #
4905*8b26181fSAndroid Build Coastguard Worker	    # -Werror forces warnings to be errors.
4906*8b26181fSAndroid Build Coastguard Worker	    #
4907*8b26181fSAndroid Build Coastguard Worker	    ac_lbl_cc_force_warning_errors=-Werror
4908*8b26181fSAndroid Build Coastguard Worker
4909*8b26181fSAndroid Build Coastguard Worker	    #
4910*8b26181fSAndroid Build Coastguard Worker	    # Try to have the compiler default to hiding symbols,
4911*8b26181fSAndroid Build Coastguard Worker	    # so that only symbols explicitly exported with
4912*8b26181fSAndroid Build Coastguard Worker	    # PCAP_API will be visible outside (shared) libraries.
4913*8b26181fSAndroid Build Coastguard Worker	    #
4914*8b26181fSAndroid Build Coastguard Worker
4915*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
4916*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
4917*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
4918*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -fvisibility=hidden"
4919*8b26181fSAndroid Build Coastguard Worker	#
4920*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
4921*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
4922*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
4923*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
4924*8b26181fSAndroid Build Coastguard Worker	# for it:
4925*8b26181fSAndroid Build Coastguard Worker	#
4926*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
4927*8b26181fSAndroid Build Coastguard Worker	#
4928*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
4929*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
4930*8b26181fSAndroid Build Coastguard Worker	#
4931*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
4932*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
4933*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
4934*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
4935*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
4936*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
4937*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
4938*8b26181fSAndroid Build Coastguard Worker	#
4939*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4940*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
4941*8b26181fSAndroid Build Coastguard Worker	#
4942*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
4943*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
4944*8b26181fSAndroid Build Coastguard Worker	#
4945*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4946*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4947*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
4948*8b26181fSAndroid Build Coastguard Worker_ACEOF
4949*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
4950*8b26181fSAndroid Build Coastguard Worker
4951*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4952*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
4953*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
4954*8b26181fSAndroid Build Coastguard Worker		#
4955*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
4956*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
4957*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
4958*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
4959*8b26181fSAndroid Build Coastguard Worker		#
4960*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
4961*8b26181fSAndroid Build Coastguard Worker		then
4962*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
4963*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
4964*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
4965*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4966*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
4967*8b26181fSAndroid Build Coastguard Worker
4968*8b26181fSAndroid Build Coastguard Worker_ACEOF
4969*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
4970*8b26181fSAndroid Build Coastguard Worker
4971*8b26181fSAndroid Build Coastguard Worker			#
4972*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
4973*8b26181fSAndroid Build Coastguard Worker			#
4974*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4975*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
4976*8b26181fSAndroid Build Coastguard Worker
4977*8b26181fSAndroid Build Coastguard Workerelse
4978*8b26181fSAndroid Build Coastguard Worker
4979*8b26181fSAndroid Build Coastguard Worker			#
4980*8b26181fSAndroid Build Coastguard Worker			# A problem.
4981*8b26181fSAndroid Build Coastguard Worker			#
4982*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4983*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
4984*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
4985*8b26181fSAndroid Build Coastguard Worker
4986*8b26181fSAndroid Build Coastguard Workerfi
4987*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4988*8b26181fSAndroid Build Coastguard Worker		fi
4989*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
4990*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
4991*8b26181fSAndroid Build Coastguard Worker		then
4992*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -fvisibility=hidden"
4993*8b26181fSAndroid Build Coastguard Worker		fi
4994*8b26181fSAndroid Build Coastguard Worker
4995*8b26181fSAndroid Build Coastguard Workerelse
4996*8b26181fSAndroid Build Coastguard Worker
4997*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
4999*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
5000*8b26181fSAndroid Build Coastguard Worker
5001*8b26181fSAndroid Build Coastguard Workerfi
5002*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5003*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
5004*8b26181fSAndroid Build Coastguard Worker
5005*8b26181fSAndroid Build Coastguard Worker    else
5006*8b26181fSAndroid Build Coastguard Worker	    V_INCLS="$V_INCLS -I/usr/local/include"
5007*8b26181fSAndroid Build Coastguard Worker	    LDFLAGS="$LDFLAGS -L/usr/local/lib"
5008*8b26181fSAndroid Build Coastguard Worker
5009*8b26181fSAndroid Build Coastguard Worker	    case "$host_os" in
5010*8b26181fSAndroid Build Coastguard Worker
5011*8b26181fSAndroid Build Coastguard Worker	    darwin*)
5012*8b26181fSAndroid Build Coastguard Worker		    #
5013*8b26181fSAndroid Build Coastguard Worker		    # This is assumed either to be GCC or clang, both
5014*8b26181fSAndroid Build Coastguard Worker		    # of which use -Werror to force warnings to be errors.
5015*8b26181fSAndroid Build Coastguard Worker		    #
5016*8b26181fSAndroid Build Coastguard Worker		    ac_lbl_cc_force_warning_errors=-Werror
5017*8b26181fSAndroid Build Coastguard Worker
5018*8b26181fSAndroid Build Coastguard Worker		    #
5019*8b26181fSAndroid Build Coastguard Worker		    # Try to have the compiler default to hiding symbols,
5020*8b26181fSAndroid Build Coastguard Worker		    # so that only symbols explicitly exported with
5021*8b26181fSAndroid Build Coastguard Worker		    # PCAP_API will be visible outside (shared) libraries.
5022*8b26181fSAndroid Build Coastguard Worker		    #
5023*8b26181fSAndroid Build Coastguard Worker
5024*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
5025*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
5026*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
5027*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -fvisibility=hidden"
5028*8b26181fSAndroid Build Coastguard Worker	#
5029*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
5030*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
5031*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
5032*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
5033*8b26181fSAndroid Build Coastguard Worker	# for it:
5034*8b26181fSAndroid Build Coastguard Worker	#
5035*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
5036*8b26181fSAndroid Build Coastguard Worker	#
5037*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
5038*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
5039*8b26181fSAndroid Build Coastguard Worker	#
5040*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
5041*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
5042*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
5043*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
5044*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
5045*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
5046*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
5047*8b26181fSAndroid Build Coastguard Worker	#
5048*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5049*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5050*8b26181fSAndroid Build Coastguard Worker	#
5051*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
5052*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
5053*8b26181fSAndroid Build Coastguard Worker	#
5054*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5055*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5056*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
5057*8b26181fSAndroid Build Coastguard Worker_ACEOF
5058*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5059*8b26181fSAndroid Build Coastguard Worker
5060*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5061*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
5062*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
5063*8b26181fSAndroid Build Coastguard Worker		#
5064*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
5065*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
5066*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
5067*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
5068*8b26181fSAndroid Build Coastguard Worker		#
5069*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
5070*8b26181fSAndroid Build Coastguard Worker		then
5071*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
5072*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
5073*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
5074*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5075*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5076*8b26181fSAndroid Build Coastguard Worker
5077*8b26181fSAndroid Build Coastguard Worker_ACEOF
5078*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5079*8b26181fSAndroid Build Coastguard Worker
5080*8b26181fSAndroid Build Coastguard Worker			#
5081*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
5082*8b26181fSAndroid Build Coastguard Worker			#
5083*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5084*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
5085*8b26181fSAndroid Build Coastguard Worker
5086*8b26181fSAndroid Build Coastguard Workerelse
5087*8b26181fSAndroid Build Coastguard Worker
5088*8b26181fSAndroid Build Coastguard Worker			#
5089*8b26181fSAndroid Build Coastguard Worker			# A problem.
5090*8b26181fSAndroid Build Coastguard Worker			#
5091*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5092*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
5093*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
5094*8b26181fSAndroid Build Coastguard Worker
5095*8b26181fSAndroid Build Coastguard Workerfi
5096*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5097*8b26181fSAndroid Build Coastguard Worker		fi
5098*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
5099*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
5100*8b26181fSAndroid Build Coastguard Worker		then
5101*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -fvisibility=hidden"
5102*8b26181fSAndroid Build Coastguard Worker		fi
5103*8b26181fSAndroid Build Coastguard Worker
5104*8b26181fSAndroid Build Coastguard Workerelse
5105*8b26181fSAndroid Build Coastguard Worker
5106*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
5108*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
5109*8b26181fSAndroid Build Coastguard Worker
5110*8b26181fSAndroid Build Coastguard Workerfi
5111*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5112*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
5113*8b26181fSAndroid Build Coastguard Worker
5114*8b26181fSAndroid Build Coastguard Worker		    ;;
5115*8b26181fSAndroid Build Coastguard Worker
5116*8b26181fSAndroid Build Coastguard Worker	    hpux*)
5117*8b26181fSAndroid Build Coastguard Worker		    #
5118*8b26181fSAndroid Build Coastguard Worker		    # HP C, which is what we presume we're using, doesn't
5119*8b26181fSAndroid Build Coastguard Worker		    # exit with a non-zero exit status if we hand it an
5120*8b26181fSAndroid Build Coastguard Worker		    # invalid -W flag, can't be forced to do so even with
5121*8b26181fSAndroid Build Coastguard Worker		    # +We, and doesn't handle GCC-style -W flags, so we
5122*8b26181fSAndroid Build Coastguard Worker		    # don't want to try using GCC-style -W flags.
5123*8b26181fSAndroid Build Coastguard Worker		    #
5124*8b26181fSAndroid Build Coastguard Worker		    ac_lbl_cc_dont_try_gcc_dashW=yes
5125*8b26181fSAndroid Build Coastguard Worker		    ;;
5126*8b26181fSAndroid Build Coastguard Worker
5127*8b26181fSAndroid Build Coastguard Worker	    irix*)
5128*8b26181fSAndroid Build Coastguard Worker		    #
5129*8b26181fSAndroid Build Coastguard Worker		    # MIPS C, which is what we presume we're using, doesn't
5130*8b26181fSAndroid Build Coastguard Worker		    # necessarily exit with a non-zero exit status if we
5131*8b26181fSAndroid Build Coastguard Worker		    # hand it an invalid -W flag, can't be forced to do
5132*8b26181fSAndroid Build Coastguard Worker		    # so, and doesn't handle GCC-style -W flags, so we
5133*8b26181fSAndroid Build Coastguard Worker		    # don't want to try using GCC-style -W flags.
5134*8b26181fSAndroid Build Coastguard Worker		    #
5135*8b26181fSAndroid Build Coastguard Worker		    ac_lbl_cc_dont_try_gcc_dashW=yes
5136*8b26181fSAndroid Build Coastguard Worker		    #
5137*8b26181fSAndroid Build Coastguard Worker		    # It also, apparently, defaults to "char" being
5138*8b26181fSAndroid Build Coastguard Worker		    # unsigned, unlike most other C implementations;
5139*8b26181fSAndroid Build Coastguard Worker		    # I suppose we could say "signed char" whenever
5140*8b26181fSAndroid Build Coastguard Worker		    # we want to guarantee a signed "char", but let's
5141*8b26181fSAndroid Build Coastguard Worker		    # just force signed chars.
5142*8b26181fSAndroid Build Coastguard Worker		    #
5143*8b26181fSAndroid Build Coastguard Worker		    # -xansi is normally the default, but the
5144*8b26181fSAndroid Build Coastguard Worker		    # configure script was setting it; perhaps -cckr
5145*8b26181fSAndroid Build Coastguard Worker		    # was the default in the Old Days.  (Then again,
5146*8b26181fSAndroid Build Coastguard Worker		    # that would probably be for backwards compatibility
5147*8b26181fSAndroid Build Coastguard Worker		    # in the days when ANSI C was Shiny and New, i.e.
5148*8b26181fSAndroid Build Coastguard Worker		    # 1989 and the early '90's, so maybe we can just
5149*8b26181fSAndroid Build Coastguard Worker		    # drop support for those compilers.)
5150*8b26181fSAndroid Build Coastguard Worker		    #
5151*8b26181fSAndroid Build Coastguard Worker		    # -g is equivalent to -g2, which turns off
5152*8b26181fSAndroid Build Coastguard Worker		    # optimization; we choose -g3, which generates
5153*8b26181fSAndroid Build Coastguard Worker		    # debugging information but doesn't turn off
5154*8b26181fSAndroid Build Coastguard Worker		    # optimization (even if the optimization would
5155*8b26181fSAndroid Build Coastguard Worker		    # cause inaccuracies in debugging).
5156*8b26181fSAndroid Build Coastguard Worker		    #
5157*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -xansi -signed -g3"
5158*8b26181fSAndroid Build Coastguard Worker		    ;;
5159*8b26181fSAndroid Build Coastguard Worker
5160*8b26181fSAndroid Build Coastguard Worker	    osf*)
5161*8b26181fSAndroid Build Coastguard Worker		    #
5162*8b26181fSAndroid Build Coastguard Worker		    # Presumed to be DEC OSF/1, Digital UNIX, or
5163*8b26181fSAndroid Build Coastguard Worker		    # Tru64 UNIX.
5164*8b26181fSAndroid Build Coastguard Worker		    #
5165*8b26181fSAndroid Build Coastguard Worker		    # The DEC C compiler, which is what we presume we're
5166*8b26181fSAndroid Build Coastguard Worker		    # using, doesn't exit with a non-zero exit status if we
5167*8b26181fSAndroid Build Coastguard Worker		    # hand it an invalid -W flag, can't be forced to do
5168*8b26181fSAndroid Build Coastguard Worker		    # so, and doesn't handle GCC-style -W flags, so we
5169*8b26181fSAndroid Build Coastguard Worker		    # don't want to try using GCC-style -W flags.
5170*8b26181fSAndroid Build Coastguard Worker		    #
5171*8b26181fSAndroid Build Coastguard Worker		    ac_lbl_cc_dont_try_gcc_dashW=yes
5172*8b26181fSAndroid Build Coastguard Worker		    #
5173*8b26181fSAndroid Build Coastguard Worker		    # -g is equivalent to -g2, which turns off
5174*8b26181fSAndroid Build Coastguard Worker		    # optimization; we choose -g3, which generates
5175*8b26181fSAndroid Build Coastguard Worker		    # debugging information but doesn't turn off
5176*8b26181fSAndroid Build Coastguard Worker		    # optimization (even if the optimization would
5177*8b26181fSAndroid Build Coastguard Worker		    # cause inaccuracies in debugging).
5178*8b26181fSAndroid Build Coastguard Worker		    #
5179*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -g3"
5180*8b26181fSAndroid Build Coastguard Worker		    ;;
5181*8b26181fSAndroid Build Coastguard Worker
5182*8b26181fSAndroid Build Coastguard Worker	    solaris*)
5183*8b26181fSAndroid Build Coastguard Worker		    #
5184*8b26181fSAndroid Build Coastguard Worker		    # Assumed to be Sun C, which requires -errwarn to force
5185*8b26181fSAndroid Build Coastguard Worker		    # warnings to be treated as errors.
5186*8b26181fSAndroid Build Coastguard Worker		    #
5187*8b26181fSAndroid Build Coastguard Worker		    ac_lbl_cc_force_warning_errors=-errwarn
5188*8b26181fSAndroid Build Coastguard Worker
5189*8b26181fSAndroid Build Coastguard Worker		    #
5190*8b26181fSAndroid Build Coastguard Worker		    # Try to have the compiler default to hiding symbols,
5191*8b26181fSAndroid Build Coastguard Worker		    # so that only symbols explicitly exported with
5192*8b26181fSAndroid Build Coastguard Worker		    # PCAP_API will be visible outside (shared) libraries.
5193*8b26181fSAndroid Build Coastguard Worker		    #
5194*8b26181fSAndroid Build Coastguard Worker
5195*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
5196*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
5197*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
5198*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -xldscope=hidden"
5199*8b26181fSAndroid Build Coastguard Worker	#
5200*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
5201*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
5202*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
5203*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
5204*8b26181fSAndroid Build Coastguard Worker	# for it:
5205*8b26181fSAndroid Build Coastguard Worker	#
5206*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
5207*8b26181fSAndroid Build Coastguard Worker	#
5208*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
5209*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
5210*8b26181fSAndroid Build Coastguard Worker	#
5211*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
5212*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
5213*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
5214*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
5215*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
5216*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
5217*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
5218*8b26181fSAndroid Build Coastguard Worker	#
5219*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5220*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
5221*8b26181fSAndroid Build Coastguard Worker	#
5222*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
5223*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
5224*8b26181fSAndroid Build Coastguard Worker	#
5225*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5226*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5227*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
5228*8b26181fSAndroid Build Coastguard Worker_ACEOF
5229*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5230*8b26181fSAndroid Build Coastguard Worker
5231*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5232*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
5233*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
5234*8b26181fSAndroid Build Coastguard Worker		#
5235*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
5236*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
5237*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
5238*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
5239*8b26181fSAndroid Build Coastguard Worker		#
5240*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
5241*8b26181fSAndroid Build Coastguard Worker		then
5242*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
5243*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
5244*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -xldscope=hidden ... " >&6; }
5245*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5246*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5247*8b26181fSAndroid Build Coastguard Worker
5248*8b26181fSAndroid Build Coastguard Worker_ACEOF
5249*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5250*8b26181fSAndroid Build Coastguard Worker
5251*8b26181fSAndroid Build Coastguard Worker			#
5252*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
5253*8b26181fSAndroid Build Coastguard Worker			#
5254*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5255*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
5256*8b26181fSAndroid Build Coastguard Worker
5257*8b26181fSAndroid Build Coastguard Workerelse
5258*8b26181fSAndroid Build Coastguard Worker
5259*8b26181fSAndroid Build Coastguard Worker			#
5260*8b26181fSAndroid Build Coastguard Worker			# A problem.
5261*8b26181fSAndroid Build Coastguard Worker			#
5262*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5263*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
5264*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
5265*8b26181fSAndroid Build Coastguard Worker
5266*8b26181fSAndroid Build Coastguard Workerfi
5267*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5268*8b26181fSAndroid Build Coastguard Worker		fi
5269*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
5270*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
5271*8b26181fSAndroid Build Coastguard Worker		then
5272*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -xldscope=hidden"
5273*8b26181fSAndroid Build Coastguard Worker		fi
5274*8b26181fSAndroid Build Coastguard Worker
5275*8b26181fSAndroid Build Coastguard Workerelse
5276*8b26181fSAndroid Build Coastguard Worker
5277*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5278*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
5279*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
5280*8b26181fSAndroid Build Coastguard Worker
5281*8b26181fSAndroid Build Coastguard Workerfi
5282*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5283*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
5284*8b26181fSAndroid Build Coastguard Worker
5285*8b26181fSAndroid Build Coastguard Worker		    ;;
5286*8b26181fSAndroid Build Coastguard Worker
5287*8b26181fSAndroid Build Coastguard Worker	    ultrix*)
5288*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
5289*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
5290*8b26181fSAndroid Build Coastguard Worker		    if ${ac_cv_lbl_cc_const_proto+:} false; then :
5291*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5292*8b26181fSAndroid Build Coastguard Workerelse
5293*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5294*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5295*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
5296*8b26181fSAndroid Build Coastguard Workerint
5297*8b26181fSAndroid Build Coastguard Workermain ()
5298*8b26181fSAndroid Build Coastguard Worker{
5299*8b26181fSAndroid Build Coastguard Workerstruct a { int b; };
5300*8b26181fSAndroid Build Coastguard Worker			    void c(const struct a *)
5301*8b26181fSAndroid Build Coastguard Worker  ;
5302*8b26181fSAndroid Build Coastguard Worker  return 0;
5303*8b26181fSAndroid Build Coastguard Worker}
5304*8b26181fSAndroid Build Coastguard Worker_ACEOF
5305*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5306*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_cc_const_proto=yes
5307*8b26181fSAndroid Build Coastguard Workerelse
5308*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_cc_const_proto=no
5309*8b26181fSAndroid Build Coastguard Workerfi
5310*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5311*8b26181fSAndroid Build Coastguard Workerfi
5312*8b26181fSAndroid Build Coastguard Worker
5313*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
5314*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
5315*8b26181fSAndroid Build Coastguard Worker		    if test $ac_cv_lbl_cc_const_proto = no ; then
5316*8b26181fSAndroid Build Coastguard Worker
5317*8b26181fSAndroid Build Coastguard Worker$as_echo "#define const /**/" >>confdefs.h
5318*8b26181fSAndroid Build Coastguard Worker
5319*8b26181fSAndroid Build Coastguard Worker		    fi
5320*8b26181fSAndroid Build Coastguard Worker		    ;;
5321*8b26181fSAndroid Build Coastguard Worker	    esac
5322*8b26181fSAndroid Build Coastguard Worker	    V_CCOPT="$V_CCOPT -O"
5323*8b26181fSAndroid Build Coastguard Worker    fi
5324*8b26181fSAndroid Build Coastguard Worker
5325*8b26181fSAndroid Build Coastguard Worker
5326*8b26181fSAndroid Build Coastguard Worker    if test "$GCC" = yes ; then
5327*8b26181fSAndroid Build Coastguard Worker	    #
5328*8b26181fSAndroid Build Coastguard Worker	    # On platforms where we build a shared library:
5329*8b26181fSAndroid Build Coastguard Worker	    #
5330*8b26181fSAndroid Build Coastguard Worker	    #	add options to generate position-independent code,
5331*8b26181fSAndroid Build Coastguard Worker	    #	if necessary (it's the default in AIX and Darwin/macOS);
5332*8b26181fSAndroid Build Coastguard Worker	    #
5333*8b26181fSAndroid Build Coastguard Worker	    #	define option to set the soname of the shared library,
5334*8b26181fSAndroid Build Coastguard Worker	    #	if the OS supports that;
5335*8b26181fSAndroid Build Coastguard Worker	    #
5336*8b26181fSAndroid Build Coastguard Worker	    #	add options to specify, at link time, a directory to
5337*8b26181fSAndroid Build Coastguard Worker	    #	add to the run-time search path, if that's necessary.
5338*8b26181fSAndroid Build Coastguard Worker	    #
5339*8b26181fSAndroid Build Coastguard Worker	    V_SHLIB_CMD="\$(CC)"
5340*8b26181fSAndroid Build Coastguard Worker	    V_SHLIB_OPT="-shared"
5341*8b26181fSAndroid Build Coastguard Worker	    case "$host_os" in
5342*8b26181fSAndroid Build Coastguard Worker
5343*8b26181fSAndroid Build Coastguard Worker	    aix*)
5344*8b26181fSAndroid Build Coastguard Worker		    ;;
5345*8b26181fSAndroid Build Coastguard Worker
5346*8b26181fSAndroid Build Coastguard Worker	    freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*)
5347*8b26181fSAndroid Build Coastguard Worker		    #
5348*8b26181fSAndroid Build Coastguard Worker		    # Platforms where the C compiler is GCC or accepts
5349*8b26181fSAndroid Build Coastguard Worker		    # compatible command-line arguments, and the linker
5350*8b26181fSAndroid Build Coastguard Worker		    # is the GNU linker or accepts compatible command-line
5351*8b26181fSAndroid Build Coastguard Worker		    # arguments.
5352*8b26181fSAndroid Build Coastguard Worker		    #
5353*8b26181fSAndroid Build Coastguard Worker		    # Some instruction sets require -fPIC on some
5354*8b26181fSAndroid Build Coastguard Worker		    # operating systems.  Check for them.  If you
5355*8b26181fSAndroid Build Coastguard Worker		    # have a combination that requires it, add it
5356*8b26181fSAndroid Build Coastguard Worker		    # here.
5357*8b26181fSAndroid Build Coastguard Worker		    #
5358*8b26181fSAndroid Build Coastguard Worker		    PIC_OPT=-fpic
5359*8b26181fSAndroid Build Coastguard Worker		    case "$host_cpu" in
5360*8b26181fSAndroid Build Coastguard Worker
5361*8b26181fSAndroid Build Coastguard Worker		    sparc64*)
5362*8b26181fSAndroid Build Coastguard Worker			case "$host_os" in
5363*8b26181fSAndroid Build Coastguard Worker
5364*8b26181fSAndroid Build Coastguard Worker			freebsd*|openbsd*|linux*)
5365*8b26181fSAndroid Build Coastguard Worker			    PIC_OPT=-fPIC
5366*8b26181fSAndroid Build Coastguard Worker			    ;;
5367*8b26181fSAndroid Build Coastguard Worker			esac
5368*8b26181fSAndroid Build Coastguard Worker			;;
5369*8b26181fSAndroid Build Coastguard Worker		    esac
5370*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
5371*8b26181fSAndroid Build Coastguard Worker		    V_SONAME_OPT="-Wl,-soname,"
5372*8b26181fSAndroid Build Coastguard Worker		    ;;
5373*8b26181fSAndroid Build Coastguard Worker
5374*8b26181fSAndroid Build Coastguard Worker	    hpux*)
5375*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5376*8b26181fSAndroid Build Coastguard Worker		    #
5377*8b26181fSAndroid Build Coastguard Worker		    # XXX - this assumes GCC is using the HP linker,
5378*8b26181fSAndroid Build Coastguard Worker		    # rather than the GNU linker, and that the "+h"
5379*8b26181fSAndroid Build Coastguard Worker		    # option is used on all HP-UX platforms, both .sl
5380*8b26181fSAndroid Build Coastguard Worker		    # and .so.
5381*8b26181fSAndroid Build Coastguard Worker		    #
5382*8b26181fSAndroid Build Coastguard Worker		    V_SONAME_OPT="-Wl,+h,"
5383*8b26181fSAndroid Build Coastguard Worker		    #
5384*8b26181fSAndroid Build Coastguard Worker		    # By default, directories specified with -L
5385*8b26181fSAndroid Build Coastguard Worker		    # are added to the run-time search path, so
5386*8b26181fSAndroid Build Coastguard Worker		    # we don't add them in pcap-config.
5387*8b26181fSAndroid Build Coastguard Worker		    #
5388*8b26181fSAndroid Build Coastguard Worker		    ;;
5389*8b26181fSAndroid Build Coastguard Worker
5390*8b26181fSAndroid Build Coastguard Worker	    solaris*)
5391*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5392*8b26181fSAndroid Build Coastguard Worker		    #
5393*8b26181fSAndroid Build Coastguard Worker		    # Sun/Oracle's C compiler, GCC, and GCC-compatible
5394*8b26181fSAndroid Build Coastguard Worker		    # compilers support -Wl,{comma-separated list of options},
5395*8b26181fSAndroid Build Coastguard Worker		    # and we use the C compiler, not ld, for all linking,
5396*8b26181fSAndroid Build Coastguard Worker		    # including linking to produce a shared library.
5397*8b26181fSAndroid Build Coastguard Worker		    #
5398*8b26181fSAndroid Build Coastguard Worker		    V_SONAME_OPT="-Wl,-h,"
5399*8b26181fSAndroid Build Coastguard Worker		    ;;
5400*8b26181fSAndroid Build Coastguard Worker	    esac
5401*8b26181fSAndroid Build Coastguard Worker    else
5402*8b26181fSAndroid Build Coastguard Worker	    #
5403*8b26181fSAndroid Build Coastguard Worker	    # Set the appropriate compiler flags and, on platforms
5404*8b26181fSAndroid Build Coastguard Worker	    # where we build a shared library:
5405*8b26181fSAndroid Build Coastguard Worker	    #
5406*8b26181fSAndroid Build Coastguard Worker	    #	add options to generate position-independent code,
5407*8b26181fSAndroid Build Coastguard Worker	    #	if necessary (it's the default in Darwin/macOS);
5408*8b26181fSAndroid Build Coastguard Worker	    #
5409*8b26181fSAndroid Build Coastguard Worker	    #	if we generate ".so" shared libraries, define the
5410*8b26181fSAndroid Build Coastguard Worker	    #	appropriate options for building the shared library;
5411*8b26181fSAndroid Build Coastguard Worker	    #
5412*8b26181fSAndroid Build Coastguard Worker	    #	add options to specify, at link time, a directory to
5413*8b26181fSAndroid Build Coastguard Worker	    #	add to the run-time search path, if that's necessary.
5414*8b26181fSAndroid Build Coastguard Worker	    #
5415*8b26181fSAndroid Build Coastguard Worker	    # Note: spaces after V_SONAME_OPT are significant; on
5416*8b26181fSAndroid Build Coastguard Worker	    # some platforms the soname is passed with a GCC-like
5417*8b26181fSAndroid Build Coastguard Worker	    # "-Wl,-soname,{soname}" option, with the soname part
5418*8b26181fSAndroid Build Coastguard Worker	    # of the option, while on other platforms the C compiler
5419*8b26181fSAndroid Build Coastguard Worker	    # driver takes it as a regular option with the soname
5420*8b26181fSAndroid Build Coastguard Worker	    # following the option.
5421*8b26181fSAndroid Build Coastguard Worker	    #
5422*8b26181fSAndroid Build Coastguard Worker	    case "$host_os" in
5423*8b26181fSAndroid Build Coastguard Worker
5424*8b26181fSAndroid Build Coastguard Worker	    aix*)
5425*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CMD="\$(CC)"
5426*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_OPT="-G -bnoentry -bexpall"
5427*8b26181fSAndroid Build Coastguard Worker		    ;;
5428*8b26181fSAndroid Build Coastguard Worker
5429*8b26181fSAndroid Build Coastguard Worker	    freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
5430*8b26181fSAndroid Build Coastguard Worker		    #
5431*8b26181fSAndroid Build Coastguard Worker		    # Platforms where the C compiler is GCC or accepts
5432*8b26181fSAndroid Build Coastguard Worker		    # compatible command-line arguments, and the linker
5433*8b26181fSAndroid Build Coastguard Worker		    # is the GNU linker or accepts compatible command-line
5434*8b26181fSAndroid Build Coastguard Worker		    # arguments.
5435*8b26181fSAndroid Build Coastguard Worker		    #
5436*8b26181fSAndroid Build Coastguard Worker		    # XXX - does 64-bit SPARC require -fPIC?
5437*8b26181fSAndroid Build Coastguard Worker		    #
5438*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
5439*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CMD="\$(CC)"
5440*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_OPT="-shared"
5441*8b26181fSAndroid Build Coastguard Worker		    V_SONAME_OPT="-Wl,-soname,"
5442*8b26181fSAndroid Build Coastguard Worker		    ;;
5443*8b26181fSAndroid Build Coastguard Worker
5444*8b26181fSAndroid Build Coastguard Worker	    hpux*)
5445*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
5446*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CMD="\$(LD)"
5447*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_OPT="-b"
5448*8b26181fSAndroid Build Coastguard Worker		    V_SONAME_OPT="+h "
5449*8b26181fSAndroid Build Coastguard Worker		    #
5450*8b26181fSAndroid Build Coastguard Worker		    # By default, directories specified with -L
5451*8b26181fSAndroid Build Coastguard Worker		    # are added to the run-time search path, so
5452*8b26181fSAndroid Build Coastguard Worker		    # we don't add them in pcap-config.
5453*8b26181fSAndroid Build Coastguard Worker		    #
5454*8b26181fSAndroid Build Coastguard Worker		    ;;
5455*8b26181fSAndroid Build Coastguard Worker
5456*8b26181fSAndroid Build Coastguard Worker	    osf*)
5457*8b26181fSAndroid Build Coastguard Worker		    #
5458*8b26181fSAndroid Build Coastguard Worker		    # Presumed to be DEC OSF/1, Digital UNIX, or
5459*8b26181fSAndroid Build Coastguard Worker		    # Tru64 UNIX.
5460*8b26181fSAndroid Build Coastguard Worker		    #
5461*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CMD="\$(CC)"
5462*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_OPT="-shared"
5463*8b26181fSAndroid Build Coastguard Worker		    V_SONAME_OPT="-soname "
5464*8b26181fSAndroid Build Coastguard Worker		    ;;
5465*8b26181fSAndroid Build Coastguard Worker
5466*8b26181fSAndroid Build Coastguard Worker	    solaris*)
5467*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
5468*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_CMD="\$(CC)"
5469*8b26181fSAndroid Build Coastguard Worker		    V_SHLIB_OPT="-G"
5470*8b26181fSAndroid Build Coastguard Worker		    #
5471*8b26181fSAndroid Build Coastguard Worker		    # Sun/Oracle's C compiler, GCC, and GCC-compatible
5472*8b26181fSAndroid Build Coastguard Worker		    # compilers support -Wl,{comma-separated list of options},
5473*8b26181fSAndroid Build Coastguard Worker		    # and we use the C compiler, not ld, for all linking,
5474*8b26181fSAndroid Build Coastguard Worker		    # including linking to produce a shared library.
5475*8b26181fSAndroid Build Coastguard Worker		    #
5476*8b26181fSAndroid Build Coastguard Worker		    V_SONAME_OPT="-Wl,-h,"
5477*8b26181fSAndroid Build Coastguard Worker		    ;;
5478*8b26181fSAndroid Build Coastguard Worker	    esac
5479*8b26181fSAndroid Build Coastguard Worker    fi
5480*8b26181fSAndroid Build Coastguard Worker
5481*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5482*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for inline... " >&6; }
5483*8b26181fSAndroid Build Coastguard Worker    save_CFLAGS="$CFLAGS"
5484*8b26181fSAndroid Build Coastguard Worker    CFLAGS="$V_CCOPT"
5485*8b26181fSAndroid Build Coastguard Worker    if ${ac_cv_lbl_inline+:} false; then :
5486*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5487*8b26181fSAndroid Build Coastguard Workerelse
5488*8b26181fSAndroid Build Coastguard Worker
5489*8b26181fSAndroid Build Coastguard Worker	ac_cv_lbl_inline=""
5490*8b26181fSAndroid Build Coastguard Worker	ac_lbl_cc_inline=no
5491*8b26181fSAndroid Build Coastguard Worker	for ac_lbl_inline in inline __inline__ __inline
5492*8b26181fSAndroid Build Coastguard Worker	do
5493*8b26181fSAndroid Build Coastguard Worker	    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5494*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5495*8b26181fSAndroid Build Coastguard Worker#define inline $ac_lbl_inline
5496*8b26181fSAndroid Build Coastguard Worker		static inline struct iltest *foo(void);
5497*8b26181fSAndroid Build Coastguard Worker		struct iltest {
5498*8b26181fSAndroid Build Coastguard Worker		    int iltest1;
5499*8b26181fSAndroid Build Coastguard Worker		    int iltest2;
5500*8b26181fSAndroid Build Coastguard Worker		};
5501*8b26181fSAndroid Build Coastguard Worker
5502*8b26181fSAndroid Build Coastguard Worker		static inline struct iltest *
5503*8b26181fSAndroid Build Coastguard Worker		foo()
5504*8b26181fSAndroid Build Coastguard Worker		{
5505*8b26181fSAndroid Build Coastguard Worker		    static struct iltest xxx;
5506*8b26181fSAndroid Build Coastguard Worker
5507*8b26181fSAndroid Build Coastguard Worker		    return &xxx;
5508*8b26181fSAndroid Build Coastguard Worker		}
5509*8b26181fSAndroid Build Coastguard Workerint
5510*8b26181fSAndroid Build Coastguard Workermain ()
5511*8b26181fSAndroid Build Coastguard Worker{
5512*8b26181fSAndroid Build Coastguard Worker
5513*8b26181fSAndroid Build Coastguard Worker  ;
5514*8b26181fSAndroid Build Coastguard Worker  return 0;
5515*8b26181fSAndroid Build Coastguard Worker}
5516*8b26181fSAndroid Build Coastguard Worker_ACEOF
5517*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5518*8b26181fSAndroid Build Coastguard Worker  ac_lbl_cc_inline=yes
5519*8b26181fSAndroid Build Coastguard Workerfi
5520*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521*8b26181fSAndroid Build Coastguard Worker	    if test "$ac_lbl_cc_inline" = yes ; then
5522*8b26181fSAndroid Build Coastguard Worker		break;
5523*8b26181fSAndroid Build Coastguard Worker	    fi
5524*8b26181fSAndroid Build Coastguard Worker	done
5525*8b26181fSAndroid Build Coastguard Worker	if test "$ac_lbl_cc_inline" = yes ; then
5526*8b26181fSAndroid Build Coastguard Worker	    ac_cv_lbl_inline=$ac_lbl_inline
5527*8b26181fSAndroid Build Coastguard Worker	fi
5528*8b26181fSAndroid Build Coastguard Workerfi
5529*8b26181fSAndroid Build Coastguard Worker
5530*8b26181fSAndroid Build Coastguard Worker    CFLAGS="$save_CFLAGS"
5531*8b26181fSAndroid Build Coastguard Worker    if test ! -z "$ac_cv_lbl_inline" ; then
5532*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
5533*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lbl_inline" >&6; }
5534*8b26181fSAndroid Build Coastguard Worker    else
5535*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5536*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
5537*8b26181fSAndroid Build Coastguard Worker    fi
5538*8b26181fSAndroid Build Coastguard Worker
5539*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
5540*8b26181fSAndroid Build Coastguard Worker#define inline $ac_cv_lbl_inline
5541*8b26181fSAndroid Build Coastguard Worker_ACEOF
5542*8b26181fSAndroid Build Coastguard Worker
5543*8b26181fSAndroid Build Coastguard Worker
5544*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5
5545*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for __atomic_load_n... " >&6; }
5546*8b26181fSAndroid Build Coastguard Worker	if ${ac_cv_have___atomic_load_n+:} false; then :
5547*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5548*8b26181fSAndroid Build Coastguard Workerelse
5549*8b26181fSAndroid Build Coastguard Worker
5550*8b26181fSAndroid Build Coastguard Worker# ac_fn_c_try_link LINENO
5551*8b26181fSAndroid Build Coastguard Worker# -----------------------
5552*8b26181fSAndroid Build Coastguard Worker# Try to link conftest.$ac_ext, and return whether this succeeded.
5553*8b26181fSAndroid Build Coastguard Workerac_fn_c_try_link ()
5554*8b26181fSAndroid Build Coastguard Worker{
5555*8b26181fSAndroid Build Coastguard Worker  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5556*8b26181fSAndroid Build Coastguard Worker  rm -f conftest.$ac_objext conftest$ac_exeext
5557*8b26181fSAndroid Build Coastguard Worker  if { { ac_try="$ac_link"
5558*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
5559*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5560*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
5561*8b26181fSAndroid Build Coastguard Workeresac
5562*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5563*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
5564*8b26181fSAndroid Build Coastguard Worker  (eval "$ac_link") 2>conftest.err
5565*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
5566*8b26181fSAndroid Build Coastguard Worker  if test -s conftest.err; then
5567*8b26181fSAndroid Build Coastguard Worker    grep -v '^ *+' conftest.err >conftest.er1
5568*8b26181fSAndroid Build Coastguard Worker    cat conftest.er1 >&5
5569*8b26181fSAndroid Build Coastguard Worker    mv -f conftest.er1 conftest.err
5570*8b26181fSAndroid Build Coastguard Worker  fi
5571*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5572*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; } && {
5573*8b26181fSAndroid Build Coastguard Worker	 test -z "$ac_c_werror_flag" ||
5574*8b26181fSAndroid Build Coastguard Worker	 test ! -s conftest.err
5575*8b26181fSAndroid Build Coastguard Worker       } && test -s conftest$ac_exeext && {
5576*8b26181fSAndroid Build Coastguard Worker	 test "$cross_compiling" = yes ||
5577*8b26181fSAndroid Build Coastguard Worker	 test -x conftest$ac_exeext
5578*8b26181fSAndroid Build Coastguard Worker       }; then :
5579*8b26181fSAndroid Build Coastguard Worker  ac_retval=0
5580*8b26181fSAndroid Build Coastguard Workerelse
5581*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: failed program was:" >&5
5582*8b26181fSAndroid Build Coastguard Workersed 's/^/| /' conftest.$ac_ext >&5
5583*8b26181fSAndroid Build Coastguard Worker
5584*8b26181fSAndroid Build Coastguard Worker	ac_retval=1
5585*8b26181fSAndroid Build Coastguard Workerfi
5586*8b26181fSAndroid Build Coastguard Worker  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
5587*8b26181fSAndroid Build Coastguard Worker  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
5588*8b26181fSAndroid Build Coastguard Worker  # interfere with the next link command; also delete a directory that is
5589*8b26181fSAndroid Build Coastguard Worker  # left behind by Apple's compiler.  We do this before executing the actions.
5590*8b26181fSAndroid Build Coastguard Worker  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
5591*8b26181fSAndroid Build Coastguard Worker  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
5592*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $ac_retval
5593*8b26181fSAndroid Build Coastguard Worker
5594*8b26181fSAndroid Build Coastguard Worker} # ac_fn_c_try_link
5595*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
5596*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5597*8b26181fSAndroid Build Coastguard Worker
5598*8b26181fSAndroid Build Coastguard Workerint
5599*8b26181fSAndroid Build Coastguard Workermain ()
5600*8b26181fSAndroid Build Coastguard Worker{
5601*8b26181fSAndroid Build Coastguard Worker
5602*8b26181fSAndroid Build Coastguard Worker		    int i = 17;
5603*8b26181fSAndroid Build Coastguard Worker		    int j;
5604*8b26181fSAndroid Build Coastguard Worker		    j = __atomic_load_n(&i, __ATOMIC_RELAXED);
5605*8b26181fSAndroid Build Coastguard Worker
5606*8b26181fSAndroid Build Coastguard Worker  ;
5607*8b26181fSAndroid Build Coastguard Worker  return 0;
5608*8b26181fSAndroid Build Coastguard Worker}
5609*8b26181fSAndroid Build Coastguard Worker_ACEOF
5610*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
5611*8b26181fSAndroid Build Coastguard Worker  ac_have___atomic_load_n=yes
5612*8b26181fSAndroid Build Coastguard Workerelse
5613*8b26181fSAndroid Build Coastguard Worker  ac_have___atomic_load_n=no
5614*8b26181fSAndroid Build Coastguard Workerfi
5615*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
5616*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
5617*8b26181fSAndroid Build Coastguard Workerfi
5618*8b26181fSAndroid Build Coastguard Worker
5619*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5
5620*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_have___atomic_load_n" >&6; }
5621*8b26181fSAndroid Build Coastguard Worker	if test $ac_have___atomic_load_n = yes ; then
5622*8b26181fSAndroid Build Coastguard Worker
5623*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h
5624*8b26181fSAndroid Build Coastguard Worker
5625*8b26181fSAndroid Build Coastguard Worker	fi
5626*8b26181fSAndroid Build Coastguard Worker
5627*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5
5628*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for __atomic_store_n... " >&6; }
5629*8b26181fSAndroid Build Coastguard Worker	if ${ac_cv_have___atomic_store_n+:} false; then :
5630*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5631*8b26181fSAndroid Build Coastguard Workerelse
5632*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5633*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5634*8b26181fSAndroid Build Coastguard Worker
5635*8b26181fSAndroid Build Coastguard Workerint
5636*8b26181fSAndroid Build Coastguard Workermain ()
5637*8b26181fSAndroid Build Coastguard Worker{
5638*8b26181fSAndroid Build Coastguard Worker
5639*8b26181fSAndroid Build Coastguard Worker		    int i;
5640*8b26181fSAndroid Build Coastguard Worker		    __atomic_store_n(&i, 17, __ATOMIC_RELAXED);
5641*8b26181fSAndroid Build Coastguard Worker
5642*8b26181fSAndroid Build Coastguard Worker  ;
5643*8b26181fSAndroid Build Coastguard Worker  return 0;
5644*8b26181fSAndroid Build Coastguard Worker}
5645*8b26181fSAndroid Build Coastguard Worker_ACEOF
5646*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
5647*8b26181fSAndroid Build Coastguard Worker  ac_have___atomic_store_n=yes
5648*8b26181fSAndroid Build Coastguard Workerelse
5649*8b26181fSAndroid Build Coastguard Worker  ac_have___atomic_store_n=no
5650*8b26181fSAndroid Build Coastguard Workerfi
5651*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
5652*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
5653*8b26181fSAndroid Build Coastguard Workerfi
5654*8b26181fSAndroid Build Coastguard Worker
5655*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5
5656*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_have___atomic_store_n" >&6; }
5657*8b26181fSAndroid Build Coastguard Worker	if test $ac_have___atomic_store_n = yes ; then
5658*8b26181fSAndroid Build Coastguard Worker
5659*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h
5660*8b26181fSAndroid Build Coastguard Worker
5661*8b26181fSAndroid Build Coastguard Worker	fi
5662*8b26181fSAndroid Build Coastguard Worker
5663*8b26181fSAndroid Build Coastguard Worker#
5664*8b26181fSAndroid Build Coastguard Worker# Try to arrange for large file support.
5665*8b26181fSAndroid Build Coastguard Worker#
5666*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-largefile was given.
5667*8b26181fSAndroid Build Coastguard Workerif test "${enable_largefile+set}" = set; then :
5668*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_largefile;
5669*8b26181fSAndroid Build Coastguard Workerfi
5670*8b26181fSAndroid Build Coastguard Worker
5671*8b26181fSAndroid Build Coastguard Workerif test "$enable_largefile" != no; then
5672*8b26181fSAndroid Build Coastguard Worker
5673*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5674*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5675*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_sys_largefile_CC+:} false; then :
5676*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5677*8b26181fSAndroid Build Coastguard Workerelse
5678*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_largefile_CC=no
5679*8b26181fSAndroid Build Coastguard Worker     if test "$GCC" != yes; then
5680*8b26181fSAndroid Build Coastguard Worker       ac_save_CC=$CC
5681*8b26181fSAndroid Build Coastguard Worker       while :; do
5682*8b26181fSAndroid Build Coastguard Worker	 # IRIX 6.2 and later do not support large files by default,
5683*8b26181fSAndroid Build Coastguard Worker	 # so use the C compiler's -n32 option if that helps.
5684*8b26181fSAndroid Build Coastguard Worker	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5685*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5686*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
5687*8b26181fSAndroid Build Coastguard Worker /* Check that off_t can represent 2**63 - 1 correctly.
5688*8b26181fSAndroid Build Coastguard Worker    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5689*8b26181fSAndroid Build Coastguard Worker    since some C++ compilers masquerading as C compilers
5690*8b26181fSAndroid Build Coastguard Worker    incorrectly reject 9223372036854775807.  */
5691*8b26181fSAndroid Build Coastguard Worker#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5692*8b26181fSAndroid Build Coastguard Worker  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5693*8b26181fSAndroid Build Coastguard Worker		       && LARGE_OFF_T % 2147483647 == 1)
5694*8b26181fSAndroid Build Coastguard Worker		      ? 1 : -1];
5695*8b26181fSAndroid Build Coastguard Workerint
5696*8b26181fSAndroid Build Coastguard Workermain ()
5697*8b26181fSAndroid Build Coastguard Worker{
5698*8b26181fSAndroid Build Coastguard Worker
5699*8b26181fSAndroid Build Coastguard Worker  ;
5700*8b26181fSAndroid Build Coastguard Worker  return 0;
5701*8b26181fSAndroid Build Coastguard Worker}
5702*8b26181fSAndroid Build Coastguard Worker_ACEOF
5703*8b26181fSAndroid Build Coastguard Worker	 if ac_fn_c_try_compile "$LINENO"; then :
5704*8b26181fSAndroid Build Coastguard Worker  break
5705*8b26181fSAndroid Build Coastguard Workerfi
5706*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext
5707*8b26181fSAndroid Build Coastguard Worker	 CC="$CC -n32"
5708*8b26181fSAndroid Build Coastguard Worker	 if ac_fn_c_try_compile "$LINENO"; then :
5709*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_largefile_CC=' -n32'; break
5710*8b26181fSAndroid Build Coastguard Workerfi
5711*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext
5712*8b26181fSAndroid Build Coastguard Worker	 break
5713*8b26181fSAndroid Build Coastguard Worker       done
5714*8b26181fSAndroid Build Coastguard Worker       CC=$ac_save_CC
5715*8b26181fSAndroid Build Coastguard Worker       rm -f conftest.$ac_ext
5716*8b26181fSAndroid Build Coastguard Worker    fi
5717*8b26181fSAndroid Build Coastguard Workerfi
5718*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5719*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5720*8b26181fSAndroid Build Coastguard Worker  if test "$ac_cv_sys_largefile_CC" != no; then
5721*8b26181fSAndroid Build Coastguard Worker    CC=$CC$ac_cv_sys_largefile_CC
5722*8b26181fSAndroid Build Coastguard Worker  fi
5723*8b26181fSAndroid Build Coastguard Worker
5724*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5725*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5726*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_sys_file_offset_bits+:} false; then :
5727*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5728*8b26181fSAndroid Build Coastguard Workerelse
5729*8b26181fSAndroid Build Coastguard Worker  while :; do
5730*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5731*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5732*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
5733*8b26181fSAndroid Build Coastguard Worker /* Check that off_t can represent 2**63 - 1 correctly.
5734*8b26181fSAndroid Build Coastguard Worker    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5735*8b26181fSAndroid Build Coastguard Worker    since some C++ compilers masquerading as C compilers
5736*8b26181fSAndroid Build Coastguard Worker    incorrectly reject 9223372036854775807.  */
5737*8b26181fSAndroid Build Coastguard Worker#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5738*8b26181fSAndroid Build Coastguard Worker  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5739*8b26181fSAndroid Build Coastguard Worker		       && LARGE_OFF_T % 2147483647 == 1)
5740*8b26181fSAndroid Build Coastguard Worker		      ? 1 : -1];
5741*8b26181fSAndroid Build Coastguard Workerint
5742*8b26181fSAndroid Build Coastguard Workermain ()
5743*8b26181fSAndroid Build Coastguard Worker{
5744*8b26181fSAndroid Build Coastguard Worker
5745*8b26181fSAndroid Build Coastguard Worker  ;
5746*8b26181fSAndroid Build Coastguard Worker  return 0;
5747*8b26181fSAndroid Build Coastguard Worker}
5748*8b26181fSAndroid Build Coastguard Worker_ACEOF
5749*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5750*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_file_offset_bits=no; break
5751*8b26181fSAndroid Build Coastguard Workerfi
5752*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5753*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5754*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5755*8b26181fSAndroid Build Coastguard Worker#define _FILE_OFFSET_BITS 64
5756*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
5757*8b26181fSAndroid Build Coastguard Worker /* Check that off_t can represent 2**63 - 1 correctly.
5758*8b26181fSAndroid Build Coastguard Worker    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5759*8b26181fSAndroid Build Coastguard Worker    since some C++ compilers masquerading as C compilers
5760*8b26181fSAndroid Build Coastguard Worker    incorrectly reject 9223372036854775807.  */
5761*8b26181fSAndroid Build Coastguard Worker#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5762*8b26181fSAndroid Build Coastguard Worker  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5763*8b26181fSAndroid Build Coastguard Worker		       && LARGE_OFF_T % 2147483647 == 1)
5764*8b26181fSAndroid Build Coastguard Worker		      ? 1 : -1];
5765*8b26181fSAndroid Build Coastguard Workerint
5766*8b26181fSAndroid Build Coastguard Workermain ()
5767*8b26181fSAndroid Build Coastguard Worker{
5768*8b26181fSAndroid Build Coastguard Worker
5769*8b26181fSAndroid Build Coastguard Worker  ;
5770*8b26181fSAndroid Build Coastguard Worker  return 0;
5771*8b26181fSAndroid Build Coastguard Worker}
5772*8b26181fSAndroid Build Coastguard Worker_ACEOF
5773*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5774*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_file_offset_bits=64; break
5775*8b26181fSAndroid Build Coastguard Workerfi
5776*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5777*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_file_offset_bits=unknown
5778*8b26181fSAndroid Build Coastguard Worker  break
5779*8b26181fSAndroid Build Coastguard Workerdone
5780*8b26181fSAndroid Build Coastguard Workerfi
5781*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5782*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5783*8b26181fSAndroid Build Coastguard Workercase $ac_cv_sys_file_offset_bits in #(
5784*8b26181fSAndroid Build Coastguard Worker  no | unknown) ;;
5785*8b26181fSAndroid Build Coastguard Worker  *)
5786*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
5787*8b26181fSAndroid Build Coastguard Worker#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5788*8b26181fSAndroid Build Coastguard Worker_ACEOF
5789*8b26181fSAndroid Build Coastguard Worker;;
5790*8b26181fSAndroid Build Coastguard Workeresac
5791*8b26181fSAndroid Build Coastguard Workerrm -rf conftest*
5792*8b26181fSAndroid Build Coastguard Worker  if test $ac_cv_sys_file_offset_bits = unknown; then
5793*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5794*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5795*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_sys_large_files+:} false; then :
5796*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5797*8b26181fSAndroid Build Coastguard Workerelse
5798*8b26181fSAndroid Build Coastguard Worker  while :; do
5799*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5801*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
5802*8b26181fSAndroid Build Coastguard Worker /* Check that off_t can represent 2**63 - 1 correctly.
5803*8b26181fSAndroid Build Coastguard Worker    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5804*8b26181fSAndroid Build Coastguard Worker    since some C++ compilers masquerading as C compilers
5805*8b26181fSAndroid Build Coastguard Worker    incorrectly reject 9223372036854775807.  */
5806*8b26181fSAndroid Build Coastguard Worker#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5807*8b26181fSAndroid Build Coastguard Worker  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5808*8b26181fSAndroid Build Coastguard Worker		       && LARGE_OFF_T % 2147483647 == 1)
5809*8b26181fSAndroid Build Coastguard Worker		      ? 1 : -1];
5810*8b26181fSAndroid Build Coastguard Workerint
5811*8b26181fSAndroid Build Coastguard Workermain ()
5812*8b26181fSAndroid Build Coastguard Worker{
5813*8b26181fSAndroid Build Coastguard Worker
5814*8b26181fSAndroid Build Coastguard Worker  ;
5815*8b26181fSAndroid Build Coastguard Worker  return 0;
5816*8b26181fSAndroid Build Coastguard Worker}
5817*8b26181fSAndroid Build Coastguard Worker_ACEOF
5818*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5819*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_large_files=no; break
5820*8b26181fSAndroid Build Coastguard Workerfi
5821*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5823*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5824*8b26181fSAndroid Build Coastguard Worker#define _LARGE_FILES 1
5825*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
5826*8b26181fSAndroid Build Coastguard Worker /* Check that off_t can represent 2**63 - 1 correctly.
5827*8b26181fSAndroid Build Coastguard Worker    We can't simply define LARGE_OFF_T to be 9223372036854775807,
5828*8b26181fSAndroid Build Coastguard Worker    since some C++ compilers masquerading as C compilers
5829*8b26181fSAndroid Build Coastguard Worker    incorrectly reject 9223372036854775807.  */
5830*8b26181fSAndroid Build Coastguard Worker#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5831*8b26181fSAndroid Build Coastguard Worker  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5832*8b26181fSAndroid Build Coastguard Worker		       && LARGE_OFF_T % 2147483647 == 1)
5833*8b26181fSAndroid Build Coastguard Worker		      ? 1 : -1];
5834*8b26181fSAndroid Build Coastguard Workerint
5835*8b26181fSAndroid Build Coastguard Workermain ()
5836*8b26181fSAndroid Build Coastguard Worker{
5837*8b26181fSAndroid Build Coastguard Worker
5838*8b26181fSAndroid Build Coastguard Worker  ;
5839*8b26181fSAndroid Build Coastguard Worker  return 0;
5840*8b26181fSAndroid Build Coastguard Worker}
5841*8b26181fSAndroid Build Coastguard Worker_ACEOF
5842*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
5843*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_large_files=1; break
5844*8b26181fSAndroid Build Coastguard Workerfi
5845*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5846*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_large_files=unknown
5847*8b26181fSAndroid Build Coastguard Worker  break
5848*8b26181fSAndroid Build Coastguard Workerdone
5849*8b26181fSAndroid Build Coastguard Workerfi
5850*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5851*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_sys_large_files" >&6; }
5852*8b26181fSAndroid Build Coastguard Workercase $ac_cv_sys_large_files in #(
5853*8b26181fSAndroid Build Coastguard Worker  no | unknown) ;;
5854*8b26181fSAndroid Build Coastguard Worker  *)
5855*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
5856*8b26181fSAndroid Build Coastguard Worker#define _LARGE_FILES $ac_cv_sys_large_files
5857*8b26181fSAndroid Build Coastguard Worker_ACEOF
5858*8b26181fSAndroid Build Coastguard Worker;;
5859*8b26181fSAndroid Build Coastguard Workeresac
5860*8b26181fSAndroid Build Coastguard Workerrm -rf conftest*
5861*8b26181fSAndroid Build Coastguard Worker  fi
5862*8b26181fSAndroid Build Coastguard Worker
5863*8b26181fSAndroid Build Coastguard Worker
5864*8b26181fSAndroid Build Coastguard Workerfi
5865*8b26181fSAndroid Build Coastguard Worker
5866*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
5867*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
5868*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_sys_largefile_source+:} false; then :
5869*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5870*8b26181fSAndroid Build Coastguard Workerelse
5871*8b26181fSAndroid Build Coastguard Worker  while :; do
5872*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5873*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5874*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h> /* for off_t */
5875*8b26181fSAndroid Build Coastguard Worker     #include <stdio.h>
5876*8b26181fSAndroid Build Coastguard Workerint
5877*8b26181fSAndroid Build Coastguard Workermain ()
5878*8b26181fSAndroid Build Coastguard Worker{
5879*8b26181fSAndroid Build Coastguard Workerint (*fp) (FILE *, off_t, int) = fseeko;
5880*8b26181fSAndroid Build Coastguard Worker     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5881*8b26181fSAndroid Build Coastguard Worker  ;
5882*8b26181fSAndroid Build Coastguard Worker  return 0;
5883*8b26181fSAndroid Build Coastguard Worker}
5884*8b26181fSAndroid Build Coastguard Worker_ACEOF
5885*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
5886*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_largefile_source=no; break
5887*8b26181fSAndroid Build Coastguard Workerfi
5888*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
5889*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
5890*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5891*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5892*8b26181fSAndroid Build Coastguard Worker#define _LARGEFILE_SOURCE 1
5893*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h> /* for off_t */
5894*8b26181fSAndroid Build Coastguard Worker     #include <stdio.h>
5895*8b26181fSAndroid Build Coastguard Workerint
5896*8b26181fSAndroid Build Coastguard Workermain ()
5897*8b26181fSAndroid Build Coastguard Worker{
5898*8b26181fSAndroid Build Coastguard Workerint (*fp) (FILE *, off_t, int) = fseeko;
5899*8b26181fSAndroid Build Coastguard Worker     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
5900*8b26181fSAndroid Build Coastguard Worker  ;
5901*8b26181fSAndroid Build Coastguard Worker  return 0;
5902*8b26181fSAndroid Build Coastguard Worker}
5903*8b26181fSAndroid Build Coastguard Worker_ACEOF
5904*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
5905*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_largefile_source=1; break
5906*8b26181fSAndroid Build Coastguard Workerfi
5907*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
5908*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
5909*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_largefile_source=unknown
5910*8b26181fSAndroid Build Coastguard Worker  break
5911*8b26181fSAndroid Build Coastguard Workerdone
5912*8b26181fSAndroid Build Coastguard Workerfi
5913*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
5914*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_sys_largefile_source" >&6; }
5915*8b26181fSAndroid Build Coastguard Workercase $ac_cv_sys_largefile_source in #(
5916*8b26181fSAndroid Build Coastguard Worker  no | unknown) ;;
5917*8b26181fSAndroid Build Coastguard Worker  *)
5918*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
5919*8b26181fSAndroid Build Coastguard Worker#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
5920*8b26181fSAndroid Build Coastguard Worker_ACEOF
5921*8b26181fSAndroid Build Coastguard Worker;;
5922*8b26181fSAndroid Build Coastguard Workeresac
5923*8b26181fSAndroid Build Coastguard Workerrm -rf conftest*
5924*8b26181fSAndroid Build Coastguard Worker
5925*8b26181fSAndroid Build Coastguard Worker# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
5926*8b26181fSAndroid Build Coastguard Worker# in glibc 2.1.3, but that breaks too many other things.
5927*8b26181fSAndroid Build Coastguard Worker# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
5928*8b26181fSAndroid Build Coastguard Workerif test $ac_cv_sys_largefile_source != unknown; then
5929*8b26181fSAndroid Build Coastguard Worker
5930*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
5931*8b26181fSAndroid Build Coastguard Worker
5932*8b26181fSAndroid Build Coastguard Workerfi
5933*8b26181fSAndroid Build Coastguard Worker
5934*8b26181fSAndroid Build Coastguard Worker
5935*8b26181fSAndroid Build Coastguard Workerfor ac_header in sys/ioccom.h sys/sockio.h
5936*8b26181fSAndroid Build Coastguard Workerdo :
5937*8b26181fSAndroid Build Coastguard Worker  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5938*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5939*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5940*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
5941*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5942*8b26181fSAndroid Build Coastguard Worker_ACEOF
5943*8b26181fSAndroid Build Coastguard Worker
5944*8b26181fSAndroid Build Coastguard Workerfi
5945*8b26181fSAndroid Build Coastguard Worker
5946*8b26181fSAndroid Build Coastguard Workerdone
5947*8b26181fSAndroid Build Coastguard Worker
5948*8b26181fSAndroid Build Coastguard Workerfor ac_header in netpacket/packet.h
5949*8b26181fSAndroid Build Coastguard Workerdo :
5950*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
5951*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
5952*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
5953*8b26181fSAndroid Build Coastguard Worker#define HAVE_NETPACKET_PACKET_H 1
5954*8b26181fSAndroid Build Coastguard Worker_ACEOF
5955*8b26181fSAndroid Build Coastguard Worker
5956*8b26181fSAndroid Build Coastguard Workerfi
5957*8b26181fSAndroid Build Coastguard Worker
5958*8b26181fSAndroid Build Coastguard Workerdone
5959*8b26181fSAndroid Build Coastguard Worker
5960*8b26181fSAndroid Build Coastguard Worker
5961*8b26181fSAndroid Build Coastguard Worker
5962*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
5963*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
5964*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
5965*8b26181fSAndroid Build Coastguard Worker
5966*8b26181fSAndroid Build Coastguard Workercase "$host_os" in
5967*8b26181fSAndroid Build Coastguard Workerhaiku*)
5968*8b26181fSAndroid Build Coastguard Worker	#
5969*8b26181fSAndroid Build Coastguard Worker	# Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
5970*8b26181fSAndroid Build Coastguard Worker	#
5971*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -D_BSD_SOURCE"
5972*8b26181fSAndroid Build Coastguard Worker	#
5973*8b26181fSAndroid Build Coastguard Worker	# Haiku has getpass in libbsd.
5974*8b26181fSAndroid Build Coastguard Worker	#
5975*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpass in -lbsd" >&5
5976*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for getpass in -lbsd... " >&6; }
5977*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_bsd_getpass+:} false; then :
5978*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
5979*8b26181fSAndroid Build Coastguard Workerelse
5980*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
5981*8b26181fSAndroid Build Coastguard WorkerLIBS="-lbsd  $LIBS"
5982*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
5983*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
5984*8b26181fSAndroid Build Coastguard Worker
5985*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
5986*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
5987*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
5988*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
5989*8b26181fSAndroid Build Coastguard Workerextern "C"
5990*8b26181fSAndroid Build Coastguard Worker#endif
5991*8b26181fSAndroid Build Coastguard Workerchar getpass ();
5992*8b26181fSAndroid Build Coastguard Workerint
5993*8b26181fSAndroid Build Coastguard Workermain ()
5994*8b26181fSAndroid Build Coastguard Worker{
5995*8b26181fSAndroid Build Coastguard Workerreturn getpass ();
5996*8b26181fSAndroid Build Coastguard Worker  ;
5997*8b26181fSAndroid Build Coastguard Worker  return 0;
5998*8b26181fSAndroid Build Coastguard Worker}
5999*8b26181fSAndroid Build Coastguard Worker_ACEOF
6000*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6001*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_bsd_getpass=yes
6002*8b26181fSAndroid Build Coastguard Workerelse
6003*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_bsd_getpass=no
6004*8b26181fSAndroid Build Coastguard Workerfi
6005*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6006*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6007*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
6008*8b26181fSAndroid Build Coastguard Workerfi
6009*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getpass" >&5
6010*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_bsd_getpass" >&6; }
6011*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_bsd_getpass" = xyes; then :
6012*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6013*8b26181fSAndroid Build Coastguard Worker#define HAVE_LIBBSD 1
6014*8b26181fSAndroid Build Coastguard Worker_ACEOF
6015*8b26181fSAndroid Build Coastguard Worker
6016*8b26181fSAndroid Build Coastguard Worker  LIBS="-lbsd $LIBS"
6017*8b26181fSAndroid Build Coastguard Worker
6018*8b26181fSAndroid Build Coastguard Workerfi
6019*8b26181fSAndroid Build Coastguard Worker
6020*8b26181fSAndroid Build Coastguard Worker	;;
6021*8b26181fSAndroid Build Coastguard Workeresac
6022*8b26181fSAndroid Build Coastguard Worker
6023*8b26181fSAndroid Build Coastguard Workerif test "$GCC" = yes ; then
6024*8b26181fSAndroid Build Coastguard Worker	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
6025*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for ANSI ioctl definitions... " >&6; }
6026*8b26181fSAndroid Build Coastguard Worker	    if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
6027*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
6028*8b26181fSAndroid Build Coastguard Workerelse
6029*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6030*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6031*8b26181fSAndroid Build Coastguard Worker/*
6032*8b26181fSAndroid Build Coastguard Worker		     * This generates a "duplicate case value" when fixincludes
6033*8b26181fSAndroid Build Coastguard Worker		     * has not be run.
6034*8b26181fSAndroid Build Coastguard Worker		     */
6035*8b26181fSAndroid Build Coastguard Worker#		include <sys/types.h>
6036*8b26181fSAndroid Build Coastguard Worker#		include <sys/time.h>
6037*8b26181fSAndroid Build Coastguard Worker#		include <sys/ioctl.h>
6038*8b26181fSAndroid Build Coastguard Worker#		ifdef HAVE_SYS_IOCCOM_H
6039*8b26181fSAndroid Build Coastguard Worker#		include <sys/ioccom.h>
6040*8b26181fSAndroid Build Coastguard Worker#		endif
6041*8b26181fSAndroid Build Coastguard Workerint
6042*8b26181fSAndroid Build Coastguard Workermain ()
6043*8b26181fSAndroid Build Coastguard Worker{
6044*8b26181fSAndroid Build Coastguard Workerswitch (0) {
6045*8b26181fSAndroid Build Coastguard Worker		    case _IO('A', 1):;
6046*8b26181fSAndroid Build Coastguard Worker		    case _IO('B', 1):;
6047*8b26181fSAndroid Build Coastguard Worker		    }
6048*8b26181fSAndroid Build Coastguard Worker  ;
6049*8b26181fSAndroid Build Coastguard Worker  return 0;
6050*8b26181fSAndroid Build Coastguard Worker}
6051*8b26181fSAndroid Build Coastguard Worker_ACEOF
6052*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
6053*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_gcc_fixincludes=yes
6054*8b26181fSAndroid Build Coastguard Workerelse
6055*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_gcc_fixincludes=no
6056*8b26181fSAndroid Build Coastguard Workerfi
6057*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6058*8b26181fSAndroid Build Coastguard Workerfi
6059*8b26181fSAndroid Build Coastguard Worker
6060*8b26181fSAndroid Build Coastguard Worker	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
6061*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
6062*8b26181fSAndroid Build Coastguard Worker	    if test $ac_cv_lbl_gcc_fixincludes = no ; then
6063*8b26181fSAndroid Build Coastguard Worker		    # Don't cache failure
6064*8b26181fSAndroid Build Coastguard Worker		    unset ac_cv_lbl_gcc_fixincludes
6065*8b26181fSAndroid Build Coastguard Worker		    as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
6066*8b26181fSAndroid Build Coastguard Worker	    fi
6067*8b26181fSAndroid Build Coastguard Worker    fi
6068*8b26181fSAndroid Build Coastguard Worker
6069*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
6070*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
6071*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
6072*8b26181fSAndroid Build Coastguard Worker
6073*8b26181fSAndroid Build Coastguard Worker
6074*8b26181fSAndroid Build Coastguard Workerfor ac_func in strerror
6075*8b26181fSAndroid Build Coastguard Workerdo :
6076*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror"
6077*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_strerror" = xyes; then :
6078*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6079*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRERROR 1
6080*8b26181fSAndroid Build Coastguard Worker_ACEOF
6081*8b26181fSAndroid Build Coastguard Worker
6082*8b26181fSAndroid Build Coastguard Workerfi
6083*8b26181fSAndroid Build Coastguard Workerdone
6084*8b26181fSAndroid Build Coastguard Worker
6085*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
6086*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_strerror_r" = xyes; then :
6087*8b26181fSAndroid Build Coastguard Worker
6088*8b26181fSAndroid Build Coastguard Worker	#
6089*8b26181fSAndroid Build Coastguard Worker	# We have strerror_r; if we define _GNU_SOURCE, is it a
6090*8b26181fSAndroid Build Coastguard Worker	# POSIX-compliant strerror_r() or a GNU strerror_r()?
6091*8b26181fSAndroid Build Coastguard Worker	#
6092*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5
6093*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether strerror_r is GNU-style... " >&6; }
6094*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6095*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6096*8b26181fSAndroid Build Coastguard Worker
6097*8b26181fSAndroid Build Coastguard Worker		#define _GNU_SOURCE
6098*8b26181fSAndroid Build Coastguard Worker#include <string.h>
6099*8b26181fSAndroid Build Coastguard Worker
6100*8b26181fSAndroid Build Coastguard Worker/* Define it GNU-style; that will cause an error if it's not GNU-style */
6101*8b26181fSAndroid Build Coastguard Workerextern char *strerror_r(int, char *, size_t);
6102*8b26181fSAndroid Build Coastguard Worker
6103*8b26181fSAndroid Build Coastguard Workerint
6104*8b26181fSAndroid Build Coastguard Workermain(void)
6105*8b26181fSAndroid Build Coastguard Worker{
6106*8b26181fSAndroid Build Coastguard Worker	return 0;
6107*8b26181fSAndroid Build Coastguard Worker}
6108*8b26181fSAndroid Build Coastguard Worker
6109*8b26181fSAndroid Build Coastguard Worker
6110*8b26181fSAndroid Build Coastguard Worker_ACEOF
6111*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
6112*8b26181fSAndroid Build Coastguard Worker
6113*8b26181fSAndroid Build Coastguard Worker		# GNU-style
6114*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6115*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
6116*8b26181fSAndroid Build Coastguard Worker
6117*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h
6118*8b26181fSAndroid Build Coastguard Worker
6119*8b26181fSAndroid Build Coastguard Worker
6120*8b26181fSAndroid Build Coastguard Workerelse
6121*8b26181fSAndroid Build Coastguard Worker
6122*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
6124*8b26181fSAndroid Build Coastguard Worker
6125*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h
6126*8b26181fSAndroid Build Coastguard Worker
6127*8b26181fSAndroid Build Coastguard Worker
6128*8b26181fSAndroid Build Coastguard Workerfi
6129*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6130*8b26181fSAndroid Build Coastguard Worker
6131*8b26181fSAndroid Build Coastguard Workerelse
6132*8b26181fSAndroid Build Coastguard Worker
6133*8b26181fSAndroid Build Coastguard Worker	#
6134*8b26181fSAndroid Build Coastguard Worker	# We don't have strerror_r; do we have _wcserror_s?
6135*8b26181fSAndroid Build Coastguard Worker	#
6136*8b26181fSAndroid Build Coastguard Worker	for ac_func in _wcserror_s
6137*8b26181fSAndroid Build Coastguard Workerdo :
6138*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s"
6139*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func__wcserror_s" = xyes; then :
6140*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6141*8b26181fSAndroid Build Coastguard Worker#define HAVE__WCSERROR_S 1
6142*8b26181fSAndroid Build Coastguard Worker_ACEOF
6143*8b26181fSAndroid Build Coastguard Worker
6144*8b26181fSAndroid Build Coastguard Workerfi
6145*8b26181fSAndroid Build Coastguard Workerdone
6146*8b26181fSAndroid Build Coastguard Worker
6147*8b26181fSAndroid Build Coastguard Worker
6148*8b26181fSAndroid Build Coastguard Workerfi
6149*8b26181fSAndroid Build Coastguard Worker
6150*8b26181fSAndroid Build Coastguard Worker
6151*8b26181fSAndroid Build Coastguard Worker#
6152*8b26181fSAndroid Build Coastguard Worker# Thanks, IBM, for not providing vsyslog() in AIX!
6153*8b26181fSAndroid Build Coastguard Worker#
6154*8b26181fSAndroid Build Coastguard Workerfor ac_func in vsyslog
6155*8b26181fSAndroid Build Coastguard Workerdo :
6156*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog"
6157*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_vsyslog" = xyes; then :
6158*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6159*8b26181fSAndroid Build Coastguard Worker#define HAVE_VSYSLOG 1
6160*8b26181fSAndroid Build Coastguard Worker_ACEOF
6161*8b26181fSAndroid Build Coastguard Worker
6162*8b26181fSAndroid Build Coastguard Workerfi
6163*8b26181fSAndroid Build Coastguard Workerdone
6164*8b26181fSAndroid Build Coastguard Worker
6165*8b26181fSAndroid Build Coastguard Worker
6166*8b26181fSAndroid Build Coastguard Worker#
6167*8b26181fSAndroid Build Coastguard Worker# Make sure we have vsnprintf() and snprintf(); we require them.
6168*8b26181fSAndroid Build Coastguard Worker#
6169*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
6170*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_vsnprintf" = xyes; then :
6171*8b26181fSAndroid Build Coastguard Worker
6172*8b26181fSAndroid Build Coastguard Workerelse
6173*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
6174*8b26181fSAndroid Build Coastguard Workerfi
6175*8b26181fSAndroid Build Coastguard Worker
6176*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
6177*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_snprintf" = xyes; then :
6178*8b26181fSAndroid Build Coastguard Worker
6179*8b26181fSAndroid Build Coastguard Workerelse
6180*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
6181*8b26181fSAndroid Build Coastguard Workerfi
6182*8b26181fSAndroid Build Coastguard Worker
6183*8b26181fSAndroid Build Coastguard Worker
6184*8b26181fSAndroid Build Coastguard Workerneedasprintf=no
6185*8b26181fSAndroid Build Coastguard Workerfor ac_func in vasprintf asprintf
6186*8b26181fSAndroid Build Coastguard Workerdo :
6187*8b26181fSAndroid Build Coastguard Worker  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6188*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6189*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6190*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6191*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6192*8b26181fSAndroid Build Coastguard Worker_ACEOF
6193*8b26181fSAndroid Build Coastguard Worker
6194*8b26181fSAndroid Build Coastguard Workerelse
6195*8b26181fSAndroid Build Coastguard Worker  needasprintf=yes
6196*8b26181fSAndroid Build Coastguard Workerfi
6197*8b26181fSAndroid Build Coastguard Workerdone
6198*8b26181fSAndroid Build Coastguard Worker
6199*8b26181fSAndroid Build Coastguard Workerif test $needasprintf = yes; then
6200*8b26181fSAndroid Build Coastguard Worker	case " $LIBOBJS " in
6201*8b26181fSAndroid Build Coastguard Worker  *" asprintf.$ac_objext "* ) ;;
6202*8b26181fSAndroid Build Coastguard Worker  *) LIBOBJS="$LIBOBJS asprintf.$ac_objext"
6203*8b26181fSAndroid Build Coastguard Worker ;;
6204*8b26181fSAndroid Build Coastguard Workeresac
6205*8b26181fSAndroid Build Coastguard Worker
6206*8b26181fSAndroid Build Coastguard Workerfi
6207*8b26181fSAndroid Build Coastguard Worker
6208*8b26181fSAndroid Build Coastguard Workerneedstrlcat=no
6209*8b26181fSAndroid Build Coastguard Workerfor ac_func in strlcat
6210*8b26181fSAndroid Build Coastguard Workerdo :
6211*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
6212*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_strlcat" = xyes; then :
6213*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6214*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRLCAT 1
6215*8b26181fSAndroid Build Coastguard Worker_ACEOF
6216*8b26181fSAndroid Build Coastguard Worker
6217*8b26181fSAndroid Build Coastguard Workerelse
6218*8b26181fSAndroid Build Coastguard Worker  needstrlcat=yes
6219*8b26181fSAndroid Build Coastguard Workerfi
6220*8b26181fSAndroid Build Coastguard Workerdone
6221*8b26181fSAndroid Build Coastguard Worker
6222*8b26181fSAndroid Build Coastguard Workerif test $needstrlcat = yes; then
6223*8b26181fSAndroid Build Coastguard Worker	case " $LIBOBJS " in
6224*8b26181fSAndroid Build Coastguard Worker  *" strlcat.$ac_objext "* ) ;;
6225*8b26181fSAndroid Build Coastguard Worker  *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
6226*8b26181fSAndroid Build Coastguard Worker ;;
6227*8b26181fSAndroid Build Coastguard Workeresac
6228*8b26181fSAndroid Build Coastguard Worker
6229*8b26181fSAndroid Build Coastguard Workerfi
6230*8b26181fSAndroid Build Coastguard Worker
6231*8b26181fSAndroid Build Coastguard Workerneedstrlcpy=no
6232*8b26181fSAndroid Build Coastguard Workerfor ac_func in strlcpy
6233*8b26181fSAndroid Build Coastguard Workerdo :
6234*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
6235*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_strlcpy" = xyes; then :
6236*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6237*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRLCPY 1
6238*8b26181fSAndroid Build Coastguard Worker_ACEOF
6239*8b26181fSAndroid Build Coastguard Worker
6240*8b26181fSAndroid Build Coastguard Workerelse
6241*8b26181fSAndroid Build Coastguard Worker  needstrlcpy=yes
6242*8b26181fSAndroid Build Coastguard Workerfi
6243*8b26181fSAndroid Build Coastguard Workerdone
6244*8b26181fSAndroid Build Coastguard Worker
6245*8b26181fSAndroid Build Coastguard Workerif test $needstrlcpy = yes; then
6246*8b26181fSAndroid Build Coastguard Worker	case " $LIBOBJS " in
6247*8b26181fSAndroid Build Coastguard Worker  *" strlcpy.$ac_objext "* ) ;;
6248*8b26181fSAndroid Build Coastguard Worker  *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
6249*8b26181fSAndroid Build Coastguard Worker ;;
6250*8b26181fSAndroid Build Coastguard Workeresac
6251*8b26181fSAndroid Build Coastguard Worker
6252*8b26181fSAndroid Build Coastguard Workerfi
6253*8b26181fSAndroid Build Coastguard Worker
6254*8b26181fSAndroid Build Coastguard Workerneedstrtok_r=no
6255*8b26181fSAndroid Build Coastguard Workerfor ac_func in strtok_r
6256*8b26181fSAndroid Build Coastguard Workerdo :
6257*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
6258*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_strtok_r" = xyes; then :
6259*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6260*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRTOK_R 1
6261*8b26181fSAndroid Build Coastguard Worker_ACEOF
6262*8b26181fSAndroid Build Coastguard Worker
6263*8b26181fSAndroid Build Coastguard Workerelse
6264*8b26181fSAndroid Build Coastguard Worker  needstrtok_r=yes
6265*8b26181fSAndroid Build Coastguard Workerfi
6266*8b26181fSAndroid Build Coastguard Workerdone
6267*8b26181fSAndroid Build Coastguard Worker
6268*8b26181fSAndroid Build Coastguard Workerif test $needstrtok_r = yes; then
6269*8b26181fSAndroid Build Coastguard Worker	case " $LIBOBJS " in
6270*8b26181fSAndroid Build Coastguard Worker  *" strtok_r.$ac_objext "* ) ;;
6271*8b26181fSAndroid Build Coastguard Worker  *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
6272*8b26181fSAndroid Build Coastguard Worker ;;
6273*8b26181fSAndroid Build Coastguard Workeresac
6274*8b26181fSAndroid Build Coastguard Worker
6275*8b26181fSAndroid Build Coastguard Workerfi
6276*8b26181fSAndroid Build Coastguard Worker
6277*8b26181fSAndroid Build Coastguard Worker#
6278*8b26181fSAndroid Build Coastguard Worker# Do we have ffs(), and is it declared in <strings.h>?
6279*8b26181fSAndroid Build Coastguard Worker#
6280*8b26181fSAndroid Build Coastguard Workerfor ac_func in ffs
6281*8b26181fSAndroid Build Coastguard Workerdo :
6282*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
6283*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_ffs" = xyes; then :
6284*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6285*8b26181fSAndroid Build Coastguard Worker#define HAVE_FFS 1
6286*8b26181fSAndroid Build Coastguard Worker_ACEOF
6287*8b26181fSAndroid Build Coastguard Worker
6288*8b26181fSAndroid Build Coastguard Workerfi
6289*8b26181fSAndroid Build Coastguard Workerdone
6290*8b26181fSAndroid Build Coastguard Worker
6291*8b26181fSAndroid Build Coastguard Workerif test "$ac_cv_func_ffs" = yes; then
6292*8b26181fSAndroid Build Coastguard Worker	#
6293*8b26181fSAndroid Build Coastguard Worker	# We have ffs(); is it declared in <strings.h>?
6294*8b26181fSAndroid Build Coastguard Worker	#
6295*8b26181fSAndroid Build Coastguard Worker	# This test fails if we don't have <strings.h> or if we do
6296*8b26181fSAndroid Build Coastguard Worker	# but it doesn't declare ffs().
6297*8b26181fSAndroid Build Coastguard Worker	#
6298*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
6299*8b26181fSAndroid Build Coastguard Worker#include <strings.h>
6300*8b26181fSAndroid Build Coastguard Worker
6301*8b26181fSAndroid Build Coastguard Worker"
6302*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_ffs" = xyes; then :
6303*8b26181fSAndroid Build Coastguard Worker
6304*8b26181fSAndroid Build Coastguard Worker
6305*8b26181fSAndroid Build Coastguard Worker$as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
6306*8b26181fSAndroid Build Coastguard Worker
6307*8b26181fSAndroid Build Coastguard Worker
6308*8b26181fSAndroid Build Coastguard Workerfi
6309*8b26181fSAndroid Build Coastguard Worker
6310*8b26181fSAndroid Build Coastguard Workerfi
6311*8b26181fSAndroid Build Coastguard Worker
6312*8b26181fSAndroid Build Coastguard Worker#
6313*8b26181fSAndroid Build Coastguard Worker# Do this before checking for ether_hostton(), as it's a
6314*8b26181fSAndroid Build Coastguard Worker# "getaddrinfo()-ish function".
6315*8b26181fSAndroid Build Coastguard Worker#
6316*8b26181fSAndroid Build Coastguard Worker
6317*8b26181fSAndroid Build Coastguard Worker    #
6318*8b26181fSAndroid Build Coastguard Worker    # Most operating systems have getaddrinfo() in the default searched
6319*8b26181fSAndroid Build Coastguard Worker    # libraries (i.e. libc).  Check there first.
6320*8b26181fSAndroid Build Coastguard Worker    #
6321*8b26181fSAndroid Build Coastguard Worker    ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
6322*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_getaddrinfo" = xyes; then :
6323*8b26181fSAndroid Build Coastguard Worker
6324*8b26181fSAndroid Build Coastguard Workerelse
6325*8b26181fSAndroid Build Coastguard Worker
6326*8b26181fSAndroid Build Coastguard Worker	#
6327*8b26181fSAndroid Build Coastguard Worker	# Not found in the standard system libraries.
6328*8b26181fSAndroid Build Coastguard Worker	# Try libsocket, which requires libnsl.
6329*8b26181fSAndroid Build Coastguard Worker	#
6330*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
6331*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
6332*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_socket_getaddrinfo+:} false; then :
6333*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
6334*8b26181fSAndroid Build Coastguard Workerelse
6335*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
6336*8b26181fSAndroid Build Coastguard WorkerLIBS="-lsocket -lnsl $LIBS"
6337*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
6338*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6339*8b26181fSAndroid Build Coastguard Worker
6340*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
6341*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
6342*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
6343*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
6344*8b26181fSAndroid Build Coastguard Workerextern "C"
6345*8b26181fSAndroid Build Coastguard Worker#endif
6346*8b26181fSAndroid Build Coastguard Workerchar getaddrinfo ();
6347*8b26181fSAndroid Build Coastguard Workerint
6348*8b26181fSAndroid Build Coastguard Workermain ()
6349*8b26181fSAndroid Build Coastguard Worker{
6350*8b26181fSAndroid Build Coastguard Workerreturn getaddrinfo ();
6351*8b26181fSAndroid Build Coastguard Worker  ;
6352*8b26181fSAndroid Build Coastguard Worker  return 0;
6353*8b26181fSAndroid Build Coastguard Worker}
6354*8b26181fSAndroid Build Coastguard Worker_ACEOF
6355*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6356*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_socket_getaddrinfo=yes
6357*8b26181fSAndroid Build Coastguard Workerelse
6358*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_socket_getaddrinfo=no
6359*8b26181fSAndroid Build Coastguard Workerfi
6360*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6361*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6362*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
6363*8b26181fSAndroid Build Coastguard Workerfi
6364*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
6365*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
6366*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
6367*8b26181fSAndroid Build Coastguard Worker
6368*8b26181fSAndroid Build Coastguard Worker	    #
6369*8b26181fSAndroid Build Coastguard Worker	    # OK, we found it in libsocket.
6370*8b26181fSAndroid Build Coastguard Worker	    #
6371*8b26181fSAndroid Build Coastguard Worker	    LIBS="-lsocket -lnsl $LIBS"
6372*8b26181fSAndroid Build Coastguard Worker
6373*8b26181fSAndroid Build Coastguard Workerelse
6374*8b26181fSAndroid Build Coastguard Worker
6375*8b26181fSAndroid Build Coastguard Worker	    #
6376*8b26181fSAndroid Build Coastguard Worker	    # Not found in libsocket; test for it in libnetwork, which
6377*8b26181fSAndroid Build Coastguard Worker	    # is where it is in Haiku.
6378*8b26181fSAndroid Build Coastguard Worker	    #
6379*8b26181fSAndroid Build Coastguard Worker	    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5
6380*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for getaddrinfo in -lnetwork... " >&6; }
6381*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_network_getaddrinfo+:} false; then :
6382*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
6383*8b26181fSAndroid Build Coastguard Workerelse
6384*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
6385*8b26181fSAndroid Build Coastguard WorkerLIBS="-lnetwork  $LIBS"
6386*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
6387*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6388*8b26181fSAndroid Build Coastguard Worker
6389*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
6390*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
6391*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
6392*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
6393*8b26181fSAndroid Build Coastguard Workerextern "C"
6394*8b26181fSAndroid Build Coastguard Worker#endif
6395*8b26181fSAndroid Build Coastguard Workerchar getaddrinfo ();
6396*8b26181fSAndroid Build Coastguard Workerint
6397*8b26181fSAndroid Build Coastguard Workermain ()
6398*8b26181fSAndroid Build Coastguard Worker{
6399*8b26181fSAndroid Build Coastguard Workerreturn getaddrinfo ();
6400*8b26181fSAndroid Build Coastguard Worker  ;
6401*8b26181fSAndroid Build Coastguard Worker  return 0;
6402*8b26181fSAndroid Build Coastguard Worker}
6403*8b26181fSAndroid Build Coastguard Worker_ACEOF
6404*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6405*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_network_getaddrinfo=yes
6406*8b26181fSAndroid Build Coastguard Workerelse
6407*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_network_getaddrinfo=no
6408*8b26181fSAndroid Build Coastguard Workerfi
6409*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6410*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6411*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
6412*8b26181fSAndroid Build Coastguard Workerfi
6413*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5
6414*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_network_getaddrinfo" >&6; }
6415*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_network_getaddrinfo" = xyes; then :
6416*8b26181fSAndroid Build Coastguard Worker
6417*8b26181fSAndroid Build Coastguard Worker		#
6418*8b26181fSAndroid Build Coastguard Worker		# OK, we found it in libnetwork.
6419*8b26181fSAndroid Build Coastguard Worker		#
6420*8b26181fSAndroid Build Coastguard Worker		LIBS="-lnetwork $LIBS"
6421*8b26181fSAndroid Build Coastguard Worker
6422*8b26181fSAndroid Build Coastguard Workerelse
6423*8b26181fSAndroid Build Coastguard Worker
6424*8b26181fSAndroid Build Coastguard Worker		#
6425*8b26181fSAndroid Build Coastguard Worker		# We didn't find it.
6426*8b26181fSAndroid Build Coastguard Worker		#
6427*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
6428*8b26181fSAndroid Build Coastguard Worker
6429*8b26181fSAndroid Build Coastguard Workerfi
6430*8b26181fSAndroid Build Coastguard Worker
6431*8b26181fSAndroid Build Coastguard Worker
6432*8b26181fSAndroid Build Coastguard Workerfi
6433*8b26181fSAndroid Build Coastguard Worker
6434*8b26181fSAndroid Build Coastguard Worker
6435*8b26181fSAndroid Build Coastguard Worker	#
6436*8b26181fSAndroid Build Coastguard Worker	# OK, do we have recvmsg() in libxnet?
6437*8b26181fSAndroid Build Coastguard Worker	# We also link with libsocket and libnsl.
6438*8b26181fSAndroid Build Coastguard Worker	#
6439*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
6440*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for recvmsg in -lxnet... " >&6; }
6441*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_xnet_recvmsg+:} false; then :
6442*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
6443*8b26181fSAndroid Build Coastguard Workerelse
6444*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
6445*8b26181fSAndroid Build Coastguard WorkerLIBS="-lxnet -lsocket -lnsl $LIBS"
6446*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
6447*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6448*8b26181fSAndroid Build Coastguard Worker
6449*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
6450*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
6451*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
6452*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
6453*8b26181fSAndroid Build Coastguard Workerextern "C"
6454*8b26181fSAndroid Build Coastguard Worker#endif
6455*8b26181fSAndroid Build Coastguard Workerchar recvmsg ();
6456*8b26181fSAndroid Build Coastguard Workerint
6457*8b26181fSAndroid Build Coastguard Workermain ()
6458*8b26181fSAndroid Build Coastguard Worker{
6459*8b26181fSAndroid Build Coastguard Workerreturn recvmsg ();
6460*8b26181fSAndroid Build Coastguard Worker  ;
6461*8b26181fSAndroid Build Coastguard Worker  return 0;
6462*8b26181fSAndroid Build Coastguard Worker}
6463*8b26181fSAndroid Build Coastguard Worker_ACEOF
6464*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6465*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_xnet_recvmsg=yes
6466*8b26181fSAndroid Build Coastguard Workerelse
6467*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_xnet_recvmsg=no
6468*8b26181fSAndroid Build Coastguard Workerfi
6469*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6470*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6471*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
6472*8b26181fSAndroid Build Coastguard Workerfi
6473*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
6474*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
6475*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
6476*8b26181fSAndroid Build Coastguard Worker
6477*8b26181fSAndroid Build Coastguard Worker	    #
6478*8b26181fSAndroid Build Coastguard Worker	    # Yes - link with it as well.
6479*8b26181fSAndroid Build Coastguard Worker	    #
6480*8b26181fSAndroid Build Coastguard Worker	    LIBS="-lxnet $LIBS"
6481*8b26181fSAndroid Build Coastguard Worker
6482*8b26181fSAndroid Build Coastguard Workerfi
6483*8b26181fSAndroid Build Coastguard Worker
6484*8b26181fSAndroid Build Coastguard Worker
6485*8b26181fSAndroid Build Coastguard Workerfi
6486*8b26181fSAndroid Build Coastguard Worker
6487*8b26181fSAndroid Build Coastguard Worker    # DLPI needs putmsg under HPUX so test for -lstr while we're at it
6488*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
6489*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for library containing putmsg... " >&6; }
6490*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_search_putmsg+:} false; then :
6491*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
6492*8b26181fSAndroid Build Coastguard Workerelse
6493*8b26181fSAndroid Build Coastguard Worker  ac_func_search_save_LIBS=$LIBS
6494*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
6495*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6496*8b26181fSAndroid Build Coastguard Worker
6497*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
6498*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
6499*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
6500*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
6501*8b26181fSAndroid Build Coastguard Workerextern "C"
6502*8b26181fSAndroid Build Coastguard Worker#endif
6503*8b26181fSAndroid Build Coastguard Workerchar putmsg ();
6504*8b26181fSAndroid Build Coastguard Workerint
6505*8b26181fSAndroid Build Coastguard Workermain ()
6506*8b26181fSAndroid Build Coastguard Worker{
6507*8b26181fSAndroid Build Coastguard Workerreturn putmsg ();
6508*8b26181fSAndroid Build Coastguard Worker  ;
6509*8b26181fSAndroid Build Coastguard Worker  return 0;
6510*8b26181fSAndroid Build Coastguard Worker}
6511*8b26181fSAndroid Build Coastguard Worker_ACEOF
6512*8b26181fSAndroid Build Coastguard Workerfor ac_lib in '' str; do
6513*8b26181fSAndroid Build Coastguard Worker  if test -z "$ac_lib"; then
6514*8b26181fSAndroid Build Coastguard Worker    ac_res="none required"
6515*8b26181fSAndroid Build Coastguard Worker  else
6516*8b26181fSAndroid Build Coastguard Worker    ac_res=-l$ac_lib
6517*8b26181fSAndroid Build Coastguard Worker    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
6518*8b26181fSAndroid Build Coastguard Worker  fi
6519*8b26181fSAndroid Build Coastguard Worker  if ac_fn_c_try_link "$LINENO"; then :
6520*8b26181fSAndroid Build Coastguard Worker  ac_cv_search_putmsg=$ac_res
6521*8b26181fSAndroid Build Coastguard Workerfi
6522*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6523*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext
6524*8b26181fSAndroid Build Coastguard Worker  if ${ac_cv_search_putmsg+:} false; then :
6525*8b26181fSAndroid Build Coastguard Worker  break
6526*8b26181fSAndroid Build Coastguard Workerfi
6527*8b26181fSAndroid Build Coastguard Workerdone
6528*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_search_putmsg+:} false; then :
6529*8b26181fSAndroid Build Coastguard Worker
6530*8b26181fSAndroid Build Coastguard Workerelse
6531*8b26181fSAndroid Build Coastguard Worker  ac_cv_search_putmsg=no
6532*8b26181fSAndroid Build Coastguard Workerfi
6533*8b26181fSAndroid Build Coastguard Workerrm conftest.$ac_ext
6534*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_func_search_save_LIBS
6535*8b26181fSAndroid Build Coastguard Workerfi
6536*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
6537*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_search_putmsg" >&6; }
6538*8b26181fSAndroid Build Coastguard Workerac_res=$ac_cv_search_putmsg
6539*8b26181fSAndroid Build Coastguard Workerif test "$ac_res" != no; then :
6540*8b26181fSAndroid Build Coastguard Worker  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
6541*8b26181fSAndroid Build Coastguard Worker
6542*8b26181fSAndroid Build Coastguard Workerfi
6543*8b26181fSAndroid Build Coastguard Worker
6544*8b26181fSAndroid Build Coastguard Worker
6545*8b26181fSAndroid Build Coastguard Worker
6546*8b26181fSAndroid Build Coastguard Worker#
6547*8b26181fSAndroid Build Coastguard Worker# Check for reentrant versions of getnetbyname_r(), as provided by
6548*8b26181fSAndroid Build Coastguard Worker# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
6549*8b26181fSAndroid Build Coastguard Worker# If we don't find one, we just use getnetbyname(), which uses
6550*8b26181fSAndroid Build Coastguard Worker# thread-specific data on many platforms, but doesn't use it on
6551*8b26181fSAndroid Build Coastguard Worker# NetBSD or OpenBSD, and may not use it on older versions of other
6552*8b26181fSAndroid Build Coastguard Worker# platforms.
6553*8b26181fSAndroid Build Coastguard Worker#
6554*8b26181fSAndroid Build Coastguard Worker# Only do the check if we have a declaration of getnetbyname_r();
6555*8b26181fSAndroid Build Coastguard Worker# without it, we can't check which API it has.  (We assume that
6556*8b26181fSAndroid Build Coastguard Worker# if there's a declaration, it has a prototype, so that the API
6557*8b26181fSAndroid Build Coastguard Worker# can be checked.)
6558*8b26181fSAndroid Build Coastguard Worker#
6559*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
6560*8b26181fSAndroid Build Coastguard Worker"
6561*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
6562*8b26181fSAndroid Build Coastguard Worker
6563*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
6564*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
6565*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6566*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6567*8b26181fSAndroid Build Coastguard Worker#include <netdb.h>
6568*8b26181fSAndroid Build Coastguard Workerint
6569*8b26181fSAndroid Build Coastguard Workermain ()
6570*8b26181fSAndroid Build Coastguard Worker{
6571*8b26181fSAndroid Build Coastguard Worker
6572*8b26181fSAndroid Build Coastguard Worker		struct netent netent_buf;
6573*8b26181fSAndroid Build Coastguard Worker		char buf[1024];
6574*8b26181fSAndroid Build Coastguard Worker		struct netent *resultp;
6575*8b26181fSAndroid Build Coastguard Worker		int h_errnoval;
6576*8b26181fSAndroid Build Coastguard Worker
6577*8b26181fSAndroid Build Coastguard Worker		return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
6578*8b26181fSAndroid Build Coastguard Worker
6579*8b26181fSAndroid Build Coastguard Worker  ;
6580*8b26181fSAndroid Build Coastguard Worker  return 0;
6581*8b26181fSAndroid Build Coastguard Worker}
6582*8b26181fSAndroid Build Coastguard Worker_ACEOF
6583*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6584*8b26181fSAndroid Build Coastguard Worker
6585*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6586*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
6587*8b26181fSAndroid Build Coastguard Worker
6588*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
6589*8b26181fSAndroid Build Coastguard Worker
6590*8b26181fSAndroid Build Coastguard Worker
6591*8b26181fSAndroid Build Coastguard Workerelse
6592*8b26181fSAndroid Build Coastguard Worker
6593*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6594*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
6595*8b26181fSAndroid Build Coastguard Worker
6596*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
6597*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
6598*8b26181fSAndroid Build Coastguard Worker		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6599*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6600*8b26181fSAndroid Build Coastguard Worker#include <netdb.h>
6601*8b26181fSAndroid Build Coastguard Workerint
6602*8b26181fSAndroid Build Coastguard Workermain ()
6603*8b26181fSAndroid Build Coastguard Worker{
6604*8b26181fSAndroid Build Coastguard Worker
6605*8b26181fSAndroid Build Coastguard Worker			struct netent netent_buf;
6606*8b26181fSAndroid Build Coastguard Worker			char buf[1024];
6607*8b26181fSAndroid Build Coastguard Worker
6608*8b26181fSAndroid Build Coastguard Worker			return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
6609*8b26181fSAndroid Build Coastguard Worker
6610*8b26181fSAndroid Build Coastguard Worker  ;
6611*8b26181fSAndroid Build Coastguard Worker  return 0;
6612*8b26181fSAndroid Build Coastguard Worker}
6613*8b26181fSAndroid Build Coastguard Worker_ACEOF
6614*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6615*8b26181fSAndroid Build Coastguard Worker
6616*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6617*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
6618*8b26181fSAndroid Build Coastguard Worker
6619*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
6620*8b26181fSAndroid Build Coastguard Worker
6621*8b26181fSAndroid Build Coastguard Worker
6622*8b26181fSAndroid Build Coastguard Workerelse
6623*8b26181fSAndroid Build Coastguard Worker
6624*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6625*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
6626*8b26181fSAndroid Build Coastguard Worker
6627*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
6628*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
6629*8b26181fSAndroid Build Coastguard Worker			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6630*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6631*8b26181fSAndroid Build Coastguard Worker#include <netdb.h>
6632*8b26181fSAndroid Build Coastguard Workerint
6633*8b26181fSAndroid Build Coastguard Workermain ()
6634*8b26181fSAndroid Build Coastguard Worker{
6635*8b26181fSAndroid Build Coastguard Worker
6636*8b26181fSAndroid Build Coastguard Worker				struct netent netent_buf;
6637*8b26181fSAndroid Build Coastguard Worker				struct netent_data net_data;
6638*8b26181fSAndroid Build Coastguard Worker
6639*8b26181fSAndroid Build Coastguard Worker				return getnetbyname_r((const char *)0, &netent_buf, &net_data);
6640*8b26181fSAndroid Build Coastguard Worker
6641*8b26181fSAndroid Build Coastguard Worker  ;
6642*8b26181fSAndroid Build Coastguard Worker  return 0;
6643*8b26181fSAndroid Build Coastguard Worker}
6644*8b26181fSAndroid Build Coastguard Worker_ACEOF
6645*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6646*8b26181fSAndroid Build Coastguard Worker
6647*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6648*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
6649*8b26181fSAndroid Build Coastguard Worker
6650*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
6651*8b26181fSAndroid Build Coastguard Worker
6652*8b26181fSAndroid Build Coastguard Worker
6653*8b26181fSAndroid Build Coastguard Workerelse
6654*8b26181fSAndroid Build Coastguard Worker
6655*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6656*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
6657*8b26181fSAndroid Build Coastguard Worker
6658*8b26181fSAndroid Build Coastguard Workerfi
6659*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6660*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6661*8b26181fSAndroid Build Coastguard Worker
6662*8b26181fSAndroid Build Coastguard Workerfi
6663*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6664*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6665*8b26181fSAndroid Build Coastguard Worker
6666*8b26181fSAndroid Build Coastguard Workerfi
6667*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6668*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6669*8b26181fSAndroid Build Coastguard Worker
6670*8b26181fSAndroid Build Coastguard Workerfi
6671*8b26181fSAndroid Build Coastguard Worker
6672*8b26181fSAndroid Build Coastguard Worker
6673*8b26181fSAndroid Build Coastguard Worker#
6674*8b26181fSAndroid Build Coastguard Worker# Check for reentrant versions of getprotobyname_r(), as provided by
6675*8b26181fSAndroid Build Coastguard Worker# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
6676*8b26181fSAndroid Build Coastguard Worker# If we don't find one, we just use getprotobyname(), which uses
6677*8b26181fSAndroid Build Coastguard Worker# thread-specific data on many platforms, but doesn't use it on
6678*8b26181fSAndroid Build Coastguard Worker# NetBSD or OpenBSD, and may not use it on older versions of other
6679*8b26181fSAndroid Build Coastguard Worker# platforms.
6680*8b26181fSAndroid Build Coastguard Worker#
6681*8b26181fSAndroid Build Coastguard Worker# Only do the check if we have a declaration of getprotobyname_r();
6682*8b26181fSAndroid Build Coastguard Worker# without it, we can't check which API it has.  (We assume that
6683*8b26181fSAndroid Build Coastguard Worker# if there's a declaration, it has a prototype, so that the API
6684*8b26181fSAndroid Build Coastguard Worker# can be checked.)
6685*8b26181fSAndroid Build Coastguard Worker#
6686*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
6687*8b26181fSAndroid Build Coastguard Worker"
6688*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
6689*8b26181fSAndroid Build Coastguard Worker
6690*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
6691*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
6692*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6693*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6694*8b26181fSAndroid Build Coastguard Worker#include <netdb.h>
6695*8b26181fSAndroid Build Coastguard Workerint
6696*8b26181fSAndroid Build Coastguard Workermain ()
6697*8b26181fSAndroid Build Coastguard Worker{
6698*8b26181fSAndroid Build Coastguard Worker
6699*8b26181fSAndroid Build Coastguard Worker		struct protoent protoent_buf;
6700*8b26181fSAndroid Build Coastguard Worker		char buf[1024];
6701*8b26181fSAndroid Build Coastguard Worker		struct protoent *resultp;
6702*8b26181fSAndroid Build Coastguard Worker
6703*8b26181fSAndroid Build Coastguard Worker		return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
6704*8b26181fSAndroid Build Coastguard Worker
6705*8b26181fSAndroid Build Coastguard Worker  ;
6706*8b26181fSAndroid Build Coastguard Worker  return 0;
6707*8b26181fSAndroid Build Coastguard Worker}
6708*8b26181fSAndroid Build Coastguard Worker_ACEOF
6709*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6710*8b26181fSAndroid Build Coastguard Worker
6711*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6712*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
6713*8b26181fSAndroid Build Coastguard Worker
6714*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
6715*8b26181fSAndroid Build Coastguard Worker
6716*8b26181fSAndroid Build Coastguard Worker
6717*8b26181fSAndroid Build Coastguard Workerelse
6718*8b26181fSAndroid Build Coastguard Worker
6719*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6720*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
6721*8b26181fSAndroid Build Coastguard Worker
6722*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
6723*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
6724*8b26181fSAndroid Build Coastguard Worker		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6725*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6726*8b26181fSAndroid Build Coastguard Worker#include <netdb.h>
6727*8b26181fSAndroid Build Coastguard Workerint
6728*8b26181fSAndroid Build Coastguard Workermain ()
6729*8b26181fSAndroid Build Coastguard Worker{
6730*8b26181fSAndroid Build Coastguard Worker
6731*8b26181fSAndroid Build Coastguard Worker			struct protoent protoent_buf;
6732*8b26181fSAndroid Build Coastguard Worker			char buf[1024];
6733*8b26181fSAndroid Build Coastguard Worker
6734*8b26181fSAndroid Build Coastguard Worker			return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
6735*8b26181fSAndroid Build Coastguard Worker
6736*8b26181fSAndroid Build Coastguard Worker  ;
6737*8b26181fSAndroid Build Coastguard Worker  return 0;
6738*8b26181fSAndroid Build Coastguard Worker}
6739*8b26181fSAndroid Build Coastguard Worker_ACEOF
6740*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6741*8b26181fSAndroid Build Coastguard Worker
6742*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6743*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
6744*8b26181fSAndroid Build Coastguard Worker
6745*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
6746*8b26181fSAndroid Build Coastguard Worker
6747*8b26181fSAndroid Build Coastguard Worker
6748*8b26181fSAndroid Build Coastguard Workerelse
6749*8b26181fSAndroid Build Coastguard Worker
6750*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6751*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
6752*8b26181fSAndroid Build Coastguard Worker
6753*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
6754*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
6755*8b26181fSAndroid Build Coastguard Worker			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6756*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
6757*8b26181fSAndroid Build Coastguard Worker#include <netdb.h>
6758*8b26181fSAndroid Build Coastguard Workerint
6759*8b26181fSAndroid Build Coastguard Workermain ()
6760*8b26181fSAndroid Build Coastguard Worker{
6761*8b26181fSAndroid Build Coastguard Worker
6762*8b26181fSAndroid Build Coastguard Worker				struct protoent protoent_buf;
6763*8b26181fSAndroid Build Coastguard Worker				struct protoent_data proto_data;
6764*8b26181fSAndroid Build Coastguard Worker
6765*8b26181fSAndroid Build Coastguard Worker				return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
6766*8b26181fSAndroid Build Coastguard Worker
6767*8b26181fSAndroid Build Coastguard Worker  ;
6768*8b26181fSAndroid Build Coastguard Worker  return 0;
6769*8b26181fSAndroid Build Coastguard Worker}
6770*8b26181fSAndroid Build Coastguard Worker_ACEOF
6771*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
6772*8b26181fSAndroid Build Coastguard Worker
6773*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6774*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
6775*8b26181fSAndroid Build Coastguard Worker
6776*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
6777*8b26181fSAndroid Build Coastguard Worker
6778*8b26181fSAndroid Build Coastguard Worker
6779*8b26181fSAndroid Build Coastguard Workerelse
6780*8b26181fSAndroid Build Coastguard Worker
6781*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6782*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
6783*8b26181fSAndroid Build Coastguard Worker
6784*8b26181fSAndroid Build Coastguard Workerfi
6785*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6786*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6787*8b26181fSAndroid Build Coastguard Worker
6788*8b26181fSAndroid Build Coastguard Workerfi
6789*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6790*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6791*8b26181fSAndroid Build Coastguard Worker
6792*8b26181fSAndroid Build Coastguard Workerfi
6793*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
6794*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
6795*8b26181fSAndroid Build Coastguard Worker
6796*8b26181fSAndroid Build Coastguard Workerfi
6797*8b26181fSAndroid Build Coastguard Worker
6798*8b26181fSAndroid Build Coastguard Worker
6799*8b26181fSAndroid Build Coastguard Worker#
6800*8b26181fSAndroid Build Coastguard Worker# You are in a twisty little maze of UN*Xes, all different.
6801*8b26181fSAndroid Build Coastguard Worker# Some might not have ether_hostton().
6802*8b26181fSAndroid Build Coastguard Worker# Some might have it and declare it in <net/ethernet.h>.
6803*8b26181fSAndroid Build Coastguard Worker# Some might have it and declare it in <netinet/ether.h>
6804*8b26181fSAndroid Build Coastguard Worker# Some might have it and declare it in <sys/ethernet.h>.
6805*8b26181fSAndroid Build Coastguard Worker# Some might have it and declare it in <arpa/inet.h>.
6806*8b26181fSAndroid Build Coastguard Worker# Some might have it and declare it in <netinet/if_ether.h>.
6807*8b26181fSAndroid Build Coastguard Worker# Some might have it and not declare it in any header file.
6808*8b26181fSAndroid Build Coastguard Worker#
6809*8b26181fSAndroid Build Coastguard Worker# Before you is a C compiler.
6810*8b26181fSAndroid Build Coastguard Worker#
6811*8b26181fSAndroid Build Coastguard Workerfor ac_func in ether_hostton
6812*8b26181fSAndroid Build Coastguard Workerdo :
6813*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
6814*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_ether_hostton" = xyes; then :
6815*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
6816*8b26181fSAndroid Build Coastguard Worker#define HAVE_ETHER_HOSTTON 1
6817*8b26181fSAndroid Build Coastguard Worker_ACEOF
6818*8b26181fSAndroid Build Coastguard Worker
6819*8b26181fSAndroid Build Coastguard Workerfi
6820*8b26181fSAndroid Build Coastguard Workerdone
6821*8b26181fSAndroid Build Coastguard Worker
6822*8b26181fSAndroid Build Coastguard Workerif test "$ac_cv_func_ether_hostton" = yes; then
6823*8b26181fSAndroid Build Coastguard Worker	#
6824*8b26181fSAndroid Build Coastguard Worker	# OK, we have ether_hostton().  Is it declared in <net/ethernet.h>?
6825*8b26181fSAndroid Build Coastguard Worker	#
6826*8b26181fSAndroid Build Coastguard Worker	# This test fails if we don't have <net/ethernet.h> or if we do
6827*8b26181fSAndroid Build Coastguard Worker	# but it doesn't declare ether_hostton().
6828*8b26181fSAndroid Build Coastguard Worker	#
6829*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6830*8b26181fSAndroid Build Coastguard Worker#include <net/ethernet.h>
6831*8b26181fSAndroid Build Coastguard Worker
6832*8b26181fSAndroid Build Coastguard Worker"
6833*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6834*8b26181fSAndroid Build Coastguard Worker
6835*8b26181fSAndroid Build Coastguard Worker
6836*8b26181fSAndroid Build Coastguard Worker$as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6837*8b26181fSAndroid Build Coastguard Worker
6838*8b26181fSAndroid Build Coastguard Worker
6839*8b26181fSAndroid Build Coastguard Workerfi
6840*8b26181fSAndroid Build Coastguard Worker
6841*8b26181fSAndroid Build Coastguard Worker	#
6842*8b26181fSAndroid Build Coastguard Worker	# Did that succeed?
6843*8b26181fSAndroid Build Coastguard Worker	#
6844*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6845*8b26181fSAndroid Build Coastguard Worker		#
6846*8b26181fSAndroid Build Coastguard Worker		# No, how about <netinet/ether.h>, as on Linux?
6847*8b26181fSAndroid Build Coastguard Worker		#
6848*8b26181fSAndroid Build Coastguard Worker		# This test fails if we don't have <netinet/ether.h>
6849*8b26181fSAndroid Build Coastguard Worker		# or if we do but it doesn't declare ether_hostton().
6850*8b26181fSAndroid Build Coastguard Worker		#
6851*8b26181fSAndroid Build Coastguard Worker		# Unset ac_cv_have_decl_ether_hostton so we don't
6852*8b26181fSAndroid Build Coastguard Worker		# treat the previous failure as a cached value and
6853*8b26181fSAndroid Build Coastguard Worker		# suppress the next test.
6854*8b26181fSAndroid Build Coastguard Worker		#
6855*8b26181fSAndroid Build Coastguard Worker		unset ac_cv_have_decl_ether_hostton
6856*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6857*8b26181fSAndroid Build Coastguard Worker#include <netinet/ether.h>
6858*8b26181fSAndroid Build Coastguard Worker
6859*8b26181fSAndroid Build Coastguard Worker"
6860*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6861*8b26181fSAndroid Build Coastguard Worker
6862*8b26181fSAndroid Build Coastguard Worker
6863*8b26181fSAndroid Build Coastguard Worker$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6864*8b26181fSAndroid Build Coastguard Worker
6865*8b26181fSAndroid Build Coastguard Worker
6866*8b26181fSAndroid Build Coastguard Workerfi
6867*8b26181fSAndroid Build Coastguard Worker
6868*8b26181fSAndroid Build Coastguard Worker	fi
6869*8b26181fSAndroid Build Coastguard Worker	#
6870*8b26181fSAndroid Build Coastguard Worker	# Did that succeed?
6871*8b26181fSAndroid Build Coastguard Worker	#
6872*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6873*8b26181fSAndroid Build Coastguard Worker		#
6874*8b26181fSAndroid Build Coastguard Worker		# No, how about <sys/ethernet.h>, as on Solaris 10
6875*8b26181fSAndroid Build Coastguard Worker		# and later?
6876*8b26181fSAndroid Build Coastguard Worker		#
6877*8b26181fSAndroid Build Coastguard Worker		# This test fails if we don't have <sys/ethernet.h>
6878*8b26181fSAndroid Build Coastguard Worker		# or if we do but it doesn't declare ether_hostton().
6879*8b26181fSAndroid Build Coastguard Worker		#
6880*8b26181fSAndroid Build Coastguard Worker		# Unset ac_cv_have_decl_ether_hostton so we don't
6881*8b26181fSAndroid Build Coastguard Worker		# treat the previous failure as a cached value and
6882*8b26181fSAndroid Build Coastguard Worker		# suppress the next test.
6883*8b26181fSAndroid Build Coastguard Worker		#
6884*8b26181fSAndroid Build Coastguard Worker		unset ac_cv_have_decl_ether_hostton
6885*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6886*8b26181fSAndroid Build Coastguard Worker#include <sys/ethernet.h>
6887*8b26181fSAndroid Build Coastguard Worker
6888*8b26181fSAndroid Build Coastguard Worker"
6889*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6890*8b26181fSAndroid Build Coastguard Worker
6891*8b26181fSAndroid Build Coastguard Worker
6892*8b26181fSAndroid Build Coastguard Worker$as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6893*8b26181fSAndroid Build Coastguard Worker
6894*8b26181fSAndroid Build Coastguard Worker
6895*8b26181fSAndroid Build Coastguard Workerfi
6896*8b26181fSAndroid Build Coastguard Worker
6897*8b26181fSAndroid Build Coastguard Worker	fi
6898*8b26181fSAndroid Build Coastguard Worker	#
6899*8b26181fSAndroid Build Coastguard Worker	# Did that succeed?
6900*8b26181fSAndroid Build Coastguard Worker	#
6901*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6902*8b26181fSAndroid Build Coastguard Worker		#
6903*8b26181fSAndroid Build Coastguard Worker		# No, how about <arpa/inet.h>, as in AIX?
6904*8b26181fSAndroid Build Coastguard Worker		#
6905*8b26181fSAndroid Build Coastguard Worker		# This test fails if we don't have <arpa/inet.h>
6906*8b26181fSAndroid Build Coastguard Worker		# (if we have ether_hostton(), we should have
6907*8b26181fSAndroid Build Coastguard Worker		# networking, and if we have networking, we should
6908*8b26181fSAndroid Build Coastguard Worker		# have <arpa/inet.h>) or if we do but it doesn't
6909*8b26181fSAndroid Build Coastguard Worker		# declare ether_hostton().
6910*8b26181fSAndroid Build Coastguard Worker		#
6911*8b26181fSAndroid Build Coastguard Worker		# Unset ac_cv_have_decl_ether_hostton so we don't
6912*8b26181fSAndroid Build Coastguard Worker		# treat the previous failure as a cached value and
6913*8b26181fSAndroid Build Coastguard Worker		# suppress the next test.
6914*8b26181fSAndroid Build Coastguard Worker		#
6915*8b26181fSAndroid Build Coastguard Worker		unset ac_cv_have_decl_ether_hostton
6916*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6917*8b26181fSAndroid Build Coastguard Worker#include <arpa/inet.h>
6918*8b26181fSAndroid Build Coastguard Worker
6919*8b26181fSAndroid Build Coastguard Worker"
6920*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6921*8b26181fSAndroid Build Coastguard Worker
6922*8b26181fSAndroid Build Coastguard Worker
6923*8b26181fSAndroid Build Coastguard Worker$as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6924*8b26181fSAndroid Build Coastguard Worker
6925*8b26181fSAndroid Build Coastguard Worker
6926*8b26181fSAndroid Build Coastguard Workerfi
6927*8b26181fSAndroid Build Coastguard Worker
6928*8b26181fSAndroid Build Coastguard Worker	fi
6929*8b26181fSAndroid Build Coastguard Worker	#
6930*8b26181fSAndroid Build Coastguard Worker	# Did that succeed?
6931*8b26181fSAndroid Build Coastguard Worker	#
6932*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_have_decl_ether_hostton" != yes; then
6933*8b26181fSAndroid Build Coastguard Worker		#
6934*8b26181fSAndroid Build Coastguard Worker		# No, how about <netinet/if_ether.h>?
6935*8b26181fSAndroid Build Coastguard Worker		# On some platforms, it requires <net/if.h> and
6936*8b26181fSAndroid Build Coastguard Worker		# <netinet/in.h>, and we always include it with
6937*8b26181fSAndroid Build Coastguard Worker		# both of them, so test it with both of them.
6938*8b26181fSAndroid Build Coastguard Worker		#
6939*8b26181fSAndroid Build Coastguard Worker		# This test fails if we don't have <netinet/if_ether.h>
6940*8b26181fSAndroid Build Coastguard Worker		# and the headers we include before it, or if we do but
6941*8b26181fSAndroid Build Coastguard Worker		# <netinet/if_ether.h> doesn't declare ether_hostton().
6942*8b26181fSAndroid Build Coastguard Worker		#
6943*8b26181fSAndroid Build Coastguard Worker		# Unset ac_cv_have_decl_ether_hostton so we don't
6944*8b26181fSAndroid Build Coastguard Worker		# treat the previous failure as a cached value and
6945*8b26181fSAndroid Build Coastguard Worker		# suppress the next test.
6946*8b26181fSAndroid Build Coastguard Worker		#
6947*8b26181fSAndroid Build Coastguard Worker		unset ac_cv_have_decl_ether_hostton
6948*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
6949*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
6950*8b26181fSAndroid Build Coastguard Worker#include <sys/socket.h>
6951*8b26181fSAndroid Build Coastguard Worker#include <net/if.h>
6952*8b26181fSAndroid Build Coastguard Worker#include <netinet/in.h>
6953*8b26181fSAndroid Build Coastguard Worker#include <netinet/if_ether.h>
6954*8b26181fSAndroid Build Coastguard Worker
6955*8b26181fSAndroid Build Coastguard Worker"
6956*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
6957*8b26181fSAndroid Build Coastguard Worker
6958*8b26181fSAndroid Build Coastguard Worker
6959*8b26181fSAndroid Build Coastguard Worker$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
6960*8b26181fSAndroid Build Coastguard Worker
6961*8b26181fSAndroid Build Coastguard Worker
6962*8b26181fSAndroid Build Coastguard Workerfi
6963*8b26181fSAndroid Build Coastguard Worker
6964*8b26181fSAndroid Build Coastguard Worker	fi
6965*8b26181fSAndroid Build Coastguard Worker	#
6966*8b26181fSAndroid Build Coastguard Worker	# After all that, is ether_hostton() declared?
6967*8b26181fSAndroid Build Coastguard Worker	#
6968*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_have_decl_ether_hostton" = yes; then
6969*8b26181fSAndroid Build Coastguard Worker		#
6970*8b26181fSAndroid Build Coastguard Worker		# Yes.
6971*8b26181fSAndroid Build Coastguard Worker		#
6972*8b26181fSAndroid Build Coastguard Worker
6973*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
6974*8b26181fSAndroid Build Coastguard Worker
6975*8b26181fSAndroid Build Coastguard Worker        else
6976*8b26181fSAndroid Build Coastguard Worker		#
6977*8b26181fSAndroid Build Coastguard Worker		# No, we'll have to declare it ourselves.
6978*8b26181fSAndroid Build Coastguard Worker		# Do we have "struct ether_addr" if we include
6979*8b26181fSAndroid Build Coastguard Worker		# <netinet/if_ether.h>?
6980*8b26181fSAndroid Build Coastguard Worker		#
6981*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
6982*8b26181fSAndroid Build Coastguard Worker			#include <sys/types.h>
6983*8b26181fSAndroid Build Coastguard Worker			#include <sys/socket.h>
6984*8b26181fSAndroid Build Coastguard Worker			#include <net/if.h>
6985*8b26181fSAndroid Build Coastguard Worker			#include <netinet/in.h>
6986*8b26181fSAndroid Build Coastguard Worker			#include <netinet/if_ether.h>
6987*8b26181fSAndroid Build Coastguard Worker
6988*8b26181fSAndroid Build Coastguard Worker"
6989*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_type_struct_ether_addr" = xyes; then :
6990*8b26181fSAndroid Build Coastguard Worker
6991*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
6992*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_ETHER_ADDR 1
6993*8b26181fSAndroid Build Coastguard Worker_ACEOF
6994*8b26181fSAndroid Build Coastguard Worker
6995*8b26181fSAndroid Build Coastguard Worker
6996*8b26181fSAndroid Build Coastguard Workerfi
6997*8b26181fSAndroid Build Coastguard Worker
6998*8b26181fSAndroid Build Coastguard Worker	fi
6999*8b26181fSAndroid Build Coastguard Workerfi
7000*8b26181fSAndroid Build Coastguard Worker
7001*8b26181fSAndroid Build Coastguard Worker#
7002*8b26181fSAndroid Build Coastguard Worker# For various things that might use pthreads.
7003*8b26181fSAndroid Build Coastguard Worker#
7004*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
7005*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_pthread_h" = xyes; then :
7006*8b26181fSAndroid Build Coastguard Worker
7007*8b26181fSAndroid Build Coastguard Worker	#
7008*8b26181fSAndroid Build Coastguard Worker	# OK, we have pthread.h.  Do we have pthread_create in the
7009*8b26181fSAndroid Build Coastguard Worker	# system libraries?
7010*8b26181fSAndroid Build Coastguard Worker	#
7011*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
7012*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_pthread_create" = xyes; then :
7013*8b26181fSAndroid Build Coastguard Worker
7014*8b26181fSAndroid Build Coastguard Worker		#
7015*8b26181fSAndroid Build Coastguard Worker		# Yes.
7016*8b26181fSAndroid Build Coastguard Worker		#
7017*8b26181fSAndroid Build Coastguard Worker		ac_lbl_have_pthreads="found"
7018*8b26181fSAndroid Build Coastguard Worker
7019*8b26181fSAndroid Build Coastguard Workerelse
7020*8b26181fSAndroid Build Coastguard Worker
7021*8b26181fSAndroid Build Coastguard Worker		#
7022*8b26181fSAndroid Build Coastguard Worker		# No - do we have it in -lpthreads?
7023*8b26181fSAndroid Build Coastguard Worker		#
7024*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
7025*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
7026*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_pthreads_pthread_create+:} false; then :
7027*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7028*8b26181fSAndroid Build Coastguard Workerelse
7029*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
7030*8b26181fSAndroid Build Coastguard WorkerLIBS="-lpthreads  $LIBS"
7031*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
7032*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
7033*8b26181fSAndroid Build Coastguard Worker
7034*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
7035*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
7036*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
7037*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
7038*8b26181fSAndroid Build Coastguard Workerextern "C"
7039*8b26181fSAndroid Build Coastguard Worker#endif
7040*8b26181fSAndroid Build Coastguard Workerchar pthread_create ();
7041*8b26181fSAndroid Build Coastguard Workerint
7042*8b26181fSAndroid Build Coastguard Workermain ()
7043*8b26181fSAndroid Build Coastguard Worker{
7044*8b26181fSAndroid Build Coastguard Workerreturn pthread_create ();
7045*8b26181fSAndroid Build Coastguard Worker  ;
7046*8b26181fSAndroid Build Coastguard Worker  return 0;
7047*8b26181fSAndroid Build Coastguard Worker}
7048*8b26181fSAndroid Build Coastguard Worker_ACEOF
7049*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
7050*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_pthreads_pthread_create=yes
7051*8b26181fSAndroid Build Coastguard Workerelse
7052*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_pthreads_pthread_create=no
7053*8b26181fSAndroid Build Coastguard Workerfi
7054*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
7055*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
7056*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
7057*8b26181fSAndroid Build Coastguard Workerfi
7058*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
7059*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
7060*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
7061*8b26181fSAndroid Build Coastguard Worker
7062*8b26181fSAndroid Build Coastguard Worker			#
7063*8b26181fSAndroid Build Coastguard Worker			# Yes - add -lpthreads.
7064*8b26181fSAndroid Build Coastguard Worker			#
7065*8b26181fSAndroid Build Coastguard Worker			ac_lbl_have_pthreads="found"
7066*8b26181fSAndroid Build Coastguard Worker			PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
7067*8b26181fSAndroid Build Coastguard Worker
7068*8b26181fSAndroid Build Coastguard Workerelse
7069*8b26181fSAndroid Build Coastguard Worker
7070*8b26181fSAndroid Build Coastguard Worker			#
7071*8b26181fSAndroid Build Coastguard Worker			# No - do we have it in -lpthread?
7072*8b26181fSAndroid Build Coastguard Worker			#
7073*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
7074*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
7075*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_pthread_pthread_create+:} false; then :
7076*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7077*8b26181fSAndroid Build Coastguard Workerelse
7078*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
7079*8b26181fSAndroid Build Coastguard WorkerLIBS="-lpthread  $LIBS"
7080*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
7081*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
7082*8b26181fSAndroid Build Coastguard Worker
7083*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
7084*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
7085*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
7086*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
7087*8b26181fSAndroid Build Coastguard Workerextern "C"
7088*8b26181fSAndroid Build Coastguard Worker#endif
7089*8b26181fSAndroid Build Coastguard Workerchar pthread_create ();
7090*8b26181fSAndroid Build Coastguard Workerint
7091*8b26181fSAndroid Build Coastguard Workermain ()
7092*8b26181fSAndroid Build Coastguard Worker{
7093*8b26181fSAndroid Build Coastguard Workerreturn pthread_create ();
7094*8b26181fSAndroid Build Coastguard Worker  ;
7095*8b26181fSAndroid Build Coastguard Worker  return 0;
7096*8b26181fSAndroid Build Coastguard Worker}
7097*8b26181fSAndroid Build Coastguard Worker_ACEOF
7098*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
7099*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_pthread_pthread_create=yes
7100*8b26181fSAndroid Build Coastguard Workerelse
7101*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_pthread_pthread_create=no
7102*8b26181fSAndroid Build Coastguard Workerfi
7103*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
7104*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
7105*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
7106*8b26181fSAndroid Build Coastguard Workerfi
7107*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
7108*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
7109*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
7110*8b26181fSAndroid Build Coastguard Worker
7111*8b26181fSAndroid Build Coastguard Worker				#
7112*8b26181fSAndroid Build Coastguard Worker				# Yes - add -lpthread.
7113*8b26181fSAndroid Build Coastguard Worker				#
7114*8b26181fSAndroid Build Coastguard Worker                                ac_lbl_have_pthreads="found"
7115*8b26181fSAndroid Build Coastguard Worker				PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
7116*8b26181fSAndroid Build Coastguard Worker
7117*8b26181fSAndroid Build Coastguard Workerelse
7118*8b26181fSAndroid Build Coastguard Worker
7119*8b26181fSAndroid Build Coastguard Worker				#
7120*8b26181fSAndroid Build Coastguard Worker				# No.
7121*8b26181fSAndroid Build Coastguard Worker				#
7122*8b26181fSAndroid Build Coastguard Worker				ac_lbl_have_pthreads="not found"
7123*8b26181fSAndroid Build Coastguard Worker
7124*8b26181fSAndroid Build Coastguard Workerfi
7125*8b26181fSAndroid Build Coastguard Worker
7126*8b26181fSAndroid Build Coastguard Worker
7127*8b26181fSAndroid Build Coastguard Workerfi
7128*8b26181fSAndroid Build Coastguard Worker
7129*8b26181fSAndroid Build Coastguard Worker
7130*8b26181fSAndroid Build Coastguard Workerfi
7131*8b26181fSAndroid Build Coastguard Worker
7132*8b26181fSAndroid Build Coastguard Worker
7133*8b26181fSAndroid Build Coastguard Workerelse
7134*8b26181fSAndroid Build Coastguard Worker
7135*8b26181fSAndroid Build Coastguard Worker	#
7136*8b26181fSAndroid Build Coastguard Worker	# We didn't find pthread.h.
7137*8b26181fSAndroid Build Coastguard Worker	#
7138*8b26181fSAndroid Build Coastguard Worker	ac_lbl_have_pthreads="not found"
7139*8b26181fSAndroid Build Coastguard Worker
7140*8b26181fSAndroid Build Coastguard Worker
7141*8b26181fSAndroid Build Coastguard Workerfi
7142*8b26181fSAndroid Build Coastguard Worker
7143*8b26181fSAndroid Build Coastguard Worker
7144*8b26181fSAndroid Build Coastguard Worker
7145*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
7146*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking if --disable-protochain option is specified... " >&6; }
7147*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-protochain was given.
7148*8b26181fSAndroid Build Coastguard Workerif test "${enable_protochain+set}" = set; then :
7149*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_protochain;
7150*8b26181fSAndroid Build Coastguard Workerfi
7151*8b26181fSAndroid Build Coastguard Worker
7152*8b26181fSAndroid Build Coastguard Workercase "x$enable_protochain" in
7153*8b26181fSAndroid Build Coastguard Workerxyes)	enable_protochain=enabled	;;
7154*8b26181fSAndroid Build Coastguard Workerxno)	enable_protochain=disabled	;;
7155*8b26181fSAndroid Build Coastguard Workerx)	enable_protochain=enabled	;;
7156*8b26181fSAndroid Build Coastguard Workeresac
7157*8b26181fSAndroid Build Coastguard Worker
7158*8b26181fSAndroid Build Coastguard Workerif test "$enable_protochain" = "disabled"; then
7159*8b26181fSAndroid Build Coastguard Worker
7160*8b26181fSAndroid Build Coastguard Worker$as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
7161*8b26181fSAndroid Build Coastguard Worker
7162*8b26181fSAndroid Build Coastguard Workerfi
7163*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
7164*8b26181fSAndroid Build Coastguard Worker$as_echo "${enable_protochain}" >&6; }
7165*8b26181fSAndroid Build Coastguard Worker
7166*8b26181fSAndroid Build Coastguard Worker#
7167*8b26181fSAndroid Build Coastguard Worker# valgrindtest directly uses the native capture mechanism, but
7168*8b26181fSAndroid Build Coastguard Worker# only tests with BPF and PF_PACKET sockets; only enable it if
7169*8b26181fSAndroid Build Coastguard Worker# we have BPF or PF_PACKET sockets.
7170*8b26181fSAndroid Build Coastguard Worker#
7171*8b26181fSAndroid Build Coastguard WorkerVALGRINDTEST_SRC=
7172*8b26181fSAndroid Build Coastguard Worker
7173*8b26181fSAndroid Build Coastguard Worker
7174*8b26181fSAndroid Build Coastguard Worker# Check whether --with-pcap was given.
7175*8b26181fSAndroid Build Coastguard Workerif test "${with_pcap+set}" = set; then :
7176*8b26181fSAndroid Build Coastguard Worker  withval=$with_pcap;
7177*8b26181fSAndroid Build Coastguard Workerfi
7178*8b26181fSAndroid Build Coastguard Worker
7179*8b26181fSAndroid Build Coastguard Workerif test ! -z "$with_pcap" ; then
7180*8b26181fSAndroid Build Coastguard Worker	V_PCAP="$withval"
7181*8b26181fSAndroid Build Coastguard Workerelse
7182*8b26181fSAndroid Build Coastguard Worker	#
7183*8b26181fSAndroid Build Coastguard Worker	# Check for a bunch of headers for various packet
7184*8b26181fSAndroid Build Coastguard Worker	# capture mechanisms.
7185*8b26181fSAndroid Build Coastguard Worker	#
7186*8b26181fSAndroid Build Coastguard Worker	for ac_header in net/bpf.h
7187*8b26181fSAndroid Build Coastguard Workerdo :
7188*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
7189*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_net_bpf_h" = xyes; then :
7190*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7191*8b26181fSAndroid Build Coastguard Worker#define HAVE_NET_BPF_H 1
7192*8b26181fSAndroid Build Coastguard Worker_ACEOF
7193*8b26181fSAndroid Build Coastguard Worker
7194*8b26181fSAndroid Build Coastguard Workerfi
7195*8b26181fSAndroid Build Coastguard Worker
7196*8b26181fSAndroid Build Coastguard Workerdone
7197*8b26181fSAndroid Build Coastguard Worker
7198*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_header_net_bpf_h" = yes; then
7199*8b26181fSAndroid Build Coastguard Worker		#
7200*8b26181fSAndroid Build Coastguard Worker		# Does it define BIOCSETIF?
7201*8b26181fSAndroid Build Coastguard Worker		# I.e., is it a header for an LBL/BSD-style capture
7202*8b26181fSAndroid Build Coastguard Worker		# mechanism, or is it just a header for a BPF filter
7203*8b26181fSAndroid Build Coastguard Worker		# engine?  Some versions of Arch Linux, for example,
7204*8b26181fSAndroid Build Coastguard Worker		# have a net/bpf.h that doesn't define BIOCSETIF;
7205*8b26181fSAndroid Build Coastguard Worker		# as it's a Linux, it should use packet sockets,
7206*8b26181fSAndroid Build Coastguard Worker		# instead.
7207*8b26181fSAndroid Build Coastguard Worker		#
7208*8b26181fSAndroid Build Coastguard Worker		# We need:
7209*8b26181fSAndroid Build Coastguard Worker		#
7210*8b26181fSAndroid Build Coastguard Worker		#  sys/types.h, because FreeBSD 10's net/bpf.h
7211*8b26181fSAndroid Build Coastguard Worker		#  requires that various BSD-style integer types
7212*8b26181fSAndroid Build Coastguard Worker		#  be defined;
7213*8b26181fSAndroid Build Coastguard Worker		#
7214*8b26181fSAndroid Build Coastguard Worker		#  sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
7215*8b26181fSAndroid Build Coastguard Worker		#  doesn't include it but does use struct timeval
7216*8b26181fSAndroid Build Coastguard Worker		#  in ioctl definitions;
7217*8b26181fSAndroid Build Coastguard Worker		#
7218*8b26181fSAndroid Build Coastguard Worker		#  sys/ioctl.h and, if we have it, sys/ioccom.h,
7219*8b26181fSAndroid Build Coastguard Worker		#  because net/bpf.h defines ioctls;
7220*8b26181fSAndroid Build Coastguard Worker		#
7221*8b26181fSAndroid Build Coastguard Worker		#  net/if.h, because it defines some structures
7222*8b26181fSAndroid Build Coastguard Worker		#  used in ioctls defined by net/bpf.h;
7223*8b26181fSAndroid Build Coastguard Worker		#
7224*8b26181fSAndroid Build Coastguard Worker		#  sys/socket.h, because OpenBSD 5.9's net/bpf.h
7225*8b26181fSAndroid Build Coastguard Worker		#  defines some structure fields as being
7226*8b26181fSAndroid Build Coastguard Worker		#  struct sockaddrs;
7227*8b26181fSAndroid Build Coastguard Worker		#
7228*8b26181fSAndroid Build Coastguard Worker		# and net/bpf.h doesn't necessarily include all
7229*8b26181fSAndroid Build Coastguard Worker		# of those headers itself.
7230*8b26181fSAndroid Build Coastguard Worker		#
7231*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
7232*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
7233*8b26181fSAndroid Build Coastguard Worker		if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
7234*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7235*8b26181fSAndroid Build Coastguard Workerelse
7236*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7237*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
7238*8b26181fSAndroid Build Coastguard Worker
7239*8b26181fSAndroid Build Coastguard Worker#include <sys/types.h>
7240*8b26181fSAndroid Build Coastguard Worker#include <sys/time.h>
7241*8b26181fSAndroid Build Coastguard Worker#include <sys/ioctl.h>
7242*8b26181fSAndroid Build Coastguard Worker#include <sys/socket.h>
7243*8b26181fSAndroid Build Coastguard Worker#ifdef HAVE_SYS_IOCCOM_H
7244*8b26181fSAndroid Build Coastguard Worker#include <sys/ioccom.h>
7245*8b26181fSAndroid Build Coastguard Worker#endif
7246*8b26181fSAndroid Build Coastguard Worker#include <net/bpf.h>
7247*8b26181fSAndroid Build Coastguard Worker#include <net/if.h>
7248*8b26181fSAndroid Build Coastguard Worker
7249*8b26181fSAndroid Build Coastguard Workerint
7250*8b26181fSAndroid Build Coastguard Workermain ()
7251*8b26181fSAndroid Build Coastguard Worker{
7252*8b26181fSAndroid Build Coastguard Workeru_int i = BIOCSETIF;
7253*8b26181fSAndroid Build Coastguard Worker  ;
7254*8b26181fSAndroid Build Coastguard Worker  return 0;
7255*8b26181fSAndroid Build Coastguard Worker}
7256*8b26181fSAndroid Build Coastguard Worker_ACEOF
7257*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
7258*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_bpf_h_defines_biocsetif=yes
7259*8b26181fSAndroid Build Coastguard Workerelse
7260*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_bpf_h_defines_biocsetif=no
7261*8b26181fSAndroid Build Coastguard Workerfi
7262*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7263*8b26181fSAndroid Build Coastguard Workerfi
7264*8b26181fSAndroid Build Coastguard Worker
7265*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
7266*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
7267*8b26181fSAndroid Build Coastguard Worker	fi
7268*8b26181fSAndroid Build Coastguard Worker	for ac_header in net/pfilt.h net/enet.h
7269*8b26181fSAndroid Build Coastguard Workerdo :
7270*8b26181fSAndroid Build Coastguard Worker  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7271*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7272*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7273*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7274*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7275*8b26181fSAndroid Build Coastguard Worker_ACEOF
7276*8b26181fSAndroid Build Coastguard Worker
7277*8b26181fSAndroid Build Coastguard Workerfi
7278*8b26181fSAndroid Build Coastguard Worker
7279*8b26181fSAndroid Build Coastguard Workerdone
7280*8b26181fSAndroid Build Coastguard Worker
7281*8b26181fSAndroid Build Coastguard Worker	for ac_header in net/nit.h sys/net/nit.h
7282*8b26181fSAndroid Build Coastguard Workerdo :
7283*8b26181fSAndroid Build Coastguard Worker  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7284*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7285*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7286*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7287*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7288*8b26181fSAndroid Build Coastguard Worker_ACEOF
7289*8b26181fSAndroid Build Coastguard Worker
7290*8b26181fSAndroid Build Coastguard Workerfi
7291*8b26181fSAndroid Build Coastguard Worker
7292*8b26181fSAndroid Build Coastguard Workerdone
7293*8b26181fSAndroid Build Coastguard Worker
7294*8b26181fSAndroid Build Coastguard Worker	for ac_header in linux/socket.h net/raw.h sys/dlpi.h
7295*8b26181fSAndroid Build Coastguard Workerdo :
7296*8b26181fSAndroid Build Coastguard Worker  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7297*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7298*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7299*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7300*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7301*8b26181fSAndroid Build Coastguard Worker_ACEOF
7302*8b26181fSAndroid Build Coastguard Worker
7303*8b26181fSAndroid Build Coastguard Workerfi
7304*8b26181fSAndroid Build Coastguard Worker
7305*8b26181fSAndroid Build Coastguard Workerdone
7306*8b26181fSAndroid Build Coastguard Worker
7307*8b26181fSAndroid Build Coastguard Worker	for ac_header in config/HaikuConfig.h
7308*8b26181fSAndroid Build Coastguard Workerdo :
7309*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default"
7310*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_config_HaikuConfig_h" = xyes; then :
7311*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7312*8b26181fSAndroid Build Coastguard Worker#define HAVE_CONFIG_HAIKUCONFIG_H 1
7313*8b26181fSAndroid Build Coastguard Worker_ACEOF
7314*8b26181fSAndroid Build Coastguard Worker
7315*8b26181fSAndroid Build Coastguard Workerfi
7316*8b26181fSAndroid Build Coastguard Worker
7317*8b26181fSAndroid Build Coastguard Workerdone
7318*8b26181fSAndroid Build Coastguard Worker
7319*8b26181fSAndroid Build Coastguard Worker
7320*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
7321*8b26181fSAndroid Build Coastguard Worker		#
7322*8b26181fSAndroid Build Coastguard Worker		# BPF.
7323*8b26181fSAndroid Build Coastguard Worker		# Check this before DLPI, so that we pick BPF on
7324*8b26181fSAndroid Build Coastguard Worker		# Solaris 11 and later.
7325*8b26181fSAndroid Build Coastguard Worker		#
7326*8b26181fSAndroid Build Coastguard Worker		V_PCAP=bpf
7327*8b26181fSAndroid Build Coastguard Worker
7328*8b26181fSAndroid Build Coastguard Worker		#
7329*8b26181fSAndroid Build Coastguard Worker		# We have BPF, so build valgrindtest with "make test"
7330*8b26181fSAndroid Build Coastguard Worker		# on macOS and FreeBSD (add your OS once there's a
7331*8b26181fSAndroid Build Coastguard Worker		# valgrind for it).
7332*8b26181fSAndroid Build Coastguard Worker		#
7333*8b26181fSAndroid Build Coastguard Worker		case "$host_os" in
7334*8b26181fSAndroid Build Coastguard Worker
7335*8b26181fSAndroid Build Coastguard Worker		freebsd*|darwin*|linux*)
7336*8b26181fSAndroid Build Coastguard Worker			VALGRINDTEST_SRC=valgrindtest.c
7337*8b26181fSAndroid Build Coastguard Worker			;;
7338*8b26181fSAndroid Build Coastguard Worker		esac
7339*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_linux_socket_h" = yes; then
7340*8b26181fSAndroid Build Coastguard Worker		#
7341*8b26181fSAndroid Build Coastguard Worker		# No prizes for guessing this one.
7342*8b26181fSAndroid Build Coastguard Worker		#
7343*8b26181fSAndroid Build Coastguard Worker		V_PCAP=linux
7344*8b26181fSAndroid Build Coastguard Worker		VALGRINDTEST_SRC=valgrindtest.c
7345*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_net_pfilt_h" = yes; then
7346*8b26181fSAndroid Build Coastguard Worker		#
7347*8b26181fSAndroid Build Coastguard Worker		# DEC OSF/1, Digital UNIX, Tru64 UNIX
7348*8b26181fSAndroid Build Coastguard Worker		#
7349*8b26181fSAndroid Build Coastguard Worker		V_PCAP=pf
7350*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_net_enet_h" = yes; then
7351*8b26181fSAndroid Build Coastguard Worker		#
7352*8b26181fSAndroid Build Coastguard Worker		# Stanford Enetfilter.
7353*8b26181fSAndroid Build Coastguard Worker		#
7354*8b26181fSAndroid Build Coastguard Worker		V_PCAP=enet
7355*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_net_nit_h" = yes; then
7356*8b26181fSAndroid Build Coastguard Worker		#
7357*8b26181fSAndroid Build Coastguard Worker		# SunOS 4.x STREAMS NIT.
7358*8b26181fSAndroid Build Coastguard Worker		#
7359*8b26181fSAndroid Build Coastguard Worker		V_PCAP=snit
7360*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_sys_net_nit_h" = yes; then
7361*8b26181fSAndroid Build Coastguard Worker		#
7362*8b26181fSAndroid Build Coastguard Worker		# Pre-SunOS 4.x non-STREAMS NIT.
7363*8b26181fSAndroid Build Coastguard Worker		#
7364*8b26181fSAndroid Build Coastguard Worker		V_PCAP=nit
7365*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_net_raw_h" = yes; then
7366*8b26181fSAndroid Build Coastguard Worker		#
7367*8b26181fSAndroid Build Coastguard Worker		# IRIX snoop.
7368*8b26181fSAndroid Build Coastguard Worker		#
7369*8b26181fSAndroid Build Coastguard Worker		V_PCAP=snoop
7370*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_sys_dlpi_h" = yes; then
7371*8b26181fSAndroid Build Coastguard Worker		#
7372*8b26181fSAndroid Build Coastguard Worker		# DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
7373*8b26181fSAndroid Build Coastguard Worker		#
7374*8b26181fSAndroid Build Coastguard Worker		V_PCAP=dlpi
7375*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then
7376*8b26181fSAndroid Build Coastguard Worker		#
7377*8b26181fSAndroid Build Coastguard Worker		# Haiku.
7378*8b26181fSAndroid Build Coastguard Worker		#
7379*8b26181fSAndroid Build Coastguard Worker		V_PCAP=haiku
7380*8b26181fSAndroid Build Coastguard Worker	else
7381*8b26181fSAndroid Build Coastguard Worker		#
7382*8b26181fSAndroid Build Coastguard Worker		# Nothing we support.
7383*8b26181fSAndroid Build Coastguard Worker		#
7384*8b26181fSAndroid Build Coastguard Worker		V_PCAP=null
7385*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
7386*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
7387*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL.md file for more info)" >&5
7388*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: (see the INSTALL.md file for more info)" >&2;}
7389*8b26181fSAndroid Build Coastguard Worker	fi
7390*8b26181fSAndroid Build Coastguard Workerfi
7391*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
7392*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking packet capture type... " >&6; }
7393*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
7394*8b26181fSAndroid Build Coastguard Worker$as_echo "$V_PCAP" >&6; }
7395*8b26181fSAndroid Build Coastguard Worker
7396*8b26181fSAndroid Build Coastguard Worker
7397*8b26181fSAndroid Build Coastguard Worker#
7398*8b26181fSAndroid Build Coastguard Worker# Do we have pkg-config?
7399*8b26181fSAndroid Build Coastguard Worker#
7400*8b26181fSAndroid Build Coastguard Worker
7401*8b26181fSAndroid Build Coastguard Worker
7402*8b26181fSAndroid Build Coastguard Worker
7403*8b26181fSAndroid Build Coastguard Worker
7404*8b26181fSAndroid Build Coastguard Worker
7405*8b26181fSAndroid Build Coastguard Worker
7406*8b26181fSAndroid Build Coastguard Worker
7407*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
7408*8b26181fSAndroid Build Coastguard Worker	if test -n "$ac_tool_prefix"; then
7409*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
7410*8b26181fSAndroid Build Coastguard Workerset dummy ${ac_tool_prefix}pkg-config; ac_word=$2
7411*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
7413*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_path_PKG_CONFIG+:} false; then :
7414*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7415*8b26181fSAndroid Build Coastguard Workerelse
7416*8b26181fSAndroid Build Coastguard Worker  case $PKG_CONFIG in
7417*8b26181fSAndroid Build Coastguard Worker  [\\/]* | ?:[\\/]*)
7418*8b26181fSAndroid Build Coastguard Worker  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
7419*8b26181fSAndroid Build Coastguard Worker  ;;
7420*8b26181fSAndroid Build Coastguard Worker  *)
7421*8b26181fSAndroid Build Coastguard Worker  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
7423*8b26181fSAndroid Build Coastguard Workerdo
7424*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
7425*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
7426*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
7427*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428*8b26181fSAndroid Build Coastguard Worker    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7429*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430*8b26181fSAndroid Build Coastguard Worker    break 2
7431*8b26181fSAndroid Build Coastguard Worker  fi
7432*8b26181fSAndroid Build Coastguard Workerdone
7433*8b26181fSAndroid Build Coastguard Worker  done
7434*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
7435*8b26181fSAndroid Build Coastguard Worker
7436*8b26181fSAndroid Build Coastguard Worker  ;;
7437*8b26181fSAndroid Build Coastguard Workeresac
7438*8b26181fSAndroid Build Coastguard Workerfi
7439*8b26181fSAndroid Build Coastguard WorkerPKG_CONFIG=$ac_cv_path_PKG_CONFIG
7440*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG"; then
7441*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
7442*8b26181fSAndroid Build Coastguard Worker$as_echo "$PKG_CONFIG" >&6; }
7443*8b26181fSAndroid Build Coastguard Workerelse
7444*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
7446*8b26181fSAndroid Build Coastguard Workerfi
7447*8b26181fSAndroid Build Coastguard Worker
7448*8b26181fSAndroid Build Coastguard Worker
7449*8b26181fSAndroid Build Coastguard Workerfi
7450*8b26181fSAndroid Build Coastguard Workerif test -z "$ac_cv_path_PKG_CONFIG"; then
7451*8b26181fSAndroid Build Coastguard Worker  ac_pt_PKG_CONFIG=$PKG_CONFIG
7452*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "pkg-config", so it can be a program name with args.
7453*8b26181fSAndroid Build Coastguard Workerset dummy pkg-config; ac_word=$2
7454*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7455*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
7456*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
7457*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7458*8b26181fSAndroid Build Coastguard Workerelse
7459*8b26181fSAndroid Build Coastguard Worker  case $ac_pt_PKG_CONFIG in
7460*8b26181fSAndroid Build Coastguard Worker  [\\/]* | ?:[\\/]*)
7461*8b26181fSAndroid Build Coastguard Worker  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
7462*8b26181fSAndroid Build Coastguard Worker  ;;
7463*8b26181fSAndroid Build Coastguard Worker  *)
7464*8b26181fSAndroid Build Coastguard Worker  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7465*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
7466*8b26181fSAndroid Build Coastguard Workerdo
7467*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
7468*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
7469*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
7470*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7471*8b26181fSAndroid Build Coastguard Worker    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
7472*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7473*8b26181fSAndroid Build Coastguard Worker    break 2
7474*8b26181fSAndroid Build Coastguard Worker  fi
7475*8b26181fSAndroid Build Coastguard Workerdone
7476*8b26181fSAndroid Build Coastguard Worker  done
7477*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
7478*8b26181fSAndroid Build Coastguard Worker
7479*8b26181fSAndroid Build Coastguard Worker  ;;
7480*8b26181fSAndroid Build Coastguard Workeresac
7481*8b26181fSAndroid Build Coastguard Workerfi
7482*8b26181fSAndroid Build Coastguard Workerac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
7483*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_pt_PKG_CONFIG"; then
7484*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
7485*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_pt_PKG_CONFIG" >&6; }
7486*8b26181fSAndroid Build Coastguard Workerelse
7487*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7488*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
7489*8b26181fSAndroid Build Coastguard Workerfi
7490*8b26181fSAndroid Build Coastguard Worker
7491*8b26181fSAndroid Build Coastguard Worker  if test "x$ac_pt_PKG_CONFIG" = x; then
7492*8b26181fSAndroid Build Coastguard Worker    PKG_CONFIG=""
7493*8b26181fSAndroid Build Coastguard Worker  else
7494*8b26181fSAndroid Build Coastguard Worker    case $cross_compiling:$ac_tool_warned in
7495*8b26181fSAndroid Build Coastguard Workeryes:)
7496*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7497*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7498*8b26181fSAndroid Build Coastguard Workerac_tool_warned=yes ;;
7499*8b26181fSAndroid Build Coastguard Workeresac
7500*8b26181fSAndroid Build Coastguard Worker    PKG_CONFIG=$ac_pt_PKG_CONFIG
7501*8b26181fSAndroid Build Coastguard Worker  fi
7502*8b26181fSAndroid Build Coastguard Workerelse
7503*8b26181fSAndroid Build Coastguard Worker  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
7504*8b26181fSAndroid Build Coastguard Workerfi
7505*8b26181fSAndroid Build Coastguard Worker
7506*8b26181fSAndroid Build Coastguard Workerfi
7507*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG"; then
7508*8b26181fSAndroid Build Coastguard Worker	_pkg_min_version=0.17.0
7509*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
7510*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
7511*8b26181fSAndroid Build Coastguard Worker	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
7512*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7513*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
7514*8b26181fSAndroid Build Coastguard Worker	else
7515*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7516*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
7517*8b26181fSAndroid Build Coastguard Worker		PKG_CONFIG=""
7518*8b26181fSAndroid Build Coastguard Worker	fi
7519*8b26181fSAndroid Build Coastguard Workerfi
7520*8b26181fSAndroid Build Coastguard Worker
7521*8b26181fSAndroid Build Coastguard Worker#
7522*8b26181fSAndroid Build Coastguard Worker# Do we have the brew command from Homebrew?
7523*8b26181fSAndroid Build Coastguard Worker#
7524*8b26181fSAndroid Build Coastguard Worker# Extract the first word of "brew", so it can be a program name with args.
7525*8b26181fSAndroid Build Coastguard Workerset dummy brew; ac_word=$2
7526*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7527*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
7528*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_path_BREW+:} false; then :
7529*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7530*8b26181fSAndroid Build Coastguard Workerelse
7531*8b26181fSAndroid Build Coastguard Worker  case $BREW in
7532*8b26181fSAndroid Build Coastguard Worker  [\\/]* | ?:[\\/]*)
7533*8b26181fSAndroid Build Coastguard Worker  ac_cv_path_BREW="$BREW" # Let the user override the test with a path.
7534*8b26181fSAndroid Build Coastguard Worker  ;;
7535*8b26181fSAndroid Build Coastguard Worker  *)
7536*8b26181fSAndroid Build Coastguard Worker  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7537*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
7538*8b26181fSAndroid Build Coastguard Workerdo
7539*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
7540*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
7541*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
7542*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7543*8b26181fSAndroid Build Coastguard Worker    ac_cv_path_BREW="$as_dir/$ac_word$ac_exec_ext"
7544*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7545*8b26181fSAndroid Build Coastguard Worker    break 2
7546*8b26181fSAndroid Build Coastguard Worker  fi
7547*8b26181fSAndroid Build Coastguard Workerdone
7548*8b26181fSAndroid Build Coastguard Worker  done
7549*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
7550*8b26181fSAndroid Build Coastguard Worker
7551*8b26181fSAndroid Build Coastguard Worker  ;;
7552*8b26181fSAndroid Build Coastguard Workeresac
7553*8b26181fSAndroid Build Coastguard Workerfi
7554*8b26181fSAndroid Build Coastguard WorkerBREW=$ac_cv_path_BREW
7555*8b26181fSAndroid Build Coastguard Workerif test -n "$BREW"; then
7556*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5
7557*8b26181fSAndroid Build Coastguard Worker$as_echo "$BREW" >&6; }
7558*8b26181fSAndroid Build Coastguard Workerelse
7559*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7560*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
7561*8b26181fSAndroid Build Coastguard Workerfi
7562*8b26181fSAndroid Build Coastguard Worker
7563*8b26181fSAndroid Build Coastguard Worker
7564*8b26181fSAndroid Build Coastguard Worker
7565*8b26181fSAndroid Build Coastguard Worker#
7566*8b26181fSAndroid Build Coastguard Worker# Solaris pkg-config is annoying.  For at least one package (D-Bus, I'm
7567*8b26181fSAndroid Build Coastguard Worker# looking at *you*!), there are separate include files for 32-bit and
7568*8b26181fSAndroid Build Coastguard Worker# 64-bit builds (I guess using "unsigned long long" as a 64-bit integer
7569*8b26181fSAndroid Build Coastguard Worker# type on a 64-bit build is like crossing the beams or soething), and
7570*8b26181fSAndroid Build Coastguard Worker# there are two separate .pc files, so if we're doing a 32-bit build we
7571*8b26181fSAndroid Build Coastguard Worker# should make sure we look in /usr/lib/pkgconfig for .pc files and if
7572*8b26181fSAndroid Build Coastguard Worker# we're doing a 64-bit build we should make sure we look in
7573*8b26181fSAndroid Build Coastguard Worker# /usr/lib/amd64/pkgconfig for .pc files.
7574*8b26181fSAndroid Build Coastguard Worker#
7575*8b26181fSAndroid Build Coastguard Workercase "$host_os" in
7576*8b26181fSAndroid Build Coastguard Worker
7577*8b26181fSAndroid Build Coastguard Workersolaris*)
7578*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_sizeof_void_p" -eq 8; then
7579*8b26181fSAndroid Build Coastguard Worker		#
7580*8b26181fSAndroid Build Coastguard Worker		# 64-bit build.  If the path is empty, set it to
7581*8b26181fSAndroid Build Coastguard Worker                # /usr/lib/amd64/pkgconfig; otherwise, if
7582*8b26181fSAndroid Build Coastguard Worker                # /usr/lib/pkgconfig appears in the path, prepend
7583*8b26181fSAndroid Build Coastguard Worker		# /usr/lib/amd64/pkgconfig to it; otherwise, put
7584*8b26181fSAndroid Build Coastguard Worker		# /usr/lib/amd64/pkgconfig at the end.
7585*8b26181fSAndroid Build Coastguard Worker		#
7586*8b26181fSAndroid Build Coastguard Worker		if test -z "$PKG_CONFIG_PATH"; then
7587*8b26181fSAndroid Build Coastguard Worker			#
7588*8b26181fSAndroid Build Coastguard Worker			# Not set, or empty.  Set it to
7589*8b26181fSAndroid Build Coastguard Worker			# /usr/lib/amd64/pkgconfig.
7590*8b26181fSAndroid Build Coastguard Worker			#
7591*8b26181fSAndroid Build Coastguard Worker			PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig
7592*8b26181fSAndroid Build Coastguard Worker		elif test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/pkgconfig"`; then
7593*8b26181fSAndroid Build Coastguard Worker			#
7594*8b26181fSAndroid Build Coastguard Worker			# It contains /usr/lib/pkgconfig.  Prepend
7595*8b26181fSAndroid Build Coastguard Worker			# /usr/lib/amd64/pkgconfig to /usr/lib/pkgconfig.
7596*8b26181fSAndroid Build Coastguard Worker			#
7597*8b26181fSAndroid Build Coastguard Worker			PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/pkgconfig;/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig;"`
7598*8b26181fSAndroid Build Coastguard Worker		else
7599*8b26181fSAndroid Build Coastguard Worker			#
7600*8b26181fSAndroid Build Coastguard Worker			# Not empty, but doesn't contain /usr/lib/pkgconfig.
7601*8b26181fSAndroid Build Coastguard Worker			# Append /usr/lib/amd64/pkgconfig to it.
7602*8b26181fSAndroid Build Coastguard Worker			#
7603*8b26181fSAndroid Build Coastguard Worker			PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/amd64/pkgconfig"
7604*8b26181fSAndroid Build Coastguard Worker		fi
7605*8b26181fSAndroid Build Coastguard Worker		export PKG_CONFIG_PATH
7606*8b26181fSAndroid Build Coastguard Worker	elif test "$ac_cv_sizeof_void_p" -eq 4; then
7607*8b26181fSAndroid Build Coastguard Worker		#
7608*8b26181fSAndroid Build Coastguard Worker		# 32-bit build.  If /usr/amd64/lib/pkgconfig appears
7609*8b26181fSAndroid Build Coastguard Worker		# in the path, prepend /usr/lib/pkgconfig to it.
7610*8b26181fSAndroid Build Coastguard Worker		#
7611*8b26181fSAndroid Build Coastguard Worker		if test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/amd64/pkgconfig"`; then
7612*8b26181fSAndroid Build Coastguard Worker			#
7613*8b26181fSAndroid Build Coastguard Worker			# It contains /usr/lib/amd64/pkgconfig.  Prepend
7614*8b26181fSAndroid Build Coastguard Worker			# /usr/lib/pkgconfig to /usr/lib/amd64/pkgconfig.
7615*8b26181fSAndroid Build Coastguard Worker			#
7616*8b26181fSAndroid Build Coastguard Worker			PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/amd64/pkgconfig;/usr/lib/pkgconfig:/usr/lib/amd64/pkgconfig;"`
7617*8b26181fSAndroid Build Coastguard Worker			export PKG_CONFIG_PATH
7618*8b26181fSAndroid Build Coastguard Worker		fi
7619*8b26181fSAndroid Build Coastguard Worker	fi
7620*8b26181fSAndroid Build Coastguard Workeresac
7621*8b26181fSAndroid Build Coastguard Worker
7622*8b26181fSAndroid Build Coastguard Worker#
7623*8b26181fSAndroid Build Coastguard Worker# Handle each capture type.
7624*8b26181fSAndroid Build Coastguard Worker#
7625*8b26181fSAndroid Build Coastguard Workercase "$V_PCAP" in
7626*8b26181fSAndroid Build Coastguard Workerdlpi)
7627*8b26181fSAndroid Build Coastguard Worker	#
7628*8b26181fSAndroid Build Coastguard Worker	# Checks for some header files.
7629*8b26181fSAndroid Build Coastguard Worker	#
7630*8b26181fSAndroid Build Coastguard Worker	for ac_header in sys/bufmod.h sys/dlpi_ext.h
7631*8b26181fSAndroid Build Coastguard Workerdo :
7632*8b26181fSAndroid Build Coastguard Worker  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7633*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7634*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7635*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7636*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7637*8b26181fSAndroid Build Coastguard Worker_ACEOF
7638*8b26181fSAndroid Build Coastguard Worker
7639*8b26181fSAndroid Build Coastguard Workerfi
7640*8b26181fSAndroid Build Coastguard Worker
7641*8b26181fSAndroid Build Coastguard Workerdone
7642*8b26181fSAndroid Build Coastguard Worker
7643*8b26181fSAndroid Build Coastguard Worker
7644*8b26181fSAndroid Build Coastguard Worker	#
7645*8b26181fSAndroid Build Coastguard Worker	# Checks to see if Solaris has the public libdlpi(3LIB) library.
7646*8b26181fSAndroid Build Coastguard Worker	# Note: The existence of /usr/include/libdlpi.h does not mean it is the
7647*8b26181fSAndroid Build Coastguard Worker	# public libdlpi(3LIB) version. Before libdlpi was made public, a
7648*8b26181fSAndroid Build Coastguard Worker	# private version also existed, which did not have the same APIs.
7649*8b26181fSAndroid Build Coastguard Worker	# Due to a gcc bug, the default search path for 32-bit libraries does
7650*8b26181fSAndroid Build Coastguard Worker	# not include /lib, we add it explicitly here.
7651*8b26181fSAndroid Build Coastguard Worker	# [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
7652*8b26181fSAndroid Build Coastguard Worker	# Also, due to the bug above applications that link to libpcap with
7653*8b26181fSAndroid Build Coastguard Worker	# libdlpi will have to add "-L/lib" option to "configure".
7654*8b26181fSAndroid Build Coastguard Worker	#
7655*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
7656*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$LIBS -L/lib"
7657*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
7658*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
7659*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
7660*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7661*8b26181fSAndroid Build Coastguard Workerelse
7662*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
7663*8b26181fSAndroid Build Coastguard WorkerLIBS="-ldlpi  $LIBS"
7664*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
7665*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
7666*8b26181fSAndroid Build Coastguard Worker
7667*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
7668*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
7669*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
7670*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
7671*8b26181fSAndroid Build Coastguard Workerextern "C"
7672*8b26181fSAndroid Build Coastguard Worker#endif
7673*8b26181fSAndroid Build Coastguard Workerchar dlpi_walk ();
7674*8b26181fSAndroid Build Coastguard Workerint
7675*8b26181fSAndroid Build Coastguard Workermain ()
7676*8b26181fSAndroid Build Coastguard Worker{
7677*8b26181fSAndroid Build Coastguard Workerreturn dlpi_walk ();
7678*8b26181fSAndroid Build Coastguard Worker  ;
7679*8b26181fSAndroid Build Coastguard Worker  return 0;
7680*8b26181fSAndroid Build Coastguard Worker}
7681*8b26181fSAndroid Build Coastguard Worker_ACEOF
7682*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
7683*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dlpi_dlpi_walk=yes
7684*8b26181fSAndroid Build Coastguard Workerelse
7685*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dlpi_dlpi_walk=no
7686*8b26181fSAndroid Build Coastguard Workerfi
7687*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
7688*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
7689*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
7690*8b26181fSAndroid Build Coastguard Workerfi
7691*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
7692*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
7693*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
7694*8b26181fSAndroid Build Coastguard Worker
7695*8b26181fSAndroid Build Coastguard Worker			LIBS="-ldlpi $LIBS"
7696*8b26181fSAndroid Build Coastguard Worker			LIBS_STATIC="-ldlpi $LIBS_STATIC"
7697*8b26181fSAndroid Build Coastguard Worker			LIBS_PRIVATE="-ldlpi $LIBS_PRIVATE"
7698*8b26181fSAndroid Build Coastguard Worker			V_PCAP=libdlpi
7699*8b26181fSAndroid Build Coastguard Worker
7700*8b26181fSAndroid Build Coastguard Worker			#
7701*8b26181fSAndroid Build Coastguard Worker			# Capture module plus common code needed for
7702*8b26181fSAndroid Build Coastguard Worker			# common functions used by pcap-[dlpi,libdlpi].c
7703*8b26181fSAndroid Build Coastguard Worker			#
7704*8b26181fSAndroid Build Coastguard Worker			PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c"
7705*8b26181fSAndroid Build Coastguard Worker
7706*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
7707*8b26181fSAndroid Build Coastguard Worker
7708*8b26181fSAndroid Build Coastguard Worker
7709*8b26181fSAndroid Build Coastguard Workerelse
7710*8b26181fSAndroid Build Coastguard Worker
7711*8b26181fSAndroid Build Coastguard Worker			V_PCAP=dlpi
7712*8b26181fSAndroid Build Coastguard Worker
7713*8b26181fSAndroid Build Coastguard Worker			#
7714*8b26181fSAndroid Build Coastguard Worker			# Capture module plus common code needed for
7715*8b26181fSAndroid Build Coastguard Worker			# common functions used by pcap-[dlpi,libdlpi].c
7716*8b26181fSAndroid Build Coastguard Worker			#
7717*8b26181fSAndroid Build Coastguard Worker			PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c"
7718*8b26181fSAndroid Build Coastguard Worker
7719*8b26181fSAndroid Build Coastguard Workerfi
7720*8b26181fSAndroid Build Coastguard Worker
7721*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
7722*8b26181fSAndroid Build Coastguard Worker
7723*8b26181fSAndroid Build Coastguard Worker	#
7724*8b26181fSAndroid Build Coastguard Worker	# Checks whether <sys/dlpi.h> is usable, to catch weird SCO
7725*8b26181fSAndroid Build Coastguard Worker	# versions of DLPI.
7726*8b26181fSAndroid Build Coastguard Worker	#
7727*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
7728*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
7729*8b26181fSAndroid Build Coastguard Worker	if ${ac_cv_sys_dlpi_usable+:} false; then :
7730*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
7731*8b26181fSAndroid Build Coastguard Workerelse
7732*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7733*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
7734*8b26181fSAndroid Build Coastguard Worker
7735*8b26181fSAndroid Build Coastguard Worker			#include <sys/types.h>
7736*8b26181fSAndroid Build Coastguard Worker			#include <sys/time.h>
7737*8b26181fSAndroid Build Coastguard Worker			#include <sys/dlpi.h>
7738*8b26181fSAndroid Build Coastguard Worker
7739*8b26181fSAndroid Build Coastguard Workerint
7740*8b26181fSAndroid Build Coastguard Workermain ()
7741*8b26181fSAndroid Build Coastguard Worker{
7742*8b26181fSAndroid Build Coastguard Workerint i = DL_PROMISC_PHYS;
7743*8b26181fSAndroid Build Coastguard Worker  ;
7744*8b26181fSAndroid Build Coastguard Worker  return 0;
7745*8b26181fSAndroid Build Coastguard Worker}
7746*8b26181fSAndroid Build Coastguard Worker_ACEOF
7747*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
7748*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_dlpi_usable=yes
7749*8b26181fSAndroid Build Coastguard Workerelse
7750*8b26181fSAndroid Build Coastguard Worker  ac_cv_sys_dlpi_usable=no
7751*8b26181fSAndroid Build Coastguard Workerfi
7752*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7753*8b26181fSAndroid Build Coastguard Workerfi
7754*8b26181fSAndroid Build Coastguard Worker
7755*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
7756*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_sys_dlpi_usable" >&6; }
7757*8b26181fSAndroid Build Coastguard Worker	if test $ac_cv_sys_dlpi_usable = no ; then
7758*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
7759*8b26181fSAndroid Build Coastguard Worker	fi
7760*8b26181fSAndroid Build Coastguard Worker
7761*8b26181fSAndroid Build Coastguard Worker	#
7762*8b26181fSAndroid Build Coastguard Worker	# Check to see if Solaris has the dl_passive_req_t struct defined
7763*8b26181fSAndroid Build Coastguard Worker	# in <sys/dlpi.h>.
7764*8b26181fSAndroid Build Coastguard Worker	# This check is for DLPI support for passive modes.
7765*8b26181fSAndroid Build Coastguard Worker	# See dlpi(7P) for more details.
7766*8b26181fSAndroid Build Coastguard Worker	#
7767*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
7768*8b26181fSAndroid Build Coastguard Worker		#include <sys/types.h>
7769*8b26181fSAndroid Build Coastguard Worker		#include <sys/dlpi.h>
7770*8b26181fSAndroid Build Coastguard Worker
7771*8b26181fSAndroid Build Coastguard Worker"
7772*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
7773*8b26181fSAndroid Build Coastguard Worker
7774*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
7775*8b26181fSAndroid Build Coastguard Worker#define HAVE_DL_PASSIVE_REQ_T 1
7776*8b26181fSAndroid Build Coastguard Worker_ACEOF
7777*8b26181fSAndroid Build Coastguard Worker
7778*8b26181fSAndroid Build Coastguard Worker
7779*8b26181fSAndroid Build Coastguard Workerfi
7780*8b26181fSAndroid Build Coastguard Worker
7781*8b26181fSAndroid Build Coastguard Worker	;;
7782*8b26181fSAndroid Build Coastguard Worker
7783*8b26181fSAndroid Build Coastguard Workerenet)
7784*8b26181fSAndroid Build Coastguard Worker	#
7785*8b26181fSAndroid Build Coastguard Worker	# Capture module
7786*8b26181fSAndroid Build Coastguard Worker	#
7787*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-enet.c"
7788*8b26181fSAndroid Build Coastguard Worker	;;
7789*8b26181fSAndroid Build Coastguard Worker
7790*8b26181fSAndroid Build Coastguard Workerhaiku)
7791*8b26181fSAndroid Build Coastguard Worker	#
7792*8b26181fSAndroid Build Coastguard Worker	# Capture module
7793*8b26181fSAndroid Build Coastguard Worker	#
7794*8b26181fSAndroid Build Coastguard Worker	PLATFORM_CXX_SRC="pcap-haiku.cpp"
7795*8b26181fSAndroid Build Coastguard Worker
7796*8b26181fSAndroid Build Coastguard Worker	#
7797*8b26181fSAndroid Build Coastguard Worker	# Just for the sake of it.
7798*8b26181fSAndroid Build Coastguard Worker	#
7799*8b26181fSAndroid Build Coastguard Worker	for ac_header in net/if.h net/if_dl.h net/if_types.h
7800*8b26181fSAndroid Build Coastguard Workerdo :
7801*8b26181fSAndroid Build Coastguard Worker  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7802*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
7803*8b26181fSAndroid Build Coastguard Workerif eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7804*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7805*8b26181fSAndroid Build Coastguard Worker#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7806*8b26181fSAndroid Build Coastguard Worker_ACEOF
7807*8b26181fSAndroid Build Coastguard Worker
7808*8b26181fSAndroid Build Coastguard Workerfi
7809*8b26181fSAndroid Build Coastguard Worker
7810*8b26181fSAndroid Build Coastguard Workerdone
7811*8b26181fSAndroid Build Coastguard Worker
7812*8b26181fSAndroid Build Coastguard Worker	;;
7813*8b26181fSAndroid Build Coastguard Worker
7814*8b26181fSAndroid Build Coastguard Workerlinux)
7815*8b26181fSAndroid Build Coastguard Worker	#
7816*8b26181fSAndroid Build Coastguard Worker	# Capture module
7817*8b26181fSAndroid Build Coastguard Worker	#
7818*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-linux.c"
7819*8b26181fSAndroid Build Coastguard Worker
7820*8b26181fSAndroid Build Coastguard Worker	#
7821*8b26181fSAndroid Build Coastguard Worker	# Do we have the wireless extensions?
7822*8b26181fSAndroid Build Coastguard Worker	#
7823*8b26181fSAndroid Build Coastguard Worker	for ac_header in linux/wireless.h
7824*8b26181fSAndroid Build Coastguard Workerdo :
7825*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
7826*8b26181fSAndroid Build Coastguard Worker#include <sys/socket.h>
7827*8b26181fSAndroid Build Coastguard Worker#include <linux/if.h>
7828*8b26181fSAndroid Build Coastguard Worker#include <linux/types.h>
7829*8b26181fSAndroid Build Coastguard Worker
7830*8b26181fSAndroid Build Coastguard Worker"
7831*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_linux_wireless_h" = xyes; then :
7832*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
7833*8b26181fSAndroid Build Coastguard Worker#define HAVE_LINUX_WIRELESS_H 1
7834*8b26181fSAndroid Build Coastguard Worker_ACEOF
7835*8b26181fSAndroid Build Coastguard Worker
7836*8b26181fSAndroid Build Coastguard Workerfi
7837*8b26181fSAndroid Build Coastguard Worker
7838*8b26181fSAndroid Build Coastguard Workerdone
7839*8b26181fSAndroid Build Coastguard Worker
7840*8b26181fSAndroid Build Coastguard Worker
7841*8b26181fSAndroid Build Coastguard Worker	#
7842*8b26181fSAndroid Build Coastguard Worker	# Do we have libnl?
7843*8b26181fSAndroid Build Coastguard Worker	# We only want version 3.  Version 2 was, apparently,
7844*8b26181fSAndroid Build Coastguard Worker	# short-lived, and version 1 is source and binary
7845*8b26181fSAndroid Build Coastguard Worker	# incompatible with version 3, and it appears that,
7846*8b26181fSAndroid Build Coastguard Worker	# these days, everybody's using version 3.  We're
7847*8b26181fSAndroid Build Coastguard Worker	# not supporting older versions of the Linux kernel;
7848*8b26181fSAndroid Build Coastguard Worker	# let's drop support for older versions of libnl, too.
7849*8b26181fSAndroid Build Coastguard Worker	#
7850*8b26181fSAndroid Build Coastguard Worker
7851*8b26181fSAndroid Build Coastguard Worker# Check whether --with-libnl was given.
7852*8b26181fSAndroid Build Coastguard Workerif test "${with_libnl+set}" = set; then :
7853*8b26181fSAndroid Build Coastguard Worker  withval=$with_libnl; with_libnl=$withval
7854*8b26181fSAndroid Build Coastguard Workerelse
7855*8b26181fSAndroid Build Coastguard Worker  with_libnl=if_available
7856*8b26181fSAndroid Build Coastguard Workerfi
7857*8b26181fSAndroid Build Coastguard Worker
7858*8b26181fSAndroid Build Coastguard Worker
7859*8b26181fSAndroid Build Coastguard Worker	if test x$with_libnl != xno ; then
7860*8b26181fSAndroid Build Coastguard Worker		#
7861*8b26181fSAndroid Build Coastguard Worker		# Check for libnl-genl-3.0 with pkg-config.
7862*8b26181fSAndroid Build Coastguard Worker		#
7863*8b26181fSAndroid Build Coastguard Worker
7864*8b26181fSAndroid Build Coastguard Worker
7865*8b26181fSAndroid Build Coastguard Workerpkg_failed=no
7866*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5
7867*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for libnl-genl-3.0 with pkg-config... " >&6; }
7868*8b26181fSAndroid Build Coastguard Worker
7869*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
7870*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7871*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7872*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
7873*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7874*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
7875*8b26181fSAndroid Build Coastguard Worker
7876*8b26181fSAndroid Build Coastguard Worker	#
7877*8b26181fSAndroid Build Coastguard Worker	# The package was found, so try to get its C flags and
7878*8b26181fSAndroid Build Coastguard Worker	# libraries.
7879*8b26181fSAndroid Build Coastguard Worker	#
7880*8b26181fSAndroid Build Coastguard Worker	if test -n "$LIBNL_CFLAGS"; then
7881*8b26181fSAndroid Build Coastguard Worker    pkg_cv_LIBNL_CFLAGS="$LIBNL_CFLAGS"
7882*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
7883*8b26181fSAndroid Build Coastguard Worker
7884*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
7885*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7886*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7887*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
7888*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7889*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
7890*8b26181fSAndroid Build Coastguard Worker  pkg_cv_LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-genl-3.0" 2>/dev/null`
7891*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
7892*8b26181fSAndroid Build Coastguard Workerelse
7893*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
7894*8b26181fSAndroid Build Coastguard Workerfi
7895*8b26181fSAndroid Build Coastguard Worker else
7896*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
7897*8b26181fSAndroid Build Coastguard Workerfi
7898*8b26181fSAndroid Build Coastguard Worker	if test -n "$LIBNL_LIBS"; then
7899*8b26181fSAndroid Build Coastguard Worker    pkg_cv_LIBNL_LIBS="$LIBNL_LIBS"
7900*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
7901*8b26181fSAndroid Build Coastguard Worker
7902*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
7903*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7904*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7905*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
7906*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7907*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
7908*8b26181fSAndroid Build Coastguard Worker  pkg_cv_LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-genl-3.0" 2>/dev/null`
7909*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
7910*8b26181fSAndroid Build Coastguard Workerelse
7911*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
7912*8b26181fSAndroid Build Coastguard Workerfi
7913*8b26181fSAndroid Build Coastguard Worker else
7914*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
7915*8b26181fSAndroid Build Coastguard Workerfi
7916*8b26181fSAndroid Build Coastguard Worker	if test -n "$LIBNL_LIBS_STATIC"; then
7917*8b26181fSAndroid Build Coastguard Worker    pkg_cv_LIBNL_LIBS_STATIC="$LIBNL_LIBS_STATIC"
7918*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
7919*8b26181fSAndroid Build Coastguard Worker
7920*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
7921*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5
7922*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5
7923*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
7924*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7925*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
7926*8b26181fSAndroid Build Coastguard Worker  pkg_cv_LIBNL_LIBS_STATIC=`$PKG_CONFIG --libs --static "libnl-genl-3.0" 2>/dev/null`
7927*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
7928*8b26181fSAndroid Build Coastguard Workerelse
7929*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
7930*8b26181fSAndroid Build Coastguard Workerfi
7931*8b26181fSAndroid Build Coastguard Worker else
7932*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
7933*8b26181fSAndroid Build Coastguard Workerfi
7934*8b26181fSAndroid Build Coastguard Worker
7935*8b26181fSAndroid Build Coastguard Worker
7936*8b26181fSAndroid Build Coastguard Worker
7937*8b26181fSAndroid Build Coastguard Worker	if test $pkg_failed = yes; then
7938*8b26181fSAndroid Build Coastguard Worker		#
7939*8b26181fSAndroid Build Coastguard Worker		# That failed - report an error.
7940*8b26181fSAndroid Build Coastguard Worker		#
7941*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
7942*8b26181fSAndroid Build Coastguard Worker$as_echo "error" >&6; }
7943*8b26181fSAndroid Build Coastguard Worker
7944*8b26181fSAndroid Build Coastguard Workerif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
7945*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=yes
7946*8b26181fSAndroid Build Coastguard Workerelse
7947*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=no
7948*8b26181fSAndroid Build Coastguard Workerfi
7949*8b26181fSAndroid Build Coastguard Worker	        if test $_pkg_short_errors_supported = yes; then
7950*8b26181fSAndroid Build Coastguard Worker		        LIBNL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libnl-genl-3.0" 2>&1`
7951*8b26181fSAndroid Build Coastguard Worker	        else
7952*8b26181fSAndroid Build Coastguard Worker		        LIBNL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libnl-genl-3.0" 2>&1`
7953*8b26181fSAndroid Build Coastguard Worker	        fi
7954*8b26181fSAndroid Build Coastguard Worker		# Put the nasty error message in config.log where it belongs
7955*8b26181fSAndroid Build Coastguard Worker		echo "$LIBNL_PKG_ERRORS" >&5
7956*8b26181fSAndroid Build Coastguard Worker
7957*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "Package requirements (libnl-genl-3.0) were not met:
7958*8b26181fSAndroid Build Coastguard Worker
7959*8b26181fSAndroid Build Coastguard Worker$LIBNL_PKG_ERRORS
7960*8b26181fSAndroid Build Coastguard Worker
7961*8b26181fSAndroid Build Coastguard WorkerConsider adjusting the PKG_CONFIG_PATH environment variable if you
7962*8b26181fSAndroid Build Coastguard Workerinstalled software in a non-standard prefix.
7963*8b26181fSAndroid Build Coastguard Worker
7964*8b26181fSAndroid Build Coastguard Worker
7965*8b26181fSAndroid Build Coastguard WorkerAlternatively, you may set the environment variables LIBNL_CFLAGS
7966*8b26181fSAndroid Build Coastguard Workerand LIBNL_LIBS to avoid the need to call pkg-config.
7967*8b26181fSAndroid Build Coastguard WorkerSee the pkg-config man page for more details." "$LINENO" 5
7968*8b26181fSAndroid Build Coastguard Worker	elif test $pkg_failed = untried; then
7969*8b26181fSAndroid Build Coastguard Worker		#
7970*8b26181fSAndroid Build Coastguard Worker		# We don't have pkg-config, so it didn't work.
7971*8b26181fSAndroid Build Coastguard Worker		#
7972*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
7973*8b26181fSAndroid Build Coastguard Worker$as_echo "not found (pkg-config not found)" >&6; }
7974*8b26181fSAndroid Build Coastguard Worker	else
7975*8b26181fSAndroid Build Coastguard Worker		#
7976*8b26181fSAndroid Build Coastguard Worker		# We found the package.
7977*8b26181fSAndroid Build Coastguard Worker		#
7978*8b26181fSAndroid Build Coastguard Worker		LIBNL_CFLAGS=$pkg_cv_LIBNL_CFLAGS
7979*8b26181fSAndroid Build Coastguard Worker		LIBNL_LIBS=$pkg_cv_LIBNL_LIBS
7980*8b26181fSAndroid Build Coastguard Worker		LIBNL_LIBS_STATIC=$pkg_cv_LIBNL_LIBS_STATIC
7981*8b26181fSAndroid Build Coastguard Worker	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
7982*8b26181fSAndroid Build Coastguard Worker$as_echo "found" >&6; }
7983*8b26181fSAndroid Build Coastguard Worker
7984*8b26181fSAndroid Build Coastguard Worker			pkg_config_found_libnl=yes
7985*8b26181fSAndroid Build Coastguard Worker			V_INCLS="$V_INCLS $LIBNL_CFLAGS"
7986*8b26181fSAndroid Build Coastguard Worker			ADDITIONAL_LIBS="$LIBNL_LIBS $ADDITIONAL_LIBS"
7987*8b26181fSAndroid Build Coastguard Worker			ADDITIONAL_LIBS_STATIC="$LIBNL_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
7988*8b26181fSAndroid Build Coastguard Worker			REQUIRES_PRIVATE="libnl-genl-3.0 $REQUIRES_PRIVATE"
7989*8b26181fSAndroid Build Coastguard Worker
7990*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
7991*8b26181fSAndroid Build Coastguard Worker
7992*8b26181fSAndroid Build Coastguard Worker
7993*8b26181fSAndroid Build Coastguard Worker	fi
7994*8b26181fSAndroid Build Coastguard Workerelse
7995*8b26181fSAndroid Build Coastguard Worker
7996*8b26181fSAndroid Build Coastguard Worker	#
7997*8b26181fSAndroid Build Coastguard Worker	# The package isn't present.
7998*8b26181fSAndroid Build Coastguard Worker	#
7999*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8000*8b26181fSAndroid Build Coastguard Worker$as_echo "not found" >&6; }
8001*8b26181fSAndroid Build Coastguard Worker
8002*8b26181fSAndroid Build Coastguard Workerfi
8003*8b26181fSAndroid Build Coastguard Worker
8004*8b26181fSAndroid Build Coastguard Worker
8005*8b26181fSAndroid Build Coastguard Worker		if test x$pkg_config_found_libnl != xyes; then
8006*8b26181fSAndroid Build Coastguard Worker			#
8007*8b26181fSAndroid Build Coastguard Worker			# OK, either we don't have pkg-config or there
8008*8b26181fSAndroid Build Coastguard Worker			# wasn't a .pc file for it; Check for it directly.
8009*8b26181fSAndroid Build Coastguard Worker			#
8010*8b26181fSAndroid Build Coastguard Worker			case "$with_libnl" in
8011*8b26181fSAndroid Build Coastguard Worker
8012*8b26181fSAndroid Build Coastguard Worker			yes|if_available)
8013*8b26181fSAndroid Build Coastguard Worker				incdir=-I/usr/include/libnl3
8014*8b26181fSAndroid Build Coastguard Worker				libnldir=
8015*8b26181fSAndroid Build Coastguard Worker				;;
8016*8b26181fSAndroid Build Coastguard Worker
8017*8b26181fSAndroid Build Coastguard Worker			*)
8018*8b26181fSAndroid Build Coastguard Worker				if test -d $withval; then
8019*8b26181fSAndroid Build Coastguard Worker					libnldir=-L${withval}/lib
8020*8b26181fSAndroid Build Coastguard Worker					incdir=-I${withval}/include
8021*8b26181fSAndroid Build Coastguard Worker				fi
8022*8b26181fSAndroid Build Coastguard Worker				;;
8023*8b26181fSAndroid Build Coastguard Worker			esac
8024*8b26181fSAndroid Build Coastguard Worker
8025*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
8026*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
8027*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
8028*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8029*8b26181fSAndroid Build Coastguard Workerelse
8030*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
8031*8b26181fSAndroid Build Coastguard WorkerLIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3  $LIBS"
8032*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
8033*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8034*8b26181fSAndroid Build Coastguard Worker
8035*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
8036*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
8037*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
8038*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
8039*8b26181fSAndroid Build Coastguard Workerextern "C"
8040*8b26181fSAndroid Build Coastguard Worker#endif
8041*8b26181fSAndroid Build Coastguard Workerchar nl_socket_alloc ();
8042*8b26181fSAndroid Build Coastguard Workerint
8043*8b26181fSAndroid Build Coastguard Workermain ()
8044*8b26181fSAndroid Build Coastguard Worker{
8045*8b26181fSAndroid Build Coastguard Workerreturn nl_socket_alloc ();
8046*8b26181fSAndroid Build Coastguard Worker  ;
8047*8b26181fSAndroid Build Coastguard Worker  return 0;
8048*8b26181fSAndroid Build Coastguard Worker}
8049*8b26181fSAndroid Build Coastguard Worker_ACEOF
8050*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
8051*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_nl_3_nl_socket_alloc=yes
8052*8b26181fSAndroid Build Coastguard Workerelse
8053*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_nl_3_nl_socket_alloc=no
8054*8b26181fSAndroid Build Coastguard Workerfi
8055*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
8056*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
8057*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
8058*8b26181fSAndroid Build Coastguard Workerfi
8059*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
8060*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
8061*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
8062*8b26181fSAndroid Build Coastguard Worker
8063*8b26181fSAndroid Build Coastguard Worker				#
8064*8b26181fSAndroid Build Coastguard Worker				# Yes, we have libnl 3.x.
8065*8b26181fSAndroid Build Coastguard Worker				#
8066*8b26181fSAndroid Build Coastguard Worker				ADDITIONAL_LIBS="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS"
8067*8b26181fSAndroid Build Coastguard Worker				ADDITIONAL_LIBS_STATIC="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS_STATIC"
8068*8b26181fSAndroid Build Coastguard Worker				LIBS_PRIVATE="${libnldir} -lnl-genl-3 -lnl-3 $LIBS_PRIVATE"
8069*8b26181fSAndroid Build Coastguard Worker
8070*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
8071*8b26181fSAndroid Build Coastguard Worker
8072*8b26181fSAndroid Build Coastguard Worker				V_INCLS="$V_INCLS ${incdir}"
8073*8b26181fSAndroid Build Coastguard Worker
8074*8b26181fSAndroid Build Coastguard Workerelse
8075*8b26181fSAndroid Build Coastguard Worker
8076*8b26181fSAndroid Build Coastguard Worker				#
8077*8b26181fSAndroid Build Coastguard Worker				# No, we don't have libnl at all.
8078*8b26181fSAndroid Build Coastguard Worker				# Fail if the user explicitly requested
8079*8b26181fSAndroid Build Coastguard Worker				# it.
8080*8b26181fSAndroid Build Coastguard Worker				#
8081*8b26181fSAndroid Build Coastguard Worker				if test x$with_libnl = xyes ; then
8082*8b26181fSAndroid Build Coastguard Worker					as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
8083*8b26181fSAndroid Build Coastguard Worker				fi
8084*8b26181fSAndroid Build Coastguard Worker
8085*8b26181fSAndroid Build Coastguard Workerfi
8086*8b26181fSAndroid Build Coastguard Worker
8087*8b26181fSAndroid Build Coastguard Worker		fi
8088*8b26181fSAndroid Build Coastguard Worker	fi
8089*8b26181fSAndroid Build Coastguard Worker
8090*8b26181fSAndroid Build Coastguard Worker	#
8091*8b26181fSAndroid Build Coastguard Worker	# Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
8092*8b26181fSAndroid Build Coastguard Worker	#
8093*8b26181fSAndroid Build Coastguard Worker	# NOTE: any failure means we conclude that it doesn't have that
8094*8b26181fSAndroid Build Coastguard Worker	# member, so if we don't have tpacket_auxdata, we conclude it
8095*8b26181fSAndroid Build Coastguard Worker	# doesn't have that member (which is OK, as either we won't be
8096*8b26181fSAndroid Build Coastguard Worker	# using code that would use that member, or we wouldn't compile
8097*8b26181fSAndroid Build Coastguard Worker	# in any case).
8098*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
8099*8b26181fSAndroid Build Coastguard Worker		#include <sys/types.h>
8100*8b26181fSAndroid Build Coastguard Worker		#include <linux/if_packet.h>
8101*8b26181fSAndroid Build Coastguard Worker
8102*8b26181fSAndroid Build Coastguard Worker"
8103*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
8104*8b26181fSAndroid Build Coastguard Worker
8105*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
8106*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
8107*8b26181fSAndroid Build Coastguard Worker_ACEOF
8108*8b26181fSAndroid Build Coastguard Worker
8109*8b26181fSAndroid Build Coastguard Worker
8110*8b26181fSAndroid Build Coastguard Workerfi
8111*8b26181fSAndroid Build Coastguard Worker
8112*8b26181fSAndroid Build Coastguard Worker	;;
8113*8b26181fSAndroid Build Coastguard Worker
8114*8b26181fSAndroid Build Coastguard Workerbpf)
8115*8b26181fSAndroid Build Coastguard Worker	#
8116*8b26181fSAndroid Build Coastguard Worker	# Capture module
8117*8b26181fSAndroid Build Coastguard Worker	#
8118*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-bpf.c"
8119*8b26181fSAndroid Build Coastguard Worker
8120*8b26181fSAndroid Build Coastguard Worker	#
8121*8b26181fSAndroid Build Coastguard Worker	# Check whether we have the *BSD-style ioctls.
8122*8b26181fSAndroid Build Coastguard Worker	#
8123*8b26181fSAndroid Build Coastguard Worker	for ac_header in net/if_media.h
8124*8b26181fSAndroid Build Coastguard Workerdo :
8125*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
8126*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_net_if_media_h" = xyes; then :
8127*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
8128*8b26181fSAndroid Build Coastguard Worker#define HAVE_NET_IF_MEDIA_H 1
8129*8b26181fSAndroid Build Coastguard Worker_ACEOF
8130*8b26181fSAndroid Build Coastguard Worker
8131*8b26181fSAndroid Build Coastguard Workerfi
8132*8b26181fSAndroid Build Coastguard Worker
8133*8b26181fSAndroid Build Coastguard Workerdone
8134*8b26181fSAndroid Build Coastguard Worker
8135*8b26181fSAndroid Build Coastguard Worker
8136*8b26181fSAndroid Build Coastguard Worker	#
8137*8b26181fSAndroid Build Coastguard Worker	# Check whether we have struct BPF_TIMEVAL.
8138*8b26181fSAndroid Build Coastguard Worker	#
8139*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
8140*8b26181fSAndroid Build Coastguard Worker		#include <sys/types.h>
8141*8b26181fSAndroid Build Coastguard Worker		#include <sys/ioctl.h>
8142*8b26181fSAndroid Build Coastguard Worker		#ifdef HAVE_SYS_IOCCOM_H
8143*8b26181fSAndroid Build Coastguard Worker		#include <sys/ioccom.h>
8144*8b26181fSAndroid Build Coastguard Worker		#endif
8145*8b26181fSAndroid Build Coastguard Worker		#include <net/bpf.h>
8146*8b26181fSAndroid Build Coastguard Worker
8147*8b26181fSAndroid Build Coastguard Worker"
8148*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
8149*8b26181fSAndroid Build Coastguard Worker
8150*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
8151*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_BPF_TIMEVAL 1
8152*8b26181fSAndroid Build Coastguard Worker_ACEOF
8153*8b26181fSAndroid Build Coastguard Worker
8154*8b26181fSAndroid Build Coastguard Worker
8155*8b26181fSAndroid Build Coastguard Workerfi
8156*8b26181fSAndroid Build Coastguard Worker
8157*8b26181fSAndroid Build Coastguard Worker	;;
8158*8b26181fSAndroid Build Coastguard Worker
8159*8b26181fSAndroid Build Coastguard Workerpf)
8160*8b26181fSAndroid Build Coastguard Worker	#
8161*8b26181fSAndroid Build Coastguard Worker	# Capture module
8162*8b26181fSAndroid Build Coastguard Worker	#
8163*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-pf.c"
8164*8b26181fSAndroid Build Coastguard Worker	;;
8165*8b26181fSAndroid Build Coastguard Worker
8166*8b26181fSAndroid Build Coastguard Workersnit)
8167*8b26181fSAndroid Build Coastguard Worker	#
8168*8b26181fSAndroid Build Coastguard Worker	# Capture module
8169*8b26181fSAndroid Build Coastguard Worker	#
8170*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-snit.c"
8171*8b26181fSAndroid Build Coastguard Worker	;;
8172*8b26181fSAndroid Build Coastguard Worker
8173*8b26181fSAndroid Build Coastguard Workersnoop)
8174*8b26181fSAndroid Build Coastguard Worker	#
8175*8b26181fSAndroid Build Coastguard Worker	# Capture module
8176*8b26181fSAndroid Build Coastguard Worker	#
8177*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-snoop.c"
8178*8b26181fSAndroid Build Coastguard Worker	;;
8179*8b26181fSAndroid Build Coastguard Worker
8180*8b26181fSAndroid Build Coastguard Workerdag)
8181*8b26181fSAndroid Build Coastguard Worker	#
8182*8b26181fSAndroid Build Coastguard Worker	# --with-pcap=dag is the only way to get here, and it means
8183*8b26181fSAndroid Build Coastguard Worker	# "DAG support but nothing else"
8184*8b26181fSAndroid Build Coastguard Worker	#
8185*8b26181fSAndroid Build Coastguard Worker	V_DEFS="$V_DEFS -DDAG_ONLY"
8186*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-dag.c"
8187*8b26181fSAndroid Build Coastguard Worker	xxx_only=yes
8188*8b26181fSAndroid Build Coastguard Worker	;;
8189*8b26181fSAndroid Build Coastguard Worker
8190*8b26181fSAndroid Build Coastguard Workerdpdk)
8191*8b26181fSAndroid Build Coastguard Worker	#
8192*8b26181fSAndroid Build Coastguard Worker	# --with-pcap=dpdk is the only way to get here, and it means
8193*8b26181fSAndroid Build Coastguard Worker	# "DPDK support but nothing else"
8194*8b26181fSAndroid Build Coastguard Worker	#
8195*8b26181fSAndroid Build Coastguard Worker	V_DEFS="$V_DEFS -DDPDK_ONLY"
8196*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-dpdk.c"
8197*8b26181fSAndroid Build Coastguard Worker	xxx_only=yes
8198*8b26181fSAndroid Build Coastguard Worker	;;
8199*8b26181fSAndroid Build Coastguard Worker
8200*8b26181fSAndroid Build Coastguard Workerseptel)
8201*8b26181fSAndroid Build Coastguard Worker	#
8202*8b26181fSAndroid Build Coastguard Worker	# --with-pcap=septel is the only way to get here, and it means
8203*8b26181fSAndroid Build Coastguard Worker	# "Septel support but nothing else"
8204*8b26181fSAndroid Build Coastguard Worker	#
8205*8b26181fSAndroid Build Coastguard Worker	V_DEFS="$V_DEFS -DSEPTEL_ONLY"
8206*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-septel.c"
8207*8b26181fSAndroid Build Coastguard Worker	xxx_only=yes
8208*8b26181fSAndroid Build Coastguard Worker	;;
8209*8b26181fSAndroid Build Coastguard Worker
8210*8b26181fSAndroid Build Coastguard Workersnf)
8211*8b26181fSAndroid Build Coastguard Worker	#
8212*8b26181fSAndroid Build Coastguard Worker	# --with-pcap=snf is the only way to get here, and it means
8213*8b26181fSAndroid Build Coastguard Worker	# "SNF support but nothing else"
8214*8b26181fSAndroid Build Coastguard Worker	#
8215*8b26181fSAndroid Build Coastguard Worker	V_DEFS="$V_DEFS -DSNF_ONLY"
8216*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-snf.c"
8217*8b26181fSAndroid Build Coastguard Worker	xxx_only=yes
8218*8b26181fSAndroid Build Coastguard Worker	;;
8219*8b26181fSAndroid Build Coastguard Worker
8220*8b26181fSAndroid Build Coastguard Workernull)
8221*8b26181fSAndroid Build Coastguard Worker	#
8222*8b26181fSAndroid Build Coastguard Worker	# Capture module
8223*8b26181fSAndroid Build Coastguard Worker	#
8224*8b26181fSAndroid Build Coastguard Worker	PLATFORM_C_SRC="pcap-null.c"
8225*8b26181fSAndroid Build Coastguard Worker	;;
8226*8b26181fSAndroid Build Coastguard Worker
8227*8b26181fSAndroid Build Coastguard Worker*)
8228*8b26181fSAndroid Build Coastguard Worker	as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
8229*8b26181fSAndroid Build Coastguard Worker	;;
8230*8b26181fSAndroid Build Coastguard Workeresac
8231*8b26181fSAndroid Build Coastguard Worker
8232*8b26181fSAndroid Build Coastguard Workerif test "$V_PCAP" != null
8233*8b26181fSAndroid Build Coastguard Workerthen
8234*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
8235*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_getifaddrs" = xyes; then :
8236*8b26181fSAndroid Build Coastguard Worker
8237*8b26181fSAndroid Build Coastguard Worker		#
8238*8b26181fSAndroid Build Coastguard Worker		# We have "getifaddrs()"; make sure we have <ifaddrs.h>
8239*8b26181fSAndroid Build Coastguard Worker		# as well, just in case some platform is really weird.
8240*8b26181fSAndroid Build Coastguard Worker		#
8241*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
8242*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_ifaddrs_h" = xyes; then :
8243*8b26181fSAndroid Build Coastguard Worker
8244*8b26181fSAndroid Build Coastguard Worker		    #
8245*8b26181fSAndroid Build Coastguard Worker		    # We have the header, so we use "getifaddrs()" to
8246*8b26181fSAndroid Build Coastguard Worker		    # get the list of interfaces.
8247*8b26181fSAndroid Build Coastguard Worker		    #
8248*8b26181fSAndroid Build Coastguard Worker		    PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c"
8249*8b26181fSAndroid Build Coastguard Worker
8250*8b26181fSAndroid Build Coastguard Workerelse
8251*8b26181fSAndroid Build Coastguard Worker
8252*8b26181fSAndroid Build Coastguard Worker		    #
8253*8b26181fSAndroid Build Coastguard Worker		    # We don't have the header - give up.
8254*8b26181fSAndroid Build Coastguard Worker		    # XXX - we could also fall back on some other
8255*8b26181fSAndroid Build Coastguard Worker		    # mechanism, but, for now, this'll catch this
8256*8b26181fSAndroid Build Coastguard Worker		    # problem so that we can at least try to figure
8257*8b26181fSAndroid Build Coastguard Worker		    # out something to do on systems with "getifaddrs()"
8258*8b26181fSAndroid Build Coastguard Worker		    # but without "ifaddrs.h", if there is something
8259*8b26181fSAndroid Build Coastguard Worker		    # we can do on those systems.
8260*8b26181fSAndroid Build Coastguard Worker		    #
8261*8b26181fSAndroid Build Coastguard Worker		    as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
8262*8b26181fSAndroid Build Coastguard Worker
8263*8b26181fSAndroid Build Coastguard Workerfi
8264*8b26181fSAndroid Build Coastguard Worker
8265*8b26181fSAndroid Build Coastguard Worker
8266*8b26181fSAndroid Build Coastguard Worker
8267*8b26181fSAndroid Build Coastguard Workerelse
8268*8b26181fSAndroid Build Coastguard Worker
8269*8b26181fSAndroid Build Coastguard Worker		#
8270*8b26181fSAndroid Build Coastguard Worker		# Well, we don't have "getifaddrs()", at least not with the
8271*8b26181fSAndroid Build Coastguard Worker		# libraries with which we've decided we need to link
8272*8b26181fSAndroid Build Coastguard Worker		# libpcap with, so we have to use some other mechanism.
8273*8b26181fSAndroid Build Coastguard Worker		#
8274*8b26181fSAndroid Build Coastguard Worker		# Note that this may happen on Solaris, which has
8275*8b26181fSAndroid Build Coastguard Worker		# getifaddrs(), but in -lsocket, not in -lxnet, so we
8276*8b26181fSAndroid Build Coastguard Worker		# won't find it if we link with -lxnet, which we want
8277*8b26181fSAndroid Build Coastguard Worker		# to do for other reasons.
8278*8b26181fSAndroid Build Coastguard Worker		#
8279*8b26181fSAndroid Build Coastguard Worker		# For now, we use either the SIOCGIFCONF ioctl or the
8280*8b26181fSAndroid Build Coastguard Worker		# SIOCGLIFCONF ioctl, preferring the latter if we have
8281*8b26181fSAndroid Build Coastguard Worker		# it; the latter is a Solarisism that first appeared
8282*8b26181fSAndroid Build Coastguard Worker		# in Solaris 8.  (Solaris's getifaddrs() appears to
8283*8b26181fSAndroid Build Coastguard Worker		# be built atop SIOCGLIFCONF; using it directly
8284*8b26181fSAndroid Build Coastguard Worker		# avoids a not-all-that-useful middleman.)
8285*8b26181fSAndroid Build Coastguard Worker		#
8286*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
8287*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
8288*8b26181fSAndroid Build Coastguard Worker		if ${ac_cv_lbl_have_siocglifconf+:} false; then :
8289*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8290*8b26181fSAndroid Build Coastguard Workerelse
8291*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8292*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8293*8b26181fSAndroid Build Coastguard Worker#include <sys/param.h>
8294*8b26181fSAndroid Build Coastguard Worker			#include <sys/file.h>
8295*8b26181fSAndroid Build Coastguard Worker			#include <sys/ioctl.h>
8296*8b26181fSAndroid Build Coastguard Worker			#include <sys/socket.h>
8297*8b26181fSAndroid Build Coastguard Worker			#include <sys/sockio.h>
8298*8b26181fSAndroid Build Coastguard Workerint
8299*8b26181fSAndroid Build Coastguard Workermain ()
8300*8b26181fSAndroid Build Coastguard Worker{
8301*8b26181fSAndroid Build Coastguard Workerioctl(0, SIOCGLIFCONF, (char *)0);
8302*8b26181fSAndroid Build Coastguard Worker  ;
8303*8b26181fSAndroid Build Coastguard Worker  return 0;
8304*8b26181fSAndroid Build Coastguard Worker}
8305*8b26181fSAndroid Build Coastguard Worker_ACEOF
8306*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
8307*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_have_siocglifconf=yes
8308*8b26181fSAndroid Build Coastguard Workerelse
8309*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_have_siocglifconf=no
8310*8b26181fSAndroid Build Coastguard Workerfi
8311*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8312*8b26181fSAndroid Build Coastguard Workerfi
8313*8b26181fSAndroid Build Coastguard Worker
8314*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
8315*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
8316*8b26181fSAndroid Build Coastguard Worker		if test $ac_cv_lbl_have_siocglifconf = yes ; then
8317*8b26181fSAndroid Build Coastguard Worker			PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c"
8318*8b26181fSAndroid Build Coastguard Worker		else
8319*8b26181fSAndroid Build Coastguard Worker			PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c"
8320*8b26181fSAndroid Build Coastguard Worker		fi
8321*8b26181fSAndroid Build Coastguard Worker
8322*8b26181fSAndroid Build Coastguard Workerfi
8323*8b26181fSAndroid Build Coastguard Worker
8324*8b26181fSAndroid Build Coastguard Workerfi
8325*8b26181fSAndroid Build Coastguard Worker
8326*8b26181fSAndroid Build Coastguard Workercase "$host_os" in
8327*8b26181fSAndroid Build Coastguard Workerlinux*)
8328*8b26181fSAndroid Build Coastguard Worker	for ac_header in linux/net_tstamp.h
8329*8b26181fSAndroid Build Coastguard Workerdo :
8330*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
8331*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
8332*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
8333*8b26181fSAndroid Build Coastguard Worker#define HAVE_LINUX_NET_TSTAMP_H 1
8334*8b26181fSAndroid Build Coastguard Worker_ACEOF
8335*8b26181fSAndroid Build Coastguard Worker
8336*8b26181fSAndroid Build Coastguard Workerfi
8337*8b26181fSAndroid Build Coastguard Worker
8338*8b26181fSAndroid Build Coastguard Workerdone
8339*8b26181fSAndroid Build Coastguard Worker
8340*8b26181fSAndroid Build Coastguard Worker	;;
8341*8b26181fSAndroid Build Coastguard Worker*)
8342*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
8343*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
8344*8b26181fSAndroid Build Coastguard Worker	;;
8345*8b26181fSAndroid Build Coastguard Workeresac
8346*8b26181fSAndroid Build Coastguard Worker
8347*8b26181fSAndroid Build Coastguard Worker#
8348*8b26181fSAndroid Build Coastguard Worker# Check for socklen_t.
8349*8b26181fSAndroid Build Coastguard Worker#
8350*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
8351*8b26181fSAndroid Build Coastguard Worker	#include <sys/types.h>
8352*8b26181fSAndroid Build Coastguard Worker	#include <sys/socket.h>
8353*8b26181fSAndroid Build Coastguard Worker
8354*8b26181fSAndroid Build Coastguard Worker"
8355*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_type_socklen_t" = xyes; then :
8356*8b26181fSAndroid Build Coastguard Worker
8357*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
8358*8b26181fSAndroid Build Coastguard Worker#define HAVE_SOCKLEN_T 1
8359*8b26181fSAndroid Build Coastguard Worker_ACEOF
8360*8b26181fSAndroid Build Coastguard Worker
8361*8b26181fSAndroid Build Coastguard Worker
8362*8b26181fSAndroid Build Coastguard Workerfi
8363*8b26181fSAndroid Build Coastguard Worker
8364*8b26181fSAndroid Build Coastguard Worker
8365*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-ipv6 was given.
8366*8b26181fSAndroid Build Coastguard Workerif test "${enable_ipv6+set}" = set; then :
8367*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_ipv6;
8368*8b26181fSAndroid Build Coastguard Workerelse
8369*8b26181fSAndroid Build Coastguard Worker  enable_ipv6=yes
8370*8b26181fSAndroid Build Coastguard Workerfi
8371*8b26181fSAndroid Build Coastguard Worker
8372*8b26181fSAndroid Build Coastguard Workerif test "$enable_ipv6" != "no"; then
8373*8b26181fSAndroid Build Coastguard Worker	#
8374*8b26181fSAndroid Build Coastguard Worker	# We've already made sure we have getaddrinfo above in
8375*8b26181fSAndroid Build Coastguard Worker	# AC_LBL_LIBRARY_NET.
8376*8b26181fSAndroid Build Coastguard Worker	#
8377*8b26181fSAndroid Build Coastguard Worker
8378*8b26181fSAndroid Build Coastguard Worker$as_echo "#define INET6 1" >>confdefs.h
8379*8b26181fSAndroid Build Coastguard Worker
8380*8b26181fSAndroid Build Coastguard Workerfi
8381*8b26181fSAndroid Build Coastguard Worker
8382*8b26181fSAndroid Build Coastguard Worker# Check for Endace DAG card support.
8383*8b26181fSAndroid Build Coastguard Worker
8384*8b26181fSAndroid Build Coastguard Worker# Check whether --with-dag was given.
8385*8b26181fSAndroid Build Coastguard Workerif test "${with_dag+set}" = set; then :
8386*8b26181fSAndroid Build Coastguard Worker  withval=$with_dag;
8387*8b26181fSAndroid Build Coastguard Worker	if test "$withval" = no
8388*8b26181fSAndroid Build Coastguard Worker	then
8389*8b26181fSAndroid Build Coastguard Worker		# User doesn't want DAG support.
8390*8b26181fSAndroid Build Coastguard Worker		want_dag=no
8391*8b26181fSAndroid Build Coastguard Worker	elif test "$withval" = yes
8392*8b26181fSAndroid Build Coastguard Worker	then
8393*8b26181fSAndroid Build Coastguard Worker		# User wants DAG support but hasn't specified a directory.
8394*8b26181fSAndroid Build Coastguard Worker		want_dag=yes
8395*8b26181fSAndroid Build Coastguard Worker	else
8396*8b26181fSAndroid Build Coastguard Worker		# User wants DAG support and has specified a directory, so use the provided value.
8397*8b26181fSAndroid Build Coastguard Worker		want_dag=yes
8398*8b26181fSAndroid Build Coastguard Worker		dag_root=$withval
8399*8b26181fSAndroid Build Coastguard Worker	fi
8400*8b26181fSAndroid Build Coastguard Worker
8401*8b26181fSAndroid Build Coastguard Workerelse
8402*8b26181fSAndroid Build Coastguard Worker
8403*8b26181fSAndroid Build Coastguard Worker	if test "$V_PCAP" = dag; then
8404*8b26181fSAndroid Build Coastguard Worker		# User requested DAG-only libpcap, so we'd better have
8405*8b26181fSAndroid Build Coastguard Worker		# the DAG API.
8406*8b26181fSAndroid Build Coastguard Worker		want_dag=yes
8407*8b26181fSAndroid Build Coastguard Worker	elif test "xxx_only" = yes; then
8408*8b26181fSAndroid Build Coastguard Worker		# User requested something-else-only pcap, so they don't
8409*8b26181fSAndroid Build Coastguard Worker		# want DAG support.
8410*8b26181fSAndroid Build Coastguard Worker		want_dag=no
8411*8b26181fSAndroid Build Coastguard Worker	else
8412*8b26181fSAndroid Build Coastguard Worker		#
8413*8b26181fSAndroid Build Coastguard Worker		# Use DAG API if present, otherwise don't
8414*8b26181fSAndroid Build Coastguard Worker		#
8415*8b26181fSAndroid Build Coastguard Worker		want_dag=ifpresent
8416*8b26181fSAndroid Build Coastguard Worker	fi
8417*8b26181fSAndroid Build Coastguard Worker
8418*8b26181fSAndroid Build Coastguard Workerfi
8419*8b26181fSAndroid Build Coastguard Worker
8420*8b26181fSAndroid Build Coastguard Worker
8421*8b26181fSAndroid Build Coastguard Worker
8422*8b26181fSAndroid Build Coastguard Worker# Check whether --with-dag-includes was given.
8423*8b26181fSAndroid Build Coastguard Workerif test "${with_dag_includes+set}" = set; then :
8424*8b26181fSAndroid Build Coastguard Worker  withval=$with_dag_includes;
8425*8b26181fSAndroid Build Coastguard Worker	# User wants DAG support and has specified a header directory, so use the provided value.
8426*8b26181fSAndroid Build Coastguard Worker	want_dag=yes
8427*8b26181fSAndroid Build Coastguard Worker	dag_include_dir=$withval
8428*8b26181fSAndroid Build Coastguard Worker
8429*8b26181fSAndroid Build Coastguard Workerfi
8430*8b26181fSAndroid Build Coastguard Worker
8431*8b26181fSAndroid Build Coastguard Worker
8432*8b26181fSAndroid Build Coastguard Worker
8433*8b26181fSAndroid Build Coastguard Worker# Check whether --with-dag-libraries was given.
8434*8b26181fSAndroid Build Coastguard Workerif test "${with_dag_libraries+set}" = set; then :
8435*8b26181fSAndroid Build Coastguard Worker  withval=$with_dag_libraries;
8436*8b26181fSAndroid Build Coastguard Worker	# User wants DAG support and has specified a library directory, so use the provided value.
8437*8b26181fSAndroid Build Coastguard Worker	want_dag=yes
8438*8b26181fSAndroid Build Coastguard Worker	dag_lib_dir=$withval
8439*8b26181fSAndroid Build Coastguard Worker
8440*8b26181fSAndroid Build Coastguard Workerfi
8441*8b26181fSAndroid Build Coastguard Worker
8442*8b26181fSAndroid Build Coastguard Worker
8443*8b26181fSAndroid Build Coastguard Workerif test "$want_dag" != no; then
8444*8b26181fSAndroid Build Coastguard Worker
8445*8b26181fSAndroid Build Coastguard Worker	# If necessary, set default paths for DAG API headers and libraries.
8446*8b26181fSAndroid Build Coastguard Worker	if test -z "$dag_root"; then
8447*8b26181fSAndroid Build Coastguard Worker		dag_root=/usr/local
8448*8b26181fSAndroid Build Coastguard Worker	fi
8449*8b26181fSAndroid Build Coastguard Worker
8450*8b26181fSAndroid Build Coastguard Worker	if test -z "$dag_include_dir"; then
8451*8b26181fSAndroid Build Coastguard Worker		dag_include_dir="$dag_root/include"
8452*8b26181fSAndroid Build Coastguard Worker	fi
8453*8b26181fSAndroid Build Coastguard Worker
8454*8b26181fSAndroid Build Coastguard Worker	if test -z "$dag_lib_dir"; then
8455*8b26181fSAndroid Build Coastguard Worker		dag_lib_dir="$dag_root/lib"
8456*8b26181fSAndroid Build Coastguard Worker		#
8457*8b26181fSAndroid Build Coastguard Worker		# Handle multiarch systems.
8458*8b26181fSAndroid Build Coastguard Worker		#
8459*8b26181fSAndroid Build Coastguard Worker		if test -d "$dag_lib_dir/$host"
8460*8b26181fSAndroid Build Coastguard Worker		then
8461*8b26181fSAndroid Build Coastguard Worker			dag_lib_dir="$dag_lib_dir/$host"
8462*8b26181fSAndroid Build Coastguard Worker		fi
8463*8b26181fSAndroid Build Coastguard Worker	fi
8464*8b26181fSAndroid Build Coastguard Worker
8465*8b26181fSAndroid Build Coastguard Worker
8466*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
8467*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
8468*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
8469*8b26181fSAndroid Build Coastguard Worker
8470*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -I$dag_include_dir"
8471*8b26181fSAndroid Build Coastguard Worker	for ac_header in dagapi.h
8472*8b26181fSAndroid Build Coastguard Workerdo :
8473*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
8474*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_dagapi_h" = xyes; then :
8475*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
8476*8b26181fSAndroid Build Coastguard Worker#define HAVE_DAGAPI_H 1
8477*8b26181fSAndroid Build Coastguard Worker_ACEOF
8478*8b26181fSAndroid Build Coastguard Worker
8479*8b26181fSAndroid Build Coastguard Workerfi
8480*8b26181fSAndroid Build Coastguard Worker
8481*8b26181fSAndroid Build Coastguard Workerdone
8482*8b26181fSAndroid Build Coastguard Worker
8483*8b26181fSAndroid Build Coastguard Worker
8484*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
8485*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
8486*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
8487*8b26181fSAndroid Build Coastguard Worker
8488*8b26181fSAndroid Build Coastguard Worker
8489*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_header_dagapi_h" = yes; then
8490*8b26181fSAndroid Build Coastguard Worker
8491*8b26181fSAndroid Build Coastguard Worker		V_INCLS="$V_INCLS -I$dag_include_dir"
8492*8b26181fSAndroid Build Coastguard Worker
8493*8b26181fSAndroid Build Coastguard Worker		if test $V_PCAP != dag ; then
8494*8b26181fSAndroid Build Coastguard Worker			 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c"
8495*8b26181fSAndroid Build Coastguard Worker		fi
8496*8b26181fSAndroid Build Coastguard Worker
8497*8b26181fSAndroid Build Coastguard Worker		# Check for various DAG API functions.
8498*8b26181fSAndroid Build Coastguard Worker		# Don't need to save and restore LIBS to prevent -ldag being
8499*8b26181fSAndroid Build Coastguard Worker		# included if there's a found-action (arg 3).
8500*8b26181fSAndroid Build Coastguard Worker
8501*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
8502*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
8503*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
8504*8b26181fSAndroid Build Coastguard Worker
8505*8b26181fSAndroid Build Coastguard Worker		LDFLAGS="-L$dag_lib_dir"
8506*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
8507*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
8508*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
8509*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8510*8b26181fSAndroid Build Coastguard Workerelse
8511*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
8512*8b26181fSAndroid Build Coastguard WorkerLIBS="-ldag  $LIBS"
8513*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
8514*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8515*8b26181fSAndroid Build Coastguard Worker
8516*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
8517*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
8518*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
8519*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
8520*8b26181fSAndroid Build Coastguard Workerextern "C"
8521*8b26181fSAndroid Build Coastguard Worker#endif
8522*8b26181fSAndroid Build Coastguard Workerchar dag_attach_stream ();
8523*8b26181fSAndroid Build Coastguard Workerint
8524*8b26181fSAndroid Build Coastguard Workermain ()
8525*8b26181fSAndroid Build Coastguard Worker{
8526*8b26181fSAndroid Build Coastguard Workerreturn dag_attach_stream ();
8527*8b26181fSAndroid Build Coastguard Worker  ;
8528*8b26181fSAndroid Build Coastguard Worker  return 0;
8529*8b26181fSAndroid Build Coastguard Worker}
8530*8b26181fSAndroid Build Coastguard Worker_ACEOF
8531*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
8532*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_attach_stream=yes
8533*8b26181fSAndroid Build Coastguard Workerelse
8534*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_attach_stream=no
8535*8b26181fSAndroid Build Coastguard Workerfi
8536*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
8537*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
8538*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
8539*8b26181fSAndroid Build Coastguard Workerfi
8540*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
8541*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
8542*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
8543*8b26181fSAndroid Build Coastguard Worker
8544*8b26181fSAndroid Build Coastguard Worker			#
8545*8b26181fSAndroid Build Coastguard Worker			# We assume that if we have libdag we have
8546*8b26181fSAndroid Build Coastguard Worker			# libdagconf, as they're installed at the
8547*8b26181fSAndroid Build Coastguard Worker			# same time from the same package.
8548*8b26181fSAndroid Build Coastguard Worker			#
8549*8b26181fSAndroid Build Coastguard Worker			ADDITIONAL_LIBS="-L$dag_lib_dir $ADDITIONAL_LIBS -ldag -ldagconf"
8550*8b26181fSAndroid Build Coastguard Worker			ADDITIONAL_LIBS_STATIC="-L$dag_lib_dir $ADDITIONAL_LIBS_STATIC -ldag -ldagconf"
8551*8b26181fSAndroid Build Coastguard Worker			LIBS_PRIVATE="-L$dag_lib_dir $LIBS_PRIVATE -ldag -ldagconf"
8552*8b26181fSAndroid Build Coastguard Worker
8553*8b26181fSAndroid Build Coastguard Workerelse
8554*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
8555*8b26181fSAndroid Build Coastguard Workerfi
8556*8b26181fSAndroid Build Coastguard Worker
8557*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
8558*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
8559*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
8560*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8561*8b26181fSAndroid Build Coastguard Workerelse
8562*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
8563*8b26181fSAndroid Build Coastguard WorkerLIBS="-ldag  $LIBS"
8564*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
8565*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8566*8b26181fSAndroid Build Coastguard Worker
8567*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
8568*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
8569*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
8570*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
8571*8b26181fSAndroid Build Coastguard Workerextern "C"
8572*8b26181fSAndroid Build Coastguard Worker#endif
8573*8b26181fSAndroid Build Coastguard Workerchar dag_attach_stream64 ();
8574*8b26181fSAndroid Build Coastguard Workerint
8575*8b26181fSAndroid Build Coastguard Workermain ()
8576*8b26181fSAndroid Build Coastguard Worker{
8577*8b26181fSAndroid Build Coastguard Workerreturn dag_attach_stream64 ();
8578*8b26181fSAndroid Build Coastguard Worker  ;
8579*8b26181fSAndroid Build Coastguard Worker  return 0;
8580*8b26181fSAndroid Build Coastguard Worker}
8581*8b26181fSAndroid Build Coastguard Worker_ACEOF
8582*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
8583*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_attach_stream64=yes
8584*8b26181fSAndroid Build Coastguard Workerelse
8585*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_attach_stream64=no
8586*8b26181fSAndroid Build Coastguard Workerfi
8587*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
8588*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
8589*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
8590*8b26181fSAndroid Build Coastguard Workerfi
8591*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
8592*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
8593*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
8594*8b26181fSAndroid Build Coastguard Worker  dag_large_streams="1"
8595*8b26181fSAndroid Build Coastguard Workerelse
8596*8b26181fSAndroid Build Coastguard Worker  dag_large_streams="0"
8597*8b26181fSAndroid Build Coastguard Workerfi
8598*8b26181fSAndroid Build Coastguard Worker
8599*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
8600*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
8601*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
8602*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8603*8b26181fSAndroid Build Coastguard Workerelse
8604*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
8605*8b26181fSAndroid Build Coastguard WorkerLIBS="-ldag  $LIBS"
8606*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
8607*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8608*8b26181fSAndroid Build Coastguard Worker
8609*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
8610*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
8611*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
8612*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
8613*8b26181fSAndroid Build Coastguard Workerextern "C"
8614*8b26181fSAndroid Build Coastguard Worker#endif
8615*8b26181fSAndroid Build Coastguard Workerchar dag_get_erf_types ();
8616*8b26181fSAndroid Build Coastguard Workerint
8617*8b26181fSAndroid Build Coastguard Workermain ()
8618*8b26181fSAndroid Build Coastguard Worker{
8619*8b26181fSAndroid Build Coastguard Workerreturn dag_get_erf_types ();
8620*8b26181fSAndroid Build Coastguard Worker  ;
8621*8b26181fSAndroid Build Coastguard Worker  return 0;
8622*8b26181fSAndroid Build Coastguard Worker}
8623*8b26181fSAndroid Build Coastguard Worker_ACEOF
8624*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
8625*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_get_erf_types=yes
8626*8b26181fSAndroid Build Coastguard Workerelse
8627*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_get_erf_types=no
8628*8b26181fSAndroid Build Coastguard Workerfi
8629*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
8630*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
8631*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
8632*8b26181fSAndroid Build Coastguard Workerfi
8633*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
8634*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
8635*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
8636*8b26181fSAndroid Build Coastguard Worker
8637*8b26181fSAndroid Build Coastguard Worker
8638*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
8639*8b26181fSAndroid Build Coastguard Worker
8640*8b26181fSAndroid Build Coastguard Workerfi
8641*8b26181fSAndroid Build Coastguard Worker
8642*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
8643*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
8644*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
8645*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8646*8b26181fSAndroid Build Coastguard Workerelse
8647*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
8648*8b26181fSAndroid Build Coastguard WorkerLIBS="-ldag  $LIBS"
8649*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
8650*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8651*8b26181fSAndroid Build Coastguard Worker
8652*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
8653*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
8654*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
8655*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
8656*8b26181fSAndroid Build Coastguard Workerextern "C"
8657*8b26181fSAndroid Build Coastguard Worker#endif
8658*8b26181fSAndroid Build Coastguard Workerchar dag_get_stream_erf_types ();
8659*8b26181fSAndroid Build Coastguard Workerint
8660*8b26181fSAndroid Build Coastguard Workermain ()
8661*8b26181fSAndroid Build Coastguard Worker{
8662*8b26181fSAndroid Build Coastguard Workerreturn dag_get_stream_erf_types ();
8663*8b26181fSAndroid Build Coastguard Worker  ;
8664*8b26181fSAndroid Build Coastguard Worker  return 0;
8665*8b26181fSAndroid Build Coastguard Worker}
8666*8b26181fSAndroid Build Coastguard Worker_ACEOF
8667*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
8668*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_get_stream_erf_types=yes
8669*8b26181fSAndroid Build Coastguard Workerelse
8670*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_dag_dag_get_stream_erf_types=no
8671*8b26181fSAndroid Build Coastguard Workerfi
8672*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
8673*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
8674*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
8675*8b26181fSAndroid Build Coastguard Workerfi
8676*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
8677*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
8678*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
8679*8b26181fSAndroid Build Coastguard Worker
8680*8b26181fSAndroid Build Coastguard Worker
8681*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
8682*8b26181fSAndroid Build Coastguard Worker
8683*8b26181fSAndroid Build Coastguard Workerfi
8684*8b26181fSAndroid Build Coastguard Worker
8685*8b26181fSAndroid Build Coastguard Worker
8686*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
8687*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
8688*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
8689*8b26181fSAndroid Build Coastguard Worker
8690*8b26181fSAndroid Build Coastguard Worker
8691*8b26181fSAndroid Build Coastguard Worker		#
8692*8b26181fSAndroid Build Coastguard Worker		# We assume that if we have libdag we have libdagconf,
8693*8b26181fSAndroid Build Coastguard Worker		# as they're installed at the same time from the same
8694*8b26181fSAndroid Build Coastguard Worker		# package.
8695*8b26181fSAndroid Build Coastguard Worker		#
8696*8b26181fSAndroid Build Coastguard Worker		if test "$dag_large_streams" = 1; then
8697*8b26181fSAndroid Build Coastguard Worker
8698*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
8699*8b26181fSAndroid Build Coastguard Worker
8700*8b26181fSAndroid Build Coastguard Worker
8701*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
8702*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
8703*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
8704*8b26181fSAndroid Build Coastguard Worker
8705*8b26181fSAndroid Build Coastguard Worker			LIBS="$LIBS -ldag -ldagconf"
8706*8b26181fSAndroid Build Coastguard Worker			LDFLAGS="$LDFLAGS -L$dag_lib_dir"
8707*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
8708*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
8709*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
8710*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8711*8b26181fSAndroid Build Coastguard Workerelse
8712*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
8713*8b26181fSAndroid Build Coastguard WorkerLIBS="-lvdag  $LIBS"
8714*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
8715*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8716*8b26181fSAndroid Build Coastguard Worker
8717*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
8718*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
8719*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
8720*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
8721*8b26181fSAndroid Build Coastguard Workerextern "C"
8722*8b26181fSAndroid Build Coastguard Worker#endif
8723*8b26181fSAndroid Build Coastguard Workerchar vdag_set_device_info ();
8724*8b26181fSAndroid Build Coastguard Workerint
8725*8b26181fSAndroid Build Coastguard Workermain ()
8726*8b26181fSAndroid Build Coastguard Worker{
8727*8b26181fSAndroid Build Coastguard Workerreturn vdag_set_device_info ();
8728*8b26181fSAndroid Build Coastguard Worker  ;
8729*8b26181fSAndroid Build Coastguard Worker  return 0;
8730*8b26181fSAndroid Build Coastguard Worker}
8731*8b26181fSAndroid Build Coastguard Worker_ACEOF
8732*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
8733*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_vdag_vdag_set_device_info=yes
8734*8b26181fSAndroid Build Coastguard Workerelse
8735*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_vdag_vdag_set_device_info=no
8736*8b26181fSAndroid Build Coastguard Workerfi
8737*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
8738*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
8739*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
8740*8b26181fSAndroid Build Coastguard Workerfi
8741*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
8742*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
8743*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
8744*8b26181fSAndroid Build Coastguard Worker  ac_dag_have_vdag="1"
8745*8b26181fSAndroid Build Coastguard Workerelse
8746*8b26181fSAndroid Build Coastguard Worker  ac_dag_have_vdag="0"
8747*8b26181fSAndroid Build Coastguard Workerfi
8748*8b26181fSAndroid Build Coastguard Worker
8749*8b26181fSAndroid Build Coastguard Worker
8750*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
8751*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
8752*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
8753*8b26181fSAndroid Build Coastguard Worker
8754*8b26181fSAndroid Build Coastguard Worker			if test "$ac_dag_have_vdag" = 1; then
8755*8b26181fSAndroid Build Coastguard Worker
8756*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
8757*8b26181fSAndroid Build Coastguard Worker
8758*8b26181fSAndroid Build Coastguard Worker				if test "$ac_lbl_have_pthreads" != "found"; then
8759*8b26181fSAndroid Build Coastguard Worker					as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
8760*8b26181fSAndroid Build Coastguard Worker				fi
8761*8b26181fSAndroid Build Coastguard Worker				ADDITIONAL_LIBS="$ADDITIONAL_LIBS $PTHREAD_LIBS"
8762*8b26181fSAndroid Build Coastguard Worker				ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $PTHREAD_LIBS"
8763*8b26181fSAndroid Build Coastguard Worker				LIBS_PRIVATE="$LIBS_PRIVATE $PTHREAD_LIBS"
8764*8b26181fSAndroid Build Coastguard Worker			fi
8765*8b26181fSAndroid Build Coastguard Worker		fi
8766*8b26181fSAndroid Build Coastguard Worker
8767*8b26181fSAndroid Build Coastguard Worker
8768*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_DAG_API 1" >>confdefs.h
8769*8b26181fSAndroid Build Coastguard Worker
8770*8b26181fSAndroid Build Coastguard Worker	else
8771*8b26181fSAndroid Build Coastguard Worker		if test "$V_PCAP" = dag; then
8772*8b26181fSAndroid Build Coastguard Worker			# User requested "dag" capture type but we couldn't
8773*8b26181fSAndroid Build Coastguard Worker			# find the DAG API support.
8774*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "DAG support requested with --with-pcap=dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
8775*8b26181fSAndroid Build Coastguard Worker		fi
8776*8b26181fSAndroid Build Coastguard Worker
8777*8b26181fSAndroid Build Coastguard Worker		if test "$want_dag" = yes; then
8778*8b26181fSAndroid Build Coastguard Worker			# User wanted DAG support but we couldn't find it.
8779*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
8780*8b26181fSAndroid Build Coastguard Worker		fi
8781*8b26181fSAndroid Build Coastguard Worker	fi
8782*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
8783*8b26181fSAndroid Build Coastguard Workerfi
8784*8b26181fSAndroid Build Coastguard Worker
8785*8b26181fSAndroid Build Coastguard Worker
8786*8b26181fSAndroid Build Coastguard Worker# Check whether --with-septel was given.
8787*8b26181fSAndroid Build Coastguard Workerif test "${with_septel+set}" = set; then :
8788*8b26181fSAndroid Build Coastguard Worker  withval=$with_septel;
8789*8b26181fSAndroid Build Coastguard Worker	if test "$withval" = no
8790*8b26181fSAndroid Build Coastguard Worker	then
8791*8b26181fSAndroid Build Coastguard Worker		want_septel=no
8792*8b26181fSAndroid Build Coastguard Worker	elif test "$withval" = yes
8793*8b26181fSAndroid Build Coastguard Worker	then
8794*8b26181fSAndroid Build Coastguard Worker		want_septel=yes
8795*8b26181fSAndroid Build Coastguard Worker		septel_root=
8796*8b26181fSAndroid Build Coastguard Worker	else
8797*8b26181fSAndroid Build Coastguard Worker		want_septel=yes
8798*8b26181fSAndroid Build Coastguard Worker		septel_root=$withval
8799*8b26181fSAndroid Build Coastguard Worker	fi
8800*8b26181fSAndroid Build Coastguard Worker
8801*8b26181fSAndroid Build Coastguard Workerelse
8802*8b26181fSAndroid Build Coastguard Worker
8803*8b26181fSAndroid Build Coastguard Worker	if test "$V_PCAP" = septel; then
8804*8b26181fSAndroid Build Coastguard Worker		# User requested Septel-only libpcap, so we'd better have
8805*8b26181fSAndroid Build Coastguard Worker		# the Septel API.
8806*8b26181fSAndroid Build Coastguard Worker		want_septel=yes
8807*8b26181fSAndroid Build Coastguard Worker	elif test "xxx_only" = yes; then
8808*8b26181fSAndroid Build Coastguard Worker		# User requested something-else-only pcap, so they don't
8809*8b26181fSAndroid Build Coastguard Worker		# want Septel support.
8810*8b26181fSAndroid Build Coastguard Worker		want_septel=no
8811*8b26181fSAndroid Build Coastguard Worker	else
8812*8b26181fSAndroid Build Coastguard Worker		#
8813*8b26181fSAndroid Build Coastguard Worker		# Use Septel API if present, otherwise don't
8814*8b26181fSAndroid Build Coastguard Worker		#
8815*8b26181fSAndroid Build Coastguard Worker		want_septel=ifpresent
8816*8b26181fSAndroid Build Coastguard Worker	fi
8817*8b26181fSAndroid Build Coastguard Worker
8818*8b26181fSAndroid Build Coastguard Workerfi
8819*8b26181fSAndroid Build Coastguard Worker
8820*8b26181fSAndroid Build Coastguard Worker
8821*8b26181fSAndroid Build Coastguard Workerac_cv_lbl_septel_api=no
8822*8b26181fSAndroid Build Coastguard Workerif test "$with_septel" != no; then
8823*8b26181fSAndroid Build Coastguard Worker
8824*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
8825*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we have Septel API headers... " >&6; }
8826*8b26181fSAndroid Build Coastguard Worker
8827*8b26181fSAndroid Build Coastguard Worker	# If necessary, set default paths for Septel API headers and libraries.
8828*8b26181fSAndroid Build Coastguard Worker	if test -z "$septel_root"; then
8829*8b26181fSAndroid Build Coastguard Worker		septel_root=$srcdir/../septel
8830*8b26181fSAndroid Build Coastguard Worker	fi
8831*8b26181fSAndroid Build Coastguard Worker
8832*8b26181fSAndroid Build Coastguard Worker	septel_tools_dir="$septel_root"
8833*8b26181fSAndroid Build Coastguard Worker	septel_include_dir="$septel_root/INC"
8834*8b26181fSAndroid Build Coastguard Worker
8835*8b26181fSAndroid Build Coastguard Worker	if test -r "$septel_include_dir/msg.h"; then
8836*8b26181fSAndroid Build Coastguard Worker		ac_cv_lbl_septel_api=yes
8837*8b26181fSAndroid Build Coastguard Worker	fi
8838*8b26181fSAndroid Build Coastguard Worker
8839*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_lbl_septel_api" = yes; then
8840*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
8841*8b26181fSAndroid Build Coastguard Worker$as_echo "yes ($septel_include_dir)" >&6; }
8842*8b26181fSAndroid Build Coastguard Worker
8843*8b26181fSAndroid Build Coastguard Worker		V_INCLS="$V_INCLS -I$septel_include_dir"
8844*8b26181fSAndroid Build Coastguard Worker		ADDLOBJS="$ADDLOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
8845*8b26181fSAndroid Build Coastguard Worker		ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
8846*8b26181fSAndroid Build Coastguard Worker
8847*8b26181fSAndroid Build Coastguard Worker		if test "$V_PCAP" != septel ; then
8848*8b26181fSAndroid Build Coastguard Worker			 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c"
8849*8b26181fSAndroid Build Coastguard Worker		fi
8850*8b26181fSAndroid Build Coastguard Worker
8851*8b26181fSAndroid Build Coastguard Worker
8852*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
8853*8b26181fSAndroid Build Coastguard Worker
8854*8b26181fSAndroid Build Coastguard Worker	else
8855*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8856*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
8857*8b26181fSAndroid Build Coastguard Worker
8858*8b26181fSAndroid Build Coastguard Worker		if test "$V_PCAP" = septel; then
8859*8b26181fSAndroid Build Coastguard Worker			# User requested "septel" capture type but
8860*8b26181fSAndroid Build Coastguard Worker			# we couldn't find the Septel API support.
8861*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "Septel support requested with --with-pcap=septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
8862*8b26181fSAndroid Build Coastguard Worker		fi
8863*8b26181fSAndroid Build Coastguard Worker
8864*8b26181fSAndroid Build Coastguard Worker		if test "$want_septel" = yes; then
8865*8b26181fSAndroid Build Coastguard Worker			# User wanted Septel support but we couldn't find it.
8866*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
8867*8b26181fSAndroid Build Coastguard Worker		fi
8868*8b26181fSAndroid Build Coastguard Worker	fi
8869*8b26181fSAndroid Build Coastguard Workerfi
8870*8b26181fSAndroid Build Coastguard Worker
8871*8b26181fSAndroid Build Coastguard Worker# Check for Myricom SNF support.
8872*8b26181fSAndroid Build Coastguard Worker
8873*8b26181fSAndroid Build Coastguard Worker# Check whether --with-snf was given.
8874*8b26181fSAndroid Build Coastguard Workerif test "${with_snf+set}" = set; then :
8875*8b26181fSAndroid Build Coastguard Worker  withval=$with_snf;
8876*8b26181fSAndroid Build Coastguard Worker	if test "$withval" = no
8877*8b26181fSAndroid Build Coastguard Worker	then
8878*8b26181fSAndroid Build Coastguard Worker		# User explicitly doesn't want SNF
8879*8b26181fSAndroid Build Coastguard Worker		want_snf=no
8880*8b26181fSAndroid Build Coastguard Worker	elif test "$withval" = yes
8881*8b26181fSAndroid Build Coastguard Worker	then
8882*8b26181fSAndroid Build Coastguard Worker		# User wants SNF support but hasn't specified a directory.
8883*8b26181fSAndroid Build Coastguard Worker		want_snf=yes
8884*8b26181fSAndroid Build Coastguard Worker	else
8885*8b26181fSAndroid Build Coastguard Worker		# User wants SNF support with a specified directory.
8886*8b26181fSAndroid Build Coastguard Worker		want_snf=yes
8887*8b26181fSAndroid Build Coastguard Worker		snf_root=$withval
8888*8b26181fSAndroid Build Coastguard Worker	fi
8889*8b26181fSAndroid Build Coastguard Worker
8890*8b26181fSAndroid Build Coastguard Workerelse
8891*8b26181fSAndroid Build Coastguard Worker
8892*8b26181fSAndroid Build Coastguard Worker	if test "$V_PCAP" = snf; then
8893*8b26181fSAndroid Build Coastguard Worker		# User requested Sniffer-only libpcap, so we'd better have
8894*8b26181fSAndroid Build Coastguard Worker		# the Sniffer API.
8895*8b26181fSAndroid Build Coastguard Worker		want_snf=yes
8896*8b26181fSAndroid Build Coastguard Worker	elif test "xxx_only" = yes; then
8897*8b26181fSAndroid Build Coastguard Worker		# User requested something-else-only pcap, so they don't
8898*8b26181fSAndroid Build Coastguard Worker		# want SNF support.
8899*8b26181fSAndroid Build Coastguard Worker		want_snf=no
8900*8b26181fSAndroid Build Coastguard Worker	else
8901*8b26181fSAndroid Build Coastguard Worker		#
8902*8b26181fSAndroid Build Coastguard Worker		# Use Sniffer API if present, otherwise don't
8903*8b26181fSAndroid Build Coastguard Worker		#
8904*8b26181fSAndroid Build Coastguard Worker		want_snf=ifpresent
8905*8b26181fSAndroid Build Coastguard Worker	fi
8906*8b26181fSAndroid Build Coastguard Worker
8907*8b26181fSAndroid Build Coastguard Workerfi
8908*8b26181fSAndroid Build Coastguard Worker
8909*8b26181fSAndroid Build Coastguard Worker
8910*8b26181fSAndroid Build Coastguard Worker
8911*8b26181fSAndroid Build Coastguard Worker# Check whether --with-snf-includes was given.
8912*8b26181fSAndroid Build Coastguard Workerif test "${with_snf_includes+set}" = set; then :
8913*8b26181fSAndroid Build Coastguard Worker  withval=$with_snf_includes;
8914*8b26181fSAndroid Build Coastguard Worker	# User wants SNF with specific header directory
8915*8b26181fSAndroid Build Coastguard Worker	want_snf=yes
8916*8b26181fSAndroid Build Coastguard Worker	snf_include_dir=$withval
8917*8b26181fSAndroid Build Coastguard Worker
8918*8b26181fSAndroid Build Coastguard Workerfi
8919*8b26181fSAndroid Build Coastguard Worker
8920*8b26181fSAndroid Build Coastguard Worker
8921*8b26181fSAndroid Build Coastguard Worker
8922*8b26181fSAndroid Build Coastguard Worker# Check whether --with-snf-libraries was given.
8923*8b26181fSAndroid Build Coastguard Workerif test "${with_snf_libraries+set}" = set; then :
8924*8b26181fSAndroid Build Coastguard Worker  withval=$with_snf_libraries;
8925*8b26181fSAndroid Build Coastguard Worker	# User wants SNF with specific lib directory
8926*8b26181fSAndroid Build Coastguard Worker	want_snf=yes
8927*8b26181fSAndroid Build Coastguard Worker	snf_lib_dir=$withval
8928*8b26181fSAndroid Build Coastguard Worker
8929*8b26181fSAndroid Build Coastguard Workerfi
8930*8b26181fSAndroid Build Coastguard Worker
8931*8b26181fSAndroid Build Coastguard Worker
8932*8b26181fSAndroid Build Coastguard Workerac_cv_lbl_snf_api=no
8933*8b26181fSAndroid Build Coastguard Workerif test "$with_snf" != no; then
8934*8b26181fSAndroid Build Coastguard Worker
8935*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
8936*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
8937*8b26181fSAndroid Build Coastguard Worker
8938*8b26181fSAndroid Build Coastguard Worker	# If necessary, set default paths for Sniffer headers and libraries.
8939*8b26181fSAndroid Build Coastguard Worker	if test -z "$snf_root"; then
8940*8b26181fSAndroid Build Coastguard Worker		snf_root=/opt/snf
8941*8b26181fSAndroid Build Coastguard Worker	fi
8942*8b26181fSAndroid Build Coastguard Worker
8943*8b26181fSAndroid Build Coastguard Worker	if test -z "$snf_include_dir"; then
8944*8b26181fSAndroid Build Coastguard Worker		snf_include_dir="$snf_root/include"
8945*8b26181fSAndroid Build Coastguard Worker	fi
8946*8b26181fSAndroid Build Coastguard Worker
8947*8b26181fSAndroid Build Coastguard Worker	if test -z "$snf_lib_dir"; then
8948*8b26181fSAndroid Build Coastguard Worker		snf_lib_dir="$snf_root/lib"
8949*8b26181fSAndroid Build Coastguard Worker		#
8950*8b26181fSAndroid Build Coastguard Worker		# Handle multiarch systems.
8951*8b26181fSAndroid Build Coastguard Worker		#
8952*8b26181fSAndroid Build Coastguard Worker		if test -d "$snf_lib_dir/$host"
8953*8b26181fSAndroid Build Coastguard Worker		then
8954*8b26181fSAndroid Build Coastguard Worker			snf_lib_dir="$snf_lib_dir/$host"
8955*8b26181fSAndroid Build Coastguard Worker		fi
8956*8b26181fSAndroid Build Coastguard Worker	fi
8957*8b26181fSAndroid Build Coastguard Worker
8958*8b26181fSAndroid Build Coastguard Worker	if test -f "$snf_include_dir/snf.h"; then
8959*8b26181fSAndroid Build Coastguard Worker		# We found a header; make sure we can link with the library
8960*8b26181fSAndroid Build Coastguard Worker
8961*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
8962*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
8963*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
8964*8b26181fSAndroid Build Coastguard Worker
8965*8b26181fSAndroid Build Coastguard Worker		LDFLAGS="$LDFLAGS -L$snf_lib_dir"
8966*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
8967*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for snf_init in -lsnf... " >&6; }
8968*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_snf_snf_init+:} false; then :
8969*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
8970*8b26181fSAndroid Build Coastguard Workerelse
8971*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
8972*8b26181fSAndroid Build Coastguard WorkerLIBS="-lsnf  $LIBS"
8973*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
8974*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
8975*8b26181fSAndroid Build Coastguard Worker
8976*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
8977*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
8978*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
8979*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
8980*8b26181fSAndroid Build Coastguard Workerextern "C"
8981*8b26181fSAndroid Build Coastguard Worker#endif
8982*8b26181fSAndroid Build Coastguard Workerchar snf_init ();
8983*8b26181fSAndroid Build Coastguard Workerint
8984*8b26181fSAndroid Build Coastguard Workermain ()
8985*8b26181fSAndroid Build Coastguard Worker{
8986*8b26181fSAndroid Build Coastguard Workerreturn snf_init ();
8987*8b26181fSAndroid Build Coastguard Worker  ;
8988*8b26181fSAndroid Build Coastguard Worker  return 0;
8989*8b26181fSAndroid Build Coastguard Worker}
8990*8b26181fSAndroid Build Coastguard Worker_ACEOF
8991*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
8992*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_snf_snf_init=yes
8993*8b26181fSAndroid Build Coastguard Workerelse
8994*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_snf_snf_init=no
8995*8b26181fSAndroid Build Coastguard Workerfi
8996*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
8997*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
8998*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
8999*8b26181fSAndroid Build Coastguard Workerfi
9000*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
9001*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_snf_snf_init" >&6; }
9002*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_snf_snf_init" = xyes; then :
9003*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_snf_api="yes"
9004*8b26181fSAndroid Build Coastguard Workerfi
9005*8b26181fSAndroid Build Coastguard Worker
9006*8b26181fSAndroid Build Coastguard Worker
9007*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
9008*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
9009*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
9010*8b26181fSAndroid Build Coastguard Worker
9011*8b26181fSAndroid Build Coastguard Worker		if test "$ac_cv_lbl_snf_api" = no; then
9012*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
9013*8b26181fSAndroid Build Coastguard Worker		fi
9014*8b26181fSAndroid Build Coastguard Worker	fi
9015*8b26181fSAndroid Build Coastguard Worker
9016*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_lbl_snf_api" = yes; then
9017*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
9018*8b26181fSAndroid Build Coastguard Worker$as_echo "yes ($snf_root)" >&6; }
9019*8b26181fSAndroid Build Coastguard Worker
9020*8b26181fSAndroid Build Coastguard Worker		V_INCLS="$V_INCLS -I$snf_include_dir"
9021*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS="$ADDITIONAL_LIBS -L$snf_lib_dir -lsnf"
9022*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC -L$snf_lib_dir -lsnf"
9023*8b26181fSAndroid Build Coastguard Worker		LIBS_PRIVATE="$LIBS_PRIVATE -L$snf_lib_dir -lsnf"
9024*8b26181fSAndroid Build Coastguard Worker
9025*8b26181fSAndroid Build Coastguard Worker		if test "$V_PCAP" != snf ; then
9026*8b26181fSAndroid Build Coastguard Worker			MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c"
9027*8b26181fSAndroid Build Coastguard Worker		fi
9028*8b26181fSAndroid Build Coastguard Worker
9029*8b26181fSAndroid Build Coastguard Worker
9030*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_SNF_API 1" >>confdefs.h
9031*8b26181fSAndroid Build Coastguard Worker
9032*8b26181fSAndroid Build Coastguard Worker	else
9033*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9034*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9035*8b26181fSAndroid Build Coastguard Worker
9036*8b26181fSAndroid Build Coastguard Worker		if test "$want_snf" = yes; then
9037*8b26181fSAndroid Build Coastguard Worker			# User requested "snf" capture type but
9038*8b26181fSAndroid Build Coastguard Worker			# we couldn't find the Sniffer API support.
9039*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "Myricom Sniffer support requested with --with-pcap=snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
9040*8b26181fSAndroid Build Coastguard Worker		fi
9041*8b26181fSAndroid Build Coastguard Worker
9042*8b26181fSAndroid Build Coastguard Worker		if test "$want_snf" = yes; then
9043*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "Myricom Sniffer support requested with --with-snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
9044*8b26181fSAndroid Build Coastguard Worker		fi
9045*8b26181fSAndroid Build Coastguard Worker	fi
9046*8b26181fSAndroid Build Coastguard Workerfi
9047*8b26181fSAndroid Build Coastguard Worker
9048*8b26181fSAndroid Build Coastguard Worker# Check for Riverbed TurboCap support.
9049*8b26181fSAndroid Build Coastguard Worker
9050*8b26181fSAndroid Build Coastguard Worker# Check whether --with-turbocap was given.
9051*8b26181fSAndroid Build Coastguard Workerif test "${with_turbocap+set}" = set; then :
9052*8b26181fSAndroid Build Coastguard Worker  withval=$with_turbocap;
9053*8b26181fSAndroid Build Coastguard Worker	if test "$withval" = no
9054*8b26181fSAndroid Build Coastguard Worker	then
9055*8b26181fSAndroid Build Coastguard Worker		# User explicitly doesn't want TurboCap
9056*8b26181fSAndroid Build Coastguard Worker		want_turbocap=no
9057*8b26181fSAndroid Build Coastguard Worker	elif test "$withval" = yes
9058*8b26181fSAndroid Build Coastguard Worker	then
9059*8b26181fSAndroid Build Coastguard Worker		# User wants TurboCap support but hasn't specified a directory.
9060*8b26181fSAndroid Build Coastguard Worker		want_turbocap=yes
9061*8b26181fSAndroid Build Coastguard Worker	else
9062*8b26181fSAndroid Build Coastguard Worker		# User wants TurboCap support with a specified directory.
9063*8b26181fSAndroid Build Coastguard Worker		want_turbocap=yes
9064*8b26181fSAndroid Build Coastguard Worker		turbocap_root=$withval
9065*8b26181fSAndroid Build Coastguard Worker	fi
9066*8b26181fSAndroid Build Coastguard Worker
9067*8b26181fSAndroid Build Coastguard Workerelse
9068*8b26181fSAndroid Build Coastguard Worker
9069*8b26181fSAndroid Build Coastguard Worker	if test "xxx_only" = yes; then
9070*8b26181fSAndroid Build Coastguard Worker		# User requested something-else-only pcap, so they don't
9071*8b26181fSAndroid Build Coastguard Worker		# want TurboCap support.
9072*8b26181fSAndroid Build Coastguard Worker		want_turbocap=no
9073*8b26181fSAndroid Build Coastguard Worker	else
9074*8b26181fSAndroid Build Coastguard Worker		#
9075*8b26181fSAndroid Build Coastguard Worker		# Use TurboCap API if present, otherwise don't
9076*8b26181fSAndroid Build Coastguard Worker		#
9077*8b26181fSAndroid Build Coastguard Worker		want_turbocap=ifpresent
9078*8b26181fSAndroid Build Coastguard Worker	fi
9079*8b26181fSAndroid Build Coastguard Worker
9080*8b26181fSAndroid Build Coastguard Workerfi
9081*8b26181fSAndroid Build Coastguard Worker
9082*8b26181fSAndroid Build Coastguard Worker
9083*8b26181fSAndroid Build Coastguard Workerac_cv_lbl_turbocap_api=no
9084*8b26181fSAndroid Build Coastguard Workerif test "$want_turbocap" != no; then
9085*8b26181fSAndroid Build Coastguard Worker
9086*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
9087*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether TurboCap is supported... " >&6; }
9088*8b26181fSAndroid Build Coastguard Worker
9089*8b26181fSAndroid Build Coastguard Worker
9090*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
9091*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
9092*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
9093*8b26181fSAndroid Build Coastguard Worker
9094*8b26181fSAndroid Build Coastguard Worker	if test ! -z "$turbocap_root"; then
9095*8b26181fSAndroid Build Coastguard Worker		TURBOCAP_CFLAGS="-I$turbocap_root/include"
9096*8b26181fSAndroid Build Coastguard Worker		TURBOCAP_LDFLAGS="-L$turbocap_root/lib"
9097*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
9098*8b26181fSAndroid Build Coastguard Worker		LDFLAGS="$LDFLAGS $TURBOCAP_LDFLAGS"
9099*8b26181fSAndroid Build Coastguard Worker	fi
9100*8b26181fSAndroid Build Coastguard Worker
9101*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9102*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
9103*8b26181fSAndroid Build Coastguard Worker
9104*8b26181fSAndroid Build Coastguard Worker	    #include <TcApi.h>
9105*8b26181fSAndroid Build Coastguard Worker
9106*8b26181fSAndroid Build Coastguard Workerint
9107*8b26181fSAndroid Build Coastguard Workermain ()
9108*8b26181fSAndroid Build Coastguard Worker{
9109*8b26181fSAndroid Build Coastguard Worker
9110*8b26181fSAndroid Build Coastguard Worker	    TC_INSTANCE a; TC_PORT b; TC_BOARD c;
9111*8b26181fSAndroid Build Coastguard Worker	    TC_INSTANCE i;
9112*8b26181fSAndroid Build Coastguard Worker	    (void)TcInstanceCreateByName("foo", &i);
9113*8b26181fSAndroid Build Coastguard Worker
9114*8b26181fSAndroid Build Coastguard Worker  ;
9115*8b26181fSAndroid Build Coastguard Worker  return 0;
9116*8b26181fSAndroid Build Coastguard Worker}
9117*8b26181fSAndroid Build Coastguard Worker_ACEOF
9118*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
9119*8b26181fSAndroid Build Coastguard Worker  ac_cv_lbl_turbocap_api=yes
9120*8b26181fSAndroid Build Coastguard Workerfi
9121*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9122*8b26181fSAndroid Build Coastguard Worker
9123*8b26181fSAndroid Build Coastguard Worker
9124*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
9125*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
9126*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
9127*8b26181fSAndroid Build Coastguard Worker
9128*8b26181fSAndroid Build Coastguard Worker	if test $ac_cv_lbl_turbocap_api = yes; then
9129*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9130*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
9131*8b26181fSAndroid Build Coastguard Worker
9132*8b26181fSAndroid Build Coastguard Worker		MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c"
9133*8b26181fSAndroid Build Coastguard Worker		V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
9134*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS="$ADDITIONAL_LIBS $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
9135*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
9136*8b26181fSAndroid Build Coastguard Worker		LIBS_PRIVATE="$LIBS_PRIVATE $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++"
9137*8b26181fSAndroid Build Coastguard Worker
9138*8b26181fSAndroid Build Coastguard Worker
9139*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_TC_API 1" >>confdefs.h
9140*8b26181fSAndroid Build Coastguard Worker
9141*8b26181fSAndroid Build Coastguard Worker	else
9142*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9143*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9144*8b26181fSAndroid Build Coastguard Worker
9145*8b26181fSAndroid Build Coastguard Worker		if test "$want_turbocap" = yes; then
9146*8b26181fSAndroid Build Coastguard Worker			# User wanted Turbo support but we couldn't find it.
9147*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support" "$LINENO" 5
9148*8b26181fSAndroid Build Coastguard Worker		fi
9149*8b26181fSAndroid Build Coastguard Worker	fi
9150*8b26181fSAndroid Build Coastguard Workerfi
9151*8b26181fSAndroid Build Coastguard Worker
9152*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
9153*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether to enable remote packet capture... " >&6; }
9154*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-remote was given.
9155*8b26181fSAndroid Build Coastguard Workerif test "${enable_remote+set}" = set; then :
9156*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_remote;
9157*8b26181fSAndroid Build Coastguard Workerelse
9158*8b26181fSAndroid Build Coastguard Worker  enableval=no
9159*8b26181fSAndroid Build Coastguard Workerfi
9160*8b26181fSAndroid Build Coastguard Worker
9161*8b26181fSAndroid Build Coastguard Workercase "$enableval" in
9162*8b26181fSAndroid Build Coastguard Workeryes)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9163*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
9164*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
9165*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
9166*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
9167*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
9168*8b26181fSAndroid Build Coastguard Worker	#
9169*8b26181fSAndroid Build Coastguard Worker	# rpcapd requires pthreads on UN*X.
9170*8b26181fSAndroid Build Coastguard Worker	#
9171*8b26181fSAndroid Build Coastguard Worker	if test "$ac_lbl_have_pthreads" != "found"; then
9172*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
9173*8b26181fSAndroid Build Coastguard Worker	fi
9174*8b26181fSAndroid Build Coastguard Worker	#
9175*8b26181fSAndroid Build Coastguard Worker	# It also requires crypt().
9176*8b26181fSAndroid Build Coastguard Worker	# Do we have it in the system libraries?
9177*8b26181fSAndroid Build Coastguard Worker	#
9178*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
9179*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_crypt" = xyes; then :
9180*8b26181fSAndroid Build Coastguard Worker
9181*8b26181fSAndroid Build Coastguard Workerelse
9182*8b26181fSAndroid Build Coastguard Worker
9183*8b26181fSAndroid Build Coastguard Worker		#
9184*8b26181fSAndroid Build Coastguard Worker		# No.  Do we have it in -lcrypt?
9185*8b26181fSAndroid Build Coastguard Worker		#
9186*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
9187*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for crypt in -lcrypt... " >&6; }
9188*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_crypt_crypt+:} false; then :
9189*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9190*8b26181fSAndroid Build Coastguard Workerelse
9191*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
9192*8b26181fSAndroid Build Coastguard WorkerLIBS="-lcrypt  $LIBS"
9193*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
9194*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
9195*8b26181fSAndroid Build Coastguard Worker
9196*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
9197*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
9198*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
9199*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
9200*8b26181fSAndroid Build Coastguard Workerextern "C"
9201*8b26181fSAndroid Build Coastguard Worker#endif
9202*8b26181fSAndroid Build Coastguard Workerchar crypt ();
9203*8b26181fSAndroid Build Coastguard Workerint
9204*8b26181fSAndroid Build Coastguard Workermain ()
9205*8b26181fSAndroid Build Coastguard Worker{
9206*8b26181fSAndroid Build Coastguard Workerreturn crypt ();
9207*8b26181fSAndroid Build Coastguard Worker  ;
9208*8b26181fSAndroid Build Coastguard Worker  return 0;
9209*8b26181fSAndroid Build Coastguard Worker}
9210*8b26181fSAndroid Build Coastguard Worker_ACEOF
9211*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
9212*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_crypt_crypt=yes
9213*8b26181fSAndroid Build Coastguard Workerelse
9214*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_crypt_crypt=no
9215*8b26181fSAndroid Build Coastguard Workerfi
9216*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
9217*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
9218*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
9219*8b26181fSAndroid Build Coastguard Workerfi
9220*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
9221*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
9222*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_crypt_crypt" = xyes; then :
9223*8b26181fSAndroid Build Coastguard Worker
9224*8b26181fSAndroid Build Coastguard Worker			#
9225*8b26181fSAndroid Build Coastguard Worker			# Yes; add -lcrypt to the libraries for rpcapd.
9226*8b26181fSAndroid Build Coastguard Worker			#
9227*8b26181fSAndroid Build Coastguard Worker			RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
9228*8b26181fSAndroid Build Coastguard Worker
9229*8b26181fSAndroid Build Coastguard Workerelse
9230*8b26181fSAndroid Build Coastguard Worker
9231*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
9232*8b26181fSAndroid Build Coastguard Worker
9233*8b26181fSAndroid Build Coastguard Workerfi
9234*8b26181fSAndroid Build Coastguard Worker
9235*8b26181fSAndroid Build Coastguard Worker
9236*8b26181fSAndroid Build Coastguard Workerfi
9237*8b26181fSAndroid Build Coastguard Worker
9238*8b26181fSAndroid Build Coastguard Worker
9239*8b26181fSAndroid Build Coastguard Worker	#
9240*8b26181fSAndroid Build Coastguard Worker	# OK, we have crypt().  Do we have getspnam()?
9241*8b26181fSAndroid Build Coastguard Worker	#
9242*8b26181fSAndroid Build Coastguard Worker	for ac_func in getspnam
9243*8b26181fSAndroid Build Coastguard Workerdo :
9244*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
9245*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_getspnam" = xyes; then :
9246*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
9247*8b26181fSAndroid Build Coastguard Worker#define HAVE_GETSPNAM 1
9248*8b26181fSAndroid Build Coastguard Worker_ACEOF
9249*8b26181fSAndroid Build Coastguard Worker
9250*8b26181fSAndroid Build Coastguard Workerfi
9251*8b26181fSAndroid Build Coastguard Workerdone
9252*8b26181fSAndroid Build Coastguard Worker
9253*8b26181fSAndroid Build Coastguard Worker
9254*8b26181fSAndroid Build Coastguard Worker	#
9255*8b26181fSAndroid Build Coastguard Worker	# Check for various members of struct msghdr.
9256*8b26181fSAndroid Build Coastguard Worker	#
9257*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
9258*8b26181fSAndroid Build Coastguard Worker		#include \"ftmacros.h\"
9259*8b26181fSAndroid Build Coastguard Worker		#include <sys/socket.h>
9260*8b26181fSAndroid Build Coastguard Worker
9261*8b26181fSAndroid Build Coastguard Worker"
9262*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
9263*8b26181fSAndroid Build Coastguard Worker
9264*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
9265*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
9266*8b26181fSAndroid Build Coastguard Worker_ACEOF
9267*8b26181fSAndroid Build Coastguard Worker
9268*8b26181fSAndroid Build Coastguard Worker
9269*8b26181fSAndroid Build Coastguard Workerfi
9270*8b26181fSAndroid Build Coastguard Worker
9271*8b26181fSAndroid Build Coastguard Worker	ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
9272*8b26181fSAndroid Build Coastguard Worker		#include \"ftmacros.h\"
9273*8b26181fSAndroid Build Coastguard Worker		#include <sys/socket.h>
9274*8b26181fSAndroid Build Coastguard Worker
9275*8b26181fSAndroid Build Coastguard Worker"
9276*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
9277*8b26181fSAndroid Build Coastguard Worker
9278*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
9279*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
9280*8b26181fSAndroid Build Coastguard Worker_ACEOF
9281*8b26181fSAndroid Build Coastguard Worker
9282*8b26181fSAndroid Build Coastguard Worker
9283*8b26181fSAndroid Build Coastguard Workerfi
9284*8b26181fSAndroid Build Coastguard Worker
9285*8b26181fSAndroid Build Coastguard Worker
9286*8b26181fSAndroid Build Coastguard Worker	#
9287*8b26181fSAndroid Build Coastguard Worker	# Optionally, we may want to support SSL.
9288*8b26181fSAndroid Build Coastguard Worker	# Check for OpenSSL/libressl.
9289*8b26181fSAndroid Build Coastguard Worker	#
9290*8b26181fSAndroid Build Coastguard Worker	# First, try looking for it with pkg-config, if we have it.
9291*8b26181fSAndroid Build Coastguard Worker	#
9292*8b26181fSAndroid Build Coastguard Worker	# Homebrew's pkg-config does not, by default, look for
9293*8b26181fSAndroid Build Coastguard Worker	# pkg-config files for packages it has installed.
9294*8b26181fSAndroid Build Coastguard Worker	# Furthermore, at least for OpenSSL, they appear to be
9295*8b26181fSAndroid Build Coastguard Worker	# dumped in package-specific directories whose paths are
9296*8b26181fSAndroid Build Coastguard Worker	# not only package-specific but package-version-specific.
9297*8b26181fSAndroid Build Coastguard Worker	#
9298*8b26181fSAndroid Build Coastguard Worker	# So the only way to find openssl is to get the value of
9299*8b26181fSAndroid Build Coastguard Worker	# PKG_CONFIG_PATH from "brew --env openssl" and add that
9300*8b26181fSAndroid Build Coastguard Worker	# to PKG_CONFIG_PATH.  (No, we can't just assume it's under
9301*8b26181fSAndroid Build Coastguard Worker	# /usr/local; Homebrew have conveniently chosen to put it
9302*8b26181fSAndroid Build Coastguard Worker	# under /opt/homebrew on ARM.)
9303*8b26181fSAndroid Build Coastguard Worker	#
9304*8b26181fSAndroid Build Coastguard Worker	# That's the nice thing about Homebrew - it makes things easier!
9305*8b26181fSAndroid Build Coastguard Worker	# Thanks!
9306*8b26181fSAndroid Build Coastguard Worker	#
9307*8b26181fSAndroid Build Coastguard Worker	save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
9308*8b26181fSAndroid Build Coastguard Worker	if test -n "$BREW"; then
9309*8b26181fSAndroid Build Coastguard Worker		openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'`
9310*8b26181fSAndroid Build Coastguard Worker		PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH"
9311*8b26181fSAndroid Build Coastguard Worker	fi
9312*8b26181fSAndroid Build Coastguard Worker
9313*8b26181fSAndroid Build Coastguard Worker
9314*8b26181fSAndroid Build Coastguard Workerpkg_failed=no
9315*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl with pkg-config" >&5
9316*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for openssl with pkg-config... " >&6; }
9317*8b26181fSAndroid Build Coastguard Worker
9318*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
9319*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9320*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9321*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
9322*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9323*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
9324*8b26181fSAndroid Build Coastguard Worker
9325*8b26181fSAndroid Build Coastguard Worker	#
9326*8b26181fSAndroid Build Coastguard Worker	# The package was found, so try to get its C flags and
9327*8b26181fSAndroid Build Coastguard Worker	# libraries.
9328*8b26181fSAndroid Build Coastguard Worker	#
9329*8b26181fSAndroid Build Coastguard Worker	if test -n "$OPENSSL_CFLAGS"; then
9330*8b26181fSAndroid Build Coastguard Worker    pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS"
9331*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
9332*8b26181fSAndroid Build Coastguard Worker
9333*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
9334*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9335*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9336*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
9337*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9338*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
9339*8b26181fSAndroid Build Coastguard Worker  pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null`
9340*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
9341*8b26181fSAndroid Build Coastguard Workerelse
9342*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
9343*8b26181fSAndroid Build Coastguard Workerfi
9344*8b26181fSAndroid Build Coastguard Worker else
9345*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
9346*8b26181fSAndroid Build Coastguard Workerfi
9347*8b26181fSAndroid Build Coastguard Worker	if test -n "$OPENSSL_LIBS"; then
9348*8b26181fSAndroid Build Coastguard Worker    pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS"
9349*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
9350*8b26181fSAndroid Build Coastguard Worker
9351*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
9352*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9353*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9354*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
9355*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9356*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
9357*8b26181fSAndroid Build Coastguard Worker  pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null`
9358*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
9359*8b26181fSAndroid Build Coastguard Workerelse
9360*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
9361*8b26181fSAndroid Build Coastguard Workerfi
9362*8b26181fSAndroid Build Coastguard Worker else
9363*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
9364*8b26181fSAndroid Build Coastguard Workerfi
9365*8b26181fSAndroid Build Coastguard Worker	if test -n "$OPENSSL_LIBS_STATIC"; then
9366*8b26181fSAndroid Build Coastguard Worker    pkg_cv_OPENSSL_LIBS_STATIC="$OPENSSL_LIBS_STATIC"
9367*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
9368*8b26181fSAndroid Build Coastguard Worker
9369*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
9370*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5
9371*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "openssl") 2>&5
9372*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
9373*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9374*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
9375*8b26181fSAndroid Build Coastguard Worker  pkg_cv_OPENSSL_LIBS_STATIC=`$PKG_CONFIG --libs --static "openssl" 2>/dev/null`
9376*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
9377*8b26181fSAndroid Build Coastguard Workerelse
9378*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
9379*8b26181fSAndroid Build Coastguard Workerfi
9380*8b26181fSAndroid Build Coastguard Worker else
9381*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
9382*8b26181fSAndroid Build Coastguard Workerfi
9383*8b26181fSAndroid Build Coastguard Worker
9384*8b26181fSAndroid Build Coastguard Worker
9385*8b26181fSAndroid Build Coastguard Worker
9386*8b26181fSAndroid Build Coastguard Worker	if test $pkg_failed = yes; then
9387*8b26181fSAndroid Build Coastguard Worker		#
9388*8b26181fSAndroid Build Coastguard Worker		# That failed - report an error.
9389*8b26181fSAndroid Build Coastguard Worker		#
9390*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
9391*8b26181fSAndroid Build Coastguard Worker$as_echo "error" >&6; }
9392*8b26181fSAndroid Build Coastguard Worker
9393*8b26181fSAndroid Build Coastguard Workerif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
9394*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=yes
9395*8b26181fSAndroid Build Coastguard Workerelse
9396*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=no
9397*8b26181fSAndroid Build Coastguard Workerfi
9398*8b26181fSAndroid Build Coastguard Worker	        if test $_pkg_short_errors_supported = yes; then
9399*8b26181fSAndroid Build Coastguard Worker		        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "openssl" 2>&1`
9400*8b26181fSAndroid Build Coastguard Worker	        else
9401*8b26181fSAndroid Build Coastguard Worker		        OPENSSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "openssl" 2>&1`
9402*8b26181fSAndroid Build Coastguard Worker	        fi
9403*8b26181fSAndroid Build Coastguard Worker		# Put the nasty error message in config.log where it belongs
9404*8b26181fSAndroid Build Coastguard Worker		echo "$OPENSSL_PKG_ERRORS" >&5
9405*8b26181fSAndroid Build Coastguard Worker
9406*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "Package requirements (openssl) were not met:
9407*8b26181fSAndroid Build Coastguard Worker
9408*8b26181fSAndroid Build Coastguard Worker$OPENSSL_PKG_ERRORS
9409*8b26181fSAndroid Build Coastguard Worker
9410*8b26181fSAndroid Build Coastguard WorkerConsider adjusting the PKG_CONFIG_PATH environment variable if you
9411*8b26181fSAndroid Build Coastguard Workerinstalled software in a non-standard prefix.
9412*8b26181fSAndroid Build Coastguard Worker
9413*8b26181fSAndroid Build Coastguard Worker
9414*8b26181fSAndroid Build Coastguard WorkerAlternatively, you may set the environment variables OPENSSL_CFLAGS
9415*8b26181fSAndroid Build Coastguard Workerand OPENSSL_LIBS to avoid the need to call pkg-config.
9416*8b26181fSAndroid Build Coastguard WorkerSee the pkg-config man page for more details." "$LINENO" 5
9417*8b26181fSAndroid Build Coastguard Worker	elif test $pkg_failed = untried; then
9418*8b26181fSAndroid Build Coastguard Worker		#
9419*8b26181fSAndroid Build Coastguard Worker		# We don't have pkg-config, so it didn't work.
9420*8b26181fSAndroid Build Coastguard Worker		#
9421*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
9422*8b26181fSAndroid Build Coastguard Worker$as_echo "not found (pkg-config not found)" >&6; }
9423*8b26181fSAndroid Build Coastguard Worker	else
9424*8b26181fSAndroid Build Coastguard Worker		#
9425*8b26181fSAndroid Build Coastguard Worker		# We found the package.
9426*8b26181fSAndroid Build Coastguard Worker		#
9427*8b26181fSAndroid Build Coastguard Worker		OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS
9428*8b26181fSAndroid Build Coastguard Worker		OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS
9429*8b26181fSAndroid Build Coastguard Worker		OPENSSL_LIBS_STATIC=$pkg_cv_OPENSSL_LIBS_STATIC
9430*8b26181fSAndroid Build Coastguard Worker	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
9431*8b26181fSAndroid Build Coastguard Worker$as_echo "found" >&6; }
9432*8b26181fSAndroid Build Coastguard Worker
9433*8b26181fSAndroid Build Coastguard Worker		#
9434*8b26181fSAndroid Build Coastguard Worker		# We found OpenSSL/libressl.
9435*8b26181fSAndroid Build Coastguard Worker		#
9436*8b26181fSAndroid Build Coastguard Worker		HAVE_OPENSSL=yes
9437*8b26181fSAndroid Build Coastguard Worker		REQUIRES_PRIVATE="$REQUIRES_PRIVATE openssl"
9438*8b26181fSAndroid Build Coastguard Worker
9439*8b26181fSAndroid Build Coastguard Worker	fi
9440*8b26181fSAndroid Build Coastguard Workerelse
9441*8b26181fSAndroid Build Coastguard Worker
9442*8b26181fSAndroid Build Coastguard Worker	#
9443*8b26181fSAndroid Build Coastguard Worker	# The package isn't present.
9444*8b26181fSAndroid Build Coastguard Worker	#
9445*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9446*8b26181fSAndroid Build Coastguard Worker$as_echo "not found" >&6; }
9447*8b26181fSAndroid Build Coastguard Worker
9448*8b26181fSAndroid Build Coastguard Workerfi
9449*8b26181fSAndroid Build Coastguard Worker
9450*8b26181fSAndroid Build Coastguard Worker	PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
9451*8b26181fSAndroid Build Coastguard Worker
9452*8b26181fSAndroid Build Coastguard Worker	#
9453*8b26181fSAndroid Build Coastguard Worker	# If it wasn't found, and we have Homebrew installed, see
9454*8b26181fSAndroid Build Coastguard Worker	# if it's in Homebrew.
9455*8b26181fSAndroid Build Coastguard Worker	#
9456*8b26181fSAndroid Build Coastguard Worker	if test "x$HAVE_OPENSSL" != "xyes" -a -n "$BREW"; then
9457*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl in Homebrew" >&5
9458*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for openssl in Homebrew... " >&6; }
9459*8b26181fSAndroid Build Coastguard Worker		#
9460*8b26181fSAndroid Build Coastguard Worker		# The brew man page lies when it speaks of
9461*8b26181fSAndroid Build Coastguard Worker		# $BREW --prefix --installed <formula>
9462*8b26181fSAndroid Build Coastguard Worker		# outputting nothing.  In Homebrew 3.3.16,
9463*8b26181fSAndroid Build Coastguard Worker		# it produces output regardless of whether
9464*8b26181fSAndroid Build Coastguard Worker		# the formula is installed or not, so we
9465*8b26181fSAndroid Build Coastguard Worker		# send the standard output and error to
9466*8b26181fSAndroid Build Coastguard Worker		# the bit bucket.
9467*8b26181fSAndroid Build Coastguard Worker		#
9468*8b26181fSAndroid Build Coastguard Worker		if $BREW --prefix --installed openssl >/dev/null 2>&1; then
9469*8b26181fSAndroid Build Coastguard Worker			#
9470*8b26181fSAndroid Build Coastguard Worker			# Yes.  Get the include directory and library
9471*8b26181fSAndroid Build Coastguard Worker			# directory.  (No, we can't just assume it's
9472*8b26181fSAndroid Build Coastguard Worker			# under /usr/local; Homebrew have conveniently
9473*8b26181fSAndroid Build Coastguard Worker			# chosen to put it under /opt/homebrew on ARM.)
9474*8b26181fSAndroid Build Coastguard Worker			#
9475*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9476*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
9477*8b26181fSAndroid Build Coastguard Worker			HAVE_OPENSSL=yes
9478*8b26181fSAndroid Build Coastguard Worker			openssl_path=`$BREW --prefix openssl`
9479*8b26181fSAndroid Build Coastguard Worker			OPENSSL_CFLAGS="-I$openssl_path/include"
9480*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS="-L$openssl_path/lib -lssl -lcrypto"
9481*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS_STATIC="-L$openssl_path/lib -lssl -lcrypto"
9482*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS_PRIVATE="-L$openssl_path/lib -lssl -lcrypto"
9483*8b26181fSAndroid Build Coastguard Worker		else
9484*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9486*8b26181fSAndroid Build Coastguard Worker		fi
9487*8b26181fSAndroid Build Coastguard Worker	fi
9488*8b26181fSAndroid Build Coastguard Worker
9489*8b26181fSAndroid Build Coastguard Worker	#
9490*8b26181fSAndroid Build Coastguard Worker	# If it wasn't found, and /usr/local/include and /usr/local/lib
9491*8b26181fSAndroid Build Coastguard Worker	# exist, check if it's in /usr/local.  (We check whether they
9492*8b26181fSAndroid Build Coastguard Worker	# exist because, if they don't exist, the compiler will warn
9493*8b26181fSAndroid Build Coastguard Worker	# about that and then ignore the argument, so they test
9494*8b26181fSAndroid Build Coastguard Worker	# using just the system header files and libraries.)
9495*8b26181fSAndroid Build Coastguard Worker	#
9496*8b26181fSAndroid Build Coastguard Worker	# We include the standard include file to 1) make sure that
9497*8b26181fSAndroid Build Coastguard Worker	# it's installed (if it's just a shared library for the
9498*8b26181fSAndroid Build Coastguard Worker	# benefit of existing programs, that's not useful) and 2)
9499*8b26181fSAndroid Build Coastguard Worker	# because SSL_library_init() is a library routine in some
9500*8b26181fSAndroid Build Coastguard Worker	# versions and a #defined wrapper around OPENSSL_init_ssl()
9501*8b26181fSAndroid Build Coastguard Worker	# in others.
9502*8b26181fSAndroid Build Coastguard Worker	#
9503*8b26181fSAndroid Build Coastguard Worker	if test "x$HAVE_OPENSSL" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then
9504*8b26181fSAndroid Build Coastguard Worker
9505*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
9506*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
9507*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
9508*8b26181fSAndroid Build Coastguard Worker
9509*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$CFLAGS -I/usr/local/include"
9510*8b26181fSAndroid Build Coastguard Worker		LIBS="$LIBS -L/usr/local/lib -lssl -lcrypto"
9511*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local that we can use" >&5
9512*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we have OpenSSL/libressl in /usr/local that we can use... " >&6; }
9513*8b26181fSAndroid Build Coastguard Worker		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9514*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
9515*8b26181fSAndroid Build Coastguard Worker
9516*8b26181fSAndroid Build Coastguard Worker#include <openssl/ssl.h>
9517*8b26181fSAndroid Build Coastguard Worker
9518*8b26181fSAndroid Build Coastguard Workerint
9519*8b26181fSAndroid Build Coastguard Workermain ()
9520*8b26181fSAndroid Build Coastguard Worker{
9521*8b26181fSAndroid Build Coastguard Worker
9522*8b26181fSAndroid Build Coastguard WorkerSSL_library_init();
9523*8b26181fSAndroid Build Coastguard Workerreturn 0;
9524*8b26181fSAndroid Build Coastguard Worker
9525*8b26181fSAndroid Build Coastguard Worker  ;
9526*8b26181fSAndroid Build Coastguard Worker  return 0;
9527*8b26181fSAndroid Build Coastguard Worker}
9528*8b26181fSAndroid Build Coastguard Worker_ACEOF
9529*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
9530*8b26181fSAndroid Build Coastguard Worker
9531*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9532*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
9533*8b26181fSAndroid Build Coastguard Worker			HAVE_OPENSSL=yes
9534*8b26181fSAndroid Build Coastguard Worker			OPENSSL_CFLAGS="-I/usr/local/include"
9535*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto"
9536*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS_STATIC="-L/usr/local/lib -lssl -lcrypto"
9537*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS_PRIVATE="-L/usr/local/lib -lssl -lcrypto"
9538*8b26181fSAndroid Build Coastguard Worker
9539*8b26181fSAndroid Build Coastguard Workerelse
9540*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9541*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9542*8b26181fSAndroid Build Coastguard Workerfi
9543*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
9544*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
9545*8b26181fSAndroid Build Coastguard Worker
9546*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
9547*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
9548*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
9549*8b26181fSAndroid Build Coastguard Worker
9550*8b26181fSAndroid Build Coastguard Worker	fi
9551*8b26181fSAndroid Build Coastguard Worker
9552*8b26181fSAndroid Build Coastguard Worker	#
9553*8b26181fSAndroid Build Coastguard Worker	# If it wasn't found, check if it's a system library.
9554*8b26181fSAndroid Build Coastguard Worker	#
9555*8b26181fSAndroid Build Coastguard Worker	# We include the standard include file to 1) make sure that
9556*8b26181fSAndroid Build Coastguard Worker	# it's installed (if it's just a shared library for the
9557*8b26181fSAndroid Build Coastguard Worker	# benefit of existing programs, that's not useful) and 2)
9558*8b26181fSAndroid Build Coastguard Worker	# because SSL_library_init() is a library routine in some
9559*8b26181fSAndroid Build Coastguard Worker	# versions and a #defined wrapper around OPENSSL_init_ssl()
9560*8b26181fSAndroid Build Coastguard Worker	# in others.
9561*8b26181fSAndroid Build Coastguard Worker	#
9562*8b26181fSAndroid Build Coastguard Worker	if test "x$HAVE_OPENSSL" != "xyes"; then
9563*8b26181fSAndroid Build Coastguard Worker
9564*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
9565*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
9566*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
9567*8b26181fSAndroid Build Coastguard Worker
9568*8b26181fSAndroid Build Coastguard Worker		LIBS="$LIBS -lssl -lcrypto"
9569*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5
9570*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we have a system OpenSSL/libressl that we can use... " >&6; }
9571*8b26181fSAndroid Build Coastguard Worker		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9572*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
9573*8b26181fSAndroid Build Coastguard Worker
9574*8b26181fSAndroid Build Coastguard Worker#include <openssl/ssl.h>
9575*8b26181fSAndroid Build Coastguard Worker
9576*8b26181fSAndroid Build Coastguard Workerint
9577*8b26181fSAndroid Build Coastguard Workermain ()
9578*8b26181fSAndroid Build Coastguard Worker{
9579*8b26181fSAndroid Build Coastguard Worker
9580*8b26181fSAndroid Build Coastguard WorkerSSL_library_init();
9581*8b26181fSAndroid Build Coastguard Workerreturn 0;
9582*8b26181fSAndroid Build Coastguard Worker
9583*8b26181fSAndroid Build Coastguard Worker  ;
9584*8b26181fSAndroid Build Coastguard Worker  return 0;
9585*8b26181fSAndroid Build Coastguard Worker}
9586*8b26181fSAndroid Build Coastguard Worker_ACEOF
9587*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
9588*8b26181fSAndroid Build Coastguard Worker
9589*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9590*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
9591*8b26181fSAndroid Build Coastguard Worker			HAVE_OPENSSL=yes
9592*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS="-lssl -lcrypto"
9593*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS_STATIC="-lssl -lcrypto"
9594*8b26181fSAndroid Build Coastguard Worker			OPENSSL_LIBS_PRIVATE="-lssl -lcrypto"
9595*8b26181fSAndroid Build Coastguard Worker
9596*8b26181fSAndroid Build Coastguard Workerelse
9597*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9598*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9599*8b26181fSAndroid Build Coastguard Workerfi
9600*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
9601*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
9602*8b26181fSAndroid Build Coastguard Worker
9603*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
9604*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
9605*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
9606*8b26181fSAndroid Build Coastguard Worker
9607*8b26181fSAndroid Build Coastguard Worker	fi
9608*8b26181fSAndroid Build Coastguard Worker
9609*8b26181fSAndroid Build Coastguard Worker	#
9610*8b26181fSAndroid Build Coastguard Worker	# OK, did we find it?
9611*8b26181fSAndroid Build Coastguard Worker	#
9612*8b26181fSAndroid Build Coastguard Worker	if test "x$HAVE_OPENSSL" = "xyes"; then
9613*8b26181fSAndroid Build Coastguard Worker
9614*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
9615*8b26181fSAndroid Build Coastguard Worker
9616*8b26181fSAndroid Build Coastguard Worker		V_INCLS="$V_INCLS $OPENSSL_CFLAGS"
9617*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS="$ADDITIONAL_LIBS $OPENSSL_LIBS"
9618*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $OPENSSL_LIBS_STATIC"
9619*8b26181fSAndroid Build Coastguard Worker		LIBS_PRIVATE="$LIBS_PRIVATE $OPENSSL_LIBS_PRIVATE"
9620*8b26181fSAndroid Build Coastguard Worker		REQUIRES_PRIVATE="$REQUIRES_PRIVATE $OPENSSL_REQUIRES_PRIVATE"
9621*8b26181fSAndroid Build Coastguard Worker	else
9622*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5
9623*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: OpenSSL not found" >&6;}
9624*8b26181fSAndroid Build Coastguard Worker	fi
9625*8b26181fSAndroid Build Coastguard Worker
9626*8b26181fSAndroid Build Coastguard Worker
9627*8b26181fSAndroid Build Coastguard Worker$as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
9628*8b26181fSAndroid Build Coastguard Worker
9629*8b26181fSAndroid Build Coastguard Worker	REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c sslutils.c"
9630*8b26181fSAndroid Build Coastguard Worker	BUILD_RPCAPD=build-rpcapd
9631*8b26181fSAndroid Build Coastguard Worker	INSTALL_RPCAPD=install-rpcapd
9632*8b26181fSAndroid Build Coastguard Worker	;;
9633*8b26181fSAndroid Build Coastguard Worker*)	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9634*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9635*8b26181fSAndroid Build Coastguard Worker	;;
9636*8b26181fSAndroid Build Coastguard Workeresac
9637*8b26181fSAndroid Build Coastguard Worker
9638*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
9639*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether to build optimizer debugging code... " >&6; }
9640*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-optimizer-dbg was given.
9641*8b26181fSAndroid Build Coastguard Workerif test "${enable_optimizer_dbg+set}" = set; then :
9642*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_optimizer_dbg;
9643*8b26181fSAndroid Build Coastguard Workerfi
9644*8b26181fSAndroid Build Coastguard Worker
9645*8b26181fSAndroid Build Coastguard Workerif test "$enable_optimizer_dbg" = "yes"; then
9646*8b26181fSAndroid Build Coastguard Worker
9647*8b26181fSAndroid Build Coastguard Worker$as_echo "#define BDEBUG 1" >>confdefs.h
9648*8b26181fSAndroid Build Coastguard Worker
9649*8b26181fSAndroid Build Coastguard Workerfi
9650*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
9651*8b26181fSAndroid Build Coastguard Worker$as_echo "${enable_optimizer_dbg-no}" >&6; }
9652*8b26181fSAndroid Build Coastguard Worker
9653*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
9654*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether to build parser debugging code... " >&6; }
9655*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-yydebug was given.
9656*8b26181fSAndroid Build Coastguard Workerif test "${enable_yydebug+set}" = set; then :
9657*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_yydebug;
9658*8b26181fSAndroid Build Coastguard Workerfi
9659*8b26181fSAndroid Build Coastguard Worker
9660*8b26181fSAndroid Build Coastguard Workerif test "$enable_yydebug" = "yes"; then
9661*8b26181fSAndroid Build Coastguard Worker
9662*8b26181fSAndroid Build Coastguard Worker$as_echo "#define YYDEBUG 1" >>confdefs.h
9663*8b26181fSAndroid Build Coastguard Worker
9664*8b26181fSAndroid Build Coastguard Workerfi
9665*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
9666*8b26181fSAndroid Build Coastguard Worker$as_echo "${enable_yydebug-no}" >&6; }
9667*8b26181fSAndroid Build Coastguard Worker
9668*8b26181fSAndroid Build Coastguard Worker#
9669*8b26181fSAndroid Build Coastguard Worker# Look for {f}lex.
9670*8b26181fSAndroid Build Coastguard Worker#
9671*8b26181fSAndroid Build Coastguard Workerfor ac_prog in flex lex
9672*8b26181fSAndroid Build Coastguard Workerdo
9673*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "$ac_prog", so it can be a program name with args.
9674*8b26181fSAndroid Build Coastguard Workerset dummy $ac_prog; ac_word=$2
9675*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9676*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
9677*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_LEX+:} false; then :
9678*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9679*8b26181fSAndroid Build Coastguard Workerelse
9680*8b26181fSAndroid Build Coastguard Worker  if test -n "$LEX"; then
9681*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_LEX="$LEX" # Let the user override the test.
9682*8b26181fSAndroid Build Coastguard Workerelse
9683*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9684*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
9685*8b26181fSAndroid Build Coastguard Workerdo
9686*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
9687*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
9688*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
9689*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9690*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_LEX="$ac_prog"
9691*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9692*8b26181fSAndroid Build Coastguard Worker    break 2
9693*8b26181fSAndroid Build Coastguard Worker  fi
9694*8b26181fSAndroid Build Coastguard Workerdone
9695*8b26181fSAndroid Build Coastguard Worker  done
9696*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
9697*8b26181fSAndroid Build Coastguard Worker
9698*8b26181fSAndroid Build Coastguard Workerfi
9699*8b26181fSAndroid Build Coastguard Workerfi
9700*8b26181fSAndroid Build Coastguard WorkerLEX=$ac_cv_prog_LEX
9701*8b26181fSAndroid Build Coastguard Workerif test -n "$LEX"; then
9702*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
9703*8b26181fSAndroid Build Coastguard Worker$as_echo "$LEX" >&6; }
9704*8b26181fSAndroid Build Coastguard Workerelse
9705*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9706*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9707*8b26181fSAndroid Build Coastguard Workerfi
9708*8b26181fSAndroid Build Coastguard Worker
9709*8b26181fSAndroid Build Coastguard Worker
9710*8b26181fSAndroid Build Coastguard Worker  test -n "$LEX" && break
9711*8b26181fSAndroid Build Coastguard Workerdone
9712*8b26181fSAndroid Build Coastguard Workertest -n "$LEX" || LEX=":"
9713*8b26181fSAndroid Build Coastguard Worker
9714*8b26181fSAndroid Build Coastguard Workerif test "x$LEX" != "x:"; then
9715*8b26181fSAndroid Build Coastguard Worker  cat >conftest.l <<_ACEOF
9716*8b26181fSAndroid Build Coastguard Worker%%
9717*8b26181fSAndroid Build Coastguard Workera { ECHO; }
9718*8b26181fSAndroid Build Coastguard Workerb { REJECT; }
9719*8b26181fSAndroid Build Coastguard Workerc { yymore (); }
9720*8b26181fSAndroid Build Coastguard Workerd { yyless (1); }
9721*8b26181fSAndroid Build Coastguard Workere { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument.  */
9722*8b26181fSAndroid Build Coastguard Worker    yyless ((input () != 0)); }
9723*8b26181fSAndroid Build Coastguard Workerf { unput (yytext[0]); }
9724*8b26181fSAndroid Build Coastguard Worker. { BEGIN INITIAL; }
9725*8b26181fSAndroid Build Coastguard Worker%%
9726*8b26181fSAndroid Build Coastguard Worker#ifdef YYTEXT_POINTER
9727*8b26181fSAndroid Build Coastguard Workerextern char *yytext;
9728*8b26181fSAndroid Build Coastguard Worker#endif
9729*8b26181fSAndroid Build Coastguard Workerint
9730*8b26181fSAndroid Build Coastguard Workermain (void)
9731*8b26181fSAndroid Build Coastguard Worker{
9732*8b26181fSAndroid Build Coastguard Worker  return ! yylex () + ! yywrap ();
9733*8b26181fSAndroid Build Coastguard Worker}
9734*8b26181fSAndroid Build Coastguard Worker_ACEOF
9735*8b26181fSAndroid Build Coastguard Worker{ { ac_try="$LEX conftest.l"
9736*8b26181fSAndroid Build Coastguard Workercase "(($ac_try" in
9737*8b26181fSAndroid Build Coastguard Worker  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9738*8b26181fSAndroid Build Coastguard Worker  *) ac_try_echo=$ac_try;;
9739*8b26181fSAndroid Build Coastguard Workeresac
9740*8b26181fSAndroid Build Coastguard Workereval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
9741*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_try_echo"; } >&5
9742*8b26181fSAndroid Build Coastguard Worker  (eval "$LEX conftest.l") 2>&5
9743*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
9744*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9745*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }
9746*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
9747*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking lex output file root... " >&6; }
9748*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_lex_root+:} false; then :
9749*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9750*8b26181fSAndroid Build Coastguard Workerelse
9751*8b26181fSAndroid Build Coastguard Worker
9752*8b26181fSAndroid Build Coastguard Workerif test -f lex.yy.c; then
9753*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_lex_root=lex.yy
9754*8b26181fSAndroid Build Coastguard Workerelif test -f lexyy.c; then
9755*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_lex_root=lexyy
9756*8b26181fSAndroid Build Coastguard Workerelse
9757*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
9758*8b26181fSAndroid Build Coastguard Workerfi
9759*8b26181fSAndroid Build Coastguard Workerfi
9760*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
9761*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_prog_lex_root" >&6; }
9762*8b26181fSAndroid Build Coastguard WorkerLEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
9763*8b26181fSAndroid Build Coastguard Worker
9764*8b26181fSAndroid Build Coastguard Workerif test -z "${LEXLIB+set}"; then
9765*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
9766*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking lex library... " >&6; }
9767*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_lex+:} false; then :
9768*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9769*8b26181fSAndroid Build Coastguard Workerelse
9770*8b26181fSAndroid Build Coastguard Worker
9771*8b26181fSAndroid Build Coastguard Worker    ac_save_LIBS=$LIBS
9772*8b26181fSAndroid Build Coastguard Worker    ac_cv_lib_lex='none needed'
9773*8b26181fSAndroid Build Coastguard Worker    for ac_lib in '' -lfl -ll; do
9774*8b26181fSAndroid Build Coastguard Worker      LIBS="$ac_lib $ac_save_LIBS"
9775*8b26181fSAndroid Build Coastguard Worker      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9776*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
9777*8b26181fSAndroid Build Coastguard Worker`cat $LEX_OUTPUT_ROOT.c`
9778*8b26181fSAndroid Build Coastguard Worker_ACEOF
9779*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
9780*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_lex=$ac_lib
9781*8b26181fSAndroid Build Coastguard Workerfi
9782*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
9783*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
9784*8b26181fSAndroid Build Coastguard Worker      test "$ac_cv_lib_lex" != 'none needed' && break
9785*8b26181fSAndroid Build Coastguard Worker    done
9786*8b26181fSAndroid Build Coastguard Worker    LIBS=$ac_save_LIBS
9787*8b26181fSAndroid Build Coastguard Worker
9788*8b26181fSAndroid Build Coastguard Workerfi
9789*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
9790*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_lex" >&6; }
9791*8b26181fSAndroid Build Coastguard Worker  test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
9792*8b26181fSAndroid Build Coastguard Workerfi
9793*8b26181fSAndroid Build Coastguard Worker
9794*8b26181fSAndroid Build Coastguard Worker
9795*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
9796*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether yytext is a pointer... " >&6; }
9797*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_lex_yytext_pointer+:} false; then :
9798*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9799*8b26181fSAndroid Build Coastguard Workerelse
9800*8b26181fSAndroid Build Coastguard Worker  # POSIX says lex can declare yytext either as a pointer or an array; the
9801*8b26181fSAndroid Build Coastguard Worker# default is implementation-dependent.  Figure out which it is, since
9802*8b26181fSAndroid Build Coastguard Worker# not all implementations provide the %pointer and %array declarations.
9803*8b26181fSAndroid Build Coastguard Workerac_cv_prog_lex_yytext_pointer=no
9804*8b26181fSAndroid Build Coastguard Workerac_save_LIBS=$LIBS
9805*8b26181fSAndroid Build Coastguard WorkerLIBS="$LEXLIB $ac_save_LIBS"
9806*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
9807*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
9808*8b26181fSAndroid Build Coastguard Worker
9809*8b26181fSAndroid Build Coastguard Worker  #define YYTEXT_POINTER 1
9810*8b26181fSAndroid Build Coastguard Worker`cat $LEX_OUTPUT_ROOT.c`
9811*8b26181fSAndroid Build Coastguard Worker_ACEOF
9812*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
9813*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_lex_yytext_pointer=yes
9814*8b26181fSAndroid Build Coastguard Workerfi
9815*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
9816*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
9817*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_save_LIBS
9818*8b26181fSAndroid Build Coastguard Worker
9819*8b26181fSAndroid Build Coastguard Workerfi
9820*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
9821*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
9822*8b26181fSAndroid Build Coastguard Workerif test $ac_cv_prog_lex_yytext_pointer = yes; then
9823*8b26181fSAndroid Build Coastguard Worker
9824*8b26181fSAndroid Build Coastguard Worker$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
9825*8b26181fSAndroid Build Coastguard Worker
9826*8b26181fSAndroid Build Coastguard Workerfi
9827*8b26181fSAndroid Build Coastguard Workerrm -f conftest.l $LEX_OUTPUT_ROOT.c
9828*8b26181fSAndroid Build Coastguard Worker
9829*8b26181fSAndroid Build Coastguard Workerfi
9830*8b26181fSAndroid Build Coastguard Workerif test "$LEX" = ":"; then
9831*8b26181fSAndroid Build Coastguard Worker	as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
9832*8b26181fSAndroid Build Coastguard Workerfi
9833*8b26181fSAndroid Build Coastguard Worker
9834*8b26181fSAndroid Build Coastguard Worker#
9835*8b26181fSAndroid Build Coastguard Worker# Make sure {f}lex supports the -P, --header-file, and --nounput flags
9836*8b26181fSAndroid Build Coastguard Worker# and supports processing our scanner.l.
9837*8b26181fSAndroid Build Coastguard Worker#
9838*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
9839*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for capable lex... " >&6; }
9840*8b26181fSAndroid Build Coastguard Workerif ${tcpdump_cv_capable_lex+:} false; then :
9841*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9842*8b26181fSAndroid Build Coastguard Workerelse
9843*8b26181fSAndroid Build Coastguard Worker  if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
9844*8b26181fSAndroid Build Coastguard Worker	    tcpdump_cv_capable_lex=yes
9845*8b26181fSAndroid Build Coastguard Worker	else
9846*8b26181fSAndroid Build Coastguard Worker	    tcpdump_cv_capable_lex=insufficient
9847*8b26181fSAndroid Build Coastguard Worker	fi
9848*8b26181fSAndroid Build Coastguard Workerfi
9849*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
9850*8b26181fSAndroid Build Coastguard Worker$as_echo "$tcpdump_cv_capable_lex" >&6; }
9851*8b26181fSAndroid Build Coastguard Workerif test $tcpdump_cv_capable_lex = insufficient ; then
9852*8b26181fSAndroid Build Coastguard Worker	as_fn_error $? "$LEX is insufficient to compile libpcap.
9853*8b26181fSAndroid Build Coastguard Worker libpcap requires Flex 2.5.31 or later, or a compatible version of lex.
9854*8b26181fSAndroid Build Coastguard Worker If a suitable version of Lex/Flex is available as a non-standard command
9855*8b26181fSAndroid Build Coastguard Worker and/or not in the PATH, you can specify it using the LEX environment
9856*8b26181fSAndroid Build Coastguard Worker variable. That said, on some systems the error can mean that Flex/Lex is
9857*8b26181fSAndroid Build Coastguard Worker actually acceptable, but m4 is not. Likewise, if a suitable version of
9858*8b26181fSAndroid Build Coastguard Worker m4 (such as GNU M4) is available but has not been detected, you can
9859*8b26181fSAndroid Build Coastguard Worker specify it using the M4 environment variable." "$LINENO" 5
9860*8b26181fSAndroid Build Coastguard Workerfi
9861*8b26181fSAndroid Build Coastguard Worker
9862*8b26181fSAndroid Build Coastguard Worker#
9863*8b26181fSAndroid Build Coastguard Worker# Look for yacc/bison/byacc.
9864*8b26181fSAndroid Build Coastguard Worker# If it's Bison, we do not want -y, as 1) we will be using -o to cause
9865*8b26181fSAndroid Build Coastguard Worker# the output for XXX.y to be written to XXX.c and 2) we don't want
9866*8b26181fSAndroid Build Coastguard Worker# it to issue warnings about stuff not supported by POSIX YACC - we
9867*8b26181fSAndroid Build Coastguard Worker# want to use that stuff, and don't care whether plain YACC supports
9868*8b26181fSAndroid Build Coastguard Worker# it or not, we require either Bison or Berkeley YACC.
9869*8b26181fSAndroid Build Coastguard Worker#
9870*8b26181fSAndroid Build Coastguard WorkerBISON_BYACC=""
9871*8b26181fSAndroid Build Coastguard Worker#
9872*8b26181fSAndroid Build Coastguard Worker# Look for Bison.
9873*8b26181fSAndroid Build Coastguard Worker#
9874*8b26181fSAndroid Build Coastguard Workerfor ac_prog in bison
9875*8b26181fSAndroid Build Coastguard Workerdo
9876*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "$ac_prog", so it can be a program name with args.
9877*8b26181fSAndroid Build Coastguard Workerset dummy $ac_prog; ac_word=$2
9878*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9879*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
9880*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_BISON_BYACC+:} false; then :
9881*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9882*8b26181fSAndroid Build Coastguard Workerelse
9883*8b26181fSAndroid Build Coastguard Worker  if test -n "$BISON_BYACC"; then
9884*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
9885*8b26181fSAndroid Build Coastguard Workerelse
9886*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9887*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
9888*8b26181fSAndroid Build Coastguard Workerdo
9889*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
9890*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
9891*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
9892*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9893*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_BISON_BYACC="$ac_prog"
9894*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9895*8b26181fSAndroid Build Coastguard Worker    break 2
9896*8b26181fSAndroid Build Coastguard Worker  fi
9897*8b26181fSAndroid Build Coastguard Workerdone
9898*8b26181fSAndroid Build Coastguard Worker  done
9899*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
9900*8b26181fSAndroid Build Coastguard Worker
9901*8b26181fSAndroid Build Coastguard Workerfi
9902*8b26181fSAndroid Build Coastguard Workerfi
9903*8b26181fSAndroid Build Coastguard WorkerBISON_BYACC=$ac_cv_prog_BISON_BYACC
9904*8b26181fSAndroid Build Coastguard Workerif test -n "$BISON_BYACC"; then
9905*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
9906*8b26181fSAndroid Build Coastguard Worker$as_echo "$BISON_BYACC" >&6; }
9907*8b26181fSAndroid Build Coastguard Workerelse
9908*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9910*8b26181fSAndroid Build Coastguard Workerfi
9911*8b26181fSAndroid Build Coastguard Worker
9912*8b26181fSAndroid Build Coastguard Worker
9913*8b26181fSAndroid Build Coastguard Worker  test -n "$BISON_BYACC" && break
9914*8b26181fSAndroid Build Coastguard Workerdone
9915*8b26181fSAndroid Build Coastguard Worker
9916*8b26181fSAndroid Build Coastguard Workerif test x"$BISON_BYACC" != x; then
9917*8b26181fSAndroid Build Coastguard Worker	#
9918*8b26181fSAndroid Build Coastguard Worker	# We found Bison.
9919*8b26181fSAndroid Build Coastguard Worker	#
9920*8b26181fSAndroid Build Coastguard Worker	# Bison prior to 2.4(.1) doesn't support "%define api.pure", so use
9921*8b26181fSAndroid Build Coastguard Worker	# "%pure-parser".
9922*8b26181fSAndroid Build Coastguard Worker	#
9923*8b26181fSAndroid Build Coastguard Worker	bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'`
9924*8b26181fSAndroid Build Coastguard Worker	bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'`
9925*8b26181fSAndroid Build Coastguard Worker	if test "$bison_major_version" -lt 2 -o \
9926*8b26181fSAndroid Build Coastguard Worker	    \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \)
9927*8b26181fSAndroid Build Coastguard Worker	then
9928*8b26181fSAndroid Build Coastguard Worker		REENTRANT_PARSER="%pure-parser"
9929*8b26181fSAndroid Build Coastguard Worker	else
9930*8b26181fSAndroid Build Coastguard Worker		REENTRANT_PARSER="%define api.pure"
9931*8b26181fSAndroid Build Coastguard Worker	fi
9932*8b26181fSAndroid Build Coastguard Workerelse
9933*8b26181fSAndroid Build Coastguard Worker	#
9934*8b26181fSAndroid Build Coastguard Worker	# We didn't find Bison; check for Berkeley YACC, under the
9935*8b26181fSAndroid Build Coastguard Worker	# names byacc and yacc.
9936*8b26181fSAndroid Build Coastguard Worker	#
9937*8b26181fSAndroid Build Coastguard Worker	for ac_prog in byacc yacc
9938*8b26181fSAndroid Build Coastguard Workerdo
9939*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "$ac_prog", so it can be a program name with args.
9940*8b26181fSAndroid Build Coastguard Workerset dummy $ac_prog; ac_word=$2
9941*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9942*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
9943*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_BISON_BYACC+:} false; then :
9944*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9945*8b26181fSAndroid Build Coastguard Workerelse
9946*8b26181fSAndroid Build Coastguard Worker  if test -n "$BISON_BYACC"; then
9947*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test.
9948*8b26181fSAndroid Build Coastguard Workerelse
9949*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9950*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
9951*8b26181fSAndroid Build Coastguard Workerdo
9952*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
9953*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
9954*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
9955*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9956*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_BISON_BYACC="$ac_prog"
9957*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9958*8b26181fSAndroid Build Coastguard Worker    break 2
9959*8b26181fSAndroid Build Coastguard Worker  fi
9960*8b26181fSAndroid Build Coastguard Workerdone
9961*8b26181fSAndroid Build Coastguard Worker  done
9962*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
9963*8b26181fSAndroid Build Coastguard Worker
9964*8b26181fSAndroid Build Coastguard Workerfi
9965*8b26181fSAndroid Build Coastguard Workerfi
9966*8b26181fSAndroid Build Coastguard WorkerBISON_BYACC=$ac_cv_prog_BISON_BYACC
9967*8b26181fSAndroid Build Coastguard Workerif test -n "$BISON_BYACC"; then
9968*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5
9969*8b26181fSAndroid Build Coastguard Worker$as_echo "$BISON_BYACC" >&6; }
9970*8b26181fSAndroid Build Coastguard Workerelse
9971*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
9973*8b26181fSAndroid Build Coastguard Workerfi
9974*8b26181fSAndroid Build Coastguard Worker
9975*8b26181fSAndroid Build Coastguard Worker
9976*8b26181fSAndroid Build Coastguard Worker  test -n "$BISON_BYACC" && break
9977*8b26181fSAndroid Build Coastguard Workerdone
9978*8b26181fSAndroid Build Coastguard Worker
9979*8b26181fSAndroid Build Coastguard Worker	if test x"$BISON_BYACC" != x; then
9980*8b26181fSAndroid Build Coastguard Worker		#
9981*8b26181fSAndroid Build Coastguard Worker		# Make sure this is Berkeley YACC, not AT&T YACC;
9982*8b26181fSAndroid Build Coastguard Worker		# the latter doesn't support reentrant parsers.
9983*8b26181fSAndroid Build Coastguard Worker		# Run it with "-V"; that succeeds and reports the
9984*8b26181fSAndroid Build Coastguard Worker		# version number with Berkeley YACC, but will
9985*8b26181fSAndroid Build Coastguard Worker		# (probably) fail with various vendor flavors
9986*8b26181fSAndroid Build Coastguard Worker		# of AT&T YACC.
9987*8b26181fSAndroid Build Coastguard Worker		#
9988*8b26181fSAndroid Build Coastguard Worker		# Hopefully this also eliminates any versions
9989*8b26181fSAndroid Build Coastguard Worker		# of Berkeley YACC that don't support reentrant
9990*8b26181fSAndroid Build Coastguard Worker		# parsers, if there are any.
9991*8b26181fSAndroid Build Coastguard Worker		#
9992*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5
9993*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for capable yacc... " >&6; }
9994*8b26181fSAndroid Build Coastguard Workerif ${tcpdump_cv_capable_yacc+:} false; then :
9995*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
9996*8b26181fSAndroid Build Coastguard Workerelse
9997*8b26181fSAndroid Build Coastguard Worker  if $BISON_BYACC -V >/dev/null 2>&1; then
9998*8b26181fSAndroid Build Coastguard Worker			tcpdump_cv_capable_yacc=yes
9999*8b26181fSAndroid Build Coastguard Worker		    else
10000*8b26181fSAndroid Build Coastguard Worker			tcpdump_cv_capable_yacc=insufficient
10001*8b26181fSAndroid Build Coastguard Worker		    fi
10002*8b26181fSAndroid Build Coastguard Workerfi
10003*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
10004*8b26181fSAndroid Build Coastguard Worker$as_echo "$tcpdump_cv_capable_yacc" >&6; }
10005*8b26181fSAndroid Build Coastguard Worker		if test $tcpdump_cv_capable_yacc = insufficient ; then
10006*8b26181fSAndroid Build Coastguard Worker		    as_fn_error $? "$BISON_BYACC is insufficient to compile libpcap.
10007*8b26181fSAndroid Build Coastguard Worker libpcap requires Bison, a newer version of Berkeley YACC with support
10008*8b26181fSAndroid Build Coastguard Worker for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
10009*8b26181fSAndroid Build Coastguard Worker		fi
10010*8b26181fSAndroid Build Coastguard Worker	else
10011*8b26181fSAndroid Build Coastguard Worker		#
10012*8b26181fSAndroid Build Coastguard Worker		# OK, we found neither byacc nor yacc.
10013*8b26181fSAndroid Build Coastguard Worker		#
10014*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "Neither bison, byacc, nor yacc was found.
10015*8b26181fSAndroid Build Coastguard Worker libpcap requires Bison, a newer version of Berkeley YACC with support
10016*8b26181fSAndroid Build Coastguard Worker for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
10017*8b26181fSAndroid Build Coastguard Worker	fi
10018*8b26181fSAndroid Build Coastguard Worker
10019*8b26181fSAndroid Build Coastguard Worker	#
10020*8b26181fSAndroid Build Coastguard Worker	# Berkeley YACC doesn't support "%define api.pure", so use
10021*8b26181fSAndroid Build Coastguard Worker	# "%pure-parser".
10022*8b26181fSAndroid Build Coastguard Worker	#
10023*8b26181fSAndroid Build Coastguard Worker	REENTRANT_PARSER="%pure-parser"
10024*8b26181fSAndroid Build Coastguard Workerfi
10025*8b26181fSAndroid Build Coastguard Worker
10026*8b26181fSAndroid Build Coastguard Worker
10027*8b26181fSAndroid Build Coastguard Worker
10028*8b26181fSAndroid Build Coastguard Worker#
10029*8b26181fSAndroid Build Coastguard Worker# Do various checks for various OSes and versions of those OSes.
10030*8b26181fSAndroid Build Coastguard Worker#
10031*8b26181fSAndroid Build Coastguard Worker# Assume, by default, no support for shared libraries and V7/BSD
10032*8b26181fSAndroid Build Coastguard Worker# convention for man pages (devices in section 4, file formats in
10033*8b26181fSAndroid Build Coastguard Worker# section 5, miscellaneous info in section 7, administrative commands
10034*8b26181fSAndroid Build Coastguard Worker# and daemons in section 8).  Individual cases can override this.
10035*8b26181fSAndroid Build Coastguard Worker#
10036*8b26181fSAndroid Build Coastguard WorkerDYEXT="none"
10037*8b26181fSAndroid Build Coastguard WorkerMAN_DEVICES=4
10038*8b26181fSAndroid Build Coastguard WorkerMAN_FILE_FORMATS=5
10039*8b26181fSAndroid Build Coastguard WorkerMAN_MISC_INFO=7
10040*8b26181fSAndroid Build Coastguard WorkerMAN_ADMIN_COMMANDS=8
10041*8b26181fSAndroid Build Coastguard Workercase "$host_os" in
10042*8b26181fSAndroid Build Coastguard Worker
10043*8b26181fSAndroid Build Coastguard Workeraix*)
10044*8b26181fSAndroid Build Coastguard Worker
10045*8b26181fSAndroid Build Coastguard Worker$as_echo "#define _SUN 1" >>confdefs.h
10046*8b26181fSAndroid Build Coastguard Worker
10047*8b26181fSAndroid Build Coastguard Worker
10048*8b26181fSAndroid Build Coastguard Worker	#
10049*8b26181fSAndroid Build Coastguard Worker	# AIX makes it fun to build shared and static libraries,
10050*8b26181fSAndroid Build Coastguard Worker	# because they're *both* ".a" archive libraries.  We
10051*8b26181fSAndroid Build Coastguard Worker	# build the static library for the benefit of the traditional
10052*8b26181fSAndroid Build Coastguard Worker	# scheme of building libpcap and tcpdump in subdirectories of
10053*8b26181fSAndroid Build Coastguard Worker	# the same directory, with tcpdump statically linked with the
10054*8b26181fSAndroid Build Coastguard Worker	# libpcap in question, but we also build a shared library as
10055*8b26181fSAndroid Build Coastguard Worker	# "libpcap.shareda" and install *it*, rather than the static
10056*8b26181fSAndroid Build Coastguard Worker	# library, as "libpcap.a".
10057*8b26181fSAndroid Build Coastguard Worker	#
10058*8b26181fSAndroid Build Coastguard Worker	DYEXT="shareda"
10059*8b26181fSAndroid Build Coastguard Worker
10060*8b26181fSAndroid Build Coastguard Worker	case "$V_PCAP" in
10061*8b26181fSAndroid Build Coastguard Worker
10062*8b26181fSAndroid Build Coastguard Worker	dlpi)
10063*8b26181fSAndroid Build Coastguard Worker		#
10064*8b26181fSAndroid Build Coastguard Worker		# If we're using DLPI, applications will need to
10065*8b26181fSAndroid Build Coastguard Worker		# use /lib/pse.exp if present, as we use the
10066*8b26181fSAndroid Build Coastguard Worker		# STREAMS routines.
10067*8b26181fSAndroid Build Coastguard Worker		#
10068*8b26181fSAndroid Build Coastguard Worker		pseexe="/lib/pse.exp"
10069*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
10070*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $pseexe... " >&6; }
10071*8b26181fSAndroid Build Coastguard Worker		if test -f $pseexe ; then
10072*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10073*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10074*8b26181fSAndroid Build Coastguard Worker			LIBS="-I:$pseexe"
10075*8b26181fSAndroid Build Coastguard Worker		fi
10076*8b26181fSAndroid Build Coastguard Worker		;;
10077*8b26181fSAndroid Build Coastguard Worker
10078*8b26181fSAndroid Build Coastguard Worker	bpf)
10079*8b26181fSAndroid Build Coastguard Worker		#
10080*8b26181fSAndroid Build Coastguard Worker		# If we're using BPF, we need "-lodm" and "-lcfg", as
10081*8b26181fSAndroid Build Coastguard Worker		# we use them to load the BPF module.
10082*8b26181fSAndroid Build Coastguard Worker		#
10083*8b26181fSAndroid Build Coastguard Worker		LIBS="-lodm -lcfg"
10084*8b26181fSAndroid Build Coastguard Worker		;;
10085*8b26181fSAndroid Build Coastguard Worker	esac
10086*8b26181fSAndroid Build Coastguard Worker	;;
10087*8b26181fSAndroid Build Coastguard Worker
10088*8b26181fSAndroid Build Coastguard Workerdarwin*)
10089*8b26181fSAndroid Build Coastguard Worker	DYEXT="dylib"
10090*8b26181fSAndroid Build Coastguard Worker	V_CCOPT="$V_CCOPT -fno-common"
10091*8b26181fSAndroid Build Coastguard Worker	# Check whether --enable-universal was given.
10092*8b26181fSAndroid Build Coastguard Workerif test "${enable_universal+set}" = set; then :
10093*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_universal;
10094*8b26181fSAndroid Build Coastguard Workerfi
10095*8b26181fSAndroid Build Coastguard Worker
10096*8b26181fSAndroid Build Coastguard Worker	if test "$enable_universal" != "no"; then
10097*8b26181fSAndroid Build Coastguard Worker		case "$host_os" in
10098*8b26181fSAndroid Build Coastguard Worker
10099*8b26181fSAndroid Build Coastguard Worker		darwin[0-7].*)
10100*8b26181fSAndroid Build Coastguard Worker			#
10101*8b26181fSAndroid Build Coastguard Worker			# Pre-Tiger.  Build only for 32-bit PowerPC; no
10102*8b26181fSAndroid Build Coastguard Worker			# need for any special compiler or linker flags.
10103*8b26181fSAndroid Build Coastguard Worker			#
10104*8b26181fSAndroid Build Coastguard Worker			;;
10105*8b26181fSAndroid Build Coastguard Worker
10106*8b26181fSAndroid Build Coastguard Worker		darwin8.[0123]|darwin8.[0123].*)
10107*8b26181fSAndroid Build Coastguard Worker			#
10108*8b26181fSAndroid Build Coastguard Worker			# Tiger, prior to Intel support.  Build
10109*8b26181fSAndroid Build Coastguard Worker			# libraries and executables for 32-bit PowerPC
10110*8b26181fSAndroid Build Coastguard Worker			# and 64-bit PowerPC, with 32-bit PowerPC first.
10111*8b26181fSAndroid Build Coastguard Worker			# (I'm guessing that's what Apple does.)
10112*8b26181fSAndroid Build Coastguard Worker			#
10113*8b26181fSAndroid Build Coastguard Worker			# (The double brackets are needed because
10114*8b26181fSAndroid Build Coastguard Worker			# autotools/m4 use brackets as a quoting
10115*8b26181fSAndroid Build Coastguard Worker			# character; the double brackets turn into
10116*8b26181fSAndroid Build Coastguard Worker			# single brackets in the generated configure
10117*8b26181fSAndroid Build Coastguard Worker			# file.)
10118*8b26181fSAndroid Build Coastguard Worker			#
10119*8b26181fSAndroid Build Coastguard Worker			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64"
10120*8b26181fSAndroid Build Coastguard Worker			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64"
10121*8b26181fSAndroid Build Coastguard Worker			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64"
10122*8b26181fSAndroid Build Coastguard Worker			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64"
10123*8b26181fSAndroid Build Coastguard Worker			;;
10124*8b26181fSAndroid Build Coastguard Worker
10125*8b26181fSAndroid Build Coastguard Worker		darwin8.[456]|darwin8.[456].*)
10126*8b26181fSAndroid Build Coastguard Worker			#
10127*8b26181fSAndroid Build Coastguard Worker			# Tiger, subsequent to Intel support but prior
10128*8b26181fSAndroid Build Coastguard Worker			# to x86-64 support.  Build libraries and
10129*8b26181fSAndroid Build Coastguard Worker			# executables for 32-bit PowerPC, 64-bit
10130*8b26181fSAndroid Build Coastguard Worker			# PowerPC, and 32-bit x86, with 32-bit PowerPC
10131*8b26181fSAndroid Build Coastguard Worker			# first.  (I'm guessing that's what Apple does.)
10132*8b26181fSAndroid Build Coastguard Worker			#
10133*8b26181fSAndroid Build Coastguard Worker			# (The double brackets are needed because
10134*8b26181fSAndroid Build Coastguard Worker			# autotools/m4 use brackets as a quoting
10135*8b26181fSAndroid Build Coastguard Worker			# character; the double brackets turn into
10136*8b26181fSAndroid Build Coastguard Worker			# single brackets in the generated configure
10137*8b26181fSAndroid Build Coastguard Worker			# file.)
10138*8b26181fSAndroid Build Coastguard Worker			#
10139*8b26181fSAndroid Build Coastguard Worker			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
10140*8b26181fSAndroid Build Coastguard Worker			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
10141*8b26181fSAndroid Build Coastguard Worker			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386"
10142*8b26181fSAndroid Build Coastguard Worker			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386"
10143*8b26181fSAndroid Build Coastguard Worker			;;
10144*8b26181fSAndroid Build Coastguard Worker
10145*8b26181fSAndroid Build Coastguard Worker		darwin8.*)
10146*8b26181fSAndroid Build Coastguard Worker			#
10147*8b26181fSAndroid Build Coastguard Worker			# All other Tiger, so subsequent to x86-64
10148*8b26181fSAndroid Build Coastguard Worker			# support.  Build libraries and executables for
10149*8b26181fSAndroid Build Coastguard Worker			# 32-bit PowerPC, 64-bit PowerPC, 32-bit x86,
10150*8b26181fSAndroid Build Coastguard Worker			# and x86-64, with 32-bit PowerPC first.  (I'm
10151*8b26181fSAndroid Build Coastguard Worker			# guessing that's what Apple does.)
10152*8b26181fSAndroid Build Coastguard Worker			#
10153*8b26181fSAndroid Build Coastguard Worker			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10154*8b26181fSAndroid Build Coastguard Worker			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10155*8b26181fSAndroid Build Coastguard Worker			V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10156*8b26181fSAndroid Build Coastguard Worker			V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10157*8b26181fSAndroid Build Coastguard Worker			;;
10158*8b26181fSAndroid Build Coastguard Worker
10159*8b26181fSAndroid Build Coastguard Worker		darwin9.*)
10160*8b26181fSAndroid Build Coastguard Worker			#
10161*8b26181fSAndroid Build Coastguard Worker			# Leopard.  Build libraries for 32-bit PowerPC,
10162*8b26181fSAndroid Build Coastguard Worker			# 64-bit PowerPC, 32-bit x86, and x86-64, with
10163*8b26181fSAndroid Build Coastguard Worker			# 32-bit PowerPC first, and build executables
10164*8b26181fSAndroid Build Coastguard Worker			# for 32-bit x86 and 32-bit PowerPC, with 32-bit
10165*8b26181fSAndroid Build Coastguard Worker			# x86 first.  (That's what Apple does.)
10166*8b26181fSAndroid Build Coastguard Worker			#
10167*8b26181fSAndroid Build Coastguard Worker			V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10168*8b26181fSAndroid Build Coastguard Worker			V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64"
10169*8b26181fSAndroid Build Coastguard Worker			V_PROG_CCOPT_FAT="-arch i386 -arch ppc"
10170*8b26181fSAndroid Build Coastguard Worker			V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc"
10171*8b26181fSAndroid Build Coastguard Worker			;;
10172*8b26181fSAndroid Build Coastguard Worker
10173*8b26181fSAndroid Build Coastguard Worker		darwin10.*)
10174*8b26181fSAndroid Build Coastguard Worker			#
10175*8b26181fSAndroid Build Coastguard Worker			# Snow Leopard.  Build libraries for x86-64,
10176*8b26181fSAndroid Build Coastguard Worker			# 32-bit x86, and 32-bit PowerPC, with x86-64
10177*8b26181fSAndroid Build Coastguard Worker			# first, and build executables for x86-64 and
10178*8b26181fSAndroid Build Coastguard Worker			# 32-bit x86, with x86-64 first.  (That's what
10179*8b26181fSAndroid Build Coastguard Worker			# Apple does, even though Snow Leopard doesn't
10180*8b26181fSAndroid Build Coastguard Worker			# run on PPC, so PPC libpcap runs under Rosetta,
10181*8b26181fSAndroid Build Coastguard Worker			# and Rosetta doesn't support BPF ioctls, so PPC
10182*8b26181fSAndroid Build Coastguard Worker			# programs can't do live captures.)
10183*8b26181fSAndroid Build Coastguard Worker			#
10184*8b26181fSAndroid Build Coastguard Worker			V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc"
10185*8b26181fSAndroid Build Coastguard Worker			V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc"
10186*8b26181fSAndroid Build Coastguard Worker			V_PROG_CCOPT_FAT="-arch x86_64 -arch i386"
10187*8b26181fSAndroid Build Coastguard Worker			V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386"
10188*8b26181fSAndroid Build Coastguard Worker			;;
10189*8b26181fSAndroid Build Coastguard Worker
10190*8b26181fSAndroid Build Coastguard Worker		darwin1[1-8]*)
10191*8b26181fSAndroid Build Coastguard Worker			#
10192*8b26181fSAndroid Build Coastguard Worker			# Post-Snow Leopard, pre-Catalina.  Build
10193*8b26181fSAndroid Build Coastguard Worker			# libraries for x86-64 and 32-bit x86, with
10194*8b26181fSAndroid Build Coastguard Worker			# x86-64 first, and build executables only for
10195*8b26181fSAndroid Build Coastguard Worker			# x86-64.  (That's what Apple does.)  This
10196*8b26181fSAndroid Build Coastguard Worker			# requires no special flags for programs.
10197*8b26181fSAndroid Build Coastguard Worker			#
10198*8b26181fSAndroid Build Coastguard Worker			# We check whether we *can* build for i386 and,
10199*8b26181fSAndroid Build Coastguard Worker			# if not, suggest that the user install the
10200*8b26181fSAndroid Build Coastguard Worker			# /usr/include headers if they want to build
10201*8b26181fSAndroid Build Coastguard Worker			# fat.
10202*8b26181fSAndroid Build Coastguard Worker			#
10203*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5
10204*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether building for 32-bit x86 is supported... " >&6; }
10205*8b26181fSAndroid Build Coastguard Worker
10206*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
10207*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
10208*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
10209*8b26181fSAndroid Build Coastguard Worker
10210*8b26181fSAndroid Build Coastguard Worker			CFLAGS="$CFLAGS -arch i386"
10211*8b26181fSAndroid Build Coastguard Worker			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10212*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10213*8b26181fSAndroid Build Coastguard Worker
10214*8b26181fSAndroid Build Coastguard Workerint
10215*8b26181fSAndroid Build Coastguard Workermain ()
10216*8b26181fSAndroid Build Coastguard Worker{
10217*8b26181fSAndroid Build Coastguard Workerreturn 0;
10218*8b26181fSAndroid Build Coastguard Worker  ;
10219*8b26181fSAndroid Build Coastguard Worker  return 0;
10220*8b26181fSAndroid Build Coastguard Worker}
10221*8b26181fSAndroid Build Coastguard Worker_ACEOF
10222*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
10223*8b26181fSAndroid Build Coastguard Worker
10224*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10225*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10226*8b26181fSAndroid Build Coastguard Worker				V_LIB_CCOPT_FAT="-arch x86_64"
10227*8b26181fSAndroid Build Coastguard Worker				V_LIB_LDFLAGS_FAT="-arch x86_64"
10228*8b26181fSAndroid Build Coastguard Worker
10229*8b26181fSAndroid Build Coastguard Worker				#
10230*8b26181fSAndroid Build Coastguard Worker				# OpenSSL installation on macOS seems
10231*8b26181fSAndroid Build Coastguard Worker				# to install only the libs for 64-bit
10232*8b26181fSAndroid Build Coastguard Worker				# x86 - at least that's what Brew does:
10233*8b26181fSAndroid Build Coastguard Worker				# only configure 32-bit builds if we
10234*8b26181fSAndroid Build Coastguard Worker				# don't have OpenSSL.
10235*8b26181fSAndroid Build Coastguard Worker				#
10236*8b26181fSAndroid Build Coastguard Worker				if test "$HAVE_OPENSSL" != yes; then
10237*8b26181fSAndroid Build Coastguard Worker					V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386"
10238*8b26181fSAndroid Build Coastguard Worker					V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386"
10239*8b26181fSAndroid Build Coastguard Worker				fi
10240*8b26181fSAndroid Build Coastguard Worker
10241*8b26181fSAndroid Build Coastguard Workerelse
10242*8b26181fSAndroid Build Coastguard Worker
10243*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10244*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10245*8b26181fSAndroid Build Coastguard Worker				V_LIB_CCOPT_FAT="-arch x86_64"
10246*8b26181fSAndroid Build Coastguard Worker				V_LIB_LDFLAGS_FAT="-arch x86_64"
10247*8b26181fSAndroid Build Coastguard Worker				case "$host_os" in
10248*8b26181fSAndroid Build Coastguard Worker
10249*8b26181fSAndroid Build Coastguard Worker				darwin18.*)
10250*8b26181fSAndroid Build Coastguard Worker					#
10251*8b26181fSAndroid Build Coastguard Worker					# Mojave; you need to install the
10252*8b26181fSAndroid Build Coastguard Worker					# /usr/include headers to get
10253*8b26181fSAndroid Build Coastguard Worker					# 32-bit x86 builds to work.
10254*8b26181fSAndroid Build Coastguard Worker					#
10255*8b26181fSAndroid Build Coastguard Worker					{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&5
10256*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&2;}
10257*8b26181fSAndroid Build Coastguard Worker					;;
10258*8b26181fSAndroid Build Coastguard Worker
10259*8b26181fSAndroid Build Coastguard Worker				*)
10260*8b26181fSAndroid Build Coastguard Worker					#
10261*8b26181fSAndroid Build Coastguard Worker					# Pre-Mojave; the command-line
10262*8b26181fSAndroid Build Coastguard Worker					# tools should be sufficient to
10263*8b26181fSAndroid Build Coastguard Worker					# enable 32-bit x86 builds.
10264*8b26181fSAndroid Build Coastguard Worker					#
10265*8b26181fSAndroid Build Coastguard Worker					{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5
10266*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;}
10267*8b26181fSAndroid Build Coastguard Worker					;;
10268*8b26181fSAndroid Build Coastguard Worker				esac
10269*8b26181fSAndroid Build Coastguard Worker
10270*8b26181fSAndroid Build Coastguard Workerfi
10271*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
10272*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
10273*8b26181fSAndroid Build Coastguard Worker
10274*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
10275*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
10276*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
10277*8b26181fSAndroid Build Coastguard Worker
10278*8b26181fSAndroid Build Coastguard Worker			;;
10279*8b26181fSAndroid Build Coastguard Worker
10280*8b26181fSAndroid Build Coastguard Worker		darwin19*)
10281*8b26181fSAndroid Build Coastguard Worker			#
10282*8b26181fSAndroid Build Coastguard Worker			# Catalina.  Build libraries and executables
10283*8b26181fSAndroid Build Coastguard Worker			# only for x86-64.  (That's what Apple does;
10284*8b26181fSAndroid Build Coastguard Worker			# 32-bit x86 binaries are not supported on
10285*8b26181fSAndroid Build Coastguard Worker			# Catalina.)
10286*8b26181fSAndroid Build Coastguard Worker			#
10287*8b26181fSAndroid Build Coastguard Worker			V_LIB_CCOPT_FAT="-arch x86_64"
10288*8b26181fSAndroid Build Coastguard Worker			V_LIB_LDFLAGS_FAT="-arch x86_64"
10289*8b26181fSAndroid Build Coastguard Worker			V_PROG_CCOPT_FAT="-arch x86_64"
10290*8b26181fSAndroid Build Coastguard Worker			V_PROG_LDFLAGS_FAT="-arch x86_64"
10291*8b26181fSAndroid Build Coastguard Worker			;;
10292*8b26181fSAndroid Build Coastguard Worker
10293*8b26181fSAndroid Build Coastguard Worker		darwin*)
10294*8b26181fSAndroid Build Coastguard Worker			#
10295*8b26181fSAndroid Build Coastguard Worker			# Post-Catalina.  Build libraries and
10296*8b26181fSAndroid Build Coastguard Worker			# executables for x86-64 and ARM64.
10297*8b26181fSAndroid Build Coastguard Worker			# (That's what Apple does, except they
10298*8b26181fSAndroid Build Coastguard Worker			# build for arm64e, which may include
10299*8b26181fSAndroid Build Coastguard Worker			# some of the pointer-checking extensions.)
10300*8b26181fSAndroid Build Coastguard Worker			#
10301*8b26181fSAndroid Build Coastguard Worker			# If we're building with libssl, make sure
10302*8b26181fSAndroid Build Coastguard Worker			# we can build fat with it (i.e., that it
10303*8b26181fSAndroid Build Coastguard Worker			# was built fat); if we can't, don't set
10304*8b26181fSAndroid Build Coastguard Worker			# the target architectures, and just
10305*8b26181fSAndroid Build Coastguard Worker			# build for the host we're on.
10306*8b26181fSAndroid Build Coastguard Worker			#
10307*8b26181fSAndroid Build Coastguard Worker			# Otherwise, just add both of them.
10308*8b26181fSAndroid Build Coastguard Worker			#
10309*8b26181fSAndroid Build Coastguard Worker			if test "$HAVE_OPENSSL" = yes; then
10310*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether building fat with libssl is supported" >&5
10311*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether building fat with libssl is supported... " >&6; }
10312*8b26181fSAndroid Build Coastguard Worker
10313*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
10314*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
10315*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
10316*8b26181fSAndroid Build Coastguard Worker
10317*8b26181fSAndroid Build Coastguard Worker				CFLAGS="$CFLAGS -arch x86_64 -arch arm64"
10318*8b26181fSAndroid Build Coastguard Worker				LDFLAGS="$LDFLAGS $OPENSSL_LIBS"
10319*8b26181fSAndroid Build Coastguard Worker				cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10320*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10321*8b26181fSAndroid Build Coastguard Worker
10322*8b26181fSAndroid Build Coastguard Worker					#include <openssl/ssl.h>
10323*8b26181fSAndroid Build Coastguard Worker
10324*8b26181fSAndroid Build Coastguard Workerint
10325*8b26181fSAndroid Build Coastguard Workermain ()
10326*8b26181fSAndroid Build Coastguard Worker{
10327*8b26181fSAndroid Build Coastguard Worker
10328*8b26181fSAndroid Build Coastguard Worker					SSL_library_init();
10329*8b26181fSAndroid Build Coastguard Worker					return 0;
10330*8b26181fSAndroid Build Coastguard Worker
10331*8b26181fSAndroid Build Coastguard Worker  ;
10332*8b26181fSAndroid Build Coastguard Worker  return 0;
10333*8b26181fSAndroid Build Coastguard Worker}
10334*8b26181fSAndroid Build Coastguard Worker_ACEOF
10335*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
10336*8b26181fSAndroid Build Coastguard Worker
10337*8b26181fSAndroid Build Coastguard Worker					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10338*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10339*8b26181fSAndroid Build Coastguard Worker					V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
10340*8b26181fSAndroid Build Coastguard Worker					V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10341*8b26181fSAndroid Build Coastguard Worker					V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
10342*8b26181fSAndroid Build Coastguard Worker					V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10343*8b26181fSAndroid Build Coastguard Worker
10344*8b26181fSAndroid Build Coastguard Workerelse
10345*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10347*8b26181fSAndroid Build Coastguard Worker
10348*8b26181fSAndroid Build Coastguard Workerfi
10349*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
10350*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
10351*8b26181fSAndroid Build Coastguard Worker
10352*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
10353*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
10354*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
10355*8b26181fSAndroid Build Coastguard Worker
10356*8b26181fSAndroid Build Coastguard Worker			else
10357*8b26181fSAndroid Build Coastguard Worker				V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64"
10358*8b26181fSAndroid Build Coastguard Worker				V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10359*8b26181fSAndroid Build Coastguard Worker				V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64"
10360*8b26181fSAndroid Build Coastguard Worker				V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64"
10361*8b26181fSAndroid Build Coastguard Worker			fi
10362*8b26181fSAndroid Build Coastguard Worker			;;
10363*8b26181fSAndroid Build Coastguard Worker		esac
10364*8b26181fSAndroid Build Coastguard Worker	fi
10365*8b26181fSAndroid Build Coastguard Worker	;;
10366*8b26181fSAndroid Build Coastguard Worker
10367*8b26181fSAndroid Build Coastguard Workerhpux9*)
10368*8b26181fSAndroid Build Coastguard Worker
10369*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_HPUX9 1" >>confdefs.h
10370*8b26181fSAndroid Build Coastguard Worker
10371*8b26181fSAndroid Build Coastguard Worker
10372*8b26181fSAndroid Build Coastguard Worker	#
10373*8b26181fSAndroid Build Coastguard Worker	# Use System V conventions for man pages.
10374*8b26181fSAndroid Build Coastguard Worker	#
10375*8b26181fSAndroid Build Coastguard Worker	MAN_ADMIN_COMMANDS=1m
10376*8b26181fSAndroid Build Coastguard Worker	MAN_FILE_FORMATS=4
10377*8b26181fSAndroid Build Coastguard Worker	MAN_MISC_INFO=5
10378*8b26181fSAndroid Build Coastguard Worker	;;
10379*8b26181fSAndroid Build Coastguard Worker
10380*8b26181fSAndroid Build Coastguard Workerhpux10.0*)
10381*8b26181fSAndroid Build Coastguard Worker
10382*8b26181fSAndroid Build Coastguard Worker	#
10383*8b26181fSAndroid Build Coastguard Worker	# Use System V conventions for man pages.
10384*8b26181fSAndroid Build Coastguard Worker	#
10385*8b26181fSAndroid Build Coastguard Worker	MAN_ADMIN_COMMANDS=1m
10386*8b26181fSAndroid Build Coastguard Worker	MAN_FILE_FORMATS=4
10387*8b26181fSAndroid Build Coastguard Worker	MAN_MISC_INFO=5
10388*8b26181fSAndroid Build Coastguard Worker	;;
10389*8b26181fSAndroid Build Coastguard Worker
10390*8b26181fSAndroid Build Coastguard Workerhpux10.1*)
10391*8b26181fSAndroid Build Coastguard Worker
10392*8b26181fSAndroid Build Coastguard Worker	#
10393*8b26181fSAndroid Build Coastguard Worker	# Use System V conventions for man pages.
10394*8b26181fSAndroid Build Coastguard Worker	#
10395*8b26181fSAndroid Build Coastguard Worker	MAN_ADMIN_COMMANDS=1m
10396*8b26181fSAndroid Build Coastguard Worker	MAN_FILE_FORMATS=4
10397*8b26181fSAndroid Build Coastguard Worker	MAN_MISC_INFO=5
10398*8b26181fSAndroid Build Coastguard Worker	;;
10399*8b26181fSAndroid Build Coastguard Worker
10400*8b26181fSAndroid Build Coastguard Workerhpux*)
10401*8b26181fSAndroid Build Coastguard Worker
10402*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
10403*8b26181fSAndroid Build Coastguard Worker
10404*8b26181fSAndroid Build Coastguard Worker	if test "`uname -m`" = "ia64"; then
10405*8b26181fSAndroid Build Coastguard Worker		DYEXT="so"
10406*8b26181fSAndroid Build Coastguard Worker	else
10407*8b26181fSAndroid Build Coastguard Worker		DYEXT="sl"
10408*8b26181fSAndroid Build Coastguard Worker	fi
10409*8b26181fSAndroid Build Coastguard Worker
10410*8b26181fSAndroid Build Coastguard Worker	#
10411*8b26181fSAndroid Build Coastguard Worker	# "-b" builds a shared library; "+h" sets the soname.
10412*8b26181fSAndroid Build Coastguard Worker	#
10413*8b26181fSAndroid Build Coastguard Worker	SHLIB_OPT="-b"
10414*8b26181fSAndroid Build Coastguard Worker	SONAME_OPT="+h"
10415*8b26181fSAndroid Build Coastguard Worker
10416*8b26181fSAndroid Build Coastguard Worker	#
10417*8b26181fSAndroid Build Coastguard Worker	# Use System V conventions for man pages.
10418*8b26181fSAndroid Build Coastguard Worker	#
10419*8b26181fSAndroid Build Coastguard Worker	MAN_FILE_FORMATS=4
10420*8b26181fSAndroid Build Coastguard Worker	MAN_MISC_INFO=5
10421*8b26181fSAndroid Build Coastguard Worker	;;
10422*8b26181fSAndroid Build Coastguard Worker
10423*8b26181fSAndroid Build Coastguard Workeririx*)
10424*8b26181fSAndroid Build Coastguard Worker	#
10425*8b26181fSAndroid Build Coastguard Worker	# Use IRIX conventions for man pages; they're the same as the
10426*8b26181fSAndroid Build Coastguard Worker	# System V conventions, except that they use section 8 for
10427*8b26181fSAndroid Build Coastguard Worker	# administrative commands and daemons.
10428*8b26181fSAndroid Build Coastguard Worker	#
10429*8b26181fSAndroid Build Coastguard Worker	MAN_FILE_FORMATS=4
10430*8b26181fSAndroid Build Coastguard Worker	MAN_MISC_INFO=5
10431*8b26181fSAndroid Build Coastguard Worker	;;
10432*8b26181fSAndroid Build Coastguard Worker
10433*8b26181fSAndroid Build Coastguard Workerlinux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*)
10434*8b26181fSAndroid Build Coastguard Worker	DYEXT="so"
10435*8b26181fSAndroid Build Coastguard Worker	;;
10436*8b26181fSAndroid Build Coastguard Worker
10437*8b26181fSAndroid Build Coastguard Workerosf*)
10438*8b26181fSAndroid Build Coastguard Worker	DYEXT="so"
10439*8b26181fSAndroid Build Coastguard Worker
10440*8b26181fSAndroid Build Coastguard Worker	#
10441*8b26181fSAndroid Build Coastguard Worker	# DEC OSF/1, a/k/a Digital UNIX, a/k/a Tru64 UNIX.
10442*8b26181fSAndroid Build Coastguard Worker	# Use Tru64 UNIX conventions for man pages; they're the same as
10443*8b26181fSAndroid Build Coastguard Worker	# the System V conventions except that they use section 8 for
10444*8b26181fSAndroid Build Coastguard Worker	# administrative commands and daemons.
10445*8b26181fSAndroid Build Coastguard Worker	#
10446*8b26181fSAndroid Build Coastguard Worker	MAN_FILE_FORMATS=4
10447*8b26181fSAndroid Build Coastguard Worker	MAN_MISC_INFO=5
10448*8b26181fSAndroid Build Coastguard Worker	MAN_DEVICES=7
10449*8b26181fSAndroid Build Coastguard Worker	;;
10450*8b26181fSAndroid Build Coastguard Worker
10451*8b26181fSAndroid Build Coastguard Workersinix*)
10452*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
10453*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
10454*8b26181fSAndroid Build Coastguard Worker	if ${ac_cv_cc_sinix_defined+:} false; then :
10455*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
10456*8b26181fSAndroid Build Coastguard Workerelse
10457*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10458*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10459*8b26181fSAndroid Build Coastguard Worker
10460*8b26181fSAndroid Build Coastguard Workerint
10461*8b26181fSAndroid Build Coastguard Workermain ()
10462*8b26181fSAndroid Build Coastguard Worker{
10463*8b26181fSAndroid Build Coastguard Workerint i = sinix;
10464*8b26181fSAndroid Build Coastguard Worker  ;
10465*8b26181fSAndroid Build Coastguard Worker  return 0;
10466*8b26181fSAndroid Build Coastguard Worker}
10467*8b26181fSAndroid Build Coastguard Worker_ACEOF
10468*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
10469*8b26181fSAndroid Build Coastguard Worker  ac_cv_cc_sinix_defined=yes
10470*8b26181fSAndroid Build Coastguard Workerelse
10471*8b26181fSAndroid Build Coastguard Worker  ac_cv_cc_sinix_defined=no
10472*8b26181fSAndroid Build Coastguard Workerfi
10473*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10474*8b26181fSAndroid Build Coastguard Workerfi
10475*8b26181fSAndroid Build Coastguard Worker
10476*8b26181fSAndroid Build Coastguard Worker	    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
10477*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_cc_sinix_defined" >&6; }
10478*8b26181fSAndroid Build Coastguard Worker	    if test $ac_cv_cc_sinix_defined = no ; then
10479*8b26181fSAndroid Build Coastguard Worker
10480*8b26181fSAndroid Build Coastguard Worker$as_echo "#define sinix 1" >>confdefs.h
10481*8b26181fSAndroid Build Coastguard Worker
10482*8b26181fSAndroid Build Coastguard Worker	    fi
10483*8b26181fSAndroid Build Coastguard Worker	;;
10484*8b26181fSAndroid Build Coastguard Worker
10485*8b26181fSAndroid Build Coastguard Workersolaris*)
10486*8b26181fSAndroid Build Coastguard Worker
10487*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
10488*8b26181fSAndroid Build Coastguard Worker
10489*8b26181fSAndroid Build Coastguard Worker
10490*8b26181fSAndroid Build Coastguard Worker	DYEXT="so"
10491*8b26181fSAndroid Build Coastguard Worker
10492*8b26181fSAndroid Build Coastguard Worker	#
10493*8b26181fSAndroid Build Coastguard Worker	# Make sure errno is thread-safe, in case we're called in
10494*8b26181fSAndroid Build Coastguard Worker	# a multithreaded program.  We don't guarantee that two
10495*8b26181fSAndroid Build Coastguard Worker	# threads can use the *same* pcap_t safely, but the
10496*8b26181fSAndroid Build Coastguard Worker	# current version does guarantee that you can use different
10497*8b26181fSAndroid Build Coastguard Worker	# pcap_t's in different threads, and even that pcap_compile()
10498*8b26181fSAndroid Build Coastguard Worker	# is thread-safe (it wasn't thread-safe in some older versions).
10499*8b26181fSAndroid Build Coastguard Worker	#
10500*8b26181fSAndroid Build Coastguard Worker	V_CCOPT="$V_CCOPT -D_TS_ERRNO"
10501*8b26181fSAndroid Build Coastguard Worker
10502*8b26181fSAndroid Build Coastguard Worker	case "`uname -r`" in
10503*8b26181fSAndroid Build Coastguard Worker
10504*8b26181fSAndroid Build Coastguard Worker	5.12)
10505*8b26181fSAndroid Build Coastguard Worker		;;
10506*8b26181fSAndroid Build Coastguard Worker
10507*8b26181fSAndroid Build Coastguard Worker	*)
10508*8b26181fSAndroid Build Coastguard Worker		#
10509*8b26181fSAndroid Build Coastguard Worker		# Use System V conventions for man pages.
10510*8b26181fSAndroid Build Coastguard Worker		#
10511*8b26181fSAndroid Build Coastguard Worker		MAN_ADMIN_COMMANDS=1m
10512*8b26181fSAndroid Build Coastguard Worker		MAN_FILE_FORMATS=4
10513*8b26181fSAndroid Build Coastguard Worker		MAN_MISC_INFO=5
10514*8b26181fSAndroid Build Coastguard Worker		MAN_DEVICES=7D
10515*8b26181fSAndroid Build Coastguard Worker	esac
10516*8b26181fSAndroid Build Coastguard Worker	;;
10517*8b26181fSAndroid Build Coastguard Workeresac
10518*8b26181fSAndroid Build Coastguard Worker
10519*8b26181fSAndroid Build Coastguard Worker
10520*8b26181fSAndroid Build Coastguard Worker
10521*8b26181fSAndroid Build Coastguard Worker
10522*8b26181fSAndroid Build Coastguard Worker
10523*8b26181fSAndroid Build Coastguard Worker
10524*8b26181fSAndroid Build Coastguard Worker
10525*8b26181fSAndroid Build Coastguard Worker
10526*8b26181fSAndroid Build Coastguard Worker
10527*8b26181fSAndroid Build Coastguard Worker
10528*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-shared was given.
10529*8b26181fSAndroid Build Coastguard Workerif test "${enable_shared+set}" = set; then :
10530*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_shared;
10531*8b26181fSAndroid Build Coastguard Workerfi
10532*8b26181fSAndroid Build Coastguard Worker
10533*8b26181fSAndroid Build Coastguard Workertest "x$enable_shared" = "xno" && DYEXT="none"
10534*8b26181fSAndroid Build Coastguard Worker
10535*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_tool_prefix"; then
10536*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
10537*8b26181fSAndroid Build Coastguard Workerset dummy ${ac_tool_prefix}ranlib; ac_word=$2
10538*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10539*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
10540*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_RANLIB+:} false; then :
10541*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
10542*8b26181fSAndroid Build Coastguard Workerelse
10543*8b26181fSAndroid Build Coastguard Worker  if test -n "$RANLIB"; then
10544*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
10545*8b26181fSAndroid Build Coastguard Workerelse
10546*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10547*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
10548*8b26181fSAndroid Build Coastguard Workerdo
10549*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
10550*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
10551*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
10552*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10553*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
10554*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10555*8b26181fSAndroid Build Coastguard Worker    break 2
10556*8b26181fSAndroid Build Coastguard Worker  fi
10557*8b26181fSAndroid Build Coastguard Workerdone
10558*8b26181fSAndroid Build Coastguard Worker  done
10559*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
10560*8b26181fSAndroid Build Coastguard Worker
10561*8b26181fSAndroid Build Coastguard Workerfi
10562*8b26181fSAndroid Build Coastguard Workerfi
10563*8b26181fSAndroid Build Coastguard WorkerRANLIB=$ac_cv_prog_RANLIB
10564*8b26181fSAndroid Build Coastguard Workerif test -n "$RANLIB"; then
10565*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
10566*8b26181fSAndroid Build Coastguard Worker$as_echo "$RANLIB" >&6; }
10567*8b26181fSAndroid Build Coastguard Workerelse
10568*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10569*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10570*8b26181fSAndroid Build Coastguard Workerfi
10571*8b26181fSAndroid Build Coastguard Worker
10572*8b26181fSAndroid Build Coastguard Worker
10573*8b26181fSAndroid Build Coastguard Workerfi
10574*8b26181fSAndroid Build Coastguard Workerif test -z "$ac_cv_prog_RANLIB"; then
10575*8b26181fSAndroid Build Coastguard Worker  ac_ct_RANLIB=$RANLIB
10576*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "ranlib", so it can be a program name with args.
10577*8b26181fSAndroid Build Coastguard Workerset dummy ranlib; ac_word=$2
10578*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10579*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
10580*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
10581*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
10582*8b26181fSAndroid Build Coastguard Workerelse
10583*8b26181fSAndroid Build Coastguard Worker  if test -n "$ac_ct_RANLIB"; then
10584*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
10585*8b26181fSAndroid Build Coastguard Workerelse
10586*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10587*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
10588*8b26181fSAndroid Build Coastguard Workerdo
10589*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
10590*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
10591*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
10592*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10593*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_ac_ct_RANLIB="ranlib"
10594*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10595*8b26181fSAndroid Build Coastguard Worker    break 2
10596*8b26181fSAndroid Build Coastguard Worker  fi
10597*8b26181fSAndroid Build Coastguard Workerdone
10598*8b26181fSAndroid Build Coastguard Worker  done
10599*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
10600*8b26181fSAndroid Build Coastguard Worker
10601*8b26181fSAndroid Build Coastguard Workerfi
10602*8b26181fSAndroid Build Coastguard Workerfi
10603*8b26181fSAndroid Build Coastguard Workerac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
10604*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_ct_RANLIB"; then
10605*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
10606*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_ct_RANLIB" >&6; }
10607*8b26181fSAndroid Build Coastguard Workerelse
10608*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10610*8b26181fSAndroid Build Coastguard Workerfi
10611*8b26181fSAndroid Build Coastguard Worker
10612*8b26181fSAndroid Build Coastguard Worker  if test "x$ac_ct_RANLIB" = x; then
10613*8b26181fSAndroid Build Coastguard Worker    RANLIB=":"
10614*8b26181fSAndroid Build Coastguard Worker  else
10615*8b26181fSAndroid Build Coastguard Worker    case $cross_compiling:$ac_tool_warned in
10616*8b26181fSAndroid Build Coastguard Workeryes:)
10617*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10618*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10619*8b26181fSAndroid Build Coastguard Workerac_tool_warned=yes ;;
10620*8b26181fSAndroid Build Coastguard Workeresac
10621*8b26181fSAndroid Build Coastguard Worker    RANLIB=$ac_ct_RANLIB
10622*8b26181fSAndroid Build Coastguard Worker  fi
10623*8b26181fSAndroid Build Coastguard Workerelse
10624*8b26181fSAndroid Build Coastguard Worker  RANLIB="$ac_cv_prog_RANLIB"
10625*8b26181fSAndroid Build Coastguard Workerfi
10626*8b26181fSAndroid Build Coastguard Worker
10627*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_tool_prefix"; then
10628*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
10629*8b26181fSAndroid Build Coastguard Workerset dummy ${ac_tool_prefix}ar; ac_word=$2
10630*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10631*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
10632*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_AR+:} false; then :
10633*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
10634*8b26181fSAndroid Build Coastguard Workerelse
10635*8b26181fSAndroid Build Coastguard Worker  if test -n "$AR"; then
10636*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_AR="$AR" # Let the user override the test.
10637*8b26181fSAndroid Build Coastguard Workerelse
10638*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10639*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
10640*8b26181fSAndroid Build Coastguard Workerdo
10641*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
10642*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
10643*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
10644*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10645*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_AR="${ac_tool_prefix}ar"
10646*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10647*8b26181fSAndroid Build Coastguard Worker    break 2
10648*8b26181fSAndroid Build Coastguard Worker  fi
10649*8b26181fSAndroid Build Coastguard Workerdone
10650*8b26181fSAndroid Build Coastguard Worker  done
10651*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
10652*8b26181fSAndroid Build Coastguard Worker
10653*8b26181fSAndroid Build Coastguard Workerfi
10654*8b26181fSAndroid Build Coastguard Workerfi
10655*8b26181fSAndroid Build Coastguard WorkerAR=$ac_cv_prog_AR
10656*8b26181fSAndroid Build Coastguard Workerif test -n "$AR"; then
10657*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
10658*8b26181fSAndroid Build Coastguard Worker$as_echo "$AR" >&6; }
10659*8b26181fSAndroid Build Coastguard Workerelse
10660*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10661*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10662*8b26181fSAndroid Build Coastguard Workerfi
10663*8b26181fSAndroid Build Coastguard Worker
10664*8b26181fSAndroid Build Coastguard Worker
10665*8b26181fSAndroid Build Coastguard Workerfi
10666*8b26181fSAndroid Build Coastguard Workerif test -z "$ac_cv_prog_AR"; then
10667*8b26181fSAndroid Build Coastguard Worker  ac_ct_AR=$AR
10668*8b26181fSAndroid Build Coastguard Worker  # Extract the first word of "ar", so it can be a program name with args.
10669*8b26181fSAndroid Build Coastguard Workerset dummy ar; ac_word=$2
10670*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10671*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for $ac_word... " >&6; }
10672*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_prog_ac_ct_AR+:} false; then :
10673*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
10674*8b26181fSAndroid Build Coastguard Workerelse
10675*8b26181fSAndroid Build Coastguard Worker  if test -n "$ac_ct_AR"; then
10676*8b26181fSAndroid Build Coastguard Worker  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
10677*8b26181fSAndroid Build Coastguard Workerelse
10678*8b26181fSAndroid Build Coastguard Workeras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
10680*8b26181fSAndroid Build Coastguard Workerdo
10681*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
10682*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
10683*8b26181fSAndroid Build Coastguard Worker    for ac_exec_ext in '' $ac_executable_extensions; do
10684*8b26181fSAndroid Build Coastguard Worker  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10685*8b26181fSAndroid Build Coastguard Worker    ac_cv_prog_ac_ct_AR="ar"
10686*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687*8b26181fSAndroid Build Coastguard Worker    break 2
10688*8b26181fSAndroid Build Coastguard Worker  fi
10689*8b26181fSAndroid Build Coastguard Workerdone
10690*8b26181fSAndroid Build Coastguard Worker  done
10691*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
10692*8b26181fSAndroid Build Coastguard Worker
10693*8b26181fSAndroid Build Coastguard Workerfi
10694*8b26181fSAndroid Build Coastguard Workerfi
10695*8b26181fSAndroid Build Coastguard Workerac_ct_AR=$ac_cv_prog_ac_ct_AR
10696*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_ct_AR"; then
10697*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
10698*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_ct_AR" >&6; }
10699*8b26181fSAndroid Build Coastguard Workerelse
10700*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10701*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10702*8b26181fSAndroid Build Coastguard Workerfi
10703*8b26181fSAndroid Build Coastguard Worker
10704*8b26181fSAndroid Build Coastguard Worker  if test "x$ac_ct_AR" = x; then
10705*8b26181fSAndroid Build Coastguard Worker    AR=""
10706*8b26181fSAndroid Build Coastguard Worker  else
10707*8b26181fSAndroid Build Coastguard Worker    case $cross_compiling:$ac_tool_warned in
10708*8b26181fSAndroid Build Coastguard Workeryes:)
10709*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10710*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10711*8b26181fSAndroid Build Coastguard Workerac_tool_warned=yes ;;
10712*8b26181fSAndroid Build Coastguard Workeresac
10713*8b26181fSAndroid Build Coastguard Worker    AR=$ac_ct_AR
10714*8b26181fSAndroid Build Coastguard Worker  fi
10715*8b26181fSAndroid Build Coastguard Workerelse
10716*8b26181fSAndroid Build Coastguard Worker  AR="$ac_cv_prog_AR"
10717*8b26181fSAndroid Build Coastguard Workerfi
10718*8b26181fSAndroid Build Coastguard Worker
10719*8b26181fSAndroid Build Coastguard Worker
10720*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
10721*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether ln -s works... " >&6; }
10722*8b26181fSAndroid Build Coastguard WorkerLN_S=$as_ln_s
10723*8b26181fSAndroid Build Coastguard Workerif test "$LN_S" = "ln -s"; then
10724*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10725*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10726*8b26181fSAndroid Build Coastguard Workerelse
10727*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
10728*8b26181fSAndroid Build Coastguard Worker$as_echo "no, using $LN_S" >&6; }
10729*8b26181fSAndroid Build Coastguard Workerfi
10730*8b26181fSAndroid Build Coastguard Worker
10731*8b26181fSAndroid Build Coastguard Worker
10732*8b26181fSAndroid Build Coastguard Worker
10733*8b26181fSAndroid Build Coastguard Workerrm -f os-proto.h
10734*8b26181fSAndroid Build Coastguard Worker    if test "${LBL_CFLAGS+set}" = set; then
10735*8b26181fSAndroid Build Coastguard Worker	    V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
10736*8b26181fSAndroid Build Coastguard Worker    fi
10737*8b26181fSAndroid Build Coastguard Worker    if test -f .devel ; then
10738*8b26181fSAndroid Build Coastguard Worker	    #
10739*8b26181fSAndroid Build Coastguard Worker	    # Skip all the warning option stuff on some compilers.
10740*8b26181fSAndroid Build Coastguard Worker	    #
10741*8b26181fSAndroid Build Coastguard Worker	    if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
10742*8b26181fSAndroid Build Coastguard Worker
10743*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
10744*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
10745*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
10746*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -W"
10747*8b26181fSAndroid Build Coastguard Worker	#
10748*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
10749*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
10750*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
10751*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
10752*8b26181fSAndroid Build Coastguard Worker	# for it:
10753*8b26181fSAndroid Build Coastguard Worker	#
10754*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10755*8b26181fSAndroid Build Coastguard Worker	#
10756*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
10757*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
10758*8b26181fSAndroid Build Coastguard Worker	#
10759*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
10760*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
10761*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
10762*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
10763*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
10764*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
10765*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
10766*8b26181fSAndroid Build Coastguard Worker	#
10767*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10768*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10769*8b26181fSAndroid Build Coastguard Worker	#
10770*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
10771*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
10772*8b26181fSAndroid Build Coastguard Worker	#
10773*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10774*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10775*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
10776*8b26181fSAndroid Build Coastguard Worker_ACEOF
10777*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
10778*8b26181fSAndroid Build Coastguard Worker
10779*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10780*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10781*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
10782*8b26181fSAndroid Build Coastguard Worker		#
10783*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
10784*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
10785*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
10786*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
10787*8b26181fSAndroid Build Coastguard Worker		#
10788*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
10789*8b26181fSAndroid Build Coastguard Worker		then
10790*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10791*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5
10792*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -W ... " >&6; }
10793*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10794*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10795*8b26181fSAndroid Build Coastguard Worker
10796*8b26181fSAndroid Build Coastguard Worker_ACEOF
10797*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
10798*8b26181fSAndroid Build Coastguard Worker
10799*8b26181fSAndroid Build Coastguard Worker			#
10800*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
10801*8b26181fSAndroid Build Coastguard Worker			#
10802*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10803*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10804*8b26181fSAndroid Build Coastguard Worker
10805*8b26181fSAndroid Build Coastguard Workerelse
10806*8b26181fSAndroid Build Coastguard Worker
10807*8b26181fSAndroid Build Coastguard Worker			#
10808*8b26181fSAndroid Build Coastguard Worker			# A problem.
10809*8b26181fSAndroid Build Coastguard Worker			#
10810*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10811*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10812*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
10813*8b26181fSAndroid Build Coastguard Worker
10814*8b26181fSAndroid Build Coastguard Workerfi
10815*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10816*8b26181fSAndroid Build Coastguard Worker		fi
10817*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
10818*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
10819*8b26181fSAndroid Build Coastguard Worker		then
10820*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -W"
10821*8b26181fSAndroid Build Coastguard Worker		fi
10822*8b26181fSAndroid Build Coastguard Worker
10823*8b26181fSAndroid Build Coastguard Workerelse
10824*8b26181fSAndroid Build Coastguard Worker
10825*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10826*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10827*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
10828*8b26181fSAndroid Build Coastguard Worker
10829*8b26181fSAndroid Build Coastguard Workerfi
10830*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10831*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
10832*8b26181fSAndroid Build Coastguard Worker
10833*8b26181fSAndroid Build Coastguard Worker
10834*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
10835*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
10836*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
10837*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wall"
10838*8b26181fSAndroid Build Coastguard Worker	#
10839*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
10840*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
10841*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
10842*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
10843*8b26181fSAndroid Build Coastguard Worker	# for it:
10844*8b26181fSAndroid Build Coastguard Worker	#
10845*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10846*8b26181fSAndroid Build Coastguard Worker	#
10847*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
10848*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
10849*8b26181fSAndroid Build Coastguard Worker	#
10850*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
10851*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
10852*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
10853*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
10854*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
10855*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
10856*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
10857*8b26181fSAndroid Build Coastguard Worker	#
10858*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10859*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10860*8b26181fSAndroid Build Coastguard Worker	#
10861*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
10862*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
10863*8b26181fSAndroid Build Coastguard Worker	#
10864*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10865*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10866*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
10867*8b26181fSAndroid Build Coastguard Worker_ACEOF
10868*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
10869*8b26181fSAndroid Build Coastguard Worker
10870*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10871*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10872*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
10873*8b26181fSAndroid Build Coastguard Worker		#
10874*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
10875*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
10876*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
10877*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
10878*8b26181fSAndroid Build Coastguard Worker		#
10879*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
10880*8b26181fSAndroid Build Coastguard Worker		then
10881*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10882*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
10883*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wall ... " >&6; }
10884*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10885*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10886*8b26181fSAndroid Build Coastguard Worker
10887*8b26181fSAndroid Build Coastguard Worker_ACEOF
10888*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
10889*8b26181fSAndroid Build Coastguard Worker
10890*8b26181fSAndroid Build Coastguard Worker			#
10891*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
10892*8b26181fSAndroid Build Coastguard Worker			#
10893*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10894*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10895*8b26181fSAndroid Build Coastguard Worker
10896*8b26181fSAndroid Build Coastguard Workerelse
10897*8b26181fSAndroid Build Coastguard Worker
10898*8b26181fSAndroid Build Coastguard Worker			#
10899*8b26181fSAndroid Build Coastguard Worker			# A problem.
10900*8b26181fSAndroid Build Coastguard Worker			#
10901*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10902*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10903*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
10904*8b26181fSAndroid Build Coastguard Worker
10905*8b26181fSAndroid Build Coastguard Workerfi
10906*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10907*8b26181fSAndroid Build Coastguard Worker		fi
10908*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
10909*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
10910*8b26181fSAndroid Build Coastguard Worker		then
10911*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wall"
10912*8b26181fSAndroid Build Coastguard Worker		fi
10913*8b26181fSAndroid Build Coastguard Worker
10914*8b26181fSAndroid Build Coastguard Workerelse
10915*8b26181fSAndroid Build Coastguard Worker
10916*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10918*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
10919*8b26181fSAndroid Build Coastguard Worker
10920*8b26181fSAndroid Build Coastguard Workerfi
10921*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10922*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
10923*8b26181fSAndroid Build Coastguard Worker
10924*8b26181fSAndroid Build Coastguard Worker
10925*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
10926*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
10927*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
10928*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wcomma"
10929*8b26181fSAndroid Build Coastguard Worker	#
10930*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
10931*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
10932*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
10933*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
10934*8b26181fSAndroid Build Coastguard Worker	# for it:
10935*8b26181fSAndroid Build Coastguard Worker	#
10936*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
10937*8b26181fSAndroid Build Coastguard Worker	#
10938*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
10939*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
10940*8b26181fSAndroid Build Coastguard Worker	#
10941*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
10942*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
10943*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
10944*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
10945*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
10946*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
10947*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
10948*8b26181fSAndroid Build Coastguard Worker	#
10949*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10950*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
10951*8b26181fSAndroid Build Coastguard Worker	#
10952*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
10953*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
10954*8b26181fSAndroid Build Coastguard Worker	#
10955*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10956*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10957*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
10958*8b26181fSAndroid Build Coastguard Worker_ACEOF
10959*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
10960*8b26181fSAndroid Build Coastguard Worker
10961*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10962*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10963*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
10964*8b26181fSAndroid Build Coastguard Worker		#
10965*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
10966*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
10967*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
10968*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
10969*8b26181fSAndroid Build Coastguard Worker		#
10970*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
10971*8b26181fSAndroid Build Coastguard Worker		then
10972*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
10973*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
10974*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wcomma ... " >&6; }
10975*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10976*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
10977*8b26181fSAndroid Build Coastguard Worker
10978*8b26181fSAndroid Build Coastguard Worker_ACEOF
10979*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
10980*8b26181fSAndroid Build Coastguard Worker
10981*8b26181fSAndroid Build Coastguard Worker			#
10982*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
10983*8b26181fSAndroid Build Coastguard Worker			#
10984*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10985*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
10986*8b26181fSAndroid Build Coastguard Worker
10987*8b26181fSAndroid Build Coastguard Workerelse
10988*8b26181fSAndroid Build Coastguard Worker
10989*8b26181fSAndroid Build Coastguard Worker			#
10990*8b26181fSAndroid Build Coastguard Worker			# A problem.
10991*8b26181fSAndroid Build Coastguard Worker			#
10992*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10993*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
10994*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
10995*8b26181fSAndroid Build Coastguard Worker
10996*8b26181fSAndroid Build Coastguard Workerfi
10997*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10998*8b26181fSAndroid Build Coastguard Worker		fi
10999*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11000*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11001*8b26181fSAndroid Build Coastguard Worker		then
11002*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wcomma"
11003*8b26181fSAndroid Build Coastguard Worker		fi
11004*8b26181fSAndroid Build Coastguard Worker
11005*8b26181fSAndroid Build Coastguard Workerelse
11006*8b26181fSAndroid Build Coastguard Worker
11007*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11009*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11010*8b26181fSAndroid Build Coastguard Worker
11011*8b26181fSAndroid Build Coastguard Workerfi
11012*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11013*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11014*8b26181fSAndroid Build Coastguard Worker
11015*8b26181fSAndroid Build Coastguard Worker
11016*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
11017*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
11018*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11019*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wdocumentation"
11020*8b26181fSAndroid Build Coastguard Worker	#
11021*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11022*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11023*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11024*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11025*8b26181fSAndroid Build Coastguard Worker	# for it:
11026*8b26181fSAndroid Build Coastguard Worker	#
11027*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11028*8b26181fSAndroid Build Coastguard Worker	#
11029*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11030*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11031*8b26181fSAndroid Build Coastguard Worker	#
11032*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11033*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11034*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11035*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11036*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11037*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11038*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11039*8b26181fSAndroid Build Coastguard Worker	#
11040*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11041*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11042*8b26181fSAndroid Build Coastguard Worker	#
11043*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11044*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11045*8b26181fSAndroid Build Coastguard Worker	#
11046*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11047*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11048*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11049*8b26181fSAndroid Build Coastguard Worker_ACEOF
11050*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11051*8b26181fSAndroid Build Coastguard Worker
11052*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11053*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11054*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11055*8b26181fSAndroid Build Coastguard Worker		#
11056*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11057*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11058*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11059*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11060*8b26181fSAndroid Build Coastguard Worker		#
11061*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11062*8b26181fSAndroid Build Coastguard Worker		then
11063*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11064*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
11065*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wdocumentation ... " >&6; }
11066*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11067*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11068*8b26181fSAndroid Build Coastguard Worker
11069*8b26181fSAndroid Build Coastguard Worker_ACEOF
11070*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11071*8b26181fSAndroid Build Coastguard Worker
11072*8b26181fSAndroid Build Coastguard Worker			#
11073*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11074*8b26181fSAndroid Build Coastguard Worker			#
11075*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11076*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11077*8b26181fSAndroid Build Coastguard Worker
11078*8b26181fSAndroid Build Coastguard Workerelse
11079*8b26181fSAndroid Build Coastguard Worker
11080*8b26181fSAndroid Build Coastguard Worker			#
11081*8b26181fSAndroid Build Coastguard Worker			# A problem.
11082*8b26181fSAndroid Build Coastguard Worker			#
11083*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11084*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11085*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11086*8b26181fSAndroid Build Coastguard Worker
11087*8b26181fSAndroid Build Coastguard Workerfi
11088*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11089*8b26181fSAndroid Build Coastguard Worker		fi
11090*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11091*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11092*8b26181fSAndroid Build Coastguard Worker		then
11093*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wdocumentation"
11094*8b26181fSAndroid Build Coastguard Worker		fi
11095*8b26181fSAndroid Build Coastguard Worker
11096*8b26181fSAndroid Build Coastguard Workerelse
11097*8b26181fSAndroid Build Coastguard Worker
11098*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11100*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11101*8b26181fSAndroid Build Coastguard Worker
11102*8b26181fSAndroid Build Coastguard Workerfi
11103*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11104*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11105*8b26181fSAndroid Build Coastguard Worker
11106*8b26181fSAndroid Build Coastguard Worker
11107*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
11108*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
11109*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11110*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wformat-nonliteral"
11111*8b26181fSAndroid Build Coastguard Worker	#
11112*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11113*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11114*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11115*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11116*8b26181fSAndroid Build Coastguard Worker	# for it:
11117*8b26181fSAndroid Build Coastguard Worker	#
11118*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11119*8b26181fSAndroid Build Coastguard Worker	#
11120*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11121*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11122*8b26181fSAndroid Build Coastguard Worker	#
11123*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11124*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11125*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11126*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11127*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11128*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11129*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11130*8b26181fSAndroid Build Coastguard Worker	#
11131*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11132*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11133*8b26181fSAndroid Build Coastguard Worker	#
11134*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11135*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11136*8b26181fSAndroid Build Coastguard Worker	#
11137*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11138*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11139*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11140*8b26181fSAndroid Build Coastguard Worker_ACEOF
11141*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11142*8b26181fSAndroid Build Coastguard Worker
11143*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11144*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11145*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11146*8b26181fSAndroid Build Coastguard Worker		#
11147*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11148*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11149*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11150*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11151*8b26181fSAndroid Build Coastguard Worker		#
11152*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11153*8b26181fSAndroid Build Coastguard Worker		then
11154*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11155*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
11156*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
11157*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11158*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11159*8b26181fSAndroid Build Coastguard Worker
11160*8b26181fSAndroid Build Coastguard Worker_ACEOF
11161*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11162*8b26181fSAndroid Build Coastguard Worker
11163*8b26181fSAndroid Build Coastguard Worker			#
11164*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11165*8b26181fSAndroid Build Coastguard Worker			#
11166*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11167*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11168*8b26181fSAndroid Build Coastguard Worker
11169*8b26181fSAndroid Build Coastguard Workerelse
11170*8b26181fSAndroid Build Coastguard Worker
11171*8b26181fSAndroid Build Coastguard Worker			#
11172*8b26181fSAndroid Build Coastguard Worker			# A problem.
11173*8b26181fSAndroid Build Coastguard Worker			#
11174*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11175*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11176*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11177*8b26181fSAndroid Build Coastguard Worker
11178*8b26181fSAndroid Build Coastguard Workerfi
11179*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11180*8b26181fSAndroid Build Coastguard Worker		fi
11181*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11182*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11183*8b26181fSAndroid Build Coastguard Worker		then
11184*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wformat-nonliteral"
11185*8b26181fSAndroid Build Coastguard Worker		fi
11186*8b26181fSAndroid Build Coastguard Worker
11187*8b26181fSAndroid Build Coastguard Workerelse
11188*8b26181fSAndroid Build Coastguard Worker
11189*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11190*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11191*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11192*8b26181fSAndroid Build Coastguard Worker
11193*8b26181fSAndroid Build Coastguard Workerfi
11194*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11195*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11196*8b26181fSAndroid Build Coastguard Worker
11197*8b26181fSAndroid Build Coastguard Worker
11198*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
11199*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
11200*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11201*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wmissing-noreturn"
11202*8b26181fSAndroid Build Coastguard Worker	#
11203*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11204*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11205*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11206*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11207*8b26181fSAndroid Build Coastguard Worker	# for it:
11208*8b26181fSAndroid Build Coastguard Worker	#
11209*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11210*8b26181fSAndroid Build Coastguard Worker	#
11211*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11212*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11213*8b26181fSAndroid Build Coastguard Worker	#
11214*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11215*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11216*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11217*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11218*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11219*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11220*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11221*8b26181fSAndroid Build Coastguard Worker	#
11222*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11223*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11224*8b26181fSAndroid Build Coastguard Worker	#
11225*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11226*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11227*8b26181fSAndroid Build Coastguard Worker	#
11228*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11229*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11230*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11231*8b26181fSAndroid Build Coastguard Worker_ACEOF
11232*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11233*8b26181fSAndroid Build Coastguard Worker
11234*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11235*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11236*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11237*8b26181fSAndroid Build Coastguard Worker		#
11238*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11239*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11240*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11241*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11242*8b26181fSAndroid Build Coastguard Worker		#
11243*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11244*8b26181fSAndroid Build Coastguard Worker		then
11245*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11246*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
11247*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
11248*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11249*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11250*8b26181fSAndroid Build Coastguard Worker
11251*8b26181fSAndroid Build Coastguard Worker_ACEOF
11252*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11253*8b26181fSAndroid Build Coastguard Worker
11254*8b26181fSAndroid Build Coastguard Worker			#
11255*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11256*8b26181fSAndroid Build Coastguard Worker			#
11257*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11258*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11259*8b26181fSAndroid Build Coastguard Worker
11260*8b26181fSAndroid Build Coastguard Workerelse
11261*8b26181fSAndroid Build Coastguard Worker
11262*8b26181fSAndroid Build Coastguard Worker			#
11263*8b26181fSAndroid Build Coastguard Worker			# A problem.
11264*8b26181fSAndroid Build Coastguard Worker			#
11265*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11266*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11267*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11268*8b26181fSAndroid Build Coastguard Worker
11269*8b26181fSAndroid Build Coastguard Workerfi
11270*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11271*8b26181fSAndroid Build Coastguard Worker		fi
11272*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11273*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11274*8b26181fSAndroid Build Coastguard Worker		then
11275*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wmissing-noreturn"
11276*8b26181fSAndroid Build Coastguard Worker		fi
11277*8b26181fSAndroid Build Coastguard Worker
11278*8b26181fSAndroid Build Coastguard Workerelse
11279*8b26181fSAndroid Build Coastguard Worker
11280*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11282*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11283*8b26181fSAndroid Build Coastguard Worker
11284*8b26181fSAndroid Build Coastguard Workerfi
11285*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11286*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11287*8b26181fSAndroid Build Coastguard Worker
11288*8b26181fSAndroid Build Coastguard Worker
11289*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
11290*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
11291*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11292*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wmissing-prototypes"
11293*8b26181fSAndroid Build Coastguard Worker	#
11294*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11295*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11296*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11297*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11298*8b26181fSAndroid Build Coastguard Worker	# for it:
11299*8b26181fSAndroid Build Coastguard Worker	#
11300*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11301*8b26181fSAndroid Build Coastguard Worker	#
11302*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11303*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11304*8b26181fSAndroid Build Coastguard Worker	#
11305*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11306*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11307*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11308*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11309*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11310*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11311*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11312*8b26181fSAndroid Build Coastguard Worker	#
11313*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11314*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11315*8b26181fSAndroid Build Coastguard Worker	#
11316*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11317*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11318*8b26181fSAndroid Build Coastguard Worker	#
11319*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11320*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11321*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11322*8b26181fSAndroid Build Coastguard Worker_ACEOF
11323*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11324*8b26181fSAndroid Build Coastguard Worker
11325*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11326*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11327*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11328*8b26181fSAndroid Build Coastguard Worker		#
11329*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11330*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11331*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11332*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11333*8b26181fSAndroid Build Coastguard Worker		#
11334*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11335*8b26181fSAndroid Build Coastguard Worker		then
11336*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11337*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
11338*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
11339*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11340*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11341*8b26181fSAndroid Build Coastguard Worker
11342*8b26181fSAndroid Build Coastguard Worker_ACEOF
11343*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11344*8b26181fSAndroid Build Coastguard Worker
11345*8b26181fSAndroid Build Coastguard Worker			#
11346*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11347*8b26181fSAndroid Build Coastguard Worker			#
11348*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11349*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11350*8b26181fSAndroid Build Coastguard Worker
11351*8b26181fSAndroid Build Coastguard Workerelse
11352*8b26181fSAndroid Build Coastguard Worker
11353*8b26181fSAndroid Build Coastguard Worker			#
11354*8b26181fSAndroid Build Coastguard Worker			# A problem.
11355*8b26181fSAndroid Build Coastguard Worker			#
11356*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11357*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11358*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11359*8b26181fSAndroid Build Coastguard Worker
11360*8b26181fSAndroid Build Coastguard Workerfi
11361*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11362*8b26181fSAndroid Build Coastguard Worker		fi
11363*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11364*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11365*8b26181fSAndroid Build Coastguard Worker		then
11366*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wmissing-prototypes"
11367*8b26181fSAndroid Build Coastguard Worker		fi
11368*8b26181fSAndroid Build Coastguard Worker
11369*8b26181fSAndroid Build Coastguard Workerelse
11370*8b26181fSAndroid Build Coastguard Worker
11371*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11372*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11373*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11374*8b26181fSAndroid Build Coastguard Worker
11375*8b26181fSAndroid Build Coastguard Workerfi
11376*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11377*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11378*8b26181fSAndroid Build Coastguard Worker
11379*8b26181fSAndroid Build Coastguard Worker
11380*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
11381*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
11382*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11383*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wmissing-variable-declarations"
11384*8b26181fSAndroid Build Coastguard Worker	#
11385*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11386*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11387*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11388*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11389*8b26181fSAndroid Build Coastguard Worker	# for it:
11390*8b26181fSAndroid Build Coastguard Worker	#
11391*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11392*8b26181fSAndroid Build Coastguard Worker	#
11393*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11394*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11395*8b26181fSAndroid Build Coastguard Worker	#
11396*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11397*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11398*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11399*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11400*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11401*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11402*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11403*8b26181fSAndroid Build Coastguard Worker	#
11404*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11405*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11406*8b26181fSAndroid Build Coastguard Worker	#
11407*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11408*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11409*8b26181fSAndroid Build Coastguard Worker	#
11410*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11411*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11412*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11413*8b26181fSAndroid Build Coastguard Worker_ACEOF
11414*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11415*8b26181fSAndroid Build Coastguard Worker
11416*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11417*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11418*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11419*8b26181fSAndroid Build Coastguard Worker		#
11420*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11421*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11422*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11423*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11424*8b26181fSAndroid Build Coastguard Worker		#
11425*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11426*8b26181fSAndroid Build Coastguard Worker		then
11427*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11428*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
11429*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
11430*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11431*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11432*8b26181fSAndroid Build Coastguard Worker
11433*8b26181fSAndroid Build Coastguard Worker_ACEOF
11434*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11435*8b26181fSAndroid Build Coastguard Worker
11436*8b26181fSAndroid Build Coastguard Worker			#
11437*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11438*8b26181fSAndroid Build Coastguard Worker			#
11439*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11440*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11441*8b26181fSAndroid Build Coastguard Worker
11442*8b26181fSAndroid Build Coastguard Workerelse
11443*8b26181fSAndroid Build Coastguard Worker
11444*8b26181fSAndroid Build Coastguard Worker			#
11445*8b26181fSAndroid Build Coastguard Worker			# A problem.
11446*8b26181fSAndroid Build Coastguard Worker			#
11447*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11448*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11449*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11450*8b26181fSAndroid Build Coastguard Worker
11451*8b26181fSAndroid Build Coastguard Workerfi
11452*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11453*8b26181fSAndroid Build Coastguard Worker		fi
11454*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11455*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11456*8b26181fSAndroid Build Coastguard Worker		then
11457*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
11458*8b26181fSAndroid Build Coastguard Worker		fi
11459*8b26181fSAndroid Build Coastguard Worker
11460*8b26181fSAndroid Build Coastguard Workerelse
11461*8b26181fSAndroid Build Coastguard Worker
11462*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11464*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11465*8b26181fSAndroid Build Coastguard Worker
11466*8b26181fSAndroid Build Coastguard Workerfi
11467*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11468*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11469*8b26181fSAndroid Build Coastguard Worker
11470*8b26181fSAndroid Build Coastguard Worker
11471*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
11472*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
11473*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11474*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wpointer-arith"
11475*8b26181fSAndroid Build Coastguard Worker	#
11476*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11477*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11478*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11479*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11480*8b26181fSAndroid Build Coastguard Worker	# for it:
11481*8b26181fSAndroid Build Coastguard Worker	#
11482*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11483*8b26181fSAndroid Build Coastguard Worker	#
11484*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11485*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11486*8b26181fSAndroid Build Coastguard Worker	#
11487*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11488*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11489*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11490*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11491*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11492*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11493*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11494*8b26181fSAndroid Build Coastguard Worker	#
11495*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11496*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11497*8b26181fSAndroid Build Coastguard Worker	#
11498*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11499*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11500*8b26181fSAndroid Build Coastguard Worker	#
11501*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11502*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11503*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11504*8b26181fSAndroid Build Coastguard Worker_ACEOF
11505*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11506*8b26181fSAndroid Build Coastguard Worker
11507*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11508*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11509*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11510*8b26181fSAndroid Build Coastguard Worker		#
11511*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11512*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11513*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11514*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11515*8b26181fSAndroid Build Coastguard Worker		#
11516*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11517*8b26181fSAndroid Build Coastguard Worker		then
11518*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11519*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5
11520*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wpointer-arith ... " >&6; }
11521*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11522*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11523*8b26181fSAndroid Build Coastguard Worker
11524*8b26181fSAndroid Build Coastguard Worker_ACEOF
11525*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11526*8b26181fSAndroid Build Coastguard Worker
11527*8b26181fSAndroid Build Coastguard Worker			#
11528*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11529*8b26181fSAndroid Build Coastguard Worker			#
11530*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11531*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11532*8b26181fSAndroid Build Coastguard Worker
11533*8b26181fSAndroid Build Coastguard Workerelse
11534*8b26181fSAndroid Build Coastguard Worker
11535*8b26181fSAndroid Build Coastguard Worker			#
11536*8b26181fSAndroid Build Coastguard Worker			# A problem.
11537*8b26181fSAndroid Build Coastguard Worker			#
11538*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11539*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11540*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11541*8b26181fSAndroid Build Coastguard Worker
11542*8b26181fSAndroid Build Coastguard Workerfi
11543*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11544*8b26181fSAndroid Build Coastguard Worker		fi
11545*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11546*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11547*8b26181fSAndroid Build Coastguard Worker		then
11548*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wpointer-arith"
11549*8b26181fSAndroid Build Coastguard Worker		fi
11550*8b26181fSAndroid Build Coastguard Worker
11551*8b26181fSAndroid Build Coastguard Workerelse
11552*8b26181fSAndroid Build Coastguard Worker
11553*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11554*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11555*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11556*8b26181fSAndroid Build Coastguard Worker
11557*8b26181fSAndroid Build Coastguard Workerfi
11558*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11559*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11560*8b26181fSAndroid Build Coastguard Worker
11561*8b26181fSAndroid Build Coastguard Worker
11562*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
11563*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
11564*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11565*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wpointer-sign"
11566*8b26181fSAndroid Build Coastguard Worker	#
11567*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11568*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11569*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11570*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11571*8b26181fSAndroid Build Coastguard Worker	# for it:
11572*8b26181fSAndroid Build Coastguard Worker	#
11573*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11574*8b26181fSAndroid Build Coastguard Worker	#
11575*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11576*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11577*8b26181fSAndroid Build Coastguard Worker	#
11578*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11579*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11580*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11581*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11582*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11583*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11584*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11585*8b26181fSAndroid Build Coastguard Worker	#
11586*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11587*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11588*8b26181fSAndroid Build Coastguard Worker	#
11589*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11590*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11591*8b26181fSAndroid Build Coastguard Worker	#
11592*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11593*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11594*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11595*8b26181fSAndroid Build Coastguard Worker_ACEOF
11596*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11597*8b26181fSAndroid Build Coastguard Worker
11598*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11599*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11600*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11601*8b26181fSAndroid Build Coastguard Worker		#
11602*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11603*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11604*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11605*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11606*8b26181fSAndroid Build Coastguard Worker		#
11607*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11608*8b26181fSAndroid Build Coastguard Worker		then
11609*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11610*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5
11611*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wpointer-sign ... " >&6; }
11612*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11613*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11614*8b26181fSAndroid Build Coastguard Worker
11615*8b26181fSAndroid Build Coastguard Worker_ACEOF
11616*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11617*8b26181fSAndroid Build Coastguard Worker
11618*8b26181fSAndroid Build Coastguard Worker			#
11619*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11620*8b26181fSAndroid Build Coastguard Worker			#
11621*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11622*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11623*8b26181fSAndroid Build Coastguard Worker
11624*8b26181fSAndroid Build Coastguard Workerelse
11625*8b26181fSAndroid Build Coastguard Worker
11626*8b26181fSAndroid Build Coastguard Worker			#
11627*8b26181fSAndroid Build Coastguard Worker			# A problem.
11628*8b26181fSAndroid Build Coastguard Worker			#
11629*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11630*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11631*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11632*8b26181fSAndroid Build Coastguard Worker
11633*8b26181fSAndroid Build Coastguard Workerfi
11634*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11635*8b26181fSAndroid Build Coastguard Worker		fi
11636*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11637*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11638*8b26181fSAndroid Build Coastguard Worker		then
11639*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wpointer-sign"
11640*8b26181fSAndroid Build Coastguard Worker		fi
11641*8b26181fSAndroid Build Coastguard Worker
11642*8b26181fSAndroid Build Coastguard Workerelse
11643*8b26181fSAndroid Build Coastguard Worker
11644*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11645*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11646*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11647*8b26181fSAndroid Build Coastguard Worker
11648*8b26181fSAndroid Build Coastguard Workerfi
11649*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11650*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11651*8b26181fSAndroid Build Coastguard Worker
11652*8b26181fSAndroid Build Coastguard Worker
11653*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
11654*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
11655*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11656*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wshadow"
11657*8b26181fSAndroid Build Coastguard Worker	#
11658*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11659*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11660*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11661*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11662*8b26181fSAndroid Build Coastguard Worker	# for it:
11663*8b26181fSAndroid Build Coastguard Worker	#
11664*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11665*8b26181fSAndroid Build Coastguard Worker	#
11666*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11667*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11668*8b26181fSAndroid Build Coastguard Worker	#
11669*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11670*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11671*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11672*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11673*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11674*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11675*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11676*8b26181fSAndroid Build Coastguard Worker	#
11677*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11678*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11679*8b26181fSAndroid Build Coastguard Worker	#
11680*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11681*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11682*8b26181fSAndroid Build Coastguard Worker	#
11683*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11684*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11685*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11686*8b26181fSAndroid Build Coastguard Worker_ACEOF
11687*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11688*8b26181fSAndroid Build Coastguard Worker
11689*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11690*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11691*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11692*8b26181fSAndroid Build Coastguard Worker		#
11693*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11694*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11695*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11696*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11697*8b26181fSAndroid Build Coastguard Worker		#
11698*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11699*8b26181fSAndroid Build Coastguard Worker		then
11700*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11701*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
11702*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wshadow ... " >&6; }
11703*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11704*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11705*8b26181fSAndroid Build Coastguard Worker
11706*8b26181fSAndroid Build Coastguard Worker_ACEOF
11707*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11708*8b26181fSAndroid Build Coastguard Worker
11709*8b26181fSAndroid Build Coastguard Worker			#
11710*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11711*8b26181fSAndroid Build Coastguard Worker			#
11712*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11713*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11714*8b26181fSAndroid Build Coastguard Worker
11715*8b26181fSAndroid Build Coastguard Workerelse
11716*8b26181fSAndroid Build Coastguard Worker
11717*8b26181fSAndroid Build Coastguard Worker			#
11718*8b26181fSAndroid Build Coastguard Worker			# A problem.
11719*8b26181fSAndroid Build Coastguard Worker			#
11720*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11721*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11722*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11723*8b26181fSAndroid Build Coastguard Worker
11724*8b26181fSAndroid Build Coastguard Workerfi
11725*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11726*8b26181fSAndroid Build Coastguard Worker		fi
11727*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11728*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11729*8b26181fSAndroid Build Coastguard Worker		then
11730*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wshadow"
11731*8b26181fSAndroid Build Coastguard Worker		fi
11732*8b26181fSAndroid Build Coastguard Worker
11733*8b26181fSAndroid Build Coastguard Workerelse
11734*8b26181fSAndroid Build Coastguard Worker
11735*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11736*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11737*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11738*8b26181fSAndroid Build Coastguard Worker
11739*8b26181fSAndroid Build Coastguard Workerfi
11740*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11741*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11742*8b26181fSAndroid Build Coastguard Worker
11743*8b26181fSAndroid Build Coastguard Worker
11744*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
11745*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
11746*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11747*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wsign-compare"
11748*8b26181fSAndroid Build Coastguard Worker	#
11749*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11750*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11751*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11752*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11753*8b26181fSAndroid Build Coastguard Worker	# for it:
11754*8b26181fSAndroid Build Coastguard Worker	#
11755*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11756*8b26181fSAndroid Build Coastguard Worker	#
11757*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11758*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11759*8b26181fSAndroid Build Coastguard Worker	#
11760*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11761*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11762*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11763*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11764*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11765*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11766*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11767*8b26181fSAndroid Build Coastguard Worker	#
11768*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11769*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11770*8b26181fSAndroid Build Coastguard Worker	#
11771*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11772*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11773*8b26181fSAndroid Build Coastguard Worker	#
11774*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11775*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11776*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11777*8b26181fSAndroid Build Coastguard Worker_ACEOF
11778*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11779*8b26181fSAndroid Build Coastguard Worker
11780*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11781*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11782*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11783*8b26181fSAndroid Build Coastguard Worker		#
11784*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11785*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11786*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11787*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11788*8b26181fSAndroid Build Coastguard Worker		#
11789*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11790*8b26181fSAndroid Build Coastguard Worker		then
11791*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11792*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
11793*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wsign-compare ... " >&6; }
11794*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11795*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11796*8b26181fSAndroid Build Coastguard Worker
11797*8b26181fSAndroid Build Coastguard Worker_ACEOF
11798*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11799*8b26181fSAndroid Build Coastguard Worker
11800*8b26181fSAndroid Build Coastguard Worker			#
11801*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11802*8b26181fSAndroid Build Coastguard Worker			#
11803*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11804*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11805*8b26181fSAndroid Build Coastguard Worker
11806*8b26181fSAndroid Build Coastguard Workerelse
11807*8b26181fSAndroid Build Coastguard Worker
11808*8b26181fSAndroid Build Coastguard Worker			#
11809*8b26181fSAndroid Build Coastguard Worker			# A problem.
11810*8b26181fSAndroid Build Coastguard Worker			#
11811*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11812*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11813*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11814*8b26181fSAndroid Build Coastguard Worker
11815*8b26181fSAndroid Build Coastguard Workerfi
11816*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11817*8b26181fSAndroid Build Coastguard Worker		fi
11818*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11819*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11820*8b26181fSAndroid Build Coastguard Worker		then
11821*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wsign-compare"
11822*8b26181fSAndroid Build Coastguard Worker		fi
11823*8b26181fSAndroid Build Coastguard Worker
11824*8b26181fSAndroid Build Coastguard Workerelse
11825*8b26181fSAndroid Build Coastguard Worker
11826*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11827*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11828*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11829*8b26181fSAndroid Build Coastguard Worker
11830*8b26181fSAndroid Build Coastguard Workerfi
11831*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11832*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11833*8b26181fSAndroid Build Coastguard Worker
11834*8b26181fSAndroid Build Coastguard Worker
11835*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
11836*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
11837*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11838*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wstrict-prototypes"
11839*8b26181fSAndroid Build Coastguard Worker	#
11840*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11841*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11842*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11843*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11844*8b26181fSAndroid Build Coastguard Worker	# for it:
11845*8b26181fSAndroid Build Coastguard Worker	#
11846*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11847*8b26181fSAndroid Build Coastguard Worker	#
11848*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11849*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11850*8b26181fSAndroid Build Coastguard Worker	#
11851*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11852*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11853*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11854*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11855*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11856*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11857*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11858*8b26181fSAndroid Build Coastguard Worker	#
11859*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11860*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11861*8b26181fSAndroid Build Coastguard Worker	#
11862*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11863*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11864*8b26181fSAndroid Build Coastguard Worker	#
11865*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11866*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11867*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11868*8b26181fSAndroid Build Coastguard Worker_ACEOF
11869*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11870*8b26181fSAndroid Build Coastguard Worker
11871*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11872*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11873*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11874*8b26181fSAndroid Build Coastguard Worker		#
11875*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11876*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11877*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11878*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11879*8b26181fSAndroid Build Coastguard Worker		#
11880*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11881*8b26181fSAndroid Build Coastguard Worker		then
11882*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11883*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
11884*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
11885*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11886*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11887*8b26181fSAndroid Build Coastguard Worker
11888*8b26181fSAndroid Build Coastguard Worker_ACEOF
11889*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11890*8b26181fSAndroid Build Coastguard Worker
11891*8b26181fSAndroid Build Coastguard Worker			#
11892*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11893*8b26181fSAndroid Build Coastguard Worker			#
11894*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11896*8b26181fSAndroid Build Coastguard Worker
11897*8b26181fSAndroid Build Coastguard Workerelse
11898*8b26181fSAndroid Build Coastguard Worker
11899*8b26181fSAndroid Build Coastguard Worker			#
11900*8b26181fSAndroid Build Coastguard Worker			# A problem.
11901*8b26181fSAndroid Build Coastguard Worker			#
11902*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11903*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11904*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11905*8b26181fSAndroid Build Coastguard Worker
11906*8b26181fSAndroid Build Coastguard Workerfi
11907*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11908*8b26181fSAndroid Build Coastguard Worker		fi
11909*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11910*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
11911*8b26181fSAndroid Build Coastguard Worker		then
11912*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wstrict-prototypes"
11913*8b26181fSAndroid Build Coastguard Worker		fi
11914*8b26181fSAndroid Build Coastguard Worker
11915*8b26181fSAndroid Build Coastguard Workerelse
11916*8b26181fSAndroid Build Coastguard Worker
11917*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11918*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11919*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
11920*8b26181fSAndroid Build Coastguard Worker
11921*8b26181fSAndroid Build Coastguard Workerfi
11922*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11923*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
11924*8b26181fSAndroid Build Coastguard Worker
11925*8b26181fSAndroid Build Coastguard Worker
11926*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
11927*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
11928*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
11929*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wunused-parameter"
11930*8b26181fSAndroid Build Coastguard Worker	#
11931*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
11932*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
11933*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
11934*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
11935*8b26181fSAndroid Build Coastguard Worker	# for it:
11936*8b26181fSAndroid Build Coastguard Worker	#
11937*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
11938*8b26181fSAndroid Build Coastguard Worker	#
11939*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
11940*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
11941*8b26181fSAndroid Build Coastguard Worker	#
11942*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
11943*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
11944*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
11945*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
11946*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
11947*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
11948*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
11949*8b26181fSAndroid Build Coastguard Worker	#
11950*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11951*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
11952*8b26181fSAndroid Build Coastguard Worker	#
11953*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
11954*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
11955*8b26181fSAndroid Build Coastguard Worker	#
11956*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11958*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
11959*8b26181fSAndroid Build Coastguard Worker_ACEOF
11960*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11961*8b26181fSAndroid Build Coastguard Worker
11962*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11963*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11964*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
11965*8b26181fSAndroid Build Coastguard Worker		#
11966*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
11967*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
11968*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
11969*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
11970*8b26181fSAndroid Build Coastguard Worker		#
11971*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
11972*8b26181fSAndroid Build Coastguard Worker		then
11973*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
11974*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
11975*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wunused-parameter ... " >&6; }
11976*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11977*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
11978*8b26181fSAndroid Build Coastguard Worker
11979*8b26181fSAndroid Build Coastguard Worker_ACEOF
11980*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
11981*8b26181fSAndroid Build Coastguard Worker
11982*8b26181fSAndroid Build Coastguard Worker			#
11983*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
11984*8b26181fSAndroid Build Coastguard Worker			#
11985*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11986*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
11987*8b26181fSAndroid Build Coastguard Worker
11988*8b26181fSAndroid Build Coastguard Workerelse
11989*8b26181fSAndroid Build Coastguard Worker
11990*8b26181fSAndroid Build Coastguard Worker			#
11991*8b26181fSAndroid Build Coastguard Worker			# A problem.
11992*8b26181fSAndroid Build Coastguard Worker			#
11993*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11994*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
11995*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
11996*8b26181fSAndroid Build Coastguard Worker
11997*8b26181fSAndroid Build Coastguard Workerfi
11998*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11999*8b26181fSAndroid Build Coastguard Worker		fi
12000*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12001*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
12002*8b26181fSAndroid Build Coastguard Worker		then
12003*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wunused-parameter"
12004*8b26181fSAndroid Build Coastguard Worker		fi
12005*8b26181fSAndroid Build Coastguard Worker
12006*8b26181fSAndroid Build Coastguard Workerelse
12007*8b26181fSAndroid Build Coastguard Worker
12008*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12009*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12010*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12011*8b26181fSAndroid Build Coastguard Worker
12012*8b26181fSAndroid Build Coastguard Workerfi
12013*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12014*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
12015*8b26181fSAndroid Build Coastguard Worker
12016*8b26181fSAndroid Build Coastguard Worker
12017*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
12018*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
12019*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
12020*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wused-but-marked-unused"
12021*8b26181fSAndroid Build Coastguard Worker	#
12022*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
12023*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
12024*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
12025*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
12026*8b26181fSAndroid Build Coastguard Worker	# for it:
12027*8b26181fSAndroid Build Coastguard Worker	#
12028*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12029*8b26181fSAndroid Build Coastguard Worker	#
12030*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
12031*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
12032*8b26181fSAndroid Build Coastguard Worker	#
12033*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
12034*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
12035*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
12036*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
12037*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
12038*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
12039*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
12040*8b26181fSAndroid Build Coastguard Worker	#
12041*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12042*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12043*8b26181fSAndroid Build Coastguard Worker	#
12044*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
12045*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
12046*8b26181fSAndroid Build Coastguard Worker	#
12047*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12048*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12049*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
12050*8b26181fSAndroid Build Coastguard Worker_ACEOF
12051*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12052*8b26181fSAndroid Build Coastguard Worker
12053*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12054*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
12055*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
12056*8b26181fSAndroid Build Coastguard Worker		#
12057*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
12058*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
12059*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
12060*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
12061*8b26181fSAndroid Build Coastguard Worker		#
12062*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
12063*8b26181fSAndroid Build Coastguard Worker		then
12064*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12065*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
12066*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
12067*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12068*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12069*8b26181fSAndroid Build Coastguard Worker
12070*8b26181fSAndroid Build Coastguard Worker_ACEOF
12071*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12072*8b26181fSAndroid Build Coastguard Worker
12073*8b26181fSAndroid Build Coastguard Worker			#
12074*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
12075*8b26181fSAndroid Build Coastguard Worker			#
12076*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12077*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12078*8b26181fSAndroid Build Coastguard Worker
12079*8b26181fSAndroid Build Coastguard Workerelse
12080*8b26181fSAndroid Build Coastguard Worker
12081*8b26181fSAndroid Build Coastguard Worker			#
12082*8b26181fSAndroid Build Coastguard Worker			# A problem.
12083*8b26181fSAndroid Build Coastguard Worker			#
12084*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12085*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
12086*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
12087*8b26181fSAndroid Build Coastguard Worker
12088*8b26181fSAndroid Build Coastguard Workerfi
12089*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12090*8b26181fSAndroid Build Coastguard Worker		fi
12091*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12092*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
12093*8b26181fSAndroid Build Coastguard Worker		then
12094*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
12095*8b26181fSAndroid Build Coastguard Worker		fi
12096*8b26181fSAndroid Build Coastguard Worker
12097*8b26181fSAndroid Build Coastguard Workerelse
12098*8b26181fSAndroid Build Coastguard Worker
12099*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12100*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12101*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12102*8b26181fSAndroid Build Coastguard Worker
12103*8b26181fSAndroid Build Coastguard Workerfi
12104*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12105*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
12106*8b26181fSAndroid Build Coastguard Worker
12107*8b26181fSAndroid Build Coastguard Worker		    # Warns about safeguards added in case the enums are
12108*8b26181fSAndroid Build Coastguard Worker		    # extended
12109*8b26181fSAndroid Build Coastguard Worker		    # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
12110*8b26181fSAndroid Build Coastguard Worker		    #
12111*8b26181fSAndroid Build Coastguard Worker		    # This can cause problems with ntohs(), ntohl(),
12112*8b26181fSAndroid Build Coastguard Worker		    # htons(), and htonl() on some platforms, such
12113*8b26181fSAndroid Build Coastguard Worker		    # as OpenBSD 6.3 with Clang 5.0.1.  I guess the
12114*8b26181fSAndroid Build Coastguard Worker		    # problem is that the macro that ultimately does
12115*8b26181fSAndroid Build Coastguard Worker		    # the byte-swapping involves a conditional
12116*8b26181fSAndroid Build Coastguard Worker		    # expression that tests whether the value being
12117*8b26181fSAndroid Build Coastguard Worker		    # swapped is a compile-time constant or not,
12118*8b26181fSAndroid Build Coastguard Worker		    # using __builtin_constant_p(), and, depending
12119*8b26181fSAndroid Build Coastguard Worker		    # on whether it is, does a compile-time swap or
12120*8b26181fSAndroid Build Coastguard Worker		    # a run-time swap; perhaps the compiler always
12121*8b26181fSAndroid Build Coastguard Worker		    # considers one of the two results of the
12122*8b26181fSAndroid Build Coastguard Worker		    # conditional expressin is never evaluated,
12123*8b26181fSAndroid Build Coastguard Worker		    # because the conditional check is done at
12124*8b26181fSAndroid Build Coastguard Worker		    # compile time, and thus always says "that
12125*8b26181fSAndroid Build Coastguard Worker		    # expression is never executed".
12126*8b26181fSAndroid Build Coastguard Worker		    #
12127*8b26181fSAndroid Build Coastguard Worker		    # (Perhaps there should be a way of flagging
12128*8b26181fSAndroid Build Coastguard Worker		    # an expression that you *want* evaluated at
12129*8b26181fSAndroid Build Coastguard Worker		    # compile time, so that the compiler 1) warns
12130*8b26181fSAndroid Build Coastguard Worker		    # if it *can't* be evaluated at compile time
12131*8b26181fSAndroid Build Coastguard Worker		    # and 2) *doesn't* warn that the true or false
12132*8b26181fSAndroid Build Coastguard Worker		    # branch will never be reached.)
12133*8b26181fSAndroid Build Coastguard Worker		    #
12134*8b26181fSAndroid Build Coastguard Worker
12135*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
12136*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
12137*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
12138*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wunreachable-code"
12139*8b26181fSAndroid Build Coastguard Worker	#
12140*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
12141*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
12142*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
12143*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
12144*8b26181fSAndroid Build Coastguard Worker	# for it:
12145*8b26181fSAndroid Build Coastguard Worker	#
12146*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12147*8b26181fSAndroid Build Coastguard Worker	#
12148*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
12149*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
12150*8b26181fSAndroid Build Coastguard Worker	#
12151*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
12152*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
12153*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
12154*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
12155*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
12156*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
12157*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
12158*8b26181fSAndroid Build Coastguard Worker	#
12159*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12160*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12161*8b26181fSAndroid Build Coastguard Worker	#
12162*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
12163*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
12164*8b26181fSAndroid Build Coastguard Worker	#
12165*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12166*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12167*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
12168*8b26181fSAndroid Build Coastguard Worker_ACEOF
12169*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12170*8b26181fSAndroid Build Coastguard Worker
12171*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12172*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
12173*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
12174*8b26181fSAndroid Build Coastguard Worker		#
12175*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
12176*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
12177*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
12178*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
12179*8b26181fSAndroid Build Coastguard Worker		#
12180*8b26181fSAndroid Build Coastguard Worker		if test "xgenerates warnings from ntohs()" != "x"
12181*8b26181fSAndroid Build Coastguard Worker		then
12182*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12183*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
12184*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
12185*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12187*8b26181fSAndroid Build Coastguard Worker#include <arpa/inet.h>
12188*8b26181fSAndroid Build Coastguard Worker
12189*8b26181fSAndroid Build Coastguard Workerunsigned short
12190*8b26181fSAndroid Build Coastguard Workertestme(unsigned short a)
12191*8b26181fSAndroid Build Coastguard Worker{
12192*8b26181fSAndroid Build Coastguard Worker	return ntohs(a);
12193*8b26181fSAndroid Build Coastguard Worker}
12194*8b26181fSAndroid Build Coastguard Worker
12195*8b26181fSAndroid Build Coastguard Worker_ACEOF
12196*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12197*8b26181fSAndroid Build Coastguard Worker
12198*8b26181fSAndroid Build Coastguard Worker			#
12199*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
12200*8b26181fSAndroid Build Coastguard Worker			#
12201*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12202*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12203*8b26181fSAndroid Build Coastguard Worker
12204*8b26181fSAndroid Build Coastguard Workerelse
12205*8b26181fSAndroid Build Coastguard Worker
12206*8b26181fSAndroid Build Coastguard Worker			#
12207*8b26181fSAndroid Build Coastguard Worker			# A problem.
12208*8b26181fSAndroid Build Coastguard Worker			#
12209*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12210*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
12211*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
12212*8b26181fSAndroid Build Coastguard Worker
12213*8b26181fSAndroid Build Coastguard Workerfi
12214*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12215*8b26181fSAndroid Build Coastguard Worker		fi
12216*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12217*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
12218*8b26181fSAndroid Build Coastguard Worker		then
12219*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wunreachable-code"
12220*8b26181fSAndroid Build Coastguard Worker		fi
12221*8b26181fSAndroid Build Coastguard Worker
12222*8b26181fSAndroid Build Coastguard Workerelse
12223*8b26181fSAndroid Build Coastguard Worker
12224*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12225*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12226*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12227*8b26181fSAndroid Build Coastguard Worker
12228*8b26181fSAndroid Build Coastguard Workerfi
12229*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12230*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
12231*8b26181fSAndroid Build Coastguard Worker
12232*8b26181fSAndroid Build Coastguard Worker
12233*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5
12234*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; }
12235*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
12236*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$CFLAGS -Wshorten-64-to-32"
12237*8b26181fSAndroid Build Coastguard Worker	#
12238*8b26181fSAndroid Build Coastguard Worker	# XXX - yes, this depends on the way AC_LANG_WERROR works,
12239*8b26181fSAndroid Build Coastguard Worker	# but no mechanism is provided to turn AC_LANG_WERROR on
12240*8b26181fSAndroid Build Coastguard Worker	# *and then turn it back off*, so that we *only* do it when
12241*8b26181fSAndroid Build Coastguard Worker	# testing compiler options - 15 years after somebody asked
12242*8b26181fSAndroid Build Coastguard Worker	# for it:
12243*8b26181fSAndroid Build Coastguard Worker	#
12244*8b26181fSAndroid Build Coastguard Worker	#     https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror
12245*8b26181fSAndroid Build Coastguard Worker	#
12246*8b26181fSAndroid Build Coastguard Worker	save_ac_c_werror_flag="$ac_c_werror_flag"
12247*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag=yes
12248*8b26181fSAndroid Build Coastguard Worker	#
12249*8b26181fSAndroid Build Coastguard Worker	# We use AC_LANG_SOURCE() so that we can control the complete
12250*8b26181fSAndroid Build Coastguard Worker	# content of the program being compiled.  We do not, for example,
12251*8b26181fSAndroid Build Coastguard Worker	# want the default "int main()" that AC_LANG_PROGRAM() generates,
12252*8b26181fSAndroid Build Coastguard Worker	# as it will generate a warning with -Wold-style-definition, meaning
12253*8b26181fSAndroid Build Coastguard Worker	# that we would treat it as not working, as the test will fail if
12254*8b26181fSAndroid Build Coastguard Worker	# *any* error output, including a warning due to the flag we're
12255*8b26181fSAndroid Build Coastguard Worker	# testing, is generated; see
12256*8b26181fSAndroid Build Coastguard Worker	#
12257*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12258*8b26181fSAndroid Build Coastguard Worker	#    https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us
12259*8b26181fSAndroid Build Coastguard Worker	#
12260*8b26181fSAndroid Build Coastguard Worker	# This may, as per those two messages, be fixed in autoconf 2.70,
12261*8b26181fSAndroid Build Coastguard Worker	# but we only require 2.64 or newer for now.
12262*8b26181fSAndroid Build Coastguard Worker	#
12263*8b26181fSAndroid Build Coastguard Worker	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12264*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12265*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
12266*8b26181fSAndroid Build Coastguard Worker_ACEOF
12267*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12268*8b26181fSAndroid Build Coastguard Worker
12269*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12270*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
12271*8b26181fSAndroid Build Coastguard Worker		can_add_to_cflags=yes
12272*8b26181fSAndroid Build Coastguard Worker		#
12273*8b26181fSAndroid Build Coastguard Worker		# The compile supports this; do we have some C code for
12274*8b26181fSAndroid Build Coastguard Worker		# which the warning should *not* appear?
12275*8b26181fSAndroid Build Coastguard Worker		# We test the fourth argument because the third argument
12276*8b26181fSAndroid Build Coastguard Worker		# could contain quotes, breaking the test.
12277*8b26181fSAndroid Build Coastguard Worker		#
12278*8b26181fSAndroid Build Coastguard Worker		if test "x" != "x"
12279*8b26181fSAndroid Build Coastguard Worker		then
12280*8b26181fSAndroid Build Coastguard Worker		    CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
12281*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5
12282*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether -Wshorten-64-to-32 ... " >&6; }
12283*8b26181fSAndroid Build Coastguard Worker		    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12284*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12285*8b26181fSAndroid Build Coastguard Worker
12286*8b26181fSAndroid Build Coastguard Worker_ACEOF
12287*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12288*8b26181fSAndroid Build Coastguard Worker
12289*8b26181fSAndroid Build Coastguard Worker			#
12290*8b26181fSAndroid Build Coastguard Worker			# Not a problem.
12291*8b26181fSAndroid Build Coastguard Worker			#
12292*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12293*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12294*8b26181fSAndroid Build Coastguard Worker
12295*8b26181fSAndroid Build Coastguard Workerelse
12296*8b26181fSAndroid Build Coastguard Worker
12297*8b26181fSAndroid Build Coastguard Worker			#
12298*8b26181fSAndroid Build Coastguard Worker			# A problem.
12299*8b26181fSAndroid Build Coastguard Worker			#
12300*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12301*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
12302*8b26181fSAndroid Build Coastguard Worker			can_add_to_cflags=no
12303*8b26181fSAndroid Build Coastguard Worker
12304*8b26181fSAndroid Build Coastguard Workerfi
12305*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12306*8b26181fSAndroid Build Coastguard Worker		fi
12307*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12308*8b26181fSAndroid Build Coastguard Worker		if test x"$can_add_to_cflags" = "xyes"
12309*8b26181fSAndroid Build Coastguard Worker		then
12310*8b26181fSAndroid Build Coastguard Worker		    V_CCOPT="$V_CCOPT -Wshorten-64-to-32"
12311*8b26181fSAndroid Build Coastguard Worker		fi
12312*8b26181fSAndroid Build Coastguard Worker
12313*8b26181fSAndroid Build Coastguard Workerelse
12314*8b26181fSAndroid Build Coastguard Worker
12315*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12316*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12317*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$save_CFLAGS"
12318*8b26181fSAndroid Build Coastguard Worker
12319*8b26181fSAndroid Build Coastguard Workerfi
12320*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12321*8b26181fSAndroid Build Coastguard Worker	ac_c_werror_flag="$save_ac_c_werror_flag"
12322*8b26181fSAndroid Build Coastguard Worker
12323*8b26181fSAndroid Build Coastguard Worker	    fi
12324*8b26181fSAndroid Build Coastguard Worker
12325*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
12326*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
12327*8b26181fSAndroid Build Coastguard Worker	if test "$GCC" = yes ; then
12328*8b26181fSAndroid Build Coastguard Worker		#
12329*8b26181fSAndroid Build Coastguard Worker		# GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
12330*8b26181fSAndroid Build Coastguard Worker		# though it's not); we assume that, in this case, the flag
12331*8b26181fSAndroid Build Coastguard Worker		# would be -M.
12332*8b26181fSAndroid Build Coastguard Worker		#
12333*8b26181fSAndroid Build Coastguard Worker		ac_lbl_dependency_flag="-M"
12334*8b26181fSAndroid Build Coastguard Worker	else
12335*8b26181fSAndroid Build Coastguard Worker		#
12336*8b26181fSAndroid Build Coastguard Worker		# Not GCC or a compiler deemed to be GCC; what platform is
12337*8b26181fSAndroid Build Coastguard Worker		# this?  (We're assuming that if the compiler isn't GCC
12338*8b26181fSAndroid Build Coastguard Worker		# it's the compiler from the vendor of the OS; that won't
12339*8b26181fSAndroid Build Coastguard Worker		# necessarily be true for x86 platforms, where it might be
12340*8b26181fSAndroid Build Coastguard Worker		# the Intel C compiler.)
12341*8b26181fSAndroid Build Coastguard Worker		#
12342*8b26181fSAndroid Build Coastguard Worker		case "$host_os" in
12343*8b26181fSAndroid Build Coastguard Worker
12344*8b26181fSAndroid Build Coastguard Worker		irix*|osf*|darwin*)
12345*8b26181fSAndroid Build Coastguard Worker			#
12346*8b26181fSAndroid Build Coastguard Worker			# MIPS C for IRIX, DEC C, and clang all use -M.
12347*8b26181fSAndroid Build Coastguard Worker			#
12348*8b26181fSAndroid Build Coastguard Worker			ac_lbl_dependency_flag="-M"
12349*8b26181fSAndroid Build Coastguard Worker			;;
12350*8b26181fSAndroid Build Coastguard Worker
12351*8b26181fSAndroid Build Coastguard Worker		solaris*)
12352*8b26181fSAndroid Build Coastguard Worker			#
12353*8b26181fSAndroid Build Coastguard Worker			# Sun C uses -xM.
12354*8b26181fSAndroid Build Coastguard Worker			#
12355*8b26181fSAndroid Build Coastguard Worker			ac_lbl_dependency_flag="-xM"
12356*8b26181fSAndroid Build Coastguard Worker			;;
12357*8b26181fSAndroid Build Coastguard Worker
12358*8b26181fSAndroid Build Coastguard Worker		hpux*)
12359*8b26181fSAndroid Build Coastguard Worker			#
12360*8b26181fSAndroid Build Coastguard Worker			# HP's older C compilers don't support this.
12361*8b26181fSAndroid Build Coastguard Worker			# HP's newer C compilers support this with
12362*8b26181fSAndroid Build Coastguard Worker			# either +M or +Make; the older compilers
12363*8b26181fSAndroid Build Coastguard Worker			# interpret +M as something completely
12364*8b26181fSAndroid Build Coastguard Worker			# different, so we use +Make so we don't
12365*8b26181fSAndroid Build Coastguard Worker			# think it works with the older compilers.
12366*8b26181fSAndroid Build Coastguard Worker			#
12367*8b26181fSAndroid Build Coastguard Worker			ac_lbl_dependency_flag="+Make"
12368*8b26181fSAndroid Build Coastguard Worker			;;
12369*8b26181fSAndroid Build Coastguard Worker
12370*8b26181fSAndroid Build Coastguard Worker		*)
12371*8b26181fSAndroid Build Coastguard Worker			#
12372*8b26181fSAndroid Build Coastguard Worker			# Not one of the above; assume no support for
12373*8b26181fSAndroid Build Coastguard Worker			# generating dependencies.
12374*8b26181fSAndroid Build Coastguard Worker			#
12375*8b26181fSAndroid Build Coastguard Worker			ac_lbl_dependency_flag=""
12376*8b26181fSAndroid Build Coastguard Worker			;;
12377*8b26181fSAndroid Build Coastguard Worker		esac
12378*8b26181fSAndroid Build Coastguard Worker	fi
12379*8b26181fSAndroid Build Coastguard Worker
12380*8b26181fSAndroid Build Coastguard Worker	#
12381*8b26181fSAndroid Build Coastguard Worker	# Is ac_lbl_dependency_flag defined and, if so, does the compiler
12382*8b26181fSAndroid Build Coastguard Worker	# complain about it?
12383*8b26181fSAndroid Build Coastguard Worker	#
12384*8b26181fSAndroid Build Coastguard Worker	# Note: clang doesn't seem to exit with an error status when handed
12385*8b26181fSAndroid Build Coastguard Worker	# an unknown non-warning error, even if you pass it
12386*8b26181fSAndroid Build Coastguard Worker	# -Werror=unknown-warning-option.  However, it always supports
12387*8b26181fSAndroid Build Coastguard Worker	# -M, so the fact that this test always succeeds with clang
12388*8b26181fSAndroid Build Coastguard Worker	# isn't an issue.
12389*8b26181fSAndroid Build Coastguard Worker	#
12390*8b26181fSAndroid Build Coastguard Worker	if test ! -z "$ac_lbl_dependency_flag"; then
12391*8b26181fSAndroid Build Coastguard Worker		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12392*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12393*8b26181fSAndroid Build Coastguard Workerint main(void) { return 0; }
12394*8b26181fSAndroid Build Coastguard Worker_ACEOF
12395*8b26181fSAndroid Build Coastguard Worker		if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
12396*8b26181fSAndroid Build Coastguard Worker  (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
12397*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
12398*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12399*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
12400*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
12401*8b26181fSAndroid Build Coastguard Worker$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
12402*8b26181fSAndroid Build Coastguard Worker			DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
12403*8b26181fSAndroid Build Coastguard Worker			MKDEP='${top_srcdir}/mkdep'
12404*8b26181fSAndroid Build Coastguard Worker		else
12405*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12406*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12407*8b26181fSAndroid Build Coastguard Worker			#
12408*8b26181fSAndroid Build Coastguard Worker			# We can't run mkdep, so have "make depend" do
12409*8b26181fSAndroid Build Coastguard Worker			# nothing.
12410*8b26181fSAndroid Build Coastguard Worker			#
12411*8b26181fSAndroid Build Coastguard Worker			MKDEP='${top_srcdir}/nomkdep'
12412*8b26181fSAndroid Build Coastguard Worker		fi
12413*8b26181fSAndroid Build Coastguard Worker		rm -rf conftest*
12414*8b26181fSAndroid Build Coastguard Worker	else
12415*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12416*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12417*8b26181fSAndroid Build Coastguard Worker		#
12418*8b26181fSAndroid Build Coastguard Worker		# We can't run mkdep, so have "make depend" do
12419*8b26181fSAndroid Build Coastguard Worker		# nothing.
12420*8b26181fSAndroid Build Coastguard Worker		#
12421*8b26181fSAndroid Build Coastguard Worker		MKDEP='${top_srcdir}/nomkdep'
12422*8b26181fSAndroid Build Coastguard Worker	fi
12423*8b26181fSAndroid Build Coastguard Worker
12424*8b26181fSAndroid Build Coastguard Worker
12425*8b26181fSAndroid Build Coastguard Worker
12426*8b26181fSAndroid Build Coastguard Worker	    #
12427*8b26181fSAndroid Build Coastguard Worker	    # We used to set -n32 for IRIX 6 when not using GCC (presumed
12428*8b26181fSAndroid Build Coastguard Worker	    # to mean that we're using MIPS C or MIPSpro C); it specified
12429*8b26181fSAndroid Build Coastguard Worker	    # the "new" faster 32-bit ABI, introduced in IRIX 6.2.  I'm
12430*8b26181fSAndroid Build Coastguard Worker	    # not sure why that would be something to do *only* with a
12431*8b26181fSAndroid Build Coastguard Worker	    # .devel file; why should the ABI for which we produce code
12432*8b26181fSAndroid Build Coastguard Worker	    # depend on .devel?
12433*8b26181fSAndroid Build Coastguard Worker	    #
12434*8b26181fSAndroid Build Coastguard Worker	    os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
12435*8b26181fSAndroid Build Coastguard Worker	    name="lbl/os-$os.h"
12436*8b26181fSAndroid Build Coastguard Worker	    if test -f $name ; then
12437*8b26181fSAndroid Build Coastguard Worker		    ln -s $name os-proto.h
12438*8b26181fSAndroid Build Coastguard Worker
12439*8b26181fSAndroid Build Coastguard Worker$as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
12440*8b26181fSAndroid Build Coastguard Worker
12441*8b26181fSAndroid Build Coastguard Worker	    else
12442*8b26181fSAndroid Build Coastguard Worker		    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
12443*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: can't find $name" >&2;}
12444*8b26181fSAndroid Build Coastguard Worker	    fi
12445*8b26181fSAndroid Build Coastguard Worker    fi
12446*8b26181fSAndroid Build Coastguard Worker
12447*8b26181fSAndroid Build Coastguard Worker#
12448*8b26181fSAndroid Build Coastguard Worker# Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
12449*8b26181fSAndroid Build Coastguard Worker#
12450*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
12451*8b26181fSAndroid Build Coastguard Worker	#include <sys/types.h>
12452*8b26181fSAndroid Build Coastguard Worker	#include <sys/socket.h>
12453*8b26181fSAndroid Build Coastguard Worker
12454*8b26181fSAndroid Build Coastguard Worker"
12455*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
12456*8b26181fSAndroid Build Coastguard Worker
12457*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
12458*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
12459*8b26181fSAndroid Build Coastguard Worker_ACEOF
12460*8b26181fSAndroid Build Coastguard Worker
12461*8b26181fSAndroid Build Coastguard Worker
12462*8b26181fSAndroid Build Coastguard Workerfi
12463*8b26181fSAndroid Build Coastguard Worker
12464*8b26181fSAndroid Build Coastguard Worker
12465*8b26181fSAndroid Build Coastguard Worker#
12466*8b26181fSAndroid Build Coastguard Worker# Check to see if there's a sockaddr_storage structure.
12467*8b26181fSAndroid Build Coastguard Worker#
12468*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
12469*8b26181fSAndroid Build Coastguard Worker	#include <sys/types.h>
12470*8b26181fSAndroid Build Coastguard Worker	#include <sys/socket.h>
12471*8b26181fSAndroid Build Coastguard Worker
12472*8b26181fSAndroid Build Coastguard Worker"
12473*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
12474*8b26181fSAndroid Build Coastguard Worker
12475*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
12476*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_SOCKADDR_STORAGE 1
12477*8b26181fSAndroid Build Coastguard Worker_ACEOF
12478*8b26181fSAndroid Build Coastguard Worker
12479*8b26181fSAndroid Build Coastguard Worker
12480*8b26181fSAndroid Build Coastguard Workerfi
12481*8b26181fSAndroid Build Coastguard Worker
12482*8b26181fSAndroid Build Coastguard Worker
12483*8b26181fSAndroid Build Coastguard Worker#
12484*8b26181fSAndroid Build Coastguard Worker# Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
12485*8b26181fSAndroid Build Coastguard Worker# dl_module_id_1 member.
12486*8b26181fSAndroid Build Coastguard Worker#
12487*8b26181fSAndroid Build Coastguard Worker# NOTE: any failure means we conclude that it doesn't have that member,
12488*8b26181fSAndroid Build Coastguard Worker# so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
12489*8b26181fSAndroid Build Coastguard Worker# have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
12490*8b26181fSAndroid Build Coastguard Worker# it doesn't have that member (which is OK, as either we won't be
12491*8b26181fSAndroid Build Coastguard Worker# using code that would use that member, or we wouldn't compile in
12492*8b26181fSAndroid Build Coastguard Worker# any case).
12493*8b26181fSAndroid Build Coastguard Worker#
12494*8b26181fSAndroid Build Coastguard Workerac_fn_c_check_member "$LINENO" "dl_hp_ppa_info_t" "dl_module_id_1" "ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" "
12495*8b26181fSAndroid Build Coastguard Worker	#include <sys/types.h>
12496*8b26181fSAndroid Build Coastguard Worker	#include <sys/dlpi.h>
12497*8b26181fSAndroid Build Coastguard Worker	#include <sys/dlpi_ext.h>
12498*8b26181fSAndroid Build Coastguard Worker
12499*8b26181fSAndroid Build Coastguard Worker"
12500*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
12501*8b26181fSAndroid Build Coastguard Worker
12502*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
12503*8b26181fSAndroid Build Coastguard Worker#define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
12504*8b26181fSAndroid Build Coastguard Worker_ACEOF
12505*8b26181fSAndroid Build Coastguard Worker
12506*8b26181fSAndroid Build Coastguard Worker
12507*8b26181fSAndroid Build Coastguard Workerfi
12508*8b26181fSAndroid Build Coastguard Worker
12509*8b26181fSAndroid Build Coastguard Worker
12510*8b26181fSAndroid Build Coastguard Worker#
12511*8b26181fSAndroid Build Coastguard Worker# Various Linux-specific mechanisms.
12512*8b26181fSAndroid Build Coastguard Worker#
12513*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-usb was given.
12514*8b26181fSAndroid Build Coastguard Workerif test "${enable_usb+set}" = set; then :
12515*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_usb;
12516*8b26181fSAndroid Build Coastguard Workerelse
12517*8b26181fSAndroid Build Coastguard Worker  enable_usb=yes
12518*8b26181fSAndroid Build Coastguard Workerfi
12519*8b26181fSAndroid Build Coastguard Worker
12520*8b26181fSAndroid Build Coastguard Worker
12521*8b26181fSAndroid Build Coastguard Worker#
12522*8b26181fSAndroid Build Coastguard Worker# If somebody requested an XXX-only pcap, that doesn't include
12523*8b26181fSAndroid Build Coastguard Worker# additional mechanisms.
12524*8b26181fSAndroid Build Coastguard Worker#
12525*8b26181fSAndroid Build Coastguard Workerif test "xxx_only" != yes; then
12526*8b26181fSAndroid Build Coastguard Worker  case "$host_os" in
12527*8b26181fSAndroid Build Coastguard Worker  linux*)
12528*8b26181fSAndroid Build Coastguard Worker        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5
12529*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for Linux usbmon USB sniffing support... " >&6; }
12530*8b26181fSAndroid Build Coastguard Worker    if test "x$enable_usb" != "xno" ; then
12531*8b26181fSAndroid Build Coastguard Worker
12532*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h
12533*8b26181fSAndroid Build Coastguard Worker
12534*8b26181fSAndroid Build Coastguard Worker      MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c"
12535*8b26181fSAndroid Build Coastguard Worker      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12536*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
12537*8b26181fSAndroid Build Coastguard Worker      #
12538*8b26181fSAndroid Build Coastguard Worker      # Note: if the directory for special files is *EVER* somewhere
12539*8b26181fSAndroid Build Coastguard Worker      # other than the UN*X standard of /dev (which will break any
12540*8b26181fSAndroid Build Coastguard Worker      # software that looks for /dev/null or /dev/tty, for example,
12541*8b26181fSAndroid Build Coastguard Worker      # so doing that is *REALLY* not a good idea), please provide
12542*8b26181fSAndroid Build Coastguard Worker      # some mechanism to determine that directory at *run time*,
12543*8b26181fSAndroid Build Coastguard Worker      # rather than *configure time*, so that it works when doinga
12544*8b26181fSAndroid Build Coastguard Worker      # a cross-build, and that works with *multiple* distributions,
12545*8b26181fSAndroid Build Coastguard Worker      # with our without udev, and with multiple versions of udev,
12546*8b26181fSAndroid Build Coastguard Worker      # with udevinfo or udevadm or any other mechanism to get the
12547*8b26181fSAndroid Build Coastguard Worker      # special files directory.
12548*8b26181fSAndroid Build Coastguard Worker      #
12549*8b26181fSAndroid Build Coastguard Worker      # Do we have a version of <linux/compiler.h> available?
12550*8b26181fSAndroid Build Coastguard Worker      # If so, we might need it for <linux/usbdevice_fs.h>.
12551*8b26181fSAndroid Build Coastguard Worker      #
12552*8b26181fSAndroid Build Coastguard Worker      for ac_header in linux/compiler.h
12553*8b26181fSAndroid Build Coastguard Workerdo :
12554*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
12555*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_linux_compiler_h" = xyes; then :
12556*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
12557*8b26181fSAndroid Build Coastguard Worker#define HAVE_LINUX_COMPILER_H 1
12558*8b26181fSAndroid Build Coastguard Worker_ACEOF
12559*8b26181fSAndroid Build Coastguard Worker
12560*8b26181fSAndroid Build Coastguard Workerfi
12561*8b26181fSAndroid Build Coastguard Worker
12562*8b26181fSAndroid Build Coastguard Workerdone
12563*8b26181fSAndroid Build Coastguard Worker
12564*8b26181fSAndroid Build Coastguard Worker      if test "$ac_cv_header_linux_compiler_h" = yes; then
12565*8b26181fSAndroid Build Coastguard Worker        #
12566*8b26181fSAndroid Build Coastguard Worker        # Yes - include it when testing for <linux/usbdevice_fs.h>.
12567*8b26181fSAndroid Build Coastguard Worker        #
12568*8b26181fSAndroid Build Coastguard Worker        for ac_header in linux/usbdevice_fs.h
12569*8b26181fSAndroid Build Coastguard Workerdo :
12570*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
12571*8b26181fSAndroid Build Coastguard Worker"
12572*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
12573*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
12574*8b26181fSAndroid Build Coastguard Worker#define HAVE_LINUX_USBDEVICE_FS_H 1
12575*8b26181fSAndroid Build Coastguard Worker_ACEOF
12576*8b26181fSAndroid Build Coastguard Worker
12577*8b26181fSAndroid Build Coastguard Workerfi
12578*8b26181fSAndroid Build Coastguard Worker
12579*8b26181fSAndroid Build Coastguard Workerdone
12580*8b26181fSAndroid Build Coastguard Worker
12581*8b26181fSAndroid Build Coastguard Worker      else
12582*8b26181fSAndroid Build Coastguard Worker        for ac_header in linux/usbdevice_fs.h
12583*8b26181fSAndroid Build Coastguard Workerdo :
12584*8b26181fSAndroid Build Coastguard Worker  ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
12585*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
12586*8b26181fSAndroid Build Coastguard Worker  cat >>confdefs.h <<_ACEOF
12587*8b26181fSAndroid Build Coastguard Worker#define HAVE_LINUX_USBDEVICE_FS_H 1
12588*8b26181fSAndroid Build Coastguard Worker_ACEOF
12589*8b26181fSAndroid Build Coastguard Worker
12590*8b26181fSAndroid Build Coastguard Workerfi
12591*8b26181fSAndroid Build Coastguard Worker
12592*8b26181fSAndroid Build Coastguard Workerdone
12593*8b26181fSAndroid Build Coastguard Worker
12594*8b26181fSAndroid Build Coastguard Worker      fi
12595*8b26181fSAndroid Build Coastguard Worker      if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
12596*8b26181fSAndroid Build Coastguard Worker        #
12597*8b26181fSAndroid Build Coastguard Worker        # OK, does it define bRequestType?  Older versions of the kernel
12598*8b26181fSAndroid Build Coastguard Worker        # define fields with names like "requesttype, "request", and
12599*8b26181fSAndroid Build Coastguard Worker        # "value", rather than "bRequestType", "bRequest", and
12600*8b26181fSAndroid Build Coastguard Worker        # "wValue".
12601*8b26181fSAndroid Build Coastguard Worker        #
12602*8b26181fSAndroid Build Coastguard Worker        ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
12603*8b26181fSAndroid Build Coastguard Worker            $ac_includes_default
12604*8b26181fSAndroid Build Coastguard Worker            #ifdef HAVE_LINUX_COMPILER_H
12605*8b26181fSAndroid Build Coastguard Worker            #include <linux/compiler.h>
12606*8b26181fSAndroid Build Coastguard Worker            #endif
12607*8b26181fSAndroid Build Coastguard Worker            #include <linux/usbdevice_fs.h>
12608*8b26181fSAndroid Build Coastguard Worker
12609*8b26181fSAndroid Build Coastguard Worker"
12610*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
12611*8b26181fSAndroid Build Coastguard Worker
12612*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
12613*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
12614*8b26181fSAndroid Build Coastguard Worker_ACEOF
12615*8b26181fSAndroid Build Coastguard Worker
12616*8b26181fSAndroid Build Coastguard Worker
12617*8b26181fSAndroid Build Coastguard Workerfi
12618*8b26181fSAndroid Build Coastguard Worker
12619*8b26181fSAndroid Build Coastguard Worker      fi
12620*8b26181fSAndroid Build Coastguard Worker    else
12621*8b26181fSAndroid Build Coastguard Worker      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12622*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
12623*8b26181fSAndroid Build Coastguard Worker    fi
12624*8b26181fSAndroid Build Coastguard Worker
12625*8b26181fSAndroid Build Coastguard Worker    #
12626*8b26181fSAndroid Build Coastguard Worker    # Life's too short to deal with trying to get this to compile
12627*8b26181fSAndroid Build Coastguard Worker    # if you don't get the right types defined with
12628*8b26181fSAndroid Build Coastguard Worker    # __KERNEL_STRICT_NAMES getting defined by some other include.
12629*8b26181fSAndroid Build Coastguard Worker    #
12630*8b26181fSAndroid Build Coastguard Worker    # Check whether the includes Just Work.  If not, don't turn on
12631*8b26181fSAndroid Build Coastguard Worker    # netfilter support.
12632*8b26181fSAndroid Build Coastguard Worker    #
12633*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
12634*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we can compile the netfilter support... " >&6; }
12635*8b26181fSAndroid Build Coastguard Worker    if ${ac_cv_netfilter_can_compile+:} false; then :
12636*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
12637*8b26181fSAndroid Build Coastguard Workerelse
12638*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12639*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12640*8b26181fSAndroid Build Coastguard Worker
12641*8b26181fSAndroid Build Coastguard Worker$ac_includes_default
12642*8b26181fSAndroid Build Coastguard Worker#include <sys/socket.h>
12643*8b26181fSAndroid Build Coastguard Worker#include <netinet/in.h>
12644*8b26181fSAndroid Build Coastguard Worker#include <linux/types.h>
12645*8b26181fSAndroid Build Coastguard Worker
12646*8b26181fSAndroid Build Coastguard Worker#include <linux/netlink.h>
12647*8b26181fSAndroid Build Coastguard Worker#include <linux/netfilter.h>
12648*8b26181fSAndroid Build Coastguard Worker#include <linux/netfilter/nfnetlink.h>
12649*8b26181fSAndroid Build Coastguard Worker#include <linux/netfilter/nfnetlink_log.h>
12650*8b26181fSAndroid Build Coastguard Worker#include <linux/netfilter/nfnetlink_queue.h>
12651*8b26181fSAndroid Build Coastguard Workerint
12652*8b26181fSAndroid Build Coastguard Workermain ()
12653*8b26181fSAndroid Build Coastguard Worker{
12654*8b26181fSAndroid Build Coastguard Worker
12655*8b26181fSAndroid Build Coastguard Worker  ;
12656*8b26181fSAndroid Build Coastguard Worker  return 0;
12657*8b26181fSAndroid Build Coastguard Worker}
12658*8b26181fSAndroid Build Coastguard Worker_ACEOF
12659*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12660*8b26181fSAndroid Build Coastguard Worker  ac_cv_netfilter_can_compile=yes
12661*8b26181fSAndroid Build Coastguard Workerelse
12662*8b26181fSAndroid Build Coastguard Worker  ac_cv_netfilter_can_compile=no
12663*8b26181fSAndroid Build Coastguard Workerfi
12664*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12665*8b26181fSAndroid Build Coastguard Workerfi
12666*8b26181fSAndroid Build Coastguard Worker
12667*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
12668*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_netfilter_can_compile" >&6; }
12669*8b26181fSAndroid Build Coastguard Worker    if test $ac_cv_netfilter_can_compile = yes ; then
12670*8b26181fSAndroid Build Coastguard Worker
12671*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
12672*8b26181fSAndroid Build Coastguard Worker
12673*8b26181fSAndroid Build Coastguard Worker      MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c"
12674*8b26181fSAndroid Build Coastguard Worker    fi
12675*8b26181fSAndroid Build Coastguard Worker    ;;
12676*8b26181fSAndroid Build Coastguard Worker  esac
12677*8b26181fSAndroid Build Coastguard Workerfi
12678*8b26181fSAndroid Build Coastguard Worker
12679*8b26181fSAndroid Build Coastguard Worker
12680*8b26181fSAndroid Build Coastguard Worker
12681*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-netmap was given.
12682*8b26181fSAndroid Build Coastguard Workerif test "${enable_netmap+set}" = set; then :
12683*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_netmap;
12684*8b26181fSAndroid Build Coastguard Workerelse
12685*8b26181fSAndroid Build Coastguard Worker  enable_netmap=yes
12686*8b26181fSAndroid Build Coastguard Workerfi
12687*8b26181fSAndroid Build Coastguard Worker
12688*8b26181fSAndroid Build Coastguard Worker
12689*8b26181fSAndroid Build Coastguard Workerif test "x$enable_netmap" != "xno" ; then
12690*8b26181fSAndroid Build Coastguard Worker	#
12691*8b26181fSAndroid Build Coastguard Worker	# Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
12692*8b26181fSAndroid Build Coastguard Worker	# defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
12693*8b26181fSAndroid Build Coastguard Worker	# is defined, for example, as it includes a non-existent malloc.h
12694*8b26181fSAndroid Build Coastguard Worker	# header.
12695*8b26181fSAndroid Build Coastguard Worker	#
12696*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
12697*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether we can compile the netmap support... " >&6; }
12698*8b26181fSAndroid Build Coastguard Worker	if ${ac_cv_net_netmap_user_can_compile+:} false; then :
12699*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
12700*8b26181fSAndroid Build Coastguard Workerelse
12701*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12702*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
12703*8b26181fSAndroid Build Coastguard Worker
12704*8b26181fSAndroid Build Coastguard Worker$ac_includes_default
12705*8b26181fSAndroid Build Coastguard Worker#define NETMAP_WITH_LIBS
12706*8b26181fSAndroid Build Coastguard Worker#include <net/netmap_user.h>
12707*8b26181fSAndroid Build Coastguard Workerint
12708*8b26181fSAndroid Build Coastguard Workermain ()
12709*8b26181fSAndroid Build Coastguard Worker{
12710*8b26181fSAndroid Build Coastguard Worker
12711*8b26181fSAndroid Build Coastguard Worker  ;
12712*8b26181fSAndroid Build Coastguard Worker  return 0;
12713*8b26181fSAndroid Build Coastguard Worker}
12714*8b26181fSAndroid Build Coastguard Worker_ACEOF
12715*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
12716*8b26181fSAndroid Build Coastguard Worker  ac_cv_net_netmap_user_can_compile=yes
12717*8b26181fSAndroid Build Coastguard Workerelse
12718*8b26181fSAndroid Build Coastguard Worker  ac_cv_net_netmap_user_can_compile=no
12719*8b26181fSAndroid Build Coastguard Workerfi
12720*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12721*8b26181fSAndroid Build Coastguard Workerfi
12722*8b26181fSAndroid Build Coastguard Worker
12723*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
12724*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
12725*8b26181fSAndroid Build Coastguard Worker	if test $ac_cv_net_netmap_user_can_compile = yes ; then
12726*8b26181fSAndroid Build Coastguard Worker
12727*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
12728*8b26181fSAndroid Build Coastguard Worker
12729*8b26181fSAndroid Build Coastguard Worker	    MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c"
12730*8b26181fSAndroid Build Coastguard Worker	fi
12731*8b26181fSAndroid Build Coastguard Worker
12732*8b26181fSAndroid Build Coastguard Workerfi
12733*8b26181fSAndroid Build Coastguard Worker
12734*8b26181fSAndroid Build Coastguard Worker# Check for DPDK support.
12735*8b26181fSAndroid Build Coastguard Worker
12736*8b26181fSAndroid Build Coastguard Worker# Check whether --with-dpdk was given.
12737*8b26181fSAndroid Build Coastguard Workerif test "${with_dpdk+set}" = set; then :
12738*8b26181fSAndroid Build Coastguard Worker  withval=$with_dpdk;
12739*8b26181fSAndroid Build Coastguard Worker	if test "$withval" = no
12740*8b26181fSAndroid Build Coastguard Worker	then
12741*8b26181fSAndroid Build Coastguard Worker		# User doesn't want DPDK support.
12742*8b26181fSAndroid Build Coastguard Worker		want_dpdk=no
12743*8b26181fSAndroid Build Coastguard Worker	elif test "$withval" = yes
12744*8b26181fSAndroid Build Coastguard Worker	then
12745*8b26181fSAndroid Build Coastguard Worker		# User wants DPDK support but hasn't specified a directory.
12746*8b26181fSAndroid Build Coastguard Worker		want_dpdk=yes
12747*8b26181fSAndroid Build Coastguard Worker	else
12748*8b26181fSAndroid Build Coastguard Worker		# User wants DPDK support and has specified a directory,
12749*8b26181fSAndroid Build Coastguard Worker		# so use the provided value.
12750*8b26181fSAndroid Build Coastguard Worker		want_dpdk=yes
12751*8b26181fSAndroid Build Coastguard Worker		dpdk_dir=$withval
12752*8b26181fSAndroid Build Coastguard Worker	fi
12753*8b26181fSAndroid Build Coastguard Worker
12754*8b26181fSAndroid Build Coastguard Workerelse
12755*8b26181fSAndroid Build Coastguard Worker
12756*8b26181fSAndroid Build Coastguard Worker	if test "$V_PCAP" = dpdk; then
12757*8b26181fSAndroid Build Coastguard Worker		# User requested DPDK-only libpcap, so we'd better have
12758*8b26181fSAndroid Build Coastguard Worker		# the DPDK API.
12759*8b26181fSAndroid Build Coastguard Worker		want_dpdk=yes
12760*8b26181fSAndroid Build Coastguard Worker	elif test "xxx_only" = yes; then
12761*8b26181fSAndroid Build Coastguard Worker		# User requested something-else-only pcap, so they don't
12762*8b26181fSAndroid Build Coastguard Worker		# want DPDK support.
12763*8b26181fSAndroid Build Coastguard Worker		want_dpdk=no
12764*8b26181fSAndroid Build Coastguard Worker	else
12765*8b26181fSAndroid Build Coastguard Worker		#
12766*8b26181fSAndroid Build Coastguard Worker		# Use DPDK API if present, otherwise don't
12767*8b26181fSAndroid Build Coastguard Worker		#
12768*8b26181fSAndroid Build Coastguard Worker		want_dpdk=ifpresent
12769*8b26181fSAndroid Build Coastguard Worker	fi
12770*8b26181fSAndroid Build Coastguard Worker
12771*8b26181fSAndroid Build Coastguard Workerfi
12772*8b26181fSAndroid Build Coastguard Worker
12773*8b26181fSAndroid Build Coastguard Worker
12774*8b26181fSAndroid Build Coastguard Workerif test "$want_dpdk" != no; then
12775*8b26181fSAndroid Build Coastguard Worker	#
12776*8b26181fSAndroid Build Coastguard Worker	# The user didn't explicitly say they don't want DPDK,
12777*8b26181fSAndroid Build Coastguard Worker	# so see if we have it.
12778*8b26181fSAndroid Build Coastguard Worker	#
12779*8b26181fSAndroid Build Coastguard Worker	# We only try to find it using pkg-config; DPDK is *SO*
12780*8b26181fSAndroid Build Coastguard Worker	# complicated - DPDK 19.02, for example, has about 117(!)
12781*8b26181fSAndroid Build Coastguard Worker	# libraries, and the precise set of libraries required has
12782*8b26181fSAndroid Build Coastguard Worker	# changed over time - so attempting to guess which libraries
12783*8b26181fSAndroid Build Coastguard Worker	# you need, and hardcoding that in an attempt to find the
12784*8b26181fSAndroid Build Coastguard Worker	# libraries without DPDK, rather than relying on DPDK to
12785*8b26181fSAndroid Build Coastguard Worker	# tell you, with a .pc file, what libraries are needed,
12786*8b26181fSAndroid Build Coastguard Worker	# is *EXTREMELY* fragile and has caused some bug reports,
12787*8b26181fSAndroid Build Coastguard Worker	# so we're just not going to do it.
12788*8b26181fSAndroid Build Coastguard Worker	#
12789*8b26181fSAndroid Build Coastguard Worker	# If that causes a problem, the only thing we will do is
12790*8b26181fSAndroid Build Coastguard Worker	# accept an alternative way of finding the appropriate
12791*8b26181fSAndroid Build Coastguard Worker	# library set for the installed version of DPDK that is
12792*8b26181fSAndroid Build Coastguard Worker	# as robust as pkg-config (i.e., it had better work as well
12793*8b26181fSAndroid Build Coastguard Worker	# as pkg-config with *ALL* versions of DPDK that provide a
12794*8b26181fSAndroid Build Coastguard Worker	# libdpdk.pc file).
12795*8b26181fSAndroid Build Coastguard Worker	#
12796*8b26181fSAndroid Build Coastguard Worker	# If --with-dpdk={path} was specified, add {path}/pkgconfig
12797*8b26181fSAndroid Build Coastguard Worker	# to PKG_CONFIG_PATH, so we look for the .pc file there,
12798*8b26181fSAndroid Build Coastguard Worker	# first.
12799*8b26181fSAndroid Build Coastguard Worker	#
12800*8b26181fSAndroid Build Coastguard Worker	save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
12801*8b26181fSAndroid Build Coastguard Worker	if test -n "$dpdk_dir"; then
12802*8b26181fSAndroid Build Coastguard Worker		PKG_CONFIG_PATH="$dpdk_dir:$PKG_CONFIG_PATH"
12803*8b26181fSAndroid Build Coastguard Worker	fi
12804*8b26181fSAndroid Build Coastguard Worker
12805*8b26181fSAndroid Build Coastguard Worker
12806*8b26181fSAndroid Build Coastguard Workerpkg_failed=no
12807*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdpdk with pkg-config" >&5
12808*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for libdpdk with pkg-config... " >&6; }
12809*8b26181fSAndroid Build Coastguard Worker
12810*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
12811*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12812*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12813*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
12814*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12815*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
12816*8b26181fSAndroid Build Coastguard Worker
12817*8b26181fSAndroid Build Coastguard Worker	#
12818*8b26181fSAndroid Build Coastguard Worker	# The package was found, so try to get its C flags and
12819*8b26181fSAndroid Build Coastguard Worker	# libraries.
12820*8b26181fSAndroid Build Coastguard Worker	#
12821*8b26181fSAndroid Build Coastguard Worker	if test -n "$DPDK_CFLAGS"; then
12822*8b26181fSAndroid Build Coastguard Worker    pkg_cv_DPDK_CFLAGS="$DPDK_CFLAGS"
12823*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
12824*8b26181fSAndroid Build Coastguard Worker
12825*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
12826*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12827*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12828*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
12829*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12830*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
12831*8b26181fSAndroid Build Coastguard Worker  pkg_cv_DPDK_CFLAGS=`$PKG_CONFIG --cflags "libdpdk" 2>/dev/null`
12832*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
12833*8b26181fSAndroid Build Coastguard Workerelse
12834*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
12835*8b26181fSAndroid Build Coastguard Workerfi
12836*8b26181fSAndroid Build Coastguard Worker else
12837*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
12838*8b26181fSAndroid Build Coastguard Workerfi
12839*8b26181fSAndroid Build Coastguard Worker	if test -n "$DPDK_LIBS"; then
12840*8b26181fSAndroid Build Coastguard Worker    pkg_cv_DPDK_LIBS="$DPDK_LIBS"
12841*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
12842*8b26181fSAndroid Build Coastguard Worker
12843*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
12844*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12845*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12846*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
12847*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12848*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
12849*8b26181fSAndroid Build Coastguard Worker  pkg_cv_DPDK_LIBS=`$PKG_CONFIG --libs "libdpdk" 2>/dev/null`
12850*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
12851*8b26181fSAndroid Build Coastguard Workerelse
12852*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
12853*8b26181fSAndroid Build Coastguard Workerfi
12854*8b26181fSAndroid Build Coastguard Worker else
12855*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
12856*8b26181fSAndroid Build Coastguard Workerfi
12857*8b26181fSAndroid Build Coastguard Worker	if test -n "$DPDK_LIBS_STATIC"; then
12858*8b26181fSAndroid Build Coastguard Worker    pkg_cv_DPDK_LIBS_STATIC="$DPDK_LIBS_STATIC"
12859*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
12860*8b26181fSAndroid Build Coastguard Worker
12861*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
12862*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5
12863*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5
12864*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
12865*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12866*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
12867*8b26181fSAndroid Build Coastguard Worker  pkg_cv_DPDK_LIBS_STATIC=`$PKG_CONFIG --libs --static "libdpdk" 2>/dev/null`
12868*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
12869*8b26181fSAndroid Build Coastguard Workerelse
12870*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
12871*8b26181fSAndroid Build Coastguard Workerfi
12872*8b26181fSAndroid Build Coastguard Worker else
12873*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
12874*8b26181fSAndroid Build Coastguard Workerfi
12875*8b26181fSAndroid Build Coastguard Worker
12876*8b26181fSAndroid Build Coastguard Worker
12877*8b26181fSAndroid Build Coastguard Worker
12878*8b26181fSAndroid Build Coastguard Worker	if test $pkg_failed = yes; then
12879*8b26181fSAndroid Build Coastguard Worker		#
12880*8b26181fSAndroid Build Coastguard Worker		# That failed - report an error.
12881*8b26181fSAndroid Build Coastguard Worker		#
12882*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
12883*8b26181fSAndroid Build Coastguard Worker$as_echo "error" >&6; }
12884*8b26181fSAndroid Build Coastguard Worker
12885*8b26181fSAndroid Build Coastguard Workerif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12886*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=yes
12887*8b26181fSAndroid Build Coastguard Workerelse
12888*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=no
12889*8b26181fSAndroid Build Coastguard Workerfi
12890*8b26181fSAndroid Build Coastguard Worker	        if test $_pkg_short_errors_supported = yes; then
12891*8b26181fSAndroid Build Coastguard Worker		        DPDK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libdpdk" 2>&1`
12892*8b26181fSAndroid Build Coastguard Worker	        else
12893*8b26181fSAndroid Build Coastguard Worker		        DPDK_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libdpdk" 2>&1`
12894*8b26181fSAndroid Build Coastguard Worker	        fi
12895*8b26181fSAndroid Build Coastguard Worker		# Put the nasty error message in config.log where it belongs
12896*8b26181fSAndroid Build Coastguard Worker		echo "$DPDK_PKG_ERRORS" >&5
12897*8b26181fSAndroid Build Coastguard Worker
12898*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "Package requirements (libdpdk) were not met:
12899*8b26181fSAndroid Build Coastguard Worker
12900*8b26181fSAndroid Build Coastguard Worker$DPDK_PKG_ERRORS
12901*8b26181fSAndroid Build Coastguard Worker
12902*8b26181fSAndroid Build Coastguard WorkerConsider adjusting the PKG_CONFIG_PATH environment variable if you
12903*8b26181fSAndroid Build Coastguard Workerinstalled software in a non-standard prefix.
12904*8b26181fSAndroid Build Coastguard Worker
12905*8b26181fSAndroid Build Coastguard Worker
12906*8b26181fSAndroid Build Coastguard WorkerAlternatively, you may set the environment variables DPDK_CFLAGS
12907*8b26181fSAndroid Build Coastguard Workerand DPDK_LIBS to avoid the need to call pkg-config.
12908*8b26181fSAndroid Build Coastguard WorkerSee the pkg-config man page for more details." "$LINENO" 5
12909*8b26181fSAndroid Build Coastguard Worker	elif test $pkg_failed = untried; then
12910*8b26181fSAndroid Build Coastguard Worker		#
12911*8b26181fSAndroid Build Coastguard Worker		# We don't have pkg-config, so it didn't work.
12912*8b26181fSAndroid Build Coastguard Worker		#
12913*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
12914*8b26181fSAndroid Build Coastguard Worker$as_echo "not found (pkg-config not found)" >&6; }
12915*8b26181fSAndroid Build Coastguard Worker	else
12916*8b26181fSAndroid Build Coastguard Worker		#
12917*8b26181fSAndroid Build Coastguard Worker		# We found the package.
12918*8b26181fSAndroid Build Coastguard Worker		#
12919*8b26181fSAndroid Build Coastguard Worker		DPDK_CFLAGS=$pkg_cv_DPDK_CFLAGS
12920*8b26181fSAndroid Build Coastguard Worker		DPDK_LIBS=$pkg_cv_DPDK_LIBS
12921*8b26181fSAndroid Build Coastguard Worker		DPDK_LIBS_STATIC=$pkg_cv_DPDK_LIBS_STATIC
12922*8b26181fSAndroid Build Coastguard Worker	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
12923*8b26181fSAndroid Build Coastguard Worker$as_echo "found" >&6; }
12924*8b26181fSAndroid Build Coastguard Worker
12925*8b26181fSAndroid Build Coastguard Worker		found_dpdk=yes
12926*8b26181fSAndroid Build Coastguard Worker
12927*8b26181fSAndroid Build Coastguard Worker	fi
12928*8b26181fSAndroid Build Coastguard Workerelse
12929*8b26181fSAndroid Build Coastguard Worker
12930*8b26181fSAndroid Build Coastguard Worker	#
12931*8b26181fSAndroid Build Coastguard Worker	# The package isn't present.
12932*8b26181fSAndroid Build Coastguard Worker	#
12933*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12934*8b26181fSAndroid Build Coastguard Worker$as_echo "not found" >&6; }
12935*8b26181fSAndroid Build Coastguard Worker
12936*8b26181fSAndroid Build Coastguard Workerfi
12937*8b26181fSAndroid Build Coastguard Worker
12938*8b26181fSAndroid Build Coastguard Worker	PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH"
12939*8b26181fSAndroid Build Coastguard Worker
12940*8b26181fSAndroid Build Coastguard Worker	#
12941*8b26181fSAndroid Build Coastguard Worker	# Did we find DPDK?
12942*8b26181fSAndroid Build Coastguard Worker	#
12943*8b26181fSAndroid Build Coastguard Worker	if test "$found_dpdk" = yes; then
12944*8b26181fSAndroid Build Coastguard Worker		#
12945*8b26181fSAndroid Build Coastguard Worker		# Found it.
12946*8b26181fSAndroid Build Coastguard Worker		#
12947*8b26181fSAndroid Build Coastguard Worker		# We call rte_eth_dev_count_avail(), and older versions
12948*8b26181fSAndroid Build Coastguard Worker		# of DPDK didn't have it, so check for it.
12949*8b26181fSAndroid Build Coastguard Worker		#
12950*8b26181fSAndroid Build Coastguard Worker
12951*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
12952*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
12953*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
12954*8b26181fSAndroid Build Coastguard Worker
12955*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$CFLAGS $DPDK_CFLAGS"
12956*8b26181fSAndroid Build Coastguard Worker		LIBS="$LIBS $DPDK_LIBS"
12957*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail"
12958*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes; then :
12959*8b26181fSAndroid Build Coastguard Worker
12960*8b26181fSAndroid Build Coastguard Workerfi
12961*8b26181fSAndroid Build Coastguard Worker
12962*8b26181fSAndroid Build Coastguard Worker
12963*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
12964*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
12965*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
12966*8b26181fSAndroid Build Coastguard Worker
12967*8b26181fSAndroid Build Coastguard Worker	fi
12968*8b26181fSAndroid Build Coastguard Worker
12969*8b26181fSAndroid Build Coastguard Worker	if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then
12970*8b26181fSAndroid Build Coastguard Worker		#
12971*8b26181fSAndroid Build Coastguard Worker		# We found a usable DPDK.
12972*8b26181fSAndroid Build Coastguard Worker		#
12973*8b26181fSAndroid Build Coastguard Worker		# Check whether the rte_ether.h file defines
12974*8b26181fSAndroid Build Coastguard Worker		# struct ether_addr or struct rte_ether_addr.
12975*8b26181fSAndroid Build Coastguard Worker		#
12976*8b26181fSAndroid Build Coastguard Worker		# ("API compatibility?  That's for losers!")
12977*8b26181fSAndroid Build Coastguard Worker		#
12978*8b26181fSAndroid Build Coastguard Worker
12979*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
12980*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
12981*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
12982*8b26181fSAndroid Build Coastguard Worker
12983*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$CFLAGS $DPDK_CFLAGS"
12984*8b26181fSAndroid Build Coastguard Worker		LIBS="$LIBS $DPDK_LIBS"
12985*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" "
12986*8b26181fSAndroid Build Coastguard Worker			#include <rte_ether.h>
12987*8b26181fSAndroid Build Coastguard Worker
12988*8b26181fSAndroid Build Coastguard Worker"
12989*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_type_struct_rte_ether_addr" = xyes; then :
12990*8b26181fSAndroid Build Coastguard Worker
12991*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
12992*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_RTE_ETHER_ADDR 1
12993*8b26181fSAndroid Build Coastguard Worker_ACEOF
12994*8b26181fSAndroid Build Coastguard Worker
12995*8b26181fSAndroid Build Coastguard Worker
12996*8b26181fSAndroid Build Coastguard Workerfi
12997*8b26181fSAndroid Build Coastguard Worker
12998*8b26181fSAndroid Build Coastguard Worker
12999*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
13000*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
13001*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
13002*8b26181fSAndroid Build Coastguard Worker
13003*8b26181fSAndroid Build Coastguard Worker
13004*8b26181fSAndroid Build Coastguard Worker		#
13005*8b26181fSAndroid Build Coastguard Worker		# We can build with DPDK.
13006*8b26181fSAndroid Build Coastguard Worker		#
13007*8b26181fSAndroid Build Coastguard Worker		V_INCLS="$V_INCLS $DPDK_CFLAGS"
13008*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DPDK_LIBS"
13009*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DPDK_LIBS_STATIC"
13010*8b26181fSAndroid Build Coastguard Worker		REQUIRES_PRIVATE="$REQUIRES_PRIVATE libdpdk"
13011*8b26181fSAndroid Build Coastguard Worker
13012*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h
13013*8b26181fSAndroid Build Coastguard Worker
13014*8b26181fSAndroid Build Coastguard Worker		if test $V_PCAP != dpdk ; then
13015*8b26181fSAndroid Build Coastguard Worker			MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c"
13016*8b26181fSAndroid Build Coastguard Worker		fi
13017*8b26181fSAndroid Build Coastguard Worker	else
13018*8b26181fSAndroid Build Coastguard Worker		#
13019*8b26181fSAndroid Build Coastguard Worker		# We didn't find a usable DPDK.
13020*8b26181fSAndroid Build Coastguard Worker		# If we required it (with --with-dpdk or --with-pcap=dpdk),
13021*8b26181fSAndroid Build Coastguard Worker		# fail with an appropriate message telling the user what
13022*8b26181fSAndroid Build Coastguard Worker		# the problem was, otherwise note the problem with a
13023*8b26181fSAndroid Build Coastguard Worker		# warning.
13024*8b26181fSAndroid Build Coastguard Worker		#
13025*8b26181fSAndroid Build Coastguard Worker		if test "$found_dpdk" != yes; then
13026*8b26181fSAndroid Build Coastguard Worker			#
13027*8b26181fSAndroid Build Coastguard Worker			# Not found with pkg-config.  Note that we
13028*8b26181fSAndroid Build Coastguard Worker			# require that DPDK must be findable with
13029*8b26181fSAndroid Build Coastguard Worker			# pkg-config.
13030*8b26181fSAndroid Build Coastguard Worker			#
13031*8b26181fSAndroid Build Coastguard Worker			if test "$V_PCAP" = dpdk; then
13032*8b26181fSAndroid Build Coastguard Worker				#
13033*8b26181fSAndroid Build Coastguard Worker				# User requested DPDK-only capture support.
13034*8b26181fSAndroid Build Coastguard Worker				#
13035*8b26181fSAndroid Build Coastguard Worker				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but
13036*8b26181fSAndroid Build Coastguard Workerwe couldn't find DPDK with pkg-config.  Make sure that pkg-config is
13037*8b26181fSAndroid Build Coastguard Workerinstalled, that DPDK 18.02.2 or later is installed, and that DPDK
13038*8b26181fSAndroid Build Coastguard Workerprovides a .pc file." "$LINENO" 5
13039*8b26181fSAndroid Build Coastguard Worker			fi
13040*8b26181fSAndroid Build Coastguard Worker
13041*8b26181fSAndroid Build Coastguard Worker			if test "$want_dpdk" = yes; then
13042*8b26181fSAndroid Build Coastguard Worker				#
13043*8b26181fSAndroid Build Coastguard Worker				# User requested that libpcap include
13044*8b26181fSAndroid Build Coastguard Worker				# DPDK capture support.
13045*8b26181fSAndroid Build Coastguard Worker				#
13046*8b26181fSAndroid Build Coastguard Worker				as_fn_error $? "DPDK support requested with --with-dpdk, but we
13047*8b26181fSAndroid Build Coastguard Workercouldn't find DPDK with pkg-config.  Make sure that pkg-config
13048*8b26181fSAndroid Build Coastguard Workeris installed, that DPDK 18.02.2 or later is installed, and that
13049*8b26181fSAndroid Build Coastguard WorkerDPDK provides .pc file." "$LINENO" 5
13050*8b26181fSAndroid Build Coastguard Worker			fi
13051*8b26181fSAndroid Build Coastguard Worker
13052*8b26181fSAndroid Build Coastguard Worker			#
13053*8b26181fSAndroid Build Coastguard Worker			# User didn't indicate whether they wanted DPDK
13054*8b26181fSAndroid Build Coastguard Worker			# or not; just warn why we didn't find it.
13055*8b26181fSAndroid Build Coastguard Worker			#
13056*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We couldn't find DPDK with pkg-config.  If
13057*8b26181fSAndroid Build Coastguard Workeryou want DPDK support, make sure that pkg-config is installed,
13058*8b26181fSAndroid Build Coastguard Workerthat DPDK 18.02.2 or later is installed, and that DPDK provides a
13059*8b26181fSAndroid Build Coastguard Worker.pc file." >&5
13060*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: We couldn't find DPDK with pkg-config.  If
13061*8b26181fSAndroid Build Coastguard Workeryou want DPDK support, make sure that pkg-config is installed,
13062*8b26181fSAndroid Build Coastguard Workerthat DPDK 18.02.2 or later is installed, and that DPDK provides a
13063*8b26181fSAndroid Build Coastguard Worker.pc file." >&2;}
13064*8b26181fSAndroid Build Coastguard Worker		elif test "$ac_cv_func_rte_eth_dev_count_avail" != yes; then
13065*8b26181fSAndroid Build Coastguard Worker			#
13066*8b26181fSAndroid Build Coastguard Worker			# Found with pkg-config, but we couldn't compile
13067*8b26181fSAndroid Build Coastguard Worker			# a program that calls rte_eth_dev_count(); we
13068*8b26181fSAndroid Build Coastguard Worker			# probably have the developer package installed,
13069*8b26181fSAndroid Build Coastguard Worker			# but don't have a sufficiently recent version
13070*8b26181fSAndroid Build Coastguard Worker			# of DPDK.  Note that we need a sufficiently
13071*8b26181fSAndroid Build Coastguard Worker			# recent version of DPDK.
13072*8b26181fSAndroid Build Coastguard Worker			#
13073*8b26181fSAndroid Build Coastguard Worker			if test "$V_PCAP" = dpdk; then
13074*8b26181fSAndroid Build Coastguard Worker				#
13075*8b26181fSAndroid Build Coastguard Worker				# User requested DPDK-only capture support.
13076*8b26181fSAndroid Build Coastguard Worker				#
13077*8b26181fSAndroid Build Coastguard Worker				as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we
13078*8b26181fSAndroid Build Coastguard Workercan't compile libpcap with DPDK.  Make sure that DPDK 18.02.2 or later
13079*8b26181fSAndroid Build Coastguard Workeris installed." "$LINENO" 5
13080*8b26181fSAndroid Build Coastguard Worker			fi
13081*8b26181fSAndroid Build Coastguard Worker
13082*8b26181fSAndroid Build Coastguard Worker			if test "$want_dpdk" = yes; then
13083*8b26181fSAndroid Build Coastguard Worker				#
13084*8b26181fSAndroid Build Coastguard Worker				# User requested that libpcap include
13085*8b26181fSAndroid Build Coastguard Worker				# DPDK capture support.
13086*8b26181fSAndroid Build Coastguard Worker				#
13087*8b26181fSAndroid Build Coastguard Worker				as_fn_error $? "DPDK support requested with --with-dpdk, but
13088*8b26181fSAndroid Build Coastguard Workerwe can't compile libpcap with DPDK.  Make sure that DPDK 18.02.2
13089*8b26181fSAndroid Build Coastguard Workeror later is DPDK is installed." "$LINENO" 5
13090*8b26181fSAndroid Build Coastguard Worker			fi
13091*8b26181fSAndroid Build Coastguard Worker
13092*8b26181fSAndroid Build Coastguard Worker			#
13093*8b26181fSAndroid Build Coastguard Worker			# User didn't indicate whether they wanted DPDK
13094*8b26181fSAndroid Build Coastguard Worker			# or not; just warn why we didn't find it.
13095*8b26181fSAndroid Build Coastguard Worker			#
13096*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DPDK was found, but we can't compile libpcap with it.
13097*8b26181fSAndroid Build Coastguard WorkerMake sure that DPDK 18.02.2 or later is installed." >&5
13098*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: DPDK was found, but we can't compile libpcap with it.
13099*8b26181fSAndroid Build Coastguard WorkerMake sure that DPDK 18.02.2 or later is installed." >&2;}
13100*8b26181fSAndroid Build Coastguard Worker		fi
13101*8b26181fSAndroid Build Coastguard Worker	fi
13102*8b26181fSAndroid Build Coastguard Workerfi
13103*8b26181fSAndroid Build Coastguard Worker
13104*8b26181fSAndroid Build Coastguard Worker
13105*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-bluetooth was given.
13106*8b26181fSAndroid Build Coastguard Workerif test "${enable_bluetooth+set}" = set; then :
13107*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_bluetooth;
13108*8b26181fSAndroid Build Coastguard Workerelse
13109*8b26181fSAndroid Build Coastguard Worker  enable_bluetooth=ifsupportavailable
13110*8b26181fSAndroid Build Coastguard Workerfi
13111*8b26181fSAndroid Build Coastguard Worker
13112*8b26181fSAndroid Build Coastguard Worker
13113*8b26181fSAndroid Build Coastguard Workerif test "xxx_only" = yes; then
13114*8b26181fSAndroid Build Coastguard Worker	# User requested something-else-only pcap, so they don't
13115*8b26181fSAndroid Build Coastguard Worker	# want Bluetooth support.
13116*8b26181fSAndroid Build Coastguard Worker	enable_bluetooth=no
13117*8b26181fSAndroid Build Coastguard Workerfi
13118*8b26181fSAndroid Build Coastguard Worker
13119*8b26181fSAndroid Build Coastguard Workerif test "x$enable_bluetooth" != "xno" ; then
13120*8b26181fSAndroid Build Coastguard Worker		case "$host_os" in
13121*8b26181fSAndroid Build Coastguard Worker	linux*)
13122*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
13123*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
13124*8b26181fSAndroid Build Coastguard Worker
13125*8b26181fSAndroid Build Coastguard Worker			#
13126*8b26181fSAndroid Build Coastguard Worker			# We have bluetooth.h, so we support Bluetooth
13127*8b26181fSAndroid Build Coastguard Worker			# sniffing.
13128*8b26181fSAndroid Build Coastguard Worker			#
13129*8b26181fSAndroid Build Coastguard Worker
13130*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
13131*8b26181fSAndroid Build Coastguard Worker
13132*8b26181fSAndroid Build Coastguard Worker			MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c"
13133*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
13134*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
13135*8b26181fSAndroid Build Coastguard Worker			ac_lbl_bluetooth_available=yes
13136*8b26181fSAndroid Build Coastguard Worker
13137*8b26181fSAndroid Build Coastguard Worker			#
13138*8b26181fSAndroid Build Coastguard Worker			# OK, does struct sockaddr_hci have an hci_channel
13139*8b26181fSAndroid Build Coastguard Worker			# member?
13140*8b26181fSAndroid Build Coastguard Worker			#
13141*8b26181fSAndroid Build Coastguard Worker			ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
13142*8b26181fSAndroid Build Coastguard Worker				#include <bluetooth/bluetooth.h>
13143*8b26181fSAndroid Build Coastguard Worker				#include <bluetooth/hci.h>
13144*8b26181fSAndroid Build Coastguard Worker
13145*8b26181fSAndroid Build Coastguard Worker"
13146*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
13147*8b26181fSAndroid Build Coastguard Worker
13148*8b26181fSAndroid Build Coastguard Workercat >>confdefs.h <<_ACEOF
13149*8b26181fSAndroid Build Coastguard Worker#define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
13150*8b26181fSAndroid Build Coastguard Worker_ACEOF
13151*8b26181fSAndroid Build Coastguard Worker
13152*8b26181fSAndroid Build Coastguard Worker
13153*8b26181fSAndroid Build Coastguard Worker				#
13154*8b26181fSAndroid Build Coastguard Worker				# Yes; is HCI_CHANNEL_MONITOR defined?
13155*8b26181fSAndroid Build Coastguard Worker				#
13156*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
13157*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
13158*8b26181fSAndroid Build Coastguard Worker				if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
13159*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
13160*8b26181fSAndroid Build Coastguard Workerelse
13161*8b26181fSAndroid Build Coastguard Worker  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13162*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
13163*8b26181fSAndroid Build Coastguard Worker
13164*8b26181fSAndroid Build Coastguard Worker					    #include <bluetooth/bluetooth.h>
13165*8b26181fSAndroid Build Coastguard Worker					    #include <bluetooth/hci.h>
13166*8b26181fSAndroid Build Coastguard Worker
13167*8b26181fSAndroid Build Coastguard Workerint
13168*8b26181fSAndroid Build Coastguard Workermain ()
13169*8b26181fSAndroid Build Coastguard Worker{
13170*8b26181fSAndroid Build Coastguard Worker
13171*8b26181fSAndroid Build Coastguard Worker					    u_int i = HCI_CHANNEL_MONITOR;
13172*8b26181fSAndroid Build Coastguard Worker
13173*8b26181fSAndroid Build Coastguard Worker  ;
13174*8b26181fSAndroid Build Coastguard Worker  return 0;
13175*8b26181fSAndroid Build Coastguard Worker}
13176*8b26181fSAndroid Build Coastguard Worker_ACEOF
13177*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_compile "$LINENO"; then :
13178*8b26181fSAndroid Build Coastguard Worker
13179*8b26181fSAndroid Build Coastguard Worker					    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13180*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
13181*8b26181fSAndroid Build Coastguard Worker
13182*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
13183*8b26181fSAndroid Build Coastguard Worker
13184*8b26181fSAndroid Build Coastguard Worker					    MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c"
13185*8b26181fSAndroid Build Coastguard Worker
13186*8b26181fSAndroid Build Coastguard Workerelse
13187*8b26181fSAndroid Build Coastguard Worker
13188*8b26181fSAndroid Build Coastguard Worker					    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13189*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
13190*8b26181fSAndroid Build Coastguard Worker
13191*8b26181fSAndroid Build Coastguard Workerfi
13192*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13193*8b26181fSAndroid Build Coastguard Workerfi
13194*8b26181fSAndroid Build Coastguard Worker
13195*8b26181fSAndroid Build Coastguard Worker
13196*8b26181fSAndroid Build Coastguard Workerfi
13197*8b26181fSAndroid Build Coastguard Worker
13198*8b26181fSAndroid Build Coastguard Worker
13199*8b26181fSAndroid Build Coastguard Workerelse
13200*8b26181fSAndroid Build Coastguard Worker
13201*8b26181fSAndroid Build Coastguard Worker			#
13202*8b26181fSAndroid Build Coastguard Worker			# We don't have bluetooth.h, so we don't support
13203*8b26181fSAndroid Build Coastguard Worker			# Bluetooth sniffing.
13204*8b26181fSAndroid Build Coastguard Worker			#
13205*8b26181fSAndroid Build Coastguard Worker			if test "x$enable_bluetooth" = "xyes" ; then
13206*8b26181fSAndroid Build Coastguard Worker				as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
13207*8b26181fSAndroid Build Coastguard Worker			else
13208*8b26181fSAndroid Build Coastguard Worker				{ $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
13209*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
13210*8b26181fSAndroid Build Coastguard Worker			fi
13211*8b26181fSAndroid Build Coastguard Worker
13212*8b26181fSAndroid Build Coastguard Workerfi
13213*8b26181fSAndroid Build Coastguard Worker
13214*8b26181fSAndroid Build Coastguard Worker
13215*8b26181fSAndroid Build Coastguard Worker		;;
13216*8b26181fSAndroid Build Coastguard Worker	*)
13217*8b26181fSAndroid Build Coastguard Worker		if test "x$enable_bluetooth" = "xyes" ; then
13218*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
13219*8b26181fSAndroid Build Coastguard Worker		else
13220*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
13221*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
13222*8b26181fSAndroid Build Coastguard Worker		fi
13223*8b26181fSAndroid Build Coastguard Worker		;;
13224*8b26181fSAndroid Build Coastguard Worker	esac
13225*8b26181fSAndroid Build Coastguard Worker
13226*8b26181fSAndroid Build Coastguard Workerfi
13227*8b26181fSAndroid Build Coastguard Worker
13228*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-dbus was given.
13229*8b26181fSAndroid Build Coastguard Workerif test "${enable_dbus+set}" = set; then :
13230*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_dbus;
13231*8b26181fSAndroid Build Coastguard Workerelse
13232*8b26181fSAndroid Build Coastguard Worker  enable_dbus=ifavailable
13233*8b26181fSAndroid Build Coastguard Workerfi
13234*8b26181fSAndroid Build Coastguard Worker
13235*8b26181fSAndroid Build Coastguard Worker
13236*8b26181fSAndroid Build Coastguard Workerif test "xxx_only" = yes; then
13237*8b26181fSAndroid Build Coastguard Worker	# User requested something-else-only pcap, so they don't
13238*8b26181fSAndroid Build Coastguard Worker	# want D-Bus support.
13239*8b26181fSAndroid Build Coastguard Worker	enable_dbus=no
13240*8b26181fSAndroid Build Coastguard Workerfi
13241*8b26181fSAndroid Build Coastguard Worker
13242*8b26181fSAndroid Build Coastguard Workerif test "x$enable_dbus" != "xno"; then
13243*8b26181fSAndroid Build Coastguard Worker	if test "x$enable_dbus" = "xyes"; then
13244*8b26181fSAndroid Build Coastguard Worker		case "$host_os" in
13245*8b26181fSAndroid Build Coastguard Worker
13246*8b26181fSAndroid Build Coastguard Worker		darwin*)
13247*8b26181fSAndroid Build Coastguard Worker			#
13248*8b26181fSAndroid Build Coastguard Worker			# We don't support D-Bus sniffing on macOS; see
13249*8b26181fSAndroid Build Coastguard Worker			#
13250*8b26181fSAndroid Build Coastguard Worker			# https://bugs.freedesktop.org/show_bug.cgi?id=74029
13251*8b26181fSAndroid Build Coastguard Worker			#
13252*8b26181fSAndroid Build Coastguard Worker			# The user requested it, so fail.
13253*8b26181fSAndroid Build Coastguard Worker			#
13254*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
13255*8b26181fSAndroid Build Coastguard Worker		esac
13256*8b26181fSAndroid Build Coastguard Worker	else
13257*8b26181fSAndroid Build Coastguard Worker		case "$host_os" in
13258*8b26181fSAndroid Build Coastguard Worker
13259*8b26181fSAndroid Build Coastguard Worker		darwin*)
13260*8b26181fSAndroid Build Coastguard Worker			#
13261*8b26181fSAndroid Build Coastguard Worker			# We don't support D-Bus sniffing on macOS; see
13262*8b26181fSAndroid Build Coastguard Worker			#
13263*8b26181fSAndroid Build Coastguard Worker			# https://bugs.freedesktop.org/show_bug.cgi?id=74029
13264*8b26181fSAndroid Build Coastguard Worker			#
13265*8b26181fSAndroid Build Coastguard Worker			# The user dind't explicitly request it, so just
13266*8b26181fSAndroid Build Coastguard Worker			# silently refuse to enable it.
13267*8b26181fSAndroid Build Coastguard Worker			#
13268*8b26181fSAndroid Build Coastguard Worker			enable_dbus="no"
13269*8b26181fSAndroid Build Coastguard Worker			;;
13270*8b26181fSAndroid Build Coastguard Worker		esac
13271*8b26181fSAndroid Build Coastguard Worker	fi
13272*8b26181fSAndroid Build Coastguard Workerfi
13273*8b26181fSAndroid Build Coastguard Worker
13274*8b26181fSAndroid Build Coastguard Workerif test "x$enable_dbus" != "xno"; then
13275*8b26181fSAndroid Build Coastguard Worker
13276*8b26181fSAndroid Build Coastguard Worker
13277*8b26181fSAndroid Build Coastguard Workerpkg_failed=no
13278*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dbus-1 with pkg-config" >&5
13279*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for dbus-1 with pkg-config... " >&6; }
13280*8b26181fSAndroid Build Coastguard Worker
13281*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13282*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13283*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13284*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13285*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13286*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13287*8b26181fSAndroid Build Coastguard Worker
13288*8b26181fSAndroid Build Coastguard Worker	#
13289*8b26181fSAndroid Build Coastguard Worker	# The package was found, so try to get its C flags and
13290*8b26181fSAndroid Build Coastguard Worker	# libraries.
13291*8b26181fSAndroid Build Coastguard Worker	#
13292*8b26181fSAndroid Build Coastguard Worker	if test -n "$DBUS_CFLAGS"; then
13293*8b26181fSAndroid Build Coastguard Worker    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
13294*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
13295*8b26181fSAndroid Build Coastguard Worker
13296*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13297*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13298*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13299*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13300*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13301*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13302*8b26181fSAndroid Build Coastguard Worker  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
13303*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
13304*8b26181fSAndroid Build Coastguard Workerelse
13305*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
13306*8b26181fSAndroid Build Coastguard Workerfi
13307*8b26181fSAndroid Build Coastguard Worker else
13308*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
13309*8b26181fSAndroid Build Coastguard Workerfi
13310*8b26181fSAndroid Build Coastguard Worker	if test -n "$DBUS_LIBS"; then
13311*8b26181fSAndroid Build Coastguard Worker    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
13312*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
13313*8b26181fSAndroid Build Coastguard Worker
13314*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13315*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13316*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13317*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13318*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13319*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13320*8b26181fSAndroid Build Coastguard Worker  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
13321*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
13322*8b26181fSAndroid Build Coastguard Workerelse
13323*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
13324*8b26181fSAndroid Build Coastguard Workerfi
13325*8b26181fSAndroid Build Coastguard Worker else
13326*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
13327*8b26181fSAndroid Build Coastguard Workerfi
13328*8b26181fSAndroid Build Coastguard Worker	if test -n "$DBUS_LIBS_STATIC"; then
13329*8b26181fSAndroid Build Coastguard Worker    pkg_cv_DBUS_LIBS_STATIC="$DBUS_LIBS_STATIC"
13330*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
13331*8b26181fSAndroid Build Coastguard Worker
13332*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13333*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
13334*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
13335*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13336*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13337*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13338*8b26181fSAndroid Build Coastguard Worker  pkg_cv_DBUS_LIBS_STATIC=`$PKG_CONFIG --libs --static "dbus-1" 2>/dev/null`
13339*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
13340*8b26181fSAndroid Build Coastguard Workerelse
13341*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
13342*8b26181fSAndroid Build Coastguard Workerfi
13343*8b26181fSAndroid Build Coastguard Worker else
13344*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
13345*8b26181fSAndroid Build Coastguard Workerfi
13346*8b26181fSAndroid Build Coastguard Worker
13347*8b26181fSAndroid Build Coastguard Worker
13348*8b26181fSAndroid Build Coastguard Worker
13349*8b26181fSAndroid Build Coastguard Worker	if test $pkg_failed = yes; then
13350*8b26181fSAndroid Build Coastguard Worker		#
13351*8b26181fSAndroid Build Coastguard Worker		# That failed - report an error.
13352*8b26181fSAndroid Build Coastguard Worker		#
13353*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
13354*8b26181fSAndroid Build Coastguard Worker$as_echo "error" >&6; }
13355*8b26181fSAndroid Build Coastguard Worker
13356*8b26181fSAndroid Build Coastguard Workerif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13357*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=yes
13358*8b26181fSAndroid Build Coastguard Workerelse
13359*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=no
13360*8b26181fSAndroid Build Coastguard Workerfi
13361*8b26181fSAndroid Build Coastguard Worker	        if test $_pkg_short_errors_supported = yes; then
13362*8b26181fSAndroid Build Coastguard Worker		        DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "dbus-1" 2>&1`
13363*8b26181fSAndroid Build Coastguard Worker	        else
13364*8b26181fSAndroid Build Coastguard Worker		        DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "dbus-1" 2>&1`
13365*8b26181fSAndroid Build Coastguard Worker	        fi
13366*8b26181fSAndroid Build Coastguard Worker		# Put the nasty error message in config.log where it belongs
13367*8b26181fSAndroid Build Coastguard Worker		echo "$DBUS_PKG_ERRORS" >&5
13368*8b26181fSAndroid Build Coastguard Worker
13369*8b26181fSAndroid Build Coastguard Worker
13370*8b26181fSAndroid Build Coastguard Worker		if test "x$enable_dbus" = "xyes"; then
13371*8b26181fSAndroid Build Coastguard Worker			as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
13372*8b26181fSAndroid Build Coastguard Worker		fi
13373*8b26181fSAndroid Build Coastguard Worker
13374*8b26181fSAndroid Build Coastguard Worker	elif test $pkg_failed = untried; then
13375*8b26181fSAndroid Build Coastguard Worker		#
13376*8b26181fSAndroid Build Coastguard Worker		# We don't have pkg-config, so it didn't work.
13377*8b26181fSAndroid Build Coastguard Worker		#
13378*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
13379*8b26181fSAndroid Build Coastguard Worker$as_echo "not found (pkg-config not found)" >&6; }
13380*8b26181fSAndroid Build Coastguard Worker	else
13381*8b26181fSAndroid Build Coastguard Worker		#
13382*8b26181fSAndroid Build Coastguard Worker		# We found the package.
13383*8b26181fSAndroid Build Coastguard Worker		#
13384*8b26181fSAndroid Build Coastguard Worker		DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
13385*8b26181fSAndroid Build Coastguard Worker		DBUS_LIBS=$pkg_cv_DBUS_LIBS
13386*8b26181fSAndroid Build Coastguard Worker		DBUS_LIBS_STATIC=$pkg_cv_DBUS_LIBS_STATIC
13387*8b26181fSAndroid Build Coastguard Worker	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
13388*8b26181fSAndroid Build Coastguard Worker$as_echo "found" >&6; }
13389*8b26181fSAndroid Build Coastguard Worker
13390*8b26181fSAndroid Build Coastguard Worker
13391*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
13392*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
13393*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
13394*8b26181fSAndroid Build Coastguard Worker
13395*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$CFLAGS $DBUS_CFLAGS"
13396*8b26181fSAndroid Build Coastguard Worker		LIBS="$LIBS $DBUS_LIBS"
13397*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
13398*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
13399*8b26181fSAndroid Build Coastguard Worker		cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
13401*8b26181fSAndroid Build Coastguard Worker#include <string.h>
13402*8b26181fSAndroid Build Coastguard Worker
13403*8b26181fSAndroid Build Coastguard Worker		     #include <time.h>
13404*8b26181fSAndroid Build Coastguard Worker		     #include <sys/time.h>
13405*8b26181fSAndroid Build Coastguard Worker
13406*8b26181fSAndroid Build Coastguard Worker		     #include <dbus/dbus.h>
13407*8b26181fSAndroid Build Coastguard Workerint
13408*8b26181fSAndroid Build Coastguard Workermain ()
13409*8b26181fSAndroid Build Coastguard Worker{
13410*8b26181fSAndroid Build Coastguard Workerreturn dbus_connection_read_write(NULL, 0);
13411*8b26181fSAndroid Build Coastguard Worker  ;
13412*8b26181fSAndroid Build Coastguard Worker  return 0;
13413*8b26181fSAndroid Build Coastguard Worker}
13414*8b26181fSAndroid Build Coastguard Worker_ACEOF
13415*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
13416*8b26181fSAndroid Build Coastguard Worker
13417*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13418*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
13419*8b26181fSAndroid Build Coastguard Worker
13420*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
13421*8b26181fSAndroid Build Coastguard Worker
13422*8b26181fSAndroid Build Coastguard Worker			MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c"
13423*8b26181fSAndroid Build Coastguard Worker			V_INCLS="$V_INCLS $DBUS_CFLAGS"
13424*8b26181fSAndroid Build Coastguard Worker			ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DBUS_LIBS"
13425*8b26181fSAndroid Build Coastguard Worker			ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DBUS_LIBS_STATIC"
13426*8b26181fSAndroid Build Coastguard Worker			REQUIRES_PRIVATE="$REQUIRES_PRIVATE dbus-1"
13427*8b26181fSAndroid Build Coastguard Worker
13428*8b26181fSAndroid Build Coastguard Workerelse
13429*8b26181fSAndroid Build Coastguard Worker
13430*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13431*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
13432*8b26181fSAndroid Build Coastguard Worker			if test "x$enable_dbus" = "xyes"; then
13433*8b26181fSAndroid Build Coastguard Worker			    as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
13434*8b26181fSAndroid Build Coastguard Worker			fi
13435*8b26181fSAndroid Build Coastguard Worker
13436*8b26181fSAndroid Build Coastguard Workerfi
13437*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
13438*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
13439*8b26181fSAndroid Build Coastguard Worker
13440*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
13441*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
13442*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
13443*8b26181fSAndroid Build Coastguard Worker
13444*8b26181fSAndroid Build Coastguard Worker
13445*8b26181fSAndroid Build Coastguard Worker	fi
13446*8b26181fSAndroid Build Coastguard Workerelse
13447*8b26181fSAndroid Build Coastguard Worker
13448*8b26181fSAndroid Build Coastguard Worker	#
13449*8b26181fSAndroid Build Coastguard Worker	# The package isn't present.
13450*8b26181fSAndroid Build Coastguard Worker	#
13451*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13452*8b26181fSAndroid Build Coastguard Worker$as_echo "not found" >&6; }
13453*8b26181fSAndroid Build Coastguard Worker
13454*8b26181fSAndroid Build Coastguard Workerfi
13455*8b26181fSAndroid Build Coastguard Worker
13456*8b26181fSAndroid Build Coastguard Worker
13457*8b26181fSAndroid Build Coastguard Workerfi
13458*8b26181fSAndroid Build Coastguard Worker
13459*8b26181fSAndroid Build Coastguard Worker# Check whether --enable-rdma was given.
13460*8b26181fSAndroid Build Coastguard Workerif test "${enable_rdma+set}" = set; then :
13461*8b26181fSAndroid Build Coastguard Worker  enableval=$enable_rdma;
13462*8b26181fSAndroid Build Coastguard Workerelse
13463*8b26181fSAndroid Build Coastguard Worker  enable_rdma=ifavailable
13464*8b26181fSAndroid Build Coastguard Workerfi
13465*8b26181fSAndroid Build Coastguard Worker
13466*8b26181fSAndroid Build Coastguard Worker
13467*8b26181fSAndroid Build Coastguard Workerif test "xxx_only" = yes; then
13468*8b26181fSAndroid Build Coastguard Worker	# User requested something-else-only pcap, so they don't
13469*8b26181fSAndroid Build Coastguard Worker	# want RDMA support.
13470*8b26181fSAndroid Build Coastguard Worker	enable_rdma=no
13471*8b26181fSAndroid Build Coastguard Workerfi
13472*8b26181fSAndroid Build Coastguard Worker
13473*8b26181fSAndroid Build Coastguard Workerif test "x$enable_rdma" != "xno"; then
13474*8b26181fSAndroid Build Coastguard Worker
13475*8b26181fSAndroid Build Coastguard Worker
13476*8b26181fSAndroid Build Coastguard Workerpkg_failed=no
13477*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libibverbs with pkg-config" >&5
13478*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for libibverbs with pkg-config... " >&6; }
13479*8b26181fSAndroid Build Coastguard Worker
13480*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13481*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13482*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13483*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13484*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13485*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13486*8b26181fSAndroid Build Coastguard Worker
13487*8b26181fSAndroid Build Coastguard Worker	#
13488*8b26181fSAndroid Build Coastguard Worker	# The package was found, so try to get its C flags and
13489*8b26181fSAndroid Build Coastguard Worker	# libraries.
13490*8b26181fSAndroid Build Coastguard Worker	#
13491*8b26181fSAndroid Build Coastguard Worker	if test -n "$LIBIBVERBS_CFLAGS"; then
13492*8b26181fSAndroid Build Coastguard Worker    pkg_cv_LIBIBVERBS_CFLAGS="$LIBIBVERBS_CFLAGS"
13493*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
13494*8b26181fSAndroid Build Coastguard Worker
13495*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13496*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13497*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13498*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13499*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13500*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13501*8b26181fSAndroid Build Coastguard Worker  pkg_cv_LIBIBVERBS_CFLAGS=`$PKG_CONFIG --cflags "libibverbs" 2>/dev/null`
13502*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
13503*8b26181fSAndroid Build Coastguard Workerelse
13504*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
13505*8b26181fSAndroid Build Coastguard Workerfi
13506*8b26181fSAndroid Build Coastguard Worker else
13507*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
13508*8b26181fSAndroid Build Coastguard Workerfi
13509*8b26181fSAndroid Build Coastguard Worker	if test -n "$LIBIBVERBS_LIBS"; then
13510*8b26181fSAndroid Build Coastguard Worker    pkg_cv_LIBIBVERBS_LIBS="$LIBIBVERBS_LIBS"
13511*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
13512*8b26181fSAndroid Build Coastguard Worker
13513*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13514*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13515*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13516*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13517*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13518*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13519*8b26181fSAndroid Build Coastguard Worker  pkg_cv_LIBIBVERBS_LIBS=`$PKG_CONFIG --libs "libibverbs" 2>/dev/null`
13520*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
13521*8b26181fSAndroid Build Coastguard Workerelse
13522*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
13523*8b26181fSAndroid Build Coastguard Workerfi
13524*8b26181fSAndroid Build Coastguard Worker else
13525*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
13526*8b26181fSAndroid Build Coastguard Workerfi
13527*8b26181fSAndroid Build Coastguard Worker	if test -n "$LIBIBVERBS_LIBS_STATIC"; then
13528*8b26181fSAndroid Build Coastguard Worker    pkg_cv_LIBIBVERBS_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC"
13529*8b26181fSAndroid Build Coastguard Worker elif test -n "$PKG_CONFIG"; then
13530*8b26181fSAndroid Build Coastguard Worker
13531*8b26181fSAndroid Build Coastguard Workerif test -n "$PKG_CONFIG" && \
13532*8b26181fSAndroid Build Coastguard Worker    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5
13533*8b26181fSAndroid Build Coastguard Worker  ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5
13534*8b26181fSAndroid Build Coastguard Worker  ac_status=$?
13535*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
13536*8b26181fSAndroid Build Coastguard Worker  test $ac_status = 0; }; then
13537*8b26181fSAndroid Build Coastguard Worker  pkg_cv_LIBIBVERBS_LIBS_STATIC=`$PKG_CONFIG --libs --static "libibverbs" 2>/dev/null`
13538*8b26181fSAndroid Build Coastguard Worker		      test "x$?" != "x0" && pkg_failed=yes
13539*8b26181fSAndroid Build Coastguard Workerelse
13540*8b26181fSAndroid Build Coastguard Worker  pkg_failed=yes
13541*8b26181fSAndroid Build Coastguard Workerfi
13542*8b26181fSAndroid Build Coastguard Worker else
13543*8b26181fSAndroid Build Coastguard Worker    pkg_failed=untried
13544*8b26181fSAndroid Build Coastguard Workerfi
13545*8b26181fSAndroid Build Coastguard Worker
13546*8b26181fSAndroid Build Coastguard Worker
13547*8b26181fSAndroid Build Coastguard Worker
13548*8b26181fSAndroid Build Coastguard Worker	if test $pkg_failed = yes; then
13549*8b26181fSAndroid Build Coastguard Worker		#
13550*8b26181fSAndroid Build Coastguard Worker		# That failed - report an error.
13551*8b26181fSAndroid Build Coastguard Worker		#
13552*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
13553*8b26181fSAndroid Build Coastguard Worker$as_echo "error" >&6; }
13554*8b26181fSAndroid Build Coastguard Worker
13555*8b26181fSAndroid Build Coastguard Workerif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13556*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=yes
13557*8b26181fSAndroid Build Coastguard Workerelse
13558*8b26181fSAndroid Build Coastguard Worker        _pkg_short_errors_supported=no
13559*8b26181fSAndroid Build Coastguard Workerfi
13560*8b26181fSAndroid Build Coastguard Worker	        if test $_pkg_short_errors_supported = yes; then
13561*8b26181fSAndroid Build Coastguard Worker		        LIBIBVERBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libibverbs" 2>&1`
13562*8b26181fSAndroid Build Coastguard Worker	        else
13563*8b26181fSAndroid Build Coastguard Worker		        LIBIBVERBS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libibverbs" 2>&1`
13564*8b26181fSAndroid Build Coastguard Worker	        fi
13565*8b26181fSAndroid Build Coastguard Worker		# Put the nasty error message in config.log where it belongs
13566*8b26181fSAndroid Build Coastguard Worker		echo "$LIBIBVERBS_PKG_ERRORS" >&5
13567*8b26181fSAndroid Build Coastguard Worker
13568*8b26181fSAndroid Build Coastguard Worker		as_fn_error $? "Package requirements (libibverbs) were not met:
13569*8b26181fSAndroid Build Coastguard Worker
13570*8b26181fSAndroid Build Coastguard Worker$LIBIBVERBS_PKG_ERRORS
13571*8b26181fSAndroid Build Coastguard Worker
13572*8b26181fSAndroid Build Coastguard WorkerConsider adjusting the PKG_CONFIG_PATH environment variable if you
13573*8b26181fSAndroid Build Coastguard Workerinstalled software in a non-standard prefix.
13574*8b26181fSAndroid Build Coastguard Worker
13575*8b26181fSAndroid Build Coastguard Worker
13576*8b26181fSAndroid Build Coastguard WorkerAlternatively, you may set the environment variables LIBIBVERBS_CFLAGS
13577*8b26181fSAndroid Build Coastguard Workerand LIBIBVERBS_LIBS to avoid the need to call pkg-config.
13578*8b26181fSAndroid Build Coastguard WorkerSee the pkg-config man page for more details." "$LINENO" 5
13579*8b26181fSAndroid Build Coastguard Worker	elif test $pkg_failed = untried; then
13580*8b26181fSAndroid Build Coastguard Worker		#
13581*8b26181fSAndroid Build Coastguard Worker		# We don't have pkg-config, so it didn't work.
13582*8b26181fSAndroid Build Coastguard Worker		#
13583*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found (pkg-config not found)" >&5
13584*8b26181fSAndroid Build Coastguard Worker$as_echo "not found (pkg-config not found)" >&6; }
13585*8b26181fSAndroid Build Coastguard Worker	else
13586*8b26181fSAndroid Build Coastguard Worker		#
13587*8b26181fSAndroid Build Coastguard Worker		# We found the package.
13588*8b26181fSAndroid Build Coastguard Worker		#
13589*8b26181fSAndroid Build Coastguard Worker		LIBIBVERBS_CFLAGS=$pkg_cv_LIBIBVERBS_CFLAGS
13590*8b26181fSAndroid Build Coastguard Worker		LIBIBVERBS_LIBS=$pkg_cv_LIBIBVERBS_LIBS
13591*8b26181fSAndroid Build Coastguard Worker		LIBIBVERBS_LIBS_STATIC=$pkg_cv_LIBIBVERBS_LIBS_STATIC
13592*8b26181fSAndroid Build Coastguard Worker	        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
13593*8b26181fSAndroid Build Coastguard Worker$as_echo "found" >&6; }
13594*8b26181fSAndroid Build Coastguard Worker
13595*8b26181fSAndroid Build Coastguard Worker		found_libibverbs=yes
13596*8b26181fSAndroid Build Coastguard Worker		LIBIBVERBS_REQUIRES_PRIVATE="libibverbs"
13597*8b26181fSAndroid Build Coastguard Worker
13598*8b26181fSAndroid Build Coastguard Worker	fi
13599*8b26181fSAndroid Build Coastguard Workerelse
13600*8b26181fSAndroid Build Coastguard Worker
13601*8b26181fSAndroid Build Coastguard Worker	#
13602*8b26181fSAndroid Build Coastguard Worker	# The package isn't present.
13603*8b26181fSAndroid Build Coastguard Worker	#
13604*8b26181fSAndroid Build Coastguard Worker	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13605*8b26181fSAndroid Build Coastguard Worker$as_echo "not found" >&6; }
13606*8b26181fSAndroid Build Coastguard Worker
13607*8b26181fSAndroid Build Coastguard Workerfi
13608*8b26181fSAndroid Build Coastguard Worker
13609*8b26181fSAndroid Build Coastguard Worker
13610*8b26181fSAndroid Build Coastguard Worker	if test "x$found_libibverbs" != "xyes"; then
13611*8b26181fSAndroid Build Coastguard Worker		{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
13612*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
13613*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
13614*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
13615*8b26181fSAndroid Build Coastguard Workerelse
13616*8b26181fSAndroid Build Coastguard Worker  ac_check_lib_save_LIBS=$LIBS
13617*8b26181fSAndroid Build Coastguard WorkerLIBS="-libverbs  $LIBS"
13618*8b26181fSAndroid Build Coastguard Workercat confdefs.h - <<_ACEOF >conftest.$ac_ext
13619*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
13620*8b26181fSAndroid Build Coastguard Worker
13621*8b26181fSAndroid Build Coastguard Worker/* Override any GCC internal prototype to avoid an error.
13622*8b26181fSAndroid Build Coastguard Worker   Use char because int might match the return type of a GCC
13623*8b26181fSAndroid Build Coastguard Worker   builtin and then its argument prototype would still apply.  */
13624*8b26181fSAndroid Build Coastguard Worker#ifdef __cplusplus
13625*8b26181fSAndroid Build Coastguard Workerextern "C"
13626*8b26181fSAndroid Build Coastguard Worker#endif
13627*8b26181fSAndroid Build Coastguard Workerchar ibv_get_device_list ();
13628*8b26181fSAndroid Build Coastguard Workerint
13629*8b26181fSAndroid Build Coastguard Workermain ()
13630*8b26181fSAndroid Build Coastguard Worker{
13631*8b26181fSAndroid Build Coastguard Workerreturn ibv_get_device_list ();
13632*8b26181fSAndroid Build Coastguard Worker  ;
13633*8b26181fSAndroid Build Coastguard Worker  return 0;
13634*8b26181fSAndroid Build Coastguard Worker}
13635*8b26181fSAndroid Build Coastguard Worker_ACEOF
13636*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
13637*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_ibverbs_ibv_get_device_list=yes
13638*8b26181fSAndroid Build Coastguard Workerelse
13639*8b26181fSAndroid Build Coastguard Worker  ac_cv_lib_ibverbs_ibv_get_device_list=no
13640*8b26181fSAndroid Build Coastguard Workerfi
13641*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
13642*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
13643*8b26181fSAndroid Build Coastguard WorkerLIBS=$ac_check_lib_save_LIBS
13644*8b26181fSAndroid Build Coastguard Workerfi
13645*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
13646*8b26181fSAndroid Build Coastguard Worker$as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
13647*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
13648*8b26181fSAndroid Build Coastguard Worker
13649*8b26181fSAndroid Build Coastguard Worker			found_libibverbs=yes
13650*8b26181fSAndroid Build Coastguard Worker			LIBIBVERBS_CFLAGS=""
13651*8b26181fSAndroid Build Coastguard Worker			LIBIBVERBS_LIBS="-libverbs"
13652*8b26181fSAndroid Build Coastguard Worker			# XXX - at least on Ubuntu 20.04, there are many more
13653*8b26181fSAndroid Build Coastguard Worker			# libraries needed; is there any platform where
13654*8b26181fSAndroid Build Coastguard Worker			# libibverbs is available but where pkg-config isn't
13655*8b26181fSAndroid Build Coastguard Worker			# available or libibverbs doesn't use it?  If not,
13656*8b26181fSAndroid Build Coastguard Worker			# we should only use pkg-config for it.
13657*8b26181fSAndroid Build Coastguard Worker			LIBIBVERBS_LIBS_STATIC="-libverbs"
13658*8b26181fSAndroid Build Coastguard Worker			LIBIBVERBS_LIBS_PRIVATE="-libverbs"
13659*8b26181fSAndroid Build Coastguard Worker
13660*8b26181fSAndroid Build Coastguard Worker
13661*8b26181fSAndroid Build Coastguard Workerfi
13662*8b26181fSAndroid Build Coastguard Worker
13663*8b26181fSAndroid Build Coastguard Worker	fi
13664*8b26181fSAndroid Build Coastguard Worker
13665*8b26181fSAndroid Build Coastguard Worker	if test "x$found_libibverbs" = "xyes"; then
13666*8b26181fSAndroid Build Coastguard Worker
13667*8b26181fSAndroid Build Coastguard Worker	save_CFLAGS="$CFLAGS"
13668*8b26181fSAndroid Build Coastguard Worker	save_LIBS="$LIBS"
13669*8b26181fSAndroid Build Coastguard Worker	save_LDFLAGS="$LDFLAGS"
13670*8b26181fSAndroid Build Coastguard Worker
13671*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$CFLAGS $LIBIBVERBS_CFLAGS"
13672*8b26181fSAndroid Build Coastguard Worker		LIBS="$LIBS $LIBIBVERBS_LIBS"
13673*8b26181fSAndroid Build Coastguard Worker		ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
13674*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
13675*8b26181fSAndroid Build Coastguard Worker
13676*8b26181fSAndroid Build Coastguard Worker			#
13677*8b26181fSAndroid Build Coastguard Worker			# ibv_create_flow may be defined as a static inline
13678*8b26181fSAndroid Build Coastguard Worker			# function in infiniband/verbs.h, so we can't
13679*8b26181fSAndroid Build Coastguard Worker			# use AC_CHECK_LIB.
13680*8b26181fSAndroid Build Coastguard Worker			#
13681*8b26181fSAndroid Build Coastguard Worker			# Too bad autoconf has no AC_SYMBOL_EXISTS()
13682*8b26181fSAndroid Build Coastguard Worker			# macro that works like CMake's check_symbol_exists()
13683*8b26181fSAndroid Build Coastguard Worker			# function, to check do a compile check like
13684*8b26181fSAndroid Build Coastguard Worker			# this (they do a clever trick to avoid having
13685*8b26181fSAndroid Build Coastguard Worker			# to know the function's signature).
13686*8b26181fSAndroid Build Coastguard Worker			#
13687*8b26181fSAndroid Build Coastguard Worker			{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
13688*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
13689*8b26181fSAndroid Build Coastguard Worker			cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13690*8b26181fSAndroid Build Coastguard Worker/* end confdefs.h.  */
13691*8b26181fSAndroid Build Coastguard Worker
13692*8b26181fSAndroid Build Coastguard Worker					#include <infiniband/verbs.h>
13693*8b26181fSAndroid Build Coastguard Worker
13694*8b26181fSAndroid Build Coastguard Workerint
13695*8b26181fSAndroid Build Coastguard Workermain ()
13696*8b26181fSAndroid Build Coastguard Worker{
13697*8b26181fSAndroid Build Coastguard Worker
13698*8b26181fSAndroid Build Coastguard Worker					(void) ibv_create_flow((struct ibv_qp *) NULL,
13699*8b26181fSAndroid Build Coastguard Worker							       (struct ibv_flow_attr *) NULL);
13700*8b26181fSAndroid Build Coastguard Worker
13701*8b26181fSAndroid Build Coastguard Worker  ;
13702*8b26181fSAndroid Build Coastguard Worker  return 0;
13703*8b26181fSAndroid Build Coastguard Worker}
13704*8b26181fSAndroid Build Coastguard Worker_ACEOF
13705*8b26181fSAndroid Build Coastguard Workerif ac_fn_c_try_link "$LINENO"; then :
13706*8b26181fSAndroid Build Coastguard Worker
13707*8b26181fSAndroid Build Coastguard Worker					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13708*8b26181fSAndroid Build Coastguard Worker$as_echo "yes" >&6; }
13709*8b26181fSAndroid Build Coastguard Worker					found_usable_libibverbs=yes
13710*8b26181fSAndroid Build Coastguard Worker
13711*8b26181fSAndroid Build Coastguard Workerelse
13712*8b26181fSAndroid Build Coastguard Worker
13713*8b26181fSAndroid Build Coastguard Worker					{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13714*8b26181fSAndroid Build Coastguard Worker$as_echo "no" >&6; }
13715*8b26181fSAndroid Build Coastguard Worker
13716*8b26181fSAndroid Build Coastguard Worker
13717*8b26181fSAndroid Build Coastguard Workerfi
13718*8b26181fSAndroid Build Coastguard Workerrm -f core conftest.err conftest.$ac_objext \
13719*8b26181fSAndroid Build Coastguard Worker    conftest$ac_exeext conftest.$ac_ext
13720*8b26181fSAndroid Build Coastguard Worker
13721*8b26181fSAndroid Build Coastguard Workerfi
13722*8b26181fSAndroid Build Coastguard Worker
13723*8b26181fSAndroid Build Coastguard Worker
13724*8b26181fSAndroid Build Coastguard Worker
13725*8b26181fSAndroid Build Coastguard Worker	CFLAGS="$save_CFLAGS"
13726*8b26181fSAndroid Build Coastguard Worker	LIBS="$save_LIBS"
13727*8b26181fSAndroid Build Coastguard Worker	LDFLAGS="$save_LDFLAGS"
13728*8b26181fSAndroid Build Coastguard Worker
13729*8b26181fSAndroid Build Coastguard Worker	fi
13730*8b26181fSAndroid Build Coastguard Worker
13731*8b26181fSAndroid Build Coastguard Worker	if test "x$found_usable_libibverbs" = "xyes"
13732*8b26181fSAndroid Build Coastguard Worker	then
13733*8b26181fSAndroid Build Coastguard Worker
13734*8b26181fSAndroid Build Coastguard Worker$as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
13735*8b26181fSAndroid Build Coastguard Worker
13736*8b26181fSAndroid Build Coastguard Worker		MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c"
13737*8b26181fSAndroid Build Coastguard Worker		CFLAGS="$LIBIBVERBS_CFLAGS $CFLAGS"
13738*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS="$LIBIBVERBS_LIBS $ADDITIONAL_LIBS"
13739*8b26181fSAndroid Build Coastguard Worker		ADDITIONAL_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC $ADDITIONAL_LIBS_STATIC"
13740*8b26181fSAndroid Build Coastguard Worker		LIBS_PRIVATE="$LIBIBVERBS_LIBS_PRIVATE $LIBS_PRIVATE"
13741*8b26181fSAndroid Build Coastguard Worker		REQUIRES_PRIVATE="$REQUIRES_PRIVATE $LIBIBVERBS_REQUIRES_PRIVATE"
13742*8b26181fSAndroid Build Coastguard Worker	fi
13743*8b26181fSAndroid Build Coastguard Worker
13744*8b26181fSAndroid Build Coastguard Workerfi
13745*8b26181fSAndroid Build Coastguard Worker
13746*8b26181fSAndroid Build Coastguard Worker#
13747*8b26181fSAndroid Build Coastguard Worker# If this is a platform where we need to have the .pc file and
13748*8b26181fSAndroid Build Coastguard Worker# pcap-config script supply an rpath option to specify the directory
13749*8b26181fSAndroid Build Coastguard Worker# in which the libpcap shared library is installed, and the install
13750*8b26181fSAndroid Build Coastguard Worker# prefix /usr (meaning we're not installing a system library), provide
13751*8b26181fSAndroid Build Coastguard Worker# the rpath option.
13752*8b26181fSAndroid Build Coastguard Worker#
13753*8b26181fSAndroid Build Coastguard Worker# (We must check $prefix, as $libdir isn't necessarily /usr/lib in this
13754*8b26181fSAndroid Build Coastguard Worker# case - for example, Linux distributions for 64-bit platforms that
13755*8b26181fSAndroid Build Coastguard Worker# also provide support for binaries for a 32-bit version of the
13756*8b26181fSAndroid Build Coastguard Worker# platform may put the 64-bit libraries, the 32-bit libraries, or both
13757*8b26181fSAndroid Build Coastguard Worker# in directories other than /usr/lib.)
13758*8b26181fSAndroid Build Coastguard Worker#
13759*8b26181fSAndroid Build Coastguard Worker# In AIX, do we have to do this?
13760*8b26181fSAndroid Build Coastguard Worker#
13761*8b26181fSAndroid Build Coastguard Worker# In Darwin-based OSes, the full paths of the shared libraries with
13762*8b26181fSAndroid Build Coastguard Worker# which the program was linked are stored in the executable, so we don't
13763*8b26181fSAndroid Build Coastguard Worker# need to provide an rpath option.
13764*8b26181fSAndroid Build Coastguard Worker#
13765*8b26181fSAndroid Build Coastguard Worker# With the HP-UX linker, directories specified with -L are, by default,
13766*8b26181fSAndroid Build Coastguard Worker# added to the run-time search path, so we don't need to supply them.
13767*8b26181fSAndroid Build Coastguard Worker#
13768*8b26181fSAndroid Build Coastguard Worker# For Tru64 UNIX, "-rpath" works with DEC's^WCompaq's^WHP's C compiler
13769*8b26181fSAndroid Build Coastguard Worker# for Alpha, but isn't documented as working with GCC, and no GCC-
13770*8b26181fSAndroid Build Coastguard Worker# compatible option is documented as working with the DEC compiler.
13771*8b26181fSAndroid Build Coastguard Worker# If anybody needs this on Tru64/Alpha, they're welcome to figure out a
13772*8b26181fSAndroid Build Coastguard Worker# way to make it work.
13773*8b26181fSAndroid Build Coastguard Worker#
13774*8b26181fSAndroid Build Coastguard Worker# This must *not* depend on the compiler, as, on platforms where there's
13775*8b26181fSAndroid Build Coastguard Worker# a GCC-compatible compiler and a vendor compiler, we need to work with
13776*8b26181fSAndroid Build Coastguard Worker# both.
13777*8b26181fSAndroid Build Coastguard Worker#
13778*8b26181fSAndroid Build Coastguard Workerif test "$prefix" != "/usr"; then
13779*8b26181fSAndroid Build Coastguard Worker	case "$host_os" in
13780*8b26181fSAndroid Build Coastguard Worker
13781*8b26181fSAndroid Build Coastguard Worker	freebsd*|netbsd*|openbsd*|dragonfly*|linux*|haiku*|midipix*|gnu*)
13782*8b26181fSAndroid Build Coastguard Worker		#
13783*8b26181fSAndroid Build Coastguard Worker		# Platforms where the "native" C compiler is GCC or
13784*8b26181fSAndroid Build Coastguard Worker		# accepts compatible command-line arguments, and the
13785*8b26181fSAndroid Build Coastguard Worker		# "native" linker is the GNU linker or accepts
13786*8b26181fSAndroid Build Coastguard Worker		# compatible command-line arguments.
13787*8b26181fSAndroid Build Coastguard Worker		#
13788*8b26181fSAndroid Build Coastguard Worker		RPATH="-Wl,-rpath,\${libdir}"
13789*8b26181fSAndroid Build Coastguard Worker		;;
13790*8b26181fSAndroid Build Coastguard Worker
13791*8b26181fSAndroid Build Coastguard Worker	solaris*)
13792*8b26181fSAndroid Build Coastguard Worker		#
13793*8b26181fSAndroid Build Coastguard Worker		# Sun/Oracle's linker, the GNU linker, and
13794*8b26181fSAndroid Build Coastguard Worker		# GNU-compatible linkers all support -R.
13795*8b26181fSAndroid Build Coastguard Worker		#
13796*8b26181fSAndroid Build Coastguard Worker		RPATH="-Wl,-R,\${libdir}"
13797*8b26181fSAndroid Build Coastguard Worker		;;
13798*8b26181fSAndroid Build Coastguard Worker	esac
13799*8b26181fSAndroid Build Coastguard Workerfi
13800*8b26181fSAndroid Build Coastguard Worker
13801*8b26181fSAndroid Build Coastguard Worker# Find a good install program.  We prefer a C program (faster),
13802*8b26181fSAndroid Build Coastguard Worker# so one script is as good as another.  But avoid the broken or
13803*8b26181fSAndroid Build Coastguard Worker# incompatible versions:
13804*8b26181fSAndroid Build Coastguard Worker# SysV /etc/install, /usr/sbin/install
13805*8b26181fSAndroid Build Coastguard Worker# SunOS /usr/etc/install
13806*8b26181fSAndroid Build Coastguard Worker# IRIX /sbin/install
13807*8b26181fSAndroid Build Coastguard Worker# AIX /bin/install
13808*8b26181fSAndroid Build Coastguard Worker# AmigaOS /C/install, which installs bootblocks on floppy discs
13809*8b26181fSAndroid Build Coastguard Worker# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
13810*8b26181fSAndroid Build Coastguard Worker# AFS /usr/afsws/bin/install, which mishandles nonexistent args
13811*8b26181fSAndroid Build Coastguard Worker# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
13812*8b26181fSAndroid Build Coastguard Worker# OS/2's system install, which has a completely different semantic
13813*8b26181fSAndroid Build Coastguard Worker# ./install, which can be erroneously created by make from ./install.sh.
13814*8b26181fSAndroid Build Coastguard Worker# Reject install programs that cannot install multiple files.
13815*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
13816*8b26181fSAndroid Build Coastguard Worker$as_echo_n "checking for a BSD-compatible install... " >&6; }
13817*8b26181fSAndroid Build Coastguard Workerif test -z "$INSTALL"; then
13818*8b26181fSAndroid Build Coastguard Workerif ${ac_cv_path_install+:} false; then :
13819*8b26181fSAndroid Build Coastguard Worker  $as_echo_n "(cached) " >&6
13820*8b26181fSAndroid Build Coastguard Workerelse
13821*8b26181fSAndroid Build Coastguard Worker  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13822*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
13823*8b26181fSAndroid Build Coastguard Workerdo
13824*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
13825*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
13826*8b26181fSAndroid Build Coastguard Worker    # Account for people who put trailing slashes in PATH elements.
13827*8b26181fSAndroid Build Coastguard Workercase $as_dir/ in #((
13828*8b26181fSAndroid Build Coastguard Worker  ./ | .// | /[cC]/* | \
13829*8b26181fSAndroid Build Coastguard Worker  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
13830*8b26181fSAndroid Build Coastguard Worker  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
13831*8b26181fSAndroid Build Coastguard Worker  /usr/ucb/* ) ;;
13832*8b26181fSAndroid Build Coastguard Worker  *)
13833*8b26181fSAndroid Build Coastguard Worker    # OSF1 and SCO ODT 3.0 have their own names for install.
13834*8b26181fSAndroid Build Coastguard Worker    # Don't use installbsd from OSF since it installs stuff as root
13835*8b26181fSAndroid Build Coastguard Worker    # by default.
13836*8b26181fSAndroid Build Coastguard Worker    for ac_prog in ginstall scoinst install; do
13837*8b26181fSAndroid Build Coastguard Worker      for ac_exec_ext in '' $ac_executable_extensions; do
13838*8b26181fSAndroid Build Coastguard Worker	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
13839*8b26181fSAndroid Build Coastguard Worker	  if test $ac_prog = install &&
13840*8b26181fSAndroid Build Coastguard Worker	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
13841*8b26181fSAndroid Build Coastguard Worker	    # AIX install.  It has an incompatible calling convention.
13842*8b26181fSAndroid Build Coastguard Worker	    :
13843*8b26181fSAndroid Build Coastguard Worker	  elif test $ac_prog = install &&
13844*8b26181fSAndroid Build Coastguard Worker	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
13845*8b26181fSAndroid Build Coastguard Worker	    # program-specific install script used by HP pwplus--don't use.
13846*8b26181fSAndroid Build Coastguard Worker	    :
13847*8b26181fSAndroid Build Coastguard Worker	  else
13848*8b26181fSAndroid Build Coastguard Worker	    rm -rf conftest.one conftest.two conftest.dir
13849*8b26181fSAndroid Build Coastguard Worker	    echo one > conftest.one
13850*8b26181fSAndroid Build Coastguard Worker	    echo two > conftest.two
13851*8b26181fSAndroid Build Coastguard Worker	    mkdir conftest.dir
13852*8b26181fSAndroid Build Coastguard Worker	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
13853*8b26181fSAndroid Build Coastguard Worker	      test -s conftest.one && test -s conftest.two &&
13854*8b26181fSAndroid Build Coastguard Worker	      test -s conftest.dir/conftest.one &&
13855*8b26181fSAndroid Build Coastguard Worker	      test -s conftest.dir/conftest.two
13856*8b26181fSAndroid Build Coastguard Worker	    then
13857*8b26181fSAndroid Build Coastguard Worker	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
13858*8b26181fSAndroid Build Coastguard Worker	      break 3
13859*8b26181fSAndroid Build Coastguard Worker	    fi
13860*8b26181fSAndroid Build Coastguard Worker	  fi
13861*8b26181fSAndroid Build Coastguard Worker	fi
13862*8b26181fSAndroid Build Coastguard Worker      done
13863*8b26181fSAndroid Build Coastguard Worker    done
13864*8b26181fSAndroid Build Coastguard Worker    ;;
13865*8b26181fSAndroid Build Coastguard Workeresac
13866*8b26181fSAndroid Build Coastguard Worker
13867*8b26181fSAndroid Build Coastguard Worker  done
13868*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
13869*8b26181fSAndroid Build Coastguard Worker
13870*8b26181fSAndroid Build Coastguard Workerrm -rf conftest.one conftest.two conftest.dir
13871*8b26181fSAndroid Build Coastguard Worker
13872*8b26181fSAndroid Build Coastguard Workerfi
13873*8b26181fSAndroid Build Coastguard Worker  if test "${ac_cv_path_install+set}" = set; then
13874*8b26181fSAndroid Build Coastguard Worker    INSTALL=$ac_cv_path_install
13875*8b26181fSAndroid Build Coastguard Worker  else
13876*8b26181fSAndroid Build Coastguard Worker    # As a last resort, use the slow shell script.  Don't cache a
13877*8b26181fSAndroid Build Coastguard Worker    # value for INSTALL within a source directory, because that will
13878*8b26181fSAndroid Build Coastguard Worker    # break other packages using the cache if that directory is
13879*8b26181fSAndroid Build Coastguard Worker    # removed, or if the value is a relative name.
13880*8b26181fSAndroid Build Coastguard Worker    INSTALL=$ac_install_sh
13881*8b26181fSAndroid Build Coastguard Worker  fi
13882*8b26181fSAndroid Build Coastguard Workerfi
13883*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
13884*8b26181fSAndroid Build Coastguard Worker$as_echo "$INSTALL" >&6; }
13885*8b26181fSAndroid Build Coastguard Worker
13886*8b26181fSAndroid Build Coastguard Worker# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
13887*8b26181fSAndroid Build Coastguard Worker# It thinks the first close brace ends the variable substitution.
13888*8b26181fSAndroid Build Coastguard Workertest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
13889*8b26181fSAndroid Build Coastguard Worker
13890*8b26181fSAndroid Build Coastguard Workertest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
13891*8b26181fSAndroid Build Coastguard Worker
13892*8b26181fSAndroid Build Coastguard Workertest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
13893*8b26181fSAndroid Build Coastguard Worker
13894*8b26181fSAndroid Build Coastguard Worker
13895*8b26181fSAndroid Build Coastguard Workerac_config_headers="$ac_config_headers config.h"
13896*8b26181fSAndroid Build Coastguard Worker
13897*8b26181fSAndroid Build Coastguard Worker
13898*8b26181fSAndroid Build Coastguard Worker
13899*8b26181fSAndroid Build Coastguard Worker
13900*8b26181fSAndroid Build Coastguard Worker
13901*8b26181fSAndroid Build Coastguard Worker
13902*8b26181fSAndroid Build Coastguard Worker
13903*8b26181fSAndroid Build Coastguard Worker
13904*8b26181fSAndroid Build Coastguard Worker
13905*8b26181fSAndroid Build Coastguard Worker
13906*8b26181fSAndroid Build Coastguard Worker
13907*8b26181fSAndroid Build Coastguard Worker
13908*8b26181fSAndroid Build Coastguard Worker
13909*8b26181fSAndroid Build Coastguard Worker
13910*8b26181fSAndroid Build Coastguard Worker
13911*8b26181fSAndroid Build Coastguard Worker
13912*8b26181fSAndroid Build Coastguard Worker
13913*8b26181fSAndroid Build Coastguard Worker
13914*8b26181fSAndroid Build Coastguard Worker#
13915*8b26181fSAndroid Build Coastguard Worker# We're done with configuration operations; add ADDITIONAL_LIBS and
13916*8b26181fSAndroid Build Coastguard Worker# ADDITIONAL_LIBS_STATIC to LIBS and LIBS_STATIC, respectively.
13917*8b26181fSAndroid Build Coastguard Worker#
13918*8b26181fSAndroid Build Coastguard WorkerLIBS="$ADDITIONAL_LIBS $LIBS"
13919*8b26181fSAndroid Build Coastguard WorkerLIBS_STATIC="$ADDITIONAL_LIBS_STATIC $LIBS_STATIC"
13920*8b26181fSAndroid Build Coastguard Worker
13921*8b26181fSAndroid Build Coastguard Workerac_config_commands="$ac_config_commands default-1"
13922*8b26181fSAndroid Build Coastguard Worker
13923*8b26181fSAndroid Build Coastguard Workerac_config_files="$ac_config_files Makefile grammar.y pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_immediate_mode.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin rpcapd/rpcapd-config.manfile testprogs/Makefile"
13924*8b26181fSAndroid Build Coastguard Worker
13925*8b26181fSAndroid Build Coastguard Workercat >confcache <<\_ACEOF
13926*8b26181fSAndroid Build Coastguard Worker# This file is a shell script that caches the results of configure
13927*8b26181fSAndroid Build Coastguard Worker# tests run on this system so they can be shared between configure
13928*8b26181fSAndroid Build Coastguard Worker# scripts and configure runs, see configure's option --config-cache.
13929*8b26181fSAndroid Build Coastguard Worker# It is not useful on other systems.  If it contains results you don't
13930*8b26181fSAndroid Build Coastguard Worker# want to keep, you may remove or edit it.
13931*8b26181fSAndroid Build Coastguard Worker#
13932*8b26181fSAndroid Build Coastguard Worker# config.status only pays attention to the cache file if you give it
13933*8b26181fSAndroid Build Coastguard Worker# the --recheck option to rerun configure.
13934*8b26181fSAndroid Build Coastguard Worker#
13935*8b26181fSAndroid Build Coastguard Worker# `ac_cv_env_foo' variables (set or unset) will be overridden when
13936*8b26181fSAndroid Build Coastguard Worker# loading this file, other *unset* `ac_cv_foo' will be assigned the
13937*8b26181fSAndroid Build Coastguard Worker# following values.
13938*8b26181fSAndroid Build Coastguard Worker
13939*8b26181fSAndroid Build Coastguard Worker_ACEOF
13940*8b26181fSAndroid Build Coastguard Worker
13941*8b26181fSAndroid Build Coastguard Worker# The following way of writing the cache mishandles newlines in values,
13942*8b26181fSAndroid Build Coastguard Worker# but we know of no workaround that is simple, portable, and efficient.
13943*8b26181fSAndroid Build Coastguard Worker# So, we kill variables containing newlines.
13944*8b26181fSAndroid Build Coastguard Worker# Ultrix sh set writes to stderr and can't be redirected directly,
13945*8b26181fSAndroid Build Coastguard Worker# and sets the high bit in the cache file unless we assign to the vars.
13946*8b26181fSAndroid Build Coastguard Worker(
13947*8b26181fSAndroid Build Coastguard Worker  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
13948*8b26181fSAndroid Build Coastguard Worker    eval ac_val=\$$ac_var
13949*8b26181fSAndroid Build Coastguard Worker    case $ac_val in #(
13950*8b26181fSAndroid Build Coastguard Worker    *${as_nl}*)
13951*8b26181fSAndroid Build Coastguard Worker      case $ac_var in #(
13952*8b26181fSAndroid Build Coastguard Worker      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
13953*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
13954*8b26181fSAndroid Build Coastguard Worker      esac
13955*8b26181fSAndroid Build Coastguard Worker      case $ac_var in #(
13956*8b26181fSAndroid Build Coastguard Worker      _ | IFS | as_nl) ;; #(
13957*8b26181fSAndroid Build Coastguard Worker      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
13958*8b26181fSAndroid Build Coastguard Worker      *) { eval $ac_var=; unset $ac_var;} ;;
13959*8b26181fSAndroid Build Coastguard Worker      esac ;;
13960*8b26181fSAndroid Build Coastguard Worker    esac
13961*8b26181fSAndroid Build Coastguard Worker  done
13962*8b26181fSAndroid Build Coastguard Worker
13963*8b26181fSAndroid Build Coastguard Worker  (set) 2>&1 |
13964*8b26181fSAndroid Build Coastguard Worker    case $as_nl`(ac_space=' '; set) 2>&1` in #(
13965*8b26181fSAndroid Build Coastguard Worker    *${as_nl}ac_space=\ *)
13966*8b26181fSAndroid Build Coastguard Worker      # `set' does not quote correctly, so add quotes: double-quote
13967*8b26181fSAndroid Build Coastguard Worker      # substitution turns \\\\ into \\, and sed turns \\ into \.
13968*8b26181fSAndroid Build Coastguard Worker      sed -n \
13969*8b26181fSAndroid Build Coastguard Worker	"s/'/'\\\\''/g;
13970*8b26181fSAndroid Build Coastguard Worker	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
13971*8b26181fSAndroid Build Coastguard Worker      ;; #(
13972*8b26181fSAndroid Build Coastguard Worker    *)
13973*8b26181fSAndroid Build Coastguard Worker      # `set' quotes correctly as required by POSIX, so do not add quotes.
13974*8b26181fSAndroid Build Coastguard Worker      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
13975*8b26181fSAndroid Build Coastguard Worker      ;;
13976*8b26181fSAndroid Build Coastguard Worker    esac |
13977*8b26181fSAndroid Build Coastguard Worker    sort
13978*8b26181fSAndroid Build Coastguard Worker) |
13979*8b26181fSAndroid Build Coastguard Worker  sed '
13980*8b26181fSAndroid Build Coastguard Worker     /^ac_cv_env_/b end
13981*8b26181fSAndroid Build Coastguard Worker     t clear
13982*8b26181fSAndroid Build Coastguard Worker     :clear
13983*8b26181fSAndroid Build Coastguard Worker     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
13984*8b26181fSAndroid Build Coastguard Worker     t end
13985*8b26181fSAndroid Build Coastguard Worker     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
13986*8b26181fSAndroid Build Coastguard Worker     :end' >>confcache
13987*8b26181fSAndroid Build Coastguard Workerif diff "$cache_file" confcache >/dev/null 2>&1; then :; else
13988*8b26181fSAndroid Build Coastguard Worker  if test -w "$cache_file"; then
13989*8b26181fSAndroid Build Coastguard Worker    if test "x$cache_file" != "x/dev/null"; then
13990*8b26181fSAndroid Build Coastguard Worker      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
13991*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: updating cache $cache_file" >&6;}
13992*8b26181fSAndroid Build Coastguard Worker      if test ! -f "$cache_file" || test -h "$cache_file"; then
13993*8b26181fSAndroid Build Coastguard Worker	cat confcache >"$cache_file"
13994*8b26181fSAndroid Build Coastguard Worker      else
13995*8b26181fSAndroid Build Coastguard Worker        case $cache_file in #(
13996*8b26181fSAndroid Build Coastguard Worker        */* | ?:*)
13997*8b26181fSAndroid Build Coastguard Worker	  mv -f confcache "$cache_file"$$ &&
13998*8b26181fSAndroid Build Coastguard Worker	  mv -f "$cache_file"$$ "$cache_file" ;; #(
13999*8b26181fSAndroid Build Coastguard Worker        *)
14000*8b26181fSAndroid Build Coastguard Worker	  mv -f confcache "$cache_file" ;;
14001*8b26181fSAndroid Build Coastguard Worker	esac
14002*8b26181fSAndroid Build Coastguard Worker      fi
14003*8b26181fSAndroid Build Coastguard Worker    fi
14004*8b26181fSAndroid Build Coastguard Worker  else
14005*8b26181fSAndroid Build Coastguard Worker    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
14006*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
14007*8b26181fSAndroid Build Coastguard Worker  fi
14008*8b26181fSAndroid Build Coastguard Workerfi
14009*8b26181fSAndroid Build Coastguard Workerrm -f confcache
14010*8b26181fSAndroid Build Coastguard Worker
14011*8b26181fSAndroid Build Coastguard Workertest "x$prefix" = xNONE && prefix=$ac_default_prefix
14012*8b26181fSAndroid Build Coastguard Worker# Let make expand exec_prefix.
14013*8b26181fSAndroid Build Coastguard Workertest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
14014*8b26181fSAndroid Build Coastguard Worker
14015*8b26181fSAndroid Build Coastguard WorkerDEFS=-DHAVE_CONFIG_H
14016*8b26181fSAndroid Build Coastguard Worker
14017*8b26181fSAndroid Build Coastguard Workerac_libobjs=
14018*8b26181fSAndroid Build Coastguard Workerac_ltlibobjs=
14019*8b26181fSAndroid Build Coastguard WorkerU=
14020*8b26181fSAndroid Build Coastguard Workerfor ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
14021*8b26181fSAndroid Build Coastguard Worker  # 1. Remove the extension, and $U if already installed.
14022*8b26181fSAndroid Build Coastguard Worker  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
14023*8b26181fSAndroid Build Coastguard Worker  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
14024*8b26181fSAndroid Build Coastguard Worker  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
14025*8b26181fSAndroid Build Coastguard Worker  #    will be set to the directory where LIBOBJS objects are built.
14026*8b26181fSAndroid Build Coastguard Worker  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
14027*8b26181fSAndroid Build Coastguard Worker  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
14028*8b26181fSAndroid Build Coastguard Workerdone
14029*8b26181fSAndroid Build Coastguard WorkerLIBOBJS=$ac_libobjs
14030*8b26181fSAndroid Build Coastguard Worker
14031*8b26181fSAndroid Build Coastguard WorkerLTLIBOBJS=$ac_ltlibobjs
14032*8b26181fSAndroid Build Coastguard Worker
14033*8b26181fSAndroid Build Coastguard Worker
14034*8b26181fSAndroid Build Coastguard Worker
14035*8b26181fSAndroid Build Coastguard Worker: "${CONFIG_STATUS=./config.status}"
14036*8b26181fSAndroid Build Coastguard Workerac_write_fail=0
14037*8b26181fSAndroid Build Coastguard Workerac_clean_files_save=$ac_clean_files
14038*8b26181fSAndroid Build Coastguard Workerac_clean_files="$ac_clean_files $CONFIG_STATUS"
14039*8b26181fSAndroid Build Coastguard Worker{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
14040*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
14041*8b26181fSAndroid Build Coastguard Workeras_write_fail=0
14042*8b26181fSAndroid Build Coastguard Workercat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
14043*8b26181fSAndroid Build Coastguard Worker#! $SHELL
14044*8b26181fSAndroid Build Coastguard Worker# Generated by $as_me.
14045*8b26181fSAndroid Build Coastguard Worker# Run this file to recreate the current configuration.
14046*8b26181fSAndroid Build Coastguard Worker# Compiler output produced by configure, useful for debugging
14047*8b26181fSAndroid Build Coastguard Worker# configure, is in config.log if it exists.
14048*8b26181fSAndroid Build Coastguard Worker
14049*8b26181fSAndroid Build Coastguard Workerdebug=false
14050*8b26181fSAndroid Build Coastguard Workerac_cs_recheck=false
14051*8b26181fSAndroid Build Coastguard Workerac_cs_silent=false
14052*8b26181fSAndroid Build Coastguard Worker
14053*8b26181fSAndroid Build Coastguard WorkerSHELL=\${CONFIG_SHELL-$SHELL}
14054*8b26181fSAndroid Build Coastguard Workerexport SHELL
14055*8b26181fSAndroid Build Coastguard Worker_ASEOF
14056*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
14057*8b26181fSAndroid Build Coastguard Worker## -------------------- ##
14058*8b26181fSAndroid Build Coastguard Worker## M4sh Initialization. ##
14059*8b26181fSAndroid Build Coastguard Worker## -------------------- ##
14060*8b26181fSAndroid Build Coastguard Worker
14061*8b26181fSAndroid Build Coastguard Worker# Be more Bourne compatible
14062*8b26181fSAndroid Build Coastguard WorkerDUALCASE=1; export DUALCASE # for MKS sh
14063*8b26181fSAndroid Build Coastguard Workerif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
14064*8b26181fSAndroid Build Coastguard Worker  emulate sh
14065*8b26181fSAndroid Build Coastguard Worker  NULLCMD=:
14066*8b26181fSAndroid Build Coastguard Worker  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
14067*8b26181fSAndroid Build Coastguard Worker  # is contrary to our usage.  Disable this feature.
14068*8b26181fSAndroid Build Coastguard Worker  alias -g '${1+"$@"}'='"$@"'
14069*8b26181fSAndroid Build Coastguard Worker  setopt NO_GLOB_SUBST
14070*8b26181fSAndroid Build Coastguard Workerelse
14071*8b26181fSAndroid Build Coastguard Worker  case `(set -o) 2>/dev/null` in #(
14072*8b26181fSAndroid Build Coastguard Worker  *posix*) :
14073*8b26181fSAndroid Build Coastguard Worker    set -o posix ;; #(
14074*8b26181fSAndroid Build Coastguard Worker  *) :
14075*8b26181fSAndroid Build Coastguard Worker     ;;
14076*8b26181fSAndroid Build Coastguard Workeresac
14077*8b26181fSAndroid Build Coastguard Workerfi
14078*8b26181fSAndroid Build Coastguard Worker
14079*8b26181fSAndroid Build Coastguard Worker
14080*8b26181fSAndroid Build Coastguard Workeras_nl='
14081*8b26181fSAndroid Build Coastguard Worker'
14082*8b26181fSAndroid Build Coastguard Workerexport as_nl
14083*8b26181fSAndroid Build Coastguard Worker# Printing a long string crashes Solaris 7 /usr/bin/printf.
14084*8b26181fSAndroid Build Coastguard Workeras_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
14085*8b26181fSAndroid Build Coastguard Workeras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
14086*8b26181fSAndroid Build Coastguard Workeras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
14087*8b26181fSAndroid Build Coastguard Worker# Prefer a ksh shell builtin over an external printf program on Solaris,
14088*8b26181fSAndroid Build Coastguard Worker# but without wasting forks for bash or zsh.
14089*8b26181fSAndroid Build Coastguard Workerif test -z "$BASH_VERSION$ZSH_VERSION" \
14090*8b26181fSAndroid Build Coastguard Worker    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
14091*8b26181fSAndroid Build Coastguard Worker  as_echo='print -r --'
14092*8b26181fSAndroid Build Coastguard Worker  as_echo_n='print -rn --'
14093*8b26181fSAndroid Build Coastguard Workerelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
14094*8b26181fSAndroid Build Coastguard Worker  as_echo='printf %s\n'
14095*8b26181fSAndroid Build Coastguard Worker  as_echo_n='printf %s'
14096*8b26181fSAndroid Build Coastguard Workerelse
14097*8b26181fSAndroid Build Coastguard Worker  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
14098*8b26181fSAndroid Build Coastguard Worker    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
14099*8b26181fSAndroid Build Coastguard Worker    as_echo_n='/usr/ucb/echo -n'
14100*8b26181fSAndroid Build Coastguard Worker  else
14101*8b26181fSAndroid Build Coastguard Worker    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
14102*8b26181fSAndroid Build Coastguard Worker    as_echo_n_body='eval
14103*8b26181fSAndroid Build Coastguard Worker      arg=$1;
14104*8b26181fSAndroid Build Coastguard Worker      case $arg in #(
14105*8b26181fSAndroid Build Coastguard Worker      *"$as_nl"*)
14106*8b26181fSAndroid Build Coastguard Worker	expr "X$arg" : "X\\(.*\\)$as_nl";
14107*8b26181fSAndroid Build Coastguard Worker	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
14108*8b26181fSAndroid Build Coastguard Worker      esac;
14109*8b26181fSAndroid Build Coastguard Worker      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
14110*8b26181fSAndroid Build Coastguard Worker    '
14111*8b26181fSAndroid Build Coastguard Worker    export as_echo_n_body
14112*8b26181fSAndroid Build Coastguard Worker    as_echo_n='sh -c $as_echo_n_body as_echo'
14113*8b26181fSAndroid Build Coastguard Worker  fi
14114*8b26181fSAndroid Build Coastguard Worker  export as_echo_body
14115*8b26181fSAndroid Build Coastguard Worker  as_echo='sh -c $as_echo_body as_echo'
14116*8b26181fSAndroid Build Coastguard Workerfi
14117*8b26181fSAndroid Build Coastguard Worker
14118*8b26181fSAndroid Build Coastguard Worker# The user is always right.
14119*8b26181fSAndroid Build Coastguard Workerif test "${PATH_SEPARATOR+set}" != set; then
14120*8b26181fSAndroid Build Coastguard Worker  PATH_SEPARATOR=:
14121*8b26181fSAndroid Build Coastguard Worker  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
14122*8b26181fSAndroid Build Coastguard Worker    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
14123*8b26181fSAndroid Build Coastguard Worker      PATH_SEPARATOR=';'
14124*8b26181fSAndroid Build Coastguard Worker  }
14125*8b26181fSAndroid Build Coastguard Workerfi
14126*8b26181fSAndroid Build Coastguard Worker
14127*8b26181fSAndroid Build Coastguard Worker
14128*8b26181fSAndroid Build Coastguard Worker# IFS
14129*8b26181fSAndroid Build Coastguard Worker# We need space, tab and new line, in precisely that order.  Quoting is
14130*8b26181fSAndroid Build Coastguard Worker# there to prevent editors from complaining about space-tab.
14131*8b26181fSAndroid Build Coastguard Worker# (If _AS_PATH_WALK were called with IFS unset, it would disable word
14132*8b26181fSAndroid Build Coastguard Worker# splitting by setting IFS to empty value.)
14133*8b26181fSAndroid Build Coastguard WorkerIFS=" ""	$as_nl"
14134*8b26181fSAndroid Build Coastguard Worker
14135*8b26181fSAndroid Build Coastguard Worker# Find who we are.  Look in the path if we contain no directory separator.
14136*8b26181fSAndroid Build Coastguard Workeras_myself=
14137*8b26181fSAndroid Build Coastguard Workercase $0 in #((
14138*8b26181fSAndroid Build Coastguard Worker  *[\\/]* ) as_myself=$0 ;;
14139*8b26181fSAndroid Build Coastguard Worker  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14140*8b26181fSAndroid Build Coastguard Workerfor as_dir in $PATH
14141*8b26181fSAndroid Build Coastguard Workerdo
14142*8b26181fSAndroid Build Coastguard Worker  IFS=$as_save_IFS
14143*8b26181fSAndroid Build Coastguard Worker  test -z "$as_dir" && as_dir=.
14144*8b26181fSAndroid Build Coastguard Worker    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
14145*8b26181fSAndroid Build Coastguard Worker  done
14146*8b26181fSAndroid Build Coastguard WorkerIFS=$as_save_IFS
14147*8b26181fSAndroid Build Coastguard Worker
14148*8b26181fSAndroid Build Coastguard Worker     ;;
14149*8b26181fSAndroid Build Coastguard Workeresac
14150*8b26181fSAndroid Build Coastguard Worker# We did not find ourselves, most probably we were run as `sh COMMAND'
14151*8b26181fSAndroid Build Coastguard Worker# in which case we are not to be found in the path.
14152*8b26181fSAndroid Build Coastguard Workerif test "x$as_myself" = x; then
14153*8b26181fSAndroid Build Coastguard Worker  as_myself=$0
14154*8b26181fSAndroid Build Coastguard Workerfi
14155*8b26181fSAndroid Build Coastguard Workerif test ! -f "$as_myself"; then
14156*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
14157*8b26181fSAndroid Build Coastguard Worker  exit 1
14158*8b26181fSAndroid Build Coastguard Workerfi
14159*8b26181fSAndroid Build Coastguard Worker
14160*8b26181fSAndroid Build Coastguard Worker# Unset variables that we do not need and which cause bugs (e.g. in
14161*8b26181fSAndroid Build Coastguard Worker# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
14162*8b26181fSAndroid Build Coastguard Worker# suppresses any "Segmentation fault" message there.  '((' could
14163*8b26181fSAndroid Build Coastguard Worker# trigger a bug in pdksh 5.2.14.
14164*8b26181fSAndroid Build Coastguard Workerfor as_var in BASH_ENV ENV MAIL MAILPATH
14165*8b26181fSAndroid Build Coastguard Workerdo eval test x\${$as_var+set} = xset \
14166*8b26181fSAndroid Build Coastguard Worker  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
14167*8b26181fSAndroid Build Coastguard Workerdone
14168*8b26181fSAndroid Build Coastguard WorkerPS1='$ '
14169*8b26181fSAndroid Build Coastguard WorkerPS2='> '
14170*8b26181fSAndroid Build Coastguard WorkerPS4='+ '
14171*8b26181fSAndroid Build Coastguard Worker
14172*8b26181fSAndroid Build Coastguard Worker# NLS nuisances.
14173*8b26181fSAndroid Build Coastguard WorkerLC_ALL=C
14174*8b26181fSAndroid Build Coastguard Workerexport LC_ALL
14175*8b26181fSAndroid Build Coastguard WorkerLANGUAGE=C
14176*8b26181fSAndroid Build Coastguard Workerexport LANGUAGE
14177*8b26181fSAndroid Build Coastguard Worker
14178*8b26181fSAndroid Build Coastguard Worker# CDPATH.
14179*8b26181fSAndroid Build Coastguard Worker(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14180*8b26181fSAndroid Build Coastguard Worker
14181*8b26181fSAndroid Build Coastguard Worker
14182*8b26181fSAndroid Build Coastguard Worker# as_fn_error STATUS ERROR [LINENO LOG_FD]
14183*8b26181fSAndroid Build Coastguard Worker# ----------------------------------------
14184*8b26181fSAndroid Build Coastguard Worker# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
14185*8b26181fSAndroid Build Coastguard Worker# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
14186*8b26181fSAndroid Build Coastguard Worker# script with STATUS, using 1 if that was 0.
14187*8b26181fSAndroid Build Coastguard Workeras_fn_error ()
14188*8b26181fSAndroid Build Coastguard Worker{
14189*8b26181fSAndroid Build Coastguard Worker  as_status=$1; test $as_status -eq 0 && as_status=1
14190*8b26181fSAndroid Build Coastguard Worker  if test "$4"; then
14191*8b26181fSAndroid Build Coastguard Worker    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
14192*8b26181fSAndroid Build Coastguard Worker    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
14193*8b26181fSAndroid Build Coastguard Worker  fi
14194*8b26181fSAndroid Build Coastguard Worker  $as_echo "$as_me: error: $2" >&2
14195*8b26181fSAndroid Build Coastguard Worker  as_fn_exit $as_status
14196*8b26181fSAndroid Build Coastguard Worker} # as_fn_error
14197*8b26181fSAndroid Build Coastguard Worker
14198*8b26181fSAndroid Build Coastguard Worker
14199*8b26181fSAndroid Build Coastguard Worker# as_fn_set_status STATUS
14200*8b26181fSAndroid Build Coastguard Worker# -----------------------
14201*8b26181fSAndroid Build Coastguard Worker# Set $? to STATUS, without forking.
14202*8b26181fSAndroid Build Coastguard Workeras_fn_set_status ()
14203*8b26181fSAndroid Build Coastguard Worker{
14204*8b26181fSAndroid Build Coastguard Worker  return $1
14205*8b26181fSAndroid Build Coastguard Worker} # as_fn_set_status
14206*8b26181fSAndroid Build Coastguard Worker
14207*8b26181fSAndroid Build Coastguard Worker# as_fn_exit STATUS
14208*8b26181fSAndroid Build Coastguard Worker# -----------------
14209*8b26181fSAndroid Build Coastguard Worker# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
14210*8b26181fSAndroid Build Coastguard Workeras_fn_exit ()
14211*8b26181fSAndroid Build Coastguard Worker{
14212*8b26181fSAndroid Build Coastguard Worker  set +e
14213*8b26181fSAndroid Build Coastguard Worker  as_fn_set_status $1
14214*8b26181fSAndroid Build Coastguard Worker  exit $1
14215*8b26181fSAndroid Build Coastguard Worker} # as_fn_exit
14216*8b26181fSAndroid Build Coastguard Worker
14217*8b26181fSAndroid Build Coastguard Worker# as_fn_unset VAR
14218*8b26181fSAndroid Build Coastguard Worker# ---------------
14219*8b26181fSAndroid Build Coastguard Worker# Portably unset VAR.
14220*8b26181fSAndroid Build Coastguard Workeras_fn_unset ()
14221*8b26181fSAndroid Build Coastguard Worker{
14222*8b26181fSAndroid Build Coastguard Worker  { eval $1=; unset $1;}
14223*8b26181fSAndroid Build Coastguard Worker}
14224*8b26181fSAndroid Build Coastguard Workeras_unset=as_fn_unset
14225*8b26181fSAndroid Build Coastguard Worker# as_fn_append VAR VALUE
14226*8b26181fSAndroid Build Coastguard Worker# ----------------------
14227*8b26181fSAndroid Build Coastguard Worker# Append the text in VALUE to the end of the definition contained in VAR. Take
14228*8b26181fSAndroid Build Coastguard Worker# advantage of any shell optimizations that allow amortized linear growth over
14229*8b26181fSAndroid Build Coastguard Worker# repeated appends, instead of the typical quadratic growth present in naive
14230*8b26181fSAndroid Build Coastguard Worker# implementations.
14231*8b26181fSAndroid Build Coastguard Workerif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
14232*8b26181fSAndroid Build Coastguard Worker  eval 'as_fn_append ()
14233*8b26181fSAndroid Build Coastguard Worker  {
14234*8b26181fSAndroid Build Coastguard Worker    eval $1+=\$2
14235*8b26181fSAndroid Build Coastguard Worker  }'
14236*8b26181fSAndroid Build Coastguard Workerelse
14237*8b26181fSAndroid Build Coastguard Worker  as_fn_append ()
14238*8b26181fSAndroid Build Coastguard Worker  {
14239*8b26181fSAndroid Build Coastguard Worker    eval $1=\$$1\$2
14240*8b26181fSAndroid Build Coastguard Worker  }
14241*8b26181fSAndroid Build Coastguard Workerfi # as_fn_append
14242*8b26181fSAndroid Build Coastguard Worker
14243*8b26181fSAndroid Build Coastguard Worker# as_fn_arith ARG...
14244*8b26181fSAndroid Build Coastguard Worker# ------------------
14245*8b26181fSAndroid Build Coastguard Worker# Perform arithmetic evaluation on the ARGs, and store the result in the
14246*8b26181fSAndroid Build Coastguard Worker# global $as_val. Take advantage of shells that can avoid forks. The arguments
14247*8b26181fSAndroid Build Coastguard Worker# must be portable across $(()) and expr.
14248*8b26181fSAndroid Build Coastguard Workerif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
14249*8b26181fSAndroid Build Coastguard Worker  eval 'as_fn_arith ()
14250*8b26181fSAndroid Build Coastguard Worker  {
14251*8b26181fSAndroid Build Coastguard Worker    as_val=$(( $* ))
14252*8b26181fSAndroid Build Coastguard Worker  }'
14253*8b26181fSAndroid Build Coastguard Workerelse
14254*8b26181fSAndroid Build Coastguard Worker  as_fn_arith ()
14255*8b26181fSAndroid Build Coastguard Worker  {
14256*8b26181fSAndroid Build Coastguard Worker    as_val=`expr "$@" || test $? -eq 1`
14257*8b26181fSAndroid Build Coastguard Worker  }
14258*8b26181fSAndroid Build Coastguard Workerfi # as_fn_arith
14259*8b26181fSAndroid Build Coastguard Worker
14260*8b26181fSAndroid Build Coastguard Worker
14261*8b26181fSAndroid Build Coastguard Workerif expr a : '\(a\)' >/dev/null 2>&1 &&
14262*8b26181fSAndroid Build Coastguard Worker   test "X`expr 00001 : '.*\(...\)'`" = X001; then
14263*8b26181fSAndroid Build Coastguard Worker  as_expr=expr
14264*8b26181fSAndroid Build Coastguard Workerelse
14265*8b26181fSAndroid Build Coastguard Worker  as_expr=false
14266*8b26181fSAndroid Build Coastguard Workerfi
14267*8b26181fSAndroid Build Coastguard Worker
14268*8b26181fSAndroid Build Coastguard Workerif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
14269*8b26181fSAndroid Build Coastguard Worker  as_basename=basename
14270*8b26181fSAndroid Build Coastguard Workerelse
14271*8b26181fSAndroid Build Coastguard Worker  as_basename=false
14272*8b26181fSAndroid Build Coastguard Workerfi
14273*8b26181fSAndroid Build Coastguard Worker
14274*8b26181fSAndroid Build Coastguard Workerif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
14275*8b26181fSAndroid Build Coastguard Worker  as_dirname=dirname
14276*8b26181fSAndroid Build Coastguard Workerelse
14277*8b26181fSAndroid Build Coastguard Worker  as_dirname=false
14278*8b26181fSAndroid Build Coastguard Workerfi
14279*8b26181fSAndroid Build Coastguard Worker
14280*8b26181fSAndroid Build Coastguard Workeras_me=`$as_basename -- "$0" ||
14281*8b26181fSAndroid Build Coastguard Worker$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
14282*8b26181fSAndroid Build Coastguard Worker	 X"$0" : 'X\(//\)$' \| \
14283*8b26181fSAndroid Build Coastguard Worker	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
14284*8b26181fSAndroid Build Coastguard Worker$as_echo X/"$0" |
14285*8b26181fSAndroid Build Coastguard Worker    sed '/^.*\/\([^/][^/]*\)\/*$/{
14286*8b26181fSAndroid Build Coastguard Worker	    s//\1/
14287*8b26181fSAndroid Build Coastguard Worker	    q
14288*8b26181fSAndroid Build Coastguard Worker	  }
14289*8b26181fSAndroid Build Coastguard Worker	  /^X\/\(\/\/\)$/{
14290*8b26181fSAndroid Build Coastguard Worker	    s//\1/
14291*8b26181fSAndroid Build Coastguard Worker	    q
14292*8b26181fSAndroid Build Coastguard Worker	  }
14293*8b26181fSAndroid Build Coastguard Worker	  /^X\/\(\/\).*/{
14294*8b26181fSAndroid Build Coastguard Worker	    s//\1/
14295*8b26181fSAndroid Build Coastguard Worker	    q
14296*8b26181fSAndroid Build Coastguard Worker	  }
14297*8b26181fSAndroid Build Coastguard Worker	  s/.*/./; q'`
14298*8b26181fSAndroid Build Coastguard Worker
14299*8b26181fSAndroid Build Coastguard Worker# Avoid depending upon Character Ranges.
14300*8b26181fSAndroid Build Coastguard Workeras_cr_letters='abcdefghijklmnopqrstuvwxyz'
14301*8b26181fSAndroid Build Coastguard Workeras_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14302*8b26181fSAndroid Build Coastguard Workeras_cr_Letters=$as_cr_letters$as_cr_LETTERS
14303*8b26181fSAndroid Build Coastguard Workeras_cr_digits='0123456789'
14304*8b26181fSAndroid Build Coastguard Workeras_cr_alnum=$as_cr_Letters$as_cr_digits
14305*8b26181fSAndroid Build Coastguard Worker
14306*8b26181fSAndroid Build Coastguard WorkerECHO_C= ECHO_N= ECHO_T=
14307*8b26181fSAndroid Build Coastguard Workercase `echo -n x` in #(((((
14308*8b26181fSAndroid Build Coastguard Worker-n*)
14309*8b26181fSAndroid Build Coastguard Worker  case `echo 'xy\c'` in
14310*8b26181fSAndroid Build Coastguard Worker  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
14311*8b26181fSAndroid Build Coastguard Worker  xy)  ECHO_C='\c';;
14312*8b26181fSAndroid Build Coastguard Worker  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
14313*8b26181fSAndroid Build Coastguard Worker       ECHO_T='	';;
14314*8b26181fSAndroid Build Coastguard Worker  esac;;
14315*8b26181fSAndroid Build Coastguard Worker*)
14316*8b26181fSAndroid Build Coastguard Worker  ECHO_N='-n';;
14317*8b26181fSAndroid Build Coastguard Workeresac
14318*8b26181fSAndroid Build Coastguard Worker
14319*8b26181fSAndroid Build Coastguard Workerrm -f conf$$ conf$$.exe conf$$.file
14320*8b26181fSAndroid Build Coastguard Workerif test -d conf$$.dir; then
14321*8b26181fSAndroid Build Coastguard Worker  rm -f conf$$.dir/conf$$.file
14322*8b26181fSAndroid Build Coastguard Workerelse
14323*8b26181fSAndroid Build Coastguard Worker  rm -f conf$$.dir
14324*8b26181fSAndroid Build Coastguard Worker  mkdir conf$$.dir 2>/dev/null
14325*8b26181fSAndroid Build Coastguard Workerfi
14326*8b26181fSAndroid Build Coastguard Workerif (echo >conf$$.file) 2>/dev/null; then
14327*8b26181fSAndroid Build Coastguard Worker  if ln -s conf$$.file conf$$ 2>/dev/null; then
14328*8b26181fSAndroid Build Coastguard Worker    as_ln_s='ln -s'
14329*8b26181fSAndroid Build Coastguard Worker    # ... but there are two gotchas:
14330*8b26181fSAndroid Build Coastguard Worker    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
14331*8b26181fSAndroid Build Coastguard Worker    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
14332*8b26181fSAndroid Build Coastguard Worker    # In both cases, we have to default to `cp -pR'.
14333*8b26181fSAndroid Build Coastguard Worker    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
14334*8b26181fSAndroid Build Coastguard Worker      as_ln_s='cp -pR'
14335*8b26181fSAndroid Build Coastguard Worker  elif ln conf$$.file conf$$ 2>/dev/null; then
14336*8b26181fSAndroid Build Coastguard Worker    as_ln_s=ln
14337*8b26181fSAndroid Build Coastguard Worker  else
14338*8b26181fSAndroid Build Coastguard Worker    as_ln_s='cp -pR'
14339*8b26181fSAndroid Build Coastguard Worker  fi
14340*8b26181fSAndroid Build Coastguard Workerelse
14341*8b26181fSAndroid Build Coastguard Worker  as_ln_s='cp -pR'
14342*8b26181fSAndroid Build Coastguard Workerfi
14343*8b26181fSAndroid Build Coastguard Workerrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
14344*8b26181fSAndroid Build Coastguard Workerrmdir conf$$.dir 2>/dev/null
14345*8b26181fSAndroid Build Coastguard Worker
14346*8b26181fSAndroid Build Coastguard Worker
14347*8b26181fSAndroid Build Coastguard Worker# as_fn_mkdir_p
14348*8b26181fSAndroid Build Coastguard Worker# -------------
14349*8b26181fSAndroid Build Coastguard Worker# Create "$as_dir" as a directory, including parents if necessary.
14350*8b26181fSAndroid Build Coastguard Workeras_fn_mkdir_p ()
14351*8b26181fSAndroid Build Coastguard Worker{
14352*8b26181fSAndroid Build Coastguard Worker
14353*8b26181fSAndroid Build Coastguard Worker  case $as_dir in #(
14354*8b26181fSAndroid Build Coastguard Worker  -*) as_dir=./$as_dir;;
14355*8b26181fSAndroid Build Coastguard Worker  esac
14356*8b26181fSAndroid Build Coastguard Worker  test -d "$as_dir" || eval $as_mkdir_p || {
14357*8b26181fSAndroid Build Coastguard Worker    as_dirs=
14358*8b26181fSAndroid Build Coastguard Worker    while :; do
14359*8b26181fSAndroid Build Coastguard Worker      case $as_dir in #(
14360*8b26181fSAndroid Build Coastguard Worker      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
14361*8b26181fSAndroid Build Coastguard Worker      *) as_qdir=$as_dir;;
14362*8b26181fSAndroid Build Coastguard Worker      esac
14363*8b26181fSAndroid Build Coastguard Worker      as_dirs="'$as_qdir' $as_dirs"
14364*8b26181fSAndroid Build Coastguard Worker      as_dir=`$as_dirname -- "$as_dir" ||
14365*8b26181fSAndroid Build Coastguard Worker$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
14366*8b26181fSAndroid Build Coastguard Worker	 X"$as_dir" : 'X\(//\)[^/]' \| \
14367*8b26181fSAndroid Build Coastguard Worker	 X"$as_dir" : 'X\(//\)$' \| \
14368*8b26181fSAndroid Build Coastguard Worker	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
14369*8b26181fSAndroid Build Coastguard Worker$as_echo X"$as_dir" |
14370*8b26181fSAndroid Build Coastguard Worker    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
14371*8b26181fSAndroid Build Coastguard Worker	    s//\1/
14372*8b26181fSAndroid Build Coastguard Worker	    q
14373*8b26181fSAndroid Build Coastguard Worker	  }
14374*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)[^/].*/{
14375*8b26181fSAndroid Build Coastguard Worker	    s//\1/
14376*8b26181fSAndroid Build Coastguard Worker	    q
14377*8b26181fSAndroid Build Coastguard Worker	  }
14378*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)$/{
14379*8b26181fSAndroid Build Coastguard Worker	    s//\1/
14380*8b26181fSAndroid Build Coastguard Worker	    q
14381*8b26181fSAndroid Build Coastguard Worker	  }
14382*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\).*/{
14383*8b26181fSAndroid Build Coastguard Worker	    s//\1/
14384*8b26181fSAndroid Build Coastguard Worker	    q
14385*8b26181fSAndroid Build Coastguard Worker	  }
14386*8b26181fSAndroid Build Coastguard Worker	  s/.*/./; q'`
14387*8b26181fSAndroid Build Coastguard Worker      test -d "$as_dir" && break
14388*8b26181fSAndroid Build Coastguard Worker    done
14389*8b26181fSAndroid Build Coastguard Worker    test -z "$as_dirs" || eval "mkdir $as_dirs"
14390*8b26181fSAndroid Build Coastguard Worker  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
14391*8b26181fSAndroid Build Coastguard Worker
14392*8b26181fSAndroid Build Coastguard Worker
14393*8b26181fSAndroid Build Coastguard Worker} # as_fn_mkdir_p
14394*8b26181fSAndroid Build Coastguard Workerif mkdir -p . 2>/dev/null; then
14395*8b26181fSAndroid Build Coastguard Worker  as_mkdir_p='mkdir -p "$as_dir"'
14396*8b26181fSAndroid Build Coastguard Workerelse
14397*8b26181fSAndroid Build Coastguard Worker  test -d ./-p && rmdir ./-p
14398*8b26181fSAndroid Build Coastguard Worker  as_mkdir_p=false
14399*8b26181fSAndroid Build Coastguard Workerfi
14400*8b26181fSAndroid Build Coastguard Worker
14401*8b26181fSAndroid Build Coastguard Worker
14402*8b26181fSAndroid Build Coastguard Worker# as_fn_executable_p FILE
14403*8b26181fSAndroid Build Coastguard Worker# -----------------------
14404*8b26181fSAndroid Build Coastguard Worker# Test if FILE is an executable regular file.
14405*8b26181fSAndroid Build Coastguard Workeras_fn_executable_p ()
14406*8b26181fSAndroid Build Coastguard Worker{
14407*8b26181fSAndroid Build Coastguard Worker  test -f "$1" && test -x "$1"
14408*8b26181fSAndroid Build Coastguard Worker} # as_fn_executable_p
14409*8b26181fSAndroid Build Coastguard Workeras_test_x='test -x'
14410*8b26181fSAndroid Build Coastguard Workeras_executable_p=as_fn_executable_p
14411*8b26181fSAndroid Build Coastguard Worker
14412*8b26181fSAndroid Build Coastguard Worker# Sed expression to map a string onto a valid CPP name.
14413*8b26181fSAndroid Build Coastguard Workeras_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
14414*8b26181fSAndroid Build Coastguard Worker
14415*8b26181fSAndroid Build Coastguard Worker# Sed expression to map a string onto a valid variable name.
14416*8b26181fSAndroid Build Coastguard Workeras_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
14417*8b26181fSAndroid Build Coastguard Worker
14418*8b26181fSAndroid Build Coastguard Worker
14419*8b26181fSAndroid Build Coastguard Workerexec 6>&1
14420*8b26181fSAndroid Build Coastguard Worker## ----------------------------------- ##
14421*8b26181fSAndroid Build Coastguard Worker## Main body of $CONFIG_STATUS script. ##
14422*8b26181fSAndroid Build Coastguard Worker## ----------------------------------- ##
14423*8b26181fSAndroid Build Coastguard Worker_ASEOF
14424*8b26181fSAndroid Build Coastguard Workertest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
14425*8b26181fSAndroid Build Coastguard Worker
14426*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14427*8b26181fSAndroid Build Coastguard Worker# Save the log message, to keep $0 and so on meaningful, and to
14428*8b26181fSAndroid Build Coastguard Worker# report actual input values of CONFIG_FILES etc. instead of their
14429*8b26181fSAndroid Build Coastguard Worker# values after options handling.
14430*8b26181fSAndroid Build Coastguard Workerac_log="
14431*8b26181fSAndroid Build Coastguard WorkerThis file was extended by pcap $as_me 1.10.4, which was
14432*8b26181fSAndroid Build Coastguard Workergenerated by GNU Autoconf 2.69.  Invocation command line was
14433*8b26181fSAndroid Build Coastguard Worker
14434*8b26181fSAndroid Build Coastguard Worker  CONFIG_FILES    = $CONFIG_FILES
14435*8b26181fSAndroid Build Coastguard Worker  CONFIG_HEADERS  = $CONFIG_HEADERS
14436*8b26181fSAndroid Build Coastguard Worker  CONFIG_LINKS    = $CONFIG_LINKS
14437*8b26181fSAndroid Build Coastguard Worker  CONFIG_COMMANDS = $CONFIG_COMMANDS
14438*8b26181fSAndroid Build Coastguard Worker  $ $0 $@
14439*8b26181fSAndroid Build Coastguard Worker
14440*8b26181fSAndroid Build Coastguard Workeron `(hostname || uname -n) 2>/dev/null | sed 1q`
14441*8b26181fSAndroid Build Coastguard Worker"
14442*8b26181fSAndroid Build Coastguard Worker
14443*8b26181fSAndroid Build Coastguard Worker_ACEOF
14444*8b26181fSAndroid Build Coastguard Worker
14445*8b26181fSAndroid Build Coastguard Workercase $ac_config_files in *"
14446*8b26181fSAndroid Build Coastguard Worker"*) set x $ac_config_files; shift; ac_config_files=$*;;
14447*8b26181fSAndroid Build Coastguard Workeresac
14448*8b26181fSAndroid Build Coastguard Worker
14449*8b26181fSAndroid Build Coastguard Workercase $ac_config_headers in *"
14450*8b26181fSAndroid Build Coastguard Worker"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
14451*8b26181fSAndroid Build Coastguard Workeresac
14452*8b26181fSAndroid Build Coastguard Worker
14453*8b26181fSAndroid Build Coastguard Worker
14454*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14455*8b26181fSAndroid Build Coastguard Worker# Files that config.status was made for.
14456*8b26181fSAndroid Build Coastguard Workerconfig_files="$ac_config_files"
14457*8b26181fSAndroid Build Coastguard Workerconfig_headers="$ac_config_headers"
14458*8b26181fSAndroid Build Coastguard Workerconfig_commands="$ac_config_commands"
14459*8b26181fSAndroid Build Coastguard Worker
14460*8b26181fSAndroid Build Coastguard Worker_ACEOF
14461*8b26181fSAndroid Build Coastguard Worker
14462*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14463*8b26181fSAndroid Build Coastguard Workerac_cs_usage="\
14464*8b26181fSAndroid Build Coastguard Worker\`$as_me' instantiates files and other configuration actions
14465*8b26181fSAndroid Build Coastguard Workerfrom templates according to the current configuration.  Unless the files
14466*8b26181fSAndroid Build Coastguard Workerand actions are specified as TAGs, all are instantiated by default.
14467*8b26181fSAndroid Build Coastguard Worker
14468*8b26181fSAndroid Build Coastguard WorkerUsage: $0 [OPTION]... [TAG]...
14469*8b26181fSAndroid Build Coastguard Worker
14470*8b26181fSAndroid Build Coastguard Worker  -h, --help       print this help, then exit
14471*8b26181fSAndroid Build Coastguard Worker  -V, --version    print version number and configuration settings, then exit
14472*8b26181fSAndroid Build Coastguard Worker      --config     print configuration, then exit
14473*8b26181fSAndroid Build Coastguard Worker  -q, --quiet, --silent
14474*8b26181fSAndroid Build Coastguard Worker                   do not print progress messages
14475*8b26181fSAndroid Build Coastguard Worker  -d, --debug      don't remove temporary files
14476*8b26181fSAndroid Build Coastguard Worker      --recheck    update $as_me by reconfiguring in the same conditions
14477*8b26181fSAndroid Build Coastguard Worker      --file=FILE[:TEMPLATE]
14478*8b26181fSAndroid Build Coastguard Worker                   instantiate the configuration file FILE
14479*8b26181fSAndroid Build Coastguard Worker      --header=FILE[:TEMPLATE]
14480*8b26181fSAndroid Build Coastguard Worker                   instantiate the configuration header FILE
14481*8b26181fSAndroid Build Coastguard Worker
14482*8b26181fSAndroid Build Coastguard WorkerConfiguration files:
14483*8b26181fSAndroid Build Coastguard Worker$config_files
14484*8b26181fSAndroid Build Coastguard Worker
14485*8b26181fSAndroid Build Coastguard WorkerConfiguration headers:
14486*8b26181fSAndroid Build Coastguard Worker$config_headers
14487*8b26181fSAndroid Build Coastguard Worker
14488*8b26181fSAndroid Build Coastguard WorkerConfiguration commands:
14489*8b26181fSAndroid Build Coastguard Worker$config_commands
14490*8b26181fSAndroid Build Coastguard Worker
14491*8b26181fSAndroid Build Coastguard WorkerReport bugs to the package provider."
14492*8b26181fSAndroid Build Coastguard Worker
14493*8b26181fSAndroid Build Coastguard Worker_ACEOF
14494*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14495*8b26181fSAndroid Build Coastguard Workerac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
14496*8b26181fSAndroid Build Coastguard Workerac_cs_version="\\
14497*8b26181fSAndroid Build Coastguard Workerpcap config.status 1.10.4
14498*8b26181fSAndroid Build Coastguard Workerconfigured by $0, generated by GNU Autoconf 2.69,
14499*8b26181fSAndroid Build Coastguard Worker  with options \\"\$ac_cs_config\\"
14500*8b26181fSAndroid Build Coastguard Worker
14501*8b26181fSAndroid Build Coastguard WorkerCopyright (C) 2012 Free Software Foundation, Inc.
14502*8b26181fSAndroid Build Coastguard WorkerThis config.status script is free software; the Free Software Foundation
14503*8b26181fSAndroid Build Coastguard Workergives unlimited permission to copy, distribute and modify it."
14504*8b26181fSAndroid Build Coastguard Worker
14505*8b26181fSAndroid Build Coastguard Workerac_pwd='$ac_pwd'
14506*8b26181fSAndroid Build Coastguard Workersrcdir='$srcdir'
14507*8b26181fSAndroid Build Coastguard WorkerINSTALL='$INSTALL'
14508*8b26181fSAndroid Build Coastguard Workertest -n "\$AWK" || AWK=awk
14509*8b26181fSAndroid Build Coastguard Worker_ACEOF
14510*8b26181fSAndroid Build Coastguard Worker
14511*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14512*8b26181fSAndroid Build Coastguard Worker# The default lists apply if the user does not specify any file.
14513*8b26181fSAndroid Build Coastguard Workerac_need_defaults=:
14514*8b26181fSAndroid Build Coastguard Workerwhile test $# != 0
14515*8b26181fSAndroid Build Coastguard Workerdo
14516*8b26181fSAndroid Build Coastguard Worker  case $1 in
14517*8b26181fSAndroid Build Coastguard Worker  --*=?*)
14518*8b26181fSAndroid Build Coastguard Worker    ac_option=`expr "X$1" : 'X\([^=]*\)='`
14519*8b26181fSAndroid Build Coastguard Worker    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
14520*8b26181fSAndroid Build Coastguard Worker    ac_shift=:
14521*8b26181fSAndroid Build Coastguard Worker    ;;
14522*8b26181fSAndroid Build Coastguard Worker  --*=)
14523*8b26181fSAndroid Build Coastguard Worker    ac_option=`expr "X$1" : 'X\([^=]*\)='`
14524*8b26181fSAndroid Build Coastguard Worker    ac_optarg=
14525*8b26181fSAndroid Build Coastguard Worker    ac_shift=:
14526*8b26181fSAndroid Build Coastguard Worker    ;;
14527*8b26181fSAndroid Build Coastguard Worker  *)
14528*8b26181fSAndroid Build Coastguard Worker    ac_option=$1
14529*8b26181fSAndroid Build Coastguard Worker    ac_optarg=$2
14530*8b26181fSAndroid Build Coastguard Worker    ac_shift=shift
14531*8b26181fSAndroid Build Coastguard Worker    ;;
14532*8b26181fSAndroid Build Coastguard Worker  esac
14533*8b26181fSAndroid Build Coastguard Worker
14534*8b26181fSAndroid Build Coastguard Worker  case $ac_option in
14535*8b26181fSAndroid Build Coastguard Worker  # Handling of the options.
14536*8b26181fSAndroid Build Coastguard Worker  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
14537*8b26181fSAndroid Build Coastguard Worker    ac_cs_recheck=: ;;
14538*8b26181fSAndroid Build Coastguard Worker  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
14539*8b26181fSAndroid Build Coastguard Worker    $as_echo "$ac_cs_version"; exit ;;
14540*8b26181fSAndroid Build Coastguard Worker  --config | --confi | --conf | --con | --co | --c )
14541*8b26181fSAndroid Build Coastguard Worker    $as_echo "$ac_cs_config"; exit ;;
14542*8b26181fSAndroid Build Coastguard Worker  --debug | --debu | --deb | --de | --d | -d )
14543*8b26181fSAndroid Build Coastguard Worker    debug=: ;;
14544*8b26181fSAndroid Build Coastguard Worker  --file | --fil | --fi | --f )
14545*8b26181fSAndroid Build Coastguard Worker    $ac_shift
14546*8b26181fSAndroid Build Coastguard Worker    case $ac_optarg in
14547*8b26181fSAndroid Build Coastguard Worker    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14548*8b26181fSAndroid Build Coastguard Worker    '') as_fn_error $? "missing file argument" ;;
14549*8b26181fSAndroid Build Coastguard Worker    esac
14550*8b26181fSAndroid Build Coastguard Worker    as_fn_append CONFIG_FILES " '$ac_optarg'"
14551*8b26181fSAndroid Build Coastguard Worker    ac_need_defaults=false;;
14552*8b26181fSAndroid Build Coastguard Worker  --header | --heade | --head | --hea )
14553*8b26181fSAndroid Build Coastguard Worker    $ac_shift
14554*8b26181fSAndroid Build Coastguard Worker    case $ac_optarg in
14555*8b26181fSAndroid Build Coastguard Worker    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
14556*8b26181fSAndroid Build Coastguard Worker    esac
14557*8b26181fSAndroid Build Coastguard Worker    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
14558*8b26181fSAndroid Build Coastguard Worker    ac_need_defaults=false;;
14559*8b26181fSAndroid Build Coastguard Worker  --he | --h)
14560*8b26181fSAndroid Build Coastguard Worker    # Conflict between --help and --header
14561*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "ambiguous option: \`$1'
14562*8b26181fSAndroid Build Coastguard WorkerTry \`$0 --help' for more information.";;
14563*8b26181fSAndroid Build Coastguard Worker  --help | --hel | -h )
14564*8b26181fSAndroid Build Coastguard Worker    $as_echo "$ac_cs_usage"; exit ;;
14565*8b26181fSAndroid Build Coastguard Worker  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
14566*8b26181fSAndroid Build Coastguard Worker  | -silent | --silent | --silen | --sile | --sil | --si | --s)
14567*8b26181fSAndroid Build Coastguard Worker    ac_cs_silent=: ;;
14568*8b26181fSAndroid Build Coastguard Worker
14569*8b26181fSAndroid Build Coastguard Worker  # This is an error.
14570*8b26181fSAndroid Build Coastguard Worker  -*) as_fn_error $? "unrecognized option: \`$1'
14571*8b26181fSAndroid Build Coastguard WorkerTry \`$0 --help' for more information." ;;
14572*8b26181fSAndroid Build Coastguard Worker
14573*8b26181fSAndroid Build Coastguard Worker  *) as_fn_append ac_config_targets " $1"
14574*8b26181fSAndroid Build Coastguard Worker     ac_need_defaults=false ;;
14575*8b26181fSAndroid Build Coastguard Worker
14576*8b26181fSAndroid Build Coastguard Worker  esac
14577*8b26181fSAndroid Build Coastguard Worker  shift
14578*8b26181fSAndroid Build Coastguard Workerdone
14579*8b26181fSAndroid Build Coastguard Worker
14580*8b26181fSAndroid Build Coastguard Workerac_configure_extra_args=
14581*8b26181fSAndroid Build Coastguard Worker
14582*8b26181fSAndroid Build Coastguard Workerif $ac_cs_silent; then
14583*8b26181fSAndroid Build Coastguard Worker  exec 6>/dev/null
14584*8b26181fSAndroid Build Coastguard Worker  ac_configure_extra_args="$ac_configure_extra_args --silent"
14585*8b26181fSAndroid Build Coastguard Workerfi
14586*8b26181fSAndroid Build Coastguard Worker
14587*8b26181fSAndroid Build Coastguard Worker_ACEOF
14588*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14589*8b26181fSAndroid Build Coastguard Workerif \$ac_cs_recheck; then
14590*8b26181fSAndroid Build Coastguard Worker  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
14591*8b26181fSAndroid Build Coastguard Worker  shift
14592*8b26181fSAndroid Build Coastguard Worker  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
14593*8b26181fSAndroid Build Coastguard Worker  CONFIG_SHELL='$SHELL'
14594*8b26181fSAndroid Build Coastguard Worker  export CONFIG_SHELL
14595*8b26181fSAndroid Build Coastguard Worker  exec "\$@"
14596*8b26181fSAndroid Build Coastguard Workerfi
14597*8b26181fSAndroid Build Coastguard Worker
14598*8b26181fSAndroid Build Coastguard Worker_ACEOF
14599*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14600*8b26181fSAndroid Build Coastguard Workerexec 5>>config.log
14601*8b26181fSAndroid Build Coastguard Worker{
14602*8b26181fSAndroid Build Coastguard Worker  echo
14603*8b26181fSAndroid Build Coastguard Worker  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
14604*8b26181fSAndroid Build Coastguard Worker## Running $as_me. ##
14605*8b26181fSAndroid Build Coastguard Worker_ASBOX
14606*8b26181fSAndroid Build Coastguard Worker  $as_echo "$ac_log"
14607*8b26181fSAndroid Build Coastguard Worker} >&5
14608*8b26181fSAndroid Build Coastguard Worker
14609*8b26181fSAndroid Build Coastguard Worker_ACEOF
14610*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14611*8b26181fSAndroid Build Coastguard Worker#
14612*8b26181fSAndroid Build Coastguard Worker# INIT-COMMANDS
14613*8b26181fSAndroid Build Coastguard Worker#
14614*8b26181fSAndroid Build Coastguard Worker
14615*8b26181fSAndroid Build Coastguard Worker
14616*8b26181fSAndroid Build Coastguard Worker_ACEOF
14617*8b26181fSAndroid Build Coastguard Worker
14618*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14619*8b26181fSAndroid Build Coastguard Worker
14620*8b26181fSAndroid Build Coastguard Worker# Handling of arguments.
14621*8b26181fSAndroid Build Coastguard Workerfor ac_config_target in $ac_config_targets
14622*8b26181fSAndroid Build Coastguard Workerdo
14623*8b26181fSAndroid Build Coastguard Worker  case $ac_config_target in
14624*8b26181fSAndroid Build Coastguard Worker    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
14625*8b26181fSAndroid Build Coastguard Worker    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
14626*8b26181fSAndroid Build Coastguard Worker    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
14627*8b26181fSAndroid Build Coastguard Worker    "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;;
14628*8b26181fSAndroid Build Coastguard Worker    "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
14629*8b26181fSAndroid Build Coastguard Worker    "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
14630*8b26181fSAndroid Build Coastguard Worker    "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
14631*8b26181fSAndroid Build Coastguard Worker    "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
14632*8b26181fSAndroid Build Coastguard Worker    "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
14633*8b26181fSAndroid Build Coastguard Worker    "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
14634*8b26181fSAndroid Build Coastguard Worker    "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
14635*8b26181fSAndroid Build Coastguard Worker    "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
14636*8b26181fSAndroid Build Coastguard Worker    "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
14637*8b26181fSAndroid Build Coastguard Worker    "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
14638*8b26181fSAndroid Build Coastguard Worker    "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
14639*8b26181fSAndroid Build Coastguard Worker    "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
14640*8b26181fSAndroid Build Coastguard Worker    "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
14641*8b26181fSAndroid Build Coastguard Worker    "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;;
14642*8b26181fSAndroid Build Coastguard Worker    "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
14643*8b26181fSAndroid Build Coastguard Worker    "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
14644*8b26181fSAndroid Build Coastguard Worker    "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
14645*8b26181fSAndroid Build Coastguard Worker    "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
14646*8b26181fSAndroid Build Coastguard Worker    "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;;
14647*8b26181fSAndroid Build Coastguard Worker    "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
14648*8b26181fSAndroid Build Coastguard Worker
14649*8b26181fSAndroid Build Coastguard Worker  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
14650*8b26181fSAndroid Build Coastguard Worker  esac
14651*8b26181fSAndroid Build Coastguard Workerdone
14652*8b26181fSAndroid Build Coastguard Worker
14653*8b26181fSAndroid Build Coastguard Worker
14654*8b26181fSAndroid Build Coastguard Worker# If the user did not use the arguments to specify the items to instantiate,
14655*8b26181fSAndroid Build Coastguard Worker# then the envvar interface is used.  Set only those that are not.
14656*8b26181fSAndroid Build Coastguard Worker# We use the long form for the default assignment because of an extremely
14657*8b26181fSAndroid Build Coastguard Worker# bizarre bug on SunOS 4.1.3.
14658*8b26181fSAndroid Build Coastguard Workerif $ac_need_defaults; then
14659*8b26181fSAndroid Build Coastguard Worker  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
14660*8b26181fSAndroid Build Coastguard Worker  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
14661*8b26181fSAndroid Build Coastguard Worker  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
14662*8b26181fSAndroid Build Coastguard Workerfi
14663*8b26181fSAndroid Build Coastguard Worker
14664*8b26181fSAndroid Build Coastguard Worker# Have a temporary directory for convenience.  Make it in the build tree
14665*8b26181fSAndroid Build Coastguard Worker# simply because there is no reason against having it here, and in addition,
14666*8b26181fSAndroid Build Coastguard Worker# creating and moving files from /tmp can sometimes cause problems.
14667*8b26181fSAndroid Build Coastguard Worker# Hook for its removal unless debugging.
14668*8b26181fSAndroid Build Coastguard Worker# Note that there is a small window in which the directory will not be cleaned:
14669*8b26181fSAndroid Build Coastguard Worker# after its creation but before its name has been assigned to `$tmp'.
14670*8b26181fSAndroid Build Coastguard Worker$debug ||
14671*8b26181fSAndroid Build Coastguard Worker{
14672*8b26181fSAndroid Build Coastguard Worker  tmp= ac_tmp=
14673*8b26181fSAndroid Build Coastguard Worker  trap 'exit_status=$?
14674*8b26181fSAndroid Build Coastguard Worker  : "${ac_tmp:=$tmp}"
14675*8b26181fSAndroid Build Coastguard Worker  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
14676*8b26181fSAndroid Build Coastguard Worker' 0
14677*8b26181fSAndroid Build Coastguard Worker  trap 'as_fn_exit 1' 1 2 13 15
14678*8b26181fSAndroid Build Coastguard Worker}
14679*8b26181fSAndroid Build Coastguard Worker# Create a (secure) tmp directory for tmp files.
14680*8b26181fSAndroid Build Coastguard Worker
14681*8b26181fSAndroid Build Coastguard Worker{
14682*8b26181fSAndroid Build Coastguard Worker  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
14683*8b26181fSAndroid Build Coastguard Worker  test -d "$tmp"
14684*8b26181fSAndroid Build Coastguard Worker}  ||
14685*8b26181fSAndroid Build Coastguard Worker{
14686*8b26181fSAndroid Build Coastguard Worker  tmp=./conf$$-$RANDOM
14687*8b26181fSAndroid Build Coastguard Worker  (umask 077 && mkdir "$tmp")
14688*8b26181fSAndroid Build Coastguard Worker} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
14689*8b26181fSAndroid Build Coastguard Workerac_tmp=$tmp
14690*8b26181fSAndroid Build Coastguard Worker
14691*8b26181fSAndroid Build Coastguard Worker# Set up the scripts for CONFIG_FILES section.
14692*8b26181fSAndroid Build Coastguard Worker# No need to generate them if there are no CONFIG_FILES.
14693*8b26181fSAndroid Build Coastguard Worker# This happens for instance with `./config.status config.h'.
14694*8b26181fSAndroid Build Coastguard Workerif test -n "$CONFIG_FILES"; then
14695*8b26181fSAndroid Build Coastguard Worker
14696*8b26181fSAndroid Build Coastguard Worker
14697*8b26181fSAndroid Build Coastguard Workerac_cr=`echo X | tr X '\015'`
14698*8b26181fSAndroid Build Coastguard Worker# On cygwin, bash can eat \r inside `` if the user requested igncr.
14699*8b26181fSAndroid Build Coastguard Worker# But we know of no other shell where ac_cr would be empty at this
14700*8b26181fSAndroid Build Coastguard Worker# point, so we can use a bashism as a fallback.
14701*8b26181fSAndroid Build Coastguard Workerif test "x$ac_cr" = x; then
14702*8b26181fSAndroid Build Coastguard Worker  eval ac_cr=\$\'\\r\'
14703*8b26181fSAndroid Build Coastguard Workerfi
14704*8b26181fSAndroid Build Coastguard Workerac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
14705*8b26181fSAndroid Build Coastguard Workerif test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
14706*8b26181fSAndroid Build Coastguard Worker  ac_cs_awk_cr='\\r'
14707*8b26181fSAndroid Build Coastguard Workerelse
14708*8b26181fSAndroid Build Coastguard Worker  ac_cs_awk_cr=$ac_cr
14709*8b26181fSAndroid Build Coastguard Workerfi
14710*8b26181fSAndroid Build Coastguard Worker
14711*8b26181fSAndroid Build Coastguard Workerecho 'BEGIN {' >"$ac_tmp/subs1.awk" &&
14712*8b26181fSAndroid Build Coastguard Worker_ACEOF
14713*8b26181fSAndroid Build Coastguard Worker
14714*8b26181fSAndroid Build Coastguard Worker
14715*8b26181fSAndroid Build Coastguard Worker{
14716*8b26181fSAndroid Build Coastguard Worker  echo "cat >conf$$subs.awk <<_ACEOF" &&
14717*8b26181fSAndroid Build Coastguard Worker  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
14718*8b26181fSAndroid Build Coastguard Worker  echo "_ACEOF"
14719*8b26181fSAndroid Build Coastguard Worker} >conf$$subs.sh ||
14720*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14721*8b26181fSAndroid Build Coastguard Workerac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
14722*8b26181fSAndroid Build Coastguard Workerac_delim='%!_!# '
14723*8b26181fSAndroid Build Coastguard Workerfor ac_last_try in false false false false false :; do
14724*8b26181fSAndroid Build Coastguard Worker  . ./conf$$subs.sh ||
14725*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14726*8b26181fSAndroid Build Coastguard Worker
14727*8b26181fSAndroid Build Coastguard Worker  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
14728*8b26181fSAndroid Build Coastguard Worker  if test $ac_delim_n = $ac_delim_num; then
14729*8b26181fSAndroid Build Coastguard Worker    break
14730*8b26181fSAndroid Build Coastguard Worker  elif $ac_last_try; then
14731*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
14732*8b26181fSAndroid Build Coastguard Worker  else
14733*8b26181fSAndroid Build Coastguard Worker    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14734*8b26181fSAndroid Build Coastguard Worker  fi
14735*8b26181fSAndroid Build Coastguard Workerdone
14736*8b26181fSAndroid Build Coastguard Workerrm -f conf$$subs.sh
14737*8b26181fSAndroid Build Coastguard Worker
14738*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14739*8b26181fSAndroid Build Coastguard Workercat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
14740*8b26181fSAndroid Build Coastguard Worker_ACEOF
14741*8b26181fSAndroid Build Coastguard Workersed -n '
14742*8b26181fSAndroid Build Coastguard Workerh
14743*8b26181fSAndroid Build Coastguard Workers/^/S["/; s/!.*/"]=/
14744*8b26181fSAndroid Build Coastguard Workerp
14745*8b26181fSAndroid Build Coastguard Workerg
14746*8b26181fSAndroid Build Coastguard Workers/^[^!]*!//
14747*8b26181fSAndroid Build Coastguard Worker:repl
14748*8b26181fSAndroid Build Coastguard Workert repl
14749*8b26181fSAndroid Build Coastguard Workers/'"$ac_delim"'$//
14750*8b26181fSAndroid Build Coastguard Workert delim
14751*8b26181fSAndroid Build Coastguard Worker:nl
14752*8b26181fSAndroid Build Coastguard Workerh
14753*8b26181fSAndroid Build Coastguard Workers/\(.\{148\}\)..*/\1/
14754*8b26181fSAndroid Build Coastguard Workert more1
14755*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
14756*8b26181fSAndroid Build Coastguard Workerp
14757*8b26181fSAndroid Build Coastguard Workern
14758*8b26181fSAndroid Build Coastguard Workerb repl
14759*8b26181fSAndroid Build Coastguard Worker:more1
14760*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g; s/^/"/; s/$/"\\/
14761*8b26181fSAndroid Build Coastguard Workerp
14762*8b26181fSAndroid Build Coastguard Workerg
14763*8b26181fSAndroid Build Coastguard Workers/.\{148\}//
14764*8b26181fSAndroid Build Coastguard Workert nl
14765*8b26181fSAndroid Build Coastguard Worker:delim
14766*8b26181fSAndroid Build Coastguard Workerh
14767*8b26181fSAndroid Build Coastguard Workers/\(.\{148\}\)..*/\1/
14768*8b26181fSAndroid Build Coastguard Workert more2
14769*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g; s/^/"/; s/$/"/
14770*8b26181fSAndroid Build Coastguard Workerp
14771*8b26181fSAndroid Build Coastguard Workerb
14772*8b26181fSAndroid Build Coastguard Worker:more2
14773*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g; s/^/"/; s/$/"\\/
14774*8b26181fSAndroid Build Coastguard Workerp
14775*8b26181fSAndroid Build Coastguard Workerg
14776*8b26181fSAndroid Build Coastguard Workers/.\{148\}//
14777*8b26181fSAndroid Build Coastguard Workert delim
14778*8b26181fSAndroid Build Coastguard Worker' <conf$$subs.awk | sed '
14779*8b26181fSAndroid Build Coastguard Worker/^[^""]/{
14780*8b26181fSAndroid Build Coastguard Worker  N
14781*8b26181fSAndroid Build Coastguard Worker  s/\n//
14782*8b26181fSAndroid Build Coastguard Worker}
14783*8b26181fSAndroid Build Coastguard Worker' >>$CONFIG_STATUS || ac_write_fail=1
14784*8b26181fSAndroid Build Coastguard Workerrm -f conf$$subs.awk
14785*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14786*8b26181fSAndroid Build Coastguard Worker_ACAWK
14787*8b26181fSAndroid Build Coastguard Workercat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
14788*8b26181fSAndroid Build Coastguard Worker  for (key in S) S_is_set[key] = 1
14789*8b26181fSAndroid Build Coastguard Worker  FS = ""
14790*8b26181fSAndroid Build Coastguard Worker
14791*8b26181fSAndroid Build Coastguard Worker}
14792*8b26181fSAndroid Build Coastguard Worker{
14793*8b26181fSAndroid Build Coastguard Worker  line = $ 0
14794*8b26181fSAndroid Build Coastguard Worker  nfields = split(line, field, "@")
14795*8b26181fSAndroid Build Coastguard Worker  substed = 0
14796*8b26181fSAndroid Build Coastguard Worker  len = length(field[1])
14797*8b26181fSAndroid Build Coastguard Worker  for (i = 2; i < nfields; i++) {
14798*8b26181fSAndroid Build Coastguard Worker    key = field[i]
14799*8b26181fSAndroid Build Coastguard Worker    keylen = length(key)
14800*8b26181fSAndroid Build Coastguard Worker    if (S_is_set[key]) {
14801*8b26181fSAndroid Build Coastguard Worker      value = S[key]
14802*8b26181fSAndroid Build Coastguard Worker      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
14803*8b26181fSAndroid Build Coastguard Worker      len += length(value) + length(field[++i])
14804*8b26181fSAndroid Build Coastguard Worker      substed = 1
14805*8b26181fSAndroid Build Coastguard Worker    } else
14806*8b26181fSAndroid Build Coastguard Worker      len += 1 + keylen
14807*8b26181fSAndroid Build Coastguard Worker  }
14808*8b26181fSAndroid Build Coastguard Worker
14809*8b26181fSAndroid Build Coastguard Worker  print line
14810*8b26181fSAndroid Build Coastguard Worker}
14811*8b26181fSAndroid Build Coastguard Worker
14812*8b26181fSAndroid Build Coastguard Worker_ACAWK
14813*8b26181fSAndroid Build Coastguard Worker_ACEOF
14814*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14815*8b26181fSAndroid Build Coastguard Workerif sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
14816*8b26181fSAndroid Build Coastguard Worker  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
14817*8b26181fSAndroid Build Coastguard Workerelse
14818*8b26181fSAndroid Build Coastguard Worker  cat
14819*8b26181fSAndroid Build Coastguard Workerfi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
14820*8b26181fSAndroid Build Coastguard Worker  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
14821*8b26181fSAndroid Build Coastguard Worker_ACEOF
14822*8b26181fSAndroid Build Coastguard Worker
14823*8b26181fSAndroid Build Coastguard Worker# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
14824*8b26181fSAndroid Build Coastguard Worker# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
14825*8b26181fSAndroid Build Coastguard Worker# trailing colons and then remove the whole line if VPATH becomes empty
14826*8b26181fSAndroid Build Coastguard Worker# (actually we leave an empty line to preserve line numbers).
14827*8b26181fSAndroid Build Coastguard Workerif test "x$srcdir" = x.; then
14828*8b26181fSAndroid Build Coastguard Worker  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
14829*8b26181fSAndroid Build Coastguard Workerh
14830*8b26181fSAndroid Build Coastguard Workers///
14831*8b26181fSAndroid Build Coastguard Workers/^/:/
14832*8b26181fSAndroid Build Coastguard Workers/[	 ]*$/:/
14833*8b26181fSAndroid Build Coastguard Workers/:\$(srcdir):/:/g
14834*8b26181fSAndroid Build Coastguard Workers/:\${srcdir}:/:/g
14835*8b26181fSAndroid Build Coastguard Workers/:@srcdir@:/:/g
14836*8b26181fSAndroid Build Coastguard Workers/^:*//
14837*8b26181fSAndroid Build Coastguard Workers/:*$//
14838*8b26181fSAndroid Build Coastguard Workerx
14839*8b26181fSAndroid Build Coastguard Workers/\(=[	 ]*\).*/\1/
14840*8b26181fSAndroid Build Coastguard WorkerG
14841*8b26181fSAndroid Build Coastguard Workers/\n//
14842*8b26181fSAndroid Build Coastguard Workers/^[^=]*=[	 ]*$//
14843*8b26181fSAndroid Build Coastguard Worker}'
14844*8b26181fSAndroid Build Coastguard Workerfi
14845*8b26181fSAndroid Build Coastguard Worker
14846*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14847*8b26181fSAndroid Build Coastguard Workerfi # test -n "$CONFIG_FILES"
14848*8b26181fSAndroid Build Coastguard Worker
14849*8b26181fSAndroid Build Coastguard Worker# Set up the scripts for CONFIG_HEADERS section.
14850*8b26181fSAndroid Build Coastguard Worker# No need to generate them if there are no CONFIG_HEADERS.
14851*8b26181fSAndroid Build Coastguard Worker# This happens for instance with `./config.status Makefile'.
14852*8b26181fSAndroid Build Coastguard Workerif test -n "$CONFIG_HEADERS"; then
14853*8b26181fSAndroid Build Coastguard Workercat >"$ac_tmp/defines.awk" <<\_ACAWK ||
14854*8b26181fSAndroid Build Coastguard WorkerBEGIN {
14855*8b26181fSAndroid Build Coastguard Worker_ACEOF
14856*8b26181fSAndroid Build Coastguard Worker
14857*8b26181fSAndroid Build Coastguard Worker# Transform confdefs.h into an awk script `defines.awk', embedded as
14858*8b26181fSAndroid Build Coastguard Worker# here-document in config.status, that substitutes the proper values into
14859*8b26181fSAndroid Build Coastguard Worker# config.h.in to produce config.h.
14860*8b26181fSAndroid Build Coastguard Worker
14861*8b26181fSAndroid Build Coastguard Worker# Create a delimiter string that does not exist in confdefs.h, to ease
14862*8b26181fSAndroid Build Coastguard Worker# handling of long lines.
14863*8b26181fSAndroid Build Coastguard Workerac_delim='%!_!# '
14864*8b26181fSAndroid Build Coastguard Workerfor ac_last_try in false false :; do
14865*8b26181fSAndroid Build Coastguard Worker  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
14866*8b26181fSAndroid Build Coastguard Worker  if test -z "$ac_tt"; then
14867*8b26181fSAndroid Build Coastguard Worker    break
14868*8b26181fSAndroid Build Coastguard Worker  elif $ac_last_try; then
14869*8b26181fSAndroid Build Coastguard Worker    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
14870*8b26181fSAndroid Build Coastguard Worker  else
14871*8b26181fSAndroid Build Coastguard Worker    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
14872*8b26181fSAndroid Build Coastguard Worker  fi
14873*8b26181fSAndroid Build Coastguard Workerdone
14874*8b26181fSAndroid Build Coastguard Worker
14875*8b26181fSAndroid Build Coastguard Worker# For the awk script, D is an array of macro values keyed by name,
14876*8b26181fSAndroid Build Coastguard Worker# likewise P contains macro parameters if any.  Preserve backslash
14877*8b26181fSAndroid Build Coastguard Worker# newline sequences.
14878*8b26181fSAndroid Build Coastguard Worker
14879*8b26181fSAndroid Build Coastguard Workerac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
14880*8b26181fSAndroid Build Coastguard Workersed -n '
14881*8b26181fSAndroid Build Coastguard Workers/.\{148\}/&'"$ac_delim"'/g
14882*8b26181fSAndroid Build Coastguard Workert rset
14883*8b26181fSAndroid Build Coastguard Worker:rset
14884*8b26181fSAndroid Build Coastguard Workers/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
14885*8b26181fSAndroid Build Coastguard Workert def
14886*8b26181fSAndroid Build Coastguard Workerd
14887*8b26181fSAndroid Build Coastguard Worker:def
14888*8b26181fSAndroid Build Coastguard Workers/\\$//
14889*8b26181fSAndroid Build Coastguard Workert bsnl
14890*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g
14891*8b26181fSAndroid Build Coastguard Workers/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
14892*8b26181fSAndroid Build Coastguard WorkerD["\1"]=" \3"/p
14893*8b26181fSAndroid Build Coastguard Workers/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
14894*8b26181fSAndroid Build Coastguard Workerd
14895*8b26181fSAndroid Build Coastguard Worker:bsnl
14896*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g
14897*8b26181fSAndroid Build Coastguard Workers/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
14898*8b26181fSAndroid Build Coastguard WorkerD["\1"]=" \3\\\\\\n"\\/p
14899*8b26181fSAndroid Build Coastguard Workert cont
14900*8b26181fSAndroid Build Coastguard Workers/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
14901*8b26181fSAndroid Build Coastguard Workert cont
14902*8b26181fSAndroid Build Coastguard Workerd
14903*8b26181fSAndroid Build Coastguard Worker:cont
14904*8b26181fSAndroid Build Coastguard Workern
14905*8b26181fSAndroid Build Coastguard Workers/.\{148\}/&'"$ac_delim"'/g
14906*8b26181fSAndroid Build Coastguard Workert clear
14907*8b26181fSAndroid Build Coastguard Worker:clear
14908*8b26181fSAndroid Build Coastguard Workers/\\$//
14909*8b26181fSAndroid Build Coastguard Workert bsnlc
14910*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g; s/^/"/; s/$/"/p
14911*8b26181fSAndroid Build Coastguard Workerd
14912*8b26181fSAndroid Build Coastguard Worker:bsnlc
14913*8b26181fSAndroid Build Coastguard Workers/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
14914*8b26181fSAndroid Build Coastguard Workerb cont
14915*8b26181fSAndroid Build Coastguard Worker' <confdefs.h | sed '
14916*8b26181fSAndroid Build Coastguard Workers/'"$ac_delim"'/"\\\
14917*8b26181fSAndroid Build Coastguard Worker"/g' >>$CONFIG_STATUS || ac_write_fail=1
14918*8b26181fSAndroid Build Coastguard Worker
14919*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
14920*8b26181fSAndroid Build Coastguard Worker  for (key in D) D_is_set[key] = 1
14921*8b26181fSAndroid Build Coastguard Worker  FS = ""
14922*8b26181fSAndroid Build Coastguard Worker}
14923*8b26181fSAndroid Build Coastguard Worker/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
14924*8b26181fSAndroid Build Coastguard Worker  line = \$ 0
14925*8b26181fSAndroid Build Coastguard Worker  split(line, arg, " ")
14926*8b26181fSAndroid Build Coastguard Worker  if (arg[1] == "#") {
14927*8b26181fSAndroid Build Coastguard Worker    defundef = arg[2]
14928*8b26181fSAndroid Build Coastguard Worker    mac1 = arg[3]
14929*8b26181fSAndroid Build Coastguard Worker  } else {
14930*8b26181fSAndroid Build Coastguard Worker    defundef = substr(arg[1], 2)
14931*8b26181fSAndroid Build Coastguard Worker    mac1 = arg[2]
14932*8b26181fSAndroid Build Coastguard Worker  }
14933*8b26181fSAndroid Build Coastguard Worker  split(mac1, mac2, "(") #)
14934*8b26181fSAndroid Build Coastguard Worker  macro = mac2[1]
14935*8b26181fSAndroid Build Coastguard Worker  prefix = substr(line, 1, index(line, defundef) - 1)
14936*8b26181fSAndroid Build Coastguard Worker  if (D_is_set[macro]) {
14937*8b26181fSAndroid Build Coastguard Worker    # Preserve the white space surrounding the "#".
14938*8b26181fSAndroid Build Coastguard Worker    print prefix "define", macro P[macro] D[macro]
14939*8b26181fSAndroid Build Coastguard Worker    next
14940*8b26181fSAndroid Build Coastguard Worker  } else {
14941*8b26181fSAndroid Build Coastguard Worker    # Replace #undef with comments.  This is necessary, for example,
14942*8b26181fSAndroid Build Coastguard Worker    # in the case of _POSIX_SOURCE, which is predefined and required
14943*8b26181fSAndroid Build Coastguard Worker    # on some systems where configure will not decide to define it.
14944*8b26181fSAndroid Build Coastguard Worker    if (defundef == "undef") {
14945*8b26181fSAndroid Build Coastguard Worker      print "/*", prefix defundef, macro, "*/"
14946*8b26181fSAndroid Build Coastguard Worker      next
14947*8b26181fSAndroid Build Coastguard Worker    }
14948*8b26181fSAndroid Build Coastguard Worker  }
14949*8b26181fSAndroid Build Coastguard Worker}
14950*8b26181fSAndroid Build Coastguard Worker{ print }
14951*8b26181fSAndroid Build Coastguard Worker_ACAWK
14952*8b26181fSAndroid Build Coastguard Worker_ACEOF
14953*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
14954*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
14955*8b26181fSAndroid Build Coastguard Workerfi # test -n "$CONFIG_HEADERS"
14956*8b26181fSAndroid Build Coastguard Worker
14957*8b26181fSAndroid Build Coastguard Worker
14958*8b26181fSAndroid Build Coastguard Workereval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
14959*8b26181fSAndroid Build Coastguard Workershift
14960*8b26181fSAndroid Build Coastguard Workerfor ac_tag
14961*8b26181fSAndroid Build Coastguard Workerdo
14962*8b26181fSAndroid Build Coastguard Worker  case $ac_tag in
14963*8b26181fSAndroid Build Coastguard Worker  :[FHLC]) ac_mode=$ac_tag; continue;;
14964*8b26181fSAndroid Build Coastguard Worker  esac
14965*8b26181fSAndroid Build Coastguard Worker  case $ac_mode$ac_tag in
14966*8b26181fSAndroid Build Coastguard Worker  :[FHL]*:*);;
14967*8b26181fSAndroid Build Coastguard Worker  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
14968*8b26181fSAndroid Build Coastguard Worker  :[FH]-) ac_tag=-:-;;
14969*8b26181fSAndroid Build Coastguard Worker  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
14970*8b26181fSAndroid Build Coastguard Worker  esac
14971*8b26181fSAndroid Build Coastguard Worker  ac_save_IFS=$IFS
14972*8b26181fSAndroid Build Coastguard Worker  IFS=:
14973*8b26181fSAndroid Build Coastguard Worker  set x $ac_tag
14974*8b26181fSAndroid Build Coastguard Worker  IFS=$ac_save_IFS
14975*8b26181fSAndroid Build Coastguard Worker  shift
14976*8b26181fSAndroid Build Coastguard Worker  ac_file=$1
14977*8b26181fSAndroid Build Coastguard Worker  shift
14978*8b26181fSAndroid Build Coastguard Worker
14979*8b26181fSAndroid Build Coastguard Worker  case $ac_mode in
14980*8b26181fSAndroid Build Coastguard Worker  :L) ac_source=$1;;
14981*8b26181fSAndroid Build Coastguard Worker  :[FH])
14982*8b26181fSAndroid Build Coastguard Worker    ac_file_inputs=
14983*8b26181fSAndroid Build Coastguard Worker    for ac_f
14984*8b26181fSAndroid Build Coastguard Worker    do
14985*8b26181fSAndroid Build Coastguard Worker      case $ac_f in
14986*8b26181fSAndroid Build Coastguard Worker      -) ac_f="$ac_tmp/stdin";;
14987*8b26181fSAndroid Build Coastguard Worker      *) # Look for the file first in the build tree, then in the source tree
14988*8b26181fSAndroid Build Coastguard Worker	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
14989*8b26181fSAndroid Build Coastguard Worker	 # because $ac_f cannot contain `:'.
14990*8b26181fSAndroid Build Coastguard Worker	 test -f "$ac_f" ||
14991*8b26181fSAndroid Build Coastguard Worker	   case $ac_f in
14992*8b26181fSAndroid Build Coastguard Worker	   [\\/$]*) false;;
14993*8b26181fSAndroid Build Coastguard Worker	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
14994*8b26181fSAndroid Build Coastguard Worker	   esac ||
14995*8b26181fSAndroid Build Coastguard Worker	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
14996*8b26181fSAndroid Build Coastguard Worker      esac
14997*8b26181fSAndroid Build Coastguard Worker      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
14998*8b26181fSAndroid Build Coastguard Worker      as_fn_append ac_file_inputs " '$ac_f'"
14999*8b26181fSAndroid Build Coastguard Worker    done
15000*8b26181fSAndroid Build Coastguard Worker
15001*8b26181fSAndroid Build Coastguard Worker    # Let's still pretend it is `configure' which instantiates (i.e., don't
15002*8b26181fSAndroid Build Coastguard Worker    # use $as_me), people would be surprised to read:
15003*8b26181fSAndroid Build Coastguard Worker    #    /* config.h.  Generated by config.status.  */
15004*8b26181fSAndroid Build Coastguard Worker    configure_input='Generated from '`
15005*8b26181fSAndroid Build Coastguard Worker	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
15006*8b26181fSAndroid Build Coastguard Worker	`' by configure.'
15007*8b26181fSAndroid Build Coastguard Worker    if test x"$ac_file" != x-; then
15008*8b26181fSAndroid Build Coastguard Worker      configure_input="$ac_file.  $configure_input"
15009*8b26181fSAndroid Build Coastguard Worker      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
15010*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: creating $ac_file" >&6;}
15011*8b26181fSAndroid Build Coastguard Worker    fi
15012*8b26181fSAndroid Build Coastguard Worker    # Neutralize special characters interpreted by sed in replacement strings.
15013*8b26181fSAndroid Build Coastguard Worker    case $configure_input in #(
15014*8b26181fSAndroid Build Coastguard Worker    *\&* | *\|* | *\\* )
15015*8b26181fSAndroid Build Coastguard Worker       ac_sed_conf_input=`$as_echo "$configure_input" |
15016*8b26181fSAndroid Build Coastguard Worker       sed 's/[\\\\&|]/\\\\&/g'`;; #(
15017*8b26181fSAndroid Build Coastguard Worker    *) ac_sed_conf_input=$configure_input;;
15018*8b26181fSAndroid Build Coastguard Worker    esac
15019*8b26181fSAndroid Build Coastguard Worker
15020*8b26181fSAndroid Build Coastguard Worker    case $ac_tag in
15021*8b26181fSAndroid Build Coastguard Worker    *:-:* | *:-) cat >"$ac_tmp/stdin" \
15022*8b26181fSAndroid Build Coastguard Worker      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
15023*8b26181fSAndroid Build Coastguard Worker    esac
15024*8b26181fSAndroid Build Coastguard Worker    ;;
15025*8b26181fSAndroid Build Coastguard Worker  esac
15026*8b26181fSAndroid Build Coastguard Worker
15027*8b26181fSAndroid Build Coastguard Worker  ac_dir=`$as_dirname -- "$ac_file" ||
15028*8b26181fSAndroid Build Coastguard Worker$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
15029*8b26181fSAndroid Build Coastguard Worker	 X"$ac_file" : 'X\(//\)[^/]' \| \
15030*8b26181fSAndroid Build Coastguard Worker	 X"$ac_file" : 'X\(//\)$' \| \
15031*8b26181fSAndroid Build Coastguard Worker	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
15032*8b26181fSAndroid Build Coastguard Worker$as_echo X"$ac_file" |
15033*8b26181fSAndroid Build Coastguard Worker    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
15034*8b26181fSAndroid Build Coastguard Worker	    s//\1/
15035*8b26181fSAndroid Build Coastguard Worker	    q
15036*8b26181fSAndroid Build Coastguard Worker	  }
15037*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)[^/].*/{
15038*8b26181fSAndroid Build Coastguard Worker	    s//\1/
15039*8b26181fSAndroid Build Coastguard Worker	    q
15040*8b26181fSAndroid Build Coastguard Worker	  }
15041*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\/\)$/{
15042*8b26181fSAndroid Build Coastguard Worker	    s//\1/
15043*8b26181fSAndroid Build Coastguard Worker	    q
15044*8b26181fSAndroid Build Coastguard Worker	  }
15045*8b26181fSAndroid Build Coastguard Worker	  /^X\(\/\).*/{
15046*8b26181fSAndroid Build Coastguard Worker	    s//\1/
15047*8b26181fSAndroid Build Coastguard Worker	    q
15048*8b26181fSAndroid Build Coastguard Worker	  }
15049*8b26181fSAndroid Build Coastguard Worker	  s/.*/./; q'`
15050*8b26181fSAndroid Build Coastguard Worker  as_dir="$ac_dir"; as_fn_mkdir_p
15051*8b26181fSAndroid Build Coastguard Worker  ac_builddir=.
15052*8b26181fSAndroid Build Coastguard Worker
15053*8b26181fSAndroid Build Coastguard Workercase "$ac_dir" in
15054*8b26181fSAndroid Build Coastguard Worker.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
15055*8b26181fSAndroid Build Coastguard Worker*)
15056*8b26181fSAndroid Build Coastguard Worker  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
15057*8b26181fSAndroid Build Coastguard Worker  # A ".." for each directory in $ac_dir_suffix.
15058*8b26181fSAndroid Build Coastguard Worker  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
15059*8b26181fSAndroid Build Coastguard Worker  case $ac_top_builddir_sub in
15060*8b26181fSAndroid Build Coastguard Worker  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
15061*8b26181fSAndroid Build Coastguard Worker  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
15062*8b26181fSAndroid Build Coastguard Worker  esac ;;
15063*8b26181fSAndroid Build Coastguard Workeresac
15064*8b26181fSAndroid Build Coastguard Workerac_abs_top_builddir=$ac_pwd
15065*8b26181fSAndroid Build Coastguard Workerac_abs_builddir=$ac_pwd$ac_dir_suffix
15066*8b26181fSAndroid Build Coastguard Worker# for backward compatibility:
15067*8b26181fSAndroid Build Coastguard Workerac_top_builddir=$ac_top_build_prefix
15068*8b26181fSAndroid Build Coastguard Worker
15069*8b26181fSAndroid Build Coastguard Workercase $srcdir in
15070*8b26181fSAndroid Build Coastguard Worker  .)  # We are building in place.
15071*8b26181fSAndroid Build Coastguard Worker    ac_srcdir=.
15072*8b26181fSAndroid Build Coastguard Worker    ac_top_srcdir=$ac_top_builddir_sub
15073*8b26181fSAndroid Build Coastguard Worker    ac_abs_top_srcdir=$ac_pwd ;;
15074*8b26181fSAndroid Build Coastguard Worker  [\\/]* | ?:[\\/]* )  # Absolute name.
15075*8b26181fSAndroid Build Coastguard Worker    ac_srcdir=$srcdir$ac_dir_suffix;
15076*8b26181fSAndroid Build Coastguard Worker    ac_top_srcdir=$srcdir
15077*8b26181fSAndroid Build Coastguard Worker    ac_abs_top_srcdir=$srcdir ;;
15078*8b26181fSAndroid Build Coastguard Worker  *) # Relative name.
15079*8b26181fSAndroid Build Coastguard Worker    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
15080*8b26181fSAndroid Build Coastguard Worker    ac_top_srcdir=$ac_top_build_prefix$srcdir
15081*8b26181fSAndroid Build Coastguard Worker    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
15082*8b26181fSAndroid Build Coastguard Workeresac
15083*8b26181fSAndroid Build Coastguard Workerac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
15084*8b26181fSAndroid Build Coastguard Worker
15085*8b26181fSAndroid Build Coastguard Worker
15086*8b26181fSAndroid Build Coastguard Worker  case $ac_mode in
15087*8b26181fSAndroid Build Coastguard Worker  :F)
15088*8b26181fSAndroid Build Coastguard Worker  #
15089*8b26181fSAndroid Build Coastguard Worker  # CONFIG_FILE
15090*8b26181fSAndroid Build Coastguard Worker  #
15091*8b26181fSAndroid Build Coastguard Worker
15092*8b26181fSAndroid Build Coastguard Worker  case $INSTALL in
15093*8b26181fSAndroid Build Coastguard Worker  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
15094*8b26181fSAndroid Build Coastguard Worker  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
15095*8b26181fSAndroid Build Coastguard Worker  esac
15096*8b26181fSAndroid Build Coastguard Worker_ACEOF
15097*8b26181fSAndroid Build Coastguard Worker
15098*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15099*8b26181fSAndroid Build Coastguard Worker# If the template does not know about datarootdir, expand it.
15100*8b26181fSAndroid Build Coastguard Worker# FIXME: This hack should be removed a few years after 2.60.
15101*8b26181fSAndroid Build Coastguard Workerac_datarootdir_hack=; ac_datarootdir_seen=
15102*8b26181fSAndroid Build Coastguard Workerac_sed_dataroot='
15103*8b26181fSAndroid Build Coastguard Worker/datarootdir/ {
15104*8b26181fSAndroid Build Coastguard Worker  p
15105*8b26181fSAndroid Build Coastguard Worker  q
15106*8b26181fSAndroid Build Coastguard Worker}
15107*8b26181fSAndroid Build Coastguard Worker/@datadir@/p
15108*8b26181fSAndroid Build Coastguard Worker/@docdir@/p
15109*8b26181fSAndroid Build Coastguard Worker/@infodir@/p
15110*8b26181fSAndroid Build Coastguard Worker/@localedir@/p
15111*8b26181fSAndroid Build Coastguard Worker/@mandir@/p'
15112*8b26181fSAndroid Build Coastguard Workercase `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
15113*8b26181fSAndroid Build Coastguard Worker*datarootdir*) ac_datarootdir_seen=yes;;
15114*8b26181fSAndroid Build Coastguard Worker*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
15115*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
15116*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
15117*8b26181fSAndroid Build Coastguard Worker_ACEOF
15118*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15119*8b26181fSAndroid Build Coastguard Worker  ac_datarootdir_hack='
15120*8b26181fSAndroid Build Coastguard Worker  s&@datadir@&$datadir&g
15121*8b26181fSAndroid Build Coastguard Worker  s&@docdir@&$docdir&g
15122*8b26181fSAndroid Build Coastguard Worker  s&@infodir@&$infodir&g
15123*8b26181fSAndroid Build Coastguard Worker  s&@localedir@&$localedir&g
15124*8b26181fSAndroid Build Coastguard Worker  s&@mandir@&$mandir&g
15125*8b26181fSAndroid Build Coastguard Worker  s&\\\${datarootdir}&$datarootdir&g' ;;
15126*8b26181fSAndroid Build Coastguard Workeresac
15127*8b26181fSAndroid Build Coastguard Worker_ACEOF
15128*8b26181fSAndroid Build Coastguard Worker
15129*8b26181fSAndroid Build Coastguard Worker# Neutralize VPATH when `$srcdir' = `.'.
15130*8b26181fSAndroid Build Coastguard Worker# Shell code in configure.ac might set extrasub.
15131*8b26181fSAndroid Build Coastguard Worker# FIXME: do we really want to maintain this feature?
15132*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
15133*8b26181fSAndroid Build Coastguard Workerac_sed_extra="$ac_vpsub
15134*8b26181fSAndroid Build Coastguard Worker$extrasub
15135*8b26181fSAndroid Build Coastguard Worker_ACEOF
15136*8b26181fSAndroid Build Coastguard Workercat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
15137*8b26181fSAndroid Build Coastguard Worker:t
15138*8b26181fSAndroid Build Coastguard Worker/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
15139*8b26181fSAndroid Build Coastguard Workers|@configure_input@|$ac_sed_conf_input|;t t
15140*8b26181fSAndroid Build Coastguard Workers&@top_builddir@&$ac_top_builddir_sub&;t t
15141*8b26181fSAndroid Build Coastguard Workers&@top_build_prefix@&$ac_top_build_prefix&;t t
15142*8b26181fSAndroid Build Coastguard Workers&@srcdir@&$ac_srcdir&;t t
15143*8b26181fSAndroid Build Coastguard Workers&@abs_srcdir@&$ac_abs_srcdir&;t t
15144*8b26181fSAndroid Build Coastguard Workers&@top_srcdir@&$ac_top_srcdir&;t t
15145*8b26181fSAndroid Build Coastguard Workers&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
15146*8b26181fSAndroid Build Coastguard Workers&@builddir@&$ac_builddir&;t t
15147*8b26181fSAndroid Build Coastguard Workers&@abs_builddir@&$ac_abs_builddir&;t t
15148*8b26181fSAndroid Build Coastguard Workers&@abs_top_builddir@&$ac_abs_top_builddir&;t t
15149*8b26181fSAndroid Build Coastguard Workers&@INSTALL@&$ac_INSTALL&;t t
15150*8b26181fSAndroid Build Coastguard Worker$ac_datarootdir_hack
15151*8b26181fSAndroid Build Coastguard Worker"
15152*8b26181fSAndroid Build Coastguard Workereval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
15153*8b26181fSAndroid Build Coastguard Worker  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15154*8b26181fSAndroid Build Coastguard Worker
15155*8b26181fSAndroid Build Coastguard Workertest -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
15156*8b26181fSAndroid Build Coastguard Worker  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
15157*8b26181fSAndroid Build Coastguard Worker  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
15158*8b26181fSAndroid Build Coastguard Worker      "$ac_tmp/out"`; test -z "$ac_out"; } &&
15159*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15160*8b26181fSAndroid Build Coastguard Workerwhich seems to be undefined.  Please make sure it is defined" >&5
15161*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
15162*8b26181fSAndroid Build Coastguard Workerwhich seems to be undefined.  Please make sure it is defined" >&2;}
15163*8b26181fSAndroid Build Coastguard Worker
15164*8b26181fSAndroid Build Coastguard Worker  rm -f "$ac_tmp/stdin"
15165*8b26181fSAndroid Build Coastguard Worker  case $ac_file in
15166*8b26181fSAndroid Build Coastguard Worker  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
15167*8b26181fSAndroid Build Coastguard Worker  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
15168*8b26181fSAndroid Build Coastguard Worker  esac \
15169*8b26181fSAndroid Build Coastguard Worker  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15170*8b26181fSAndroid Build Coastguard Worker ;;
15171*8b26181fSAndroid Build Coastguard Worker  :H)
15172*8b26181fSAndroid Build Coastguard Worker  #
15173*8b26181fSAndroid Build Coastguard Worker  # CONFIG_HEADER
15174*8b26181fSAndroid Build Coastguard Worker  #
15175*8b26181fSAndroid Build Coastguard Worker  if test x"$ac_file" != x-; then
15176*8b26181fSAndroid Build Coastguard Worker    {
15177*8b26181fSAndroid Build Coastguard Worker      $as_echo "/* $configure_input  */" \
15178*8b26181fSAndroid Build Coastguard Worker      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
15179*8b26181fSAndroid Build Coastguard Worker    } >"$ac_tmp/config.h" \
15180*8b26181fSAndroid Build Coastguard Worker      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
15181*8b26181fSAndroid Build Coastguard Worker    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
15182*8b26181fSAndroid Build Coastguard Worker      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
15183*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: $ac_file is unchanged" >&6;}
15184*8b26181fSAndroid Build Coastguard Worker    else
15185*8b26181fSAndroid Build Coastguard Worker      rm -f "$ac_file"
15186*8b26181fSAndroid Build Coastguard Worker      mv "$ac_tmp/config.h" "$ac_file" \
15187*8b26181fSAndroid Build Coastguard Worker	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
15188*8b26181fSAndroid Build Coastguard Worker    fi
15189*8b26181fSAndroid Build Coastguard Worker  else
15190*8b26181fSAndroid Build Coastguard Worker    $as_echo "/* $configure_input  */" \
15191*8b26181fSAndroid Build Coastguard Worker      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
15192*8b26181fSAndroid Build Coastguard Worker      || as_fn_error $? "could not create -" "$LINENO" 5
15193*8b26181fSAndroid Build Coastguard Worker  fi
15194*8b26181fSAndroid Build Coastguard Worker ;;
15195*8b26181fSAndroid Build Coastguard Worker
15196*8b26181fSAndroid Build Coastguard Worker  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
15197*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: executing $ac_file commands" >&6;}
15198*8b26181fSAndroid Build Coastguard Worker ;;
15199*8b26181fSAndroid Build Coastguard Worker  esac
15200*8b26181fSAndroid Build Coastguard Worker
15201*8b26181fSAndroid Build Coastguard Worker
15202*8b26181fSAndroid Build Coastguard Worker  case $ac_file$ac_mode in
15203*8b26181fSAndroid Build Coastguard Worker    "default-1":C) if test -f .devel; then
15204*8b26181fSAndroid Build Coastguard Worker	echo timestamp > stamp-h
15205*8b26181fSAndroid Build Coastguard Worker	cat $srcdir/Makefile-devel-adds >> Makefile
15206*8b26181fSAndroid Build Coastguard Worker	make depend || exit 1
15207*8b26181fSAndroid Build Coastguard Workerfi ;;
15208*8b26181fSAndroid Build Coastguard Worker
15209*8b26181fSAndroid Build Coastguard Worker  esac
15210*8b26181fSAndroid Build Coastguard Workerdone # for ac_tag
15211*8b26181fSAndroid Build Coastguard Worker
15212*8b26181fSAndroid Build Coastguard Worker
15213*8b26181fSAndroid Build Coastguard Workeras_fn_exit 0
15214*8b26181fSAndroid Build Coastguard Worker_ACEOF
15215*8b26181fSAndroid Build Coastguard Workerac_clean_files=$ac_clean_files_save
15216*8b26181fSAndroid Build Coastguard Worker
15217*8b26181fSAndroid Build Coastguard Workertest $ac_write_fail = 0 ||
15218*8b26181fSAndroid Build Coastguard Worker  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
15219*8b26181fSAndroid Build Coastguard Worker
15220*8b26181fSAndroid Build Coastguard Worker
15221*8b26181fSAndroid Build Coastguard Worker# configure is writing to config.log, and then calls config.status.
15222*8b26181fSAndroid Build Coastguard Worker# config.status does its own redirection, appending to config.log.
15223*8b26181fSAndroid Build Coastguard Worker# Unfortunately, on DOS this fails, as config.log is still kept open
15224*8b26181fSAndroid Build Coastguard Worker# by configure, so config.status won't be able to write to it; its
15225*8b26181fSAndroid Build Coastguard Worker# output is simply discarded.  So we exec the FD to /dev/null,
15226*8b26181fSAndroid Build Coastguard Worker# effectively closing config.log, so it can be properly (re)opened and
15227*8b26181fSAndroid Build Coastguard Worker# appended to by config.status.  When coming back to configure, we
15228*8b26181fSAndroid Build Coastguard Worker# need to make the FD available again.
15229*8b26181fSAndroid Build Coastguard Workerif test "$no_create" != yes; then
15230*8b26181fSAndroid Build Coastguard Worker  ac_cs_success=:
15231*8b26181fSAndroid Build Coastguard Worker  ac_config_status_args=
15232*8b26181fSAndroid Build Coastguard Worker  test "$silent" = yes &&
15233*8b26181fSAndroid Build Coastguard Worker    ac_config_status_args="$ac_config_status_args --quiet"
15234*8b26181fSAndroid Build Coastguard Worker  exec 5>/dev/null
15235*8b26181fSAndroid Build Coastguard Worker  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
15236*8b26181fSAndroid Build Coastguard Worker  exec 5>>config.log
15237*8b26181fSAndroid Build Coastguard Worker  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
15238*8b26181fSAndroid Build Coastguard Worker  # would make configure fail if this is the last instruction.
15239*8b26181fSAndroid Build Coastguard Worker  $ac_cs_success || as_fn_exit 1
15240*8b26181fSAndroid Build Coastguard Workerfi
15241*8b26181fSAndroid Build Coastguard Workerif test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
15242*8b26181fSAndroid Build Coastguard Worker  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
15243*8b26181fSAndroid Build Coastguard Worker$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
15244*8b26181fSAndroid Build Coastguard Workerfi
15245*8b26181fSAndroid Build Coastguard Worker
15246*8b26181fSAndroid Build Coastguard Workerexit 0
15247