blob: 736dfefb6710cac1efe9ffbfa6dbb34a176325b3 [file] [log] [blame]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001#! /bin/sh
The Android Open Source Project2949f582009-03-03 19:30:46 -08002# Guess values for system-dependent variables and create Makefiles.
Elliott Hughes820eced2021-08-20 18:00:50 -07003# Generated by GNU Autoconf 2.69 for tcpdump 4.99.1.
The Android Open Source Project2949f582009-03-03 19:30:46 -08004#
JP Abgrall53f17a92014-02-12 14:02:41 -08005#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
The Android Open Source Project2949f582009-03-03 19:30:46 -08009# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
JP Abgrall53f17a92014-02-12 14:02:41 -080011## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
The Android Open Source Project2949f582009-03-03 19:30:46 -080014
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
JP Abgrall53f17a92014-02-12 14:02:41 -080017if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -080018 emulate sh
19 NULLCMD=:
JP Abgrall53f17a92014-02-12 14:02:41 -080020 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
The Android Open Source Project2949f582009-03-03 19:30:46 -080021 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
JP Abgrall53f17a92014-02-12 14:02:41 -080025 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -080030esac
The Android Open Source Project2949f582009-03-03 19:30:46 -080031fi
32
33
JP Abgrall53f17a92014-02-12 14:02:41 -080034as_nl='
35'
36export as_nl
37# Printing a long string crashes Solaris 7 /usr/bin/printf.
38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41# Prefer a ksh shell builtin over an external printf program on Solaris,
42# but without wasting forks for bash or zsh.
43if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
64 '
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
67 fi
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
70fi
The Android Open Source Project2949f582009-03-03 19:30:46 -080071
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
JP Abgrall53f17a92014-02-12 14:02:41 -080074 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
78 }
The Android Open Source Project2949f582009-03-03 19:30:46 -080079fi
80
81
82# IFS
83# We need space, tab and new line, in precisely that order. Quoting is
84# there to prevent editors from complaining about space-tab.
85# (If _AS_PATH_WALK were called with IFS unset, it would disable word
86# splitting by setting IFS to empty value.)
The Android Open Source Project2949f582009-03-03 19:30:46 -080087IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
JP Abgrall53f17a92014-02-12 14:02:41 -080090as_myself=
91case $0 in #((
The Android Open Source Project2949f582009-03-03 19:30:46 -080092 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94for as_dir in $PATH
95do
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -080098 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
The Android Open Source Project2949f582009-03-03 19:30:46 -0800100IFS=$as_save_IFS
101
102 ;;
103esac
104# We did not find ourselves, most probably we were run as `sh COMMAND'
105# in which case we are not to be found in the path.
106if test "x$as_myself" = x; then
107 as_myself=$0
108fi
109if test ! -f "$as_myself"; then
JP Abgrall53f17a92014-02-12 14:02:41 -0800110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
The Android Open Source Project2949f582009-03-03 19:30:46 -0800112fi
113
JP Abgrall53f17a92014-02-12 14:02:41 -0800114# Unset variables that we do not need and which cause bugs (e.g. in
115# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116# suppresses any "Segmentation fault" message there. '((' could
117# trigger a bug in pdksh 5.2.14.
118for as_var in BASH_ENV ENV MAIL MAILPATH
119do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
The Android Open Source Project2949f582009-03-03 19:30:46 -0800121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
JP Abgrall53f17a92014-02-12 14:02:41 -0800127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
The Android Open Source Project2949f582009-03-03 19:30:46 -0800131
JP Abgrall53f17a92014-02-12 14:02:41 -0800132# CDPATH.
133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
134
135# Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140# neutralization value for shells without unset; and this also
141# works around shells that cannot unset nonexistent variables.
142# Preserve -v and -x to the replacement shell.
143BASH_ENV=/dev/null
144ENV=/dev/null
145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151esac
152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153# Admittedly, this is quite paranoid, since all the known shells bail
154# out after a failed `exec'.
155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156as_fn_exit 255
157 fi
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
173 ;;
174esac
175fi
176"
177 as_required="as_fn_return () { (exit \$1); }
178as_fn_success () { as_fn_return 0; }
179as_fn_failure () { as_fn_return 1; }
180as_fn_ret_success () { return 0; }
181as_fn_ret_failure () { return 1; }
182
183exitcode=0
184as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
189
190else
191 exitcode=1; echo positional parameters were not saved.
192fi
193test x\$exitcode = x0 || exit 1
194test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev/null; then :
201 as_have_required=yes
202else
203 as_have_required=no
204fi
205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206
207else
208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
209as_found=false
210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211do
212 IFS=$as_save_IFS
213 test -z "$as_dir" && as_dir=.
214 as_found=:
215 case $as_dir in #(
216 /*)
217 for as_base in sh bash ksh sh5; do
218 # Try only shells that exist, to save several forks.
219 as_shell=$as_dir/$as_base
220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
222 CONFIG_SHELL=$as_shell as_have_required=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
224 break 2
225fi
226fi
227 done;;
228 esac
229 as_found=false
230done
231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
233 CONFIG_SHELL=$SHELL as_have_required=yes
234fi; }
235IFS=$as_save_IFS
236
237
238 if test "x$CONFIG_SHELL" != x; then :
239 export CONFIG_SHELL
240 # We cannot yet assume a decent shell, so we have to provide a
241# neutralization value for shells without unset; and this also
242# works around shells that cannot unset nonexistent variables.
243# Preserve -v and -x to the replacement shell.
244BASH_ENV=/dev/null
245ENV=/dev/null
246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247case $- in # ((((
248 *v*x* | *x*v* ) as_opts=-vx ;;
249 *v* ) as_opts=-v ;;
250 *x* ) as_opts=-x ;;
251 * ) as_opts= ;;
252esac
253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254# Admittedly, this is quite paranoid, since all the known shells bail
255# out after a failed `exec'.
256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
257exit 255
258fi
259
260 if test x$as_have_required = xno; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x${ZSH_VERSION+set} = xset ; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
266 else
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268$0: including any error possibly output before this
269$0: message. Then install a modern shell, or manually run
270$0: the script under such a shell if you do have one."
271 fi
272 exit 1
273fi
274fi
275fi
276SHELL=${CONFIG_SHELL-/bin/sh}
277export SHELL
278# Unset more variables known to interfere with behavior of common tools.
279CLICOLOR_FORCE= GREP_OPTIONS=
280unset CLICOLOR_FORCE GREP_OPTIONS
281
282## --------------------- ##
283## M4sh Shell Functions. ##
284## --------------------- ##
285# as_fn_unset VAR
286# ---------------
287# Portably unset VAR.
288as_fn_unset ()
289{
290 { eval $1=; unset $1;}
291}
292as_unset=as_fn_unset
293
294# as_fn_set_status STATUS
295# -----------------------
296# Set $? to STATUS, without forking.
297as_fn_set_status ()
298{
299 return $1
300} # as_fn_set_status
301
302# as_fn_exit STATUS
303# -----------------
304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
305as_fn_exit ()
306{
307 set +e
308 as_fn_set_status $1
309 exit $1
310} # as_fn_exit
311
312# as_fn_mkdir_p
313# -------------
314# Create "$as_dir" as a directory, including parents if necessary.
315as_fn_mkdir_p ()
316{
317
318 case $as_dir in #(
319 -*) as_dir=./$as_dir;;
320 esac
321 test -d "$as_dir" || eval $as_mkdir_p || {
322 as_dirs=
323 while :; do
324 case $as_dir in #(
325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
326 *) as_qdir=$as_dir;;
327 esac
328 as_dirs="'$as_qdir' $as_dirs"
329 as_dir=`$as_dirname -- "$as_dir" ||
330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334$as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
336 s//\1/
337 q
338 }
339 /^X\(\/\/\)[^/].*/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)$/{
344 s//\1/
345 q
346 }
347 /^X\(\/\).*/{
348 s//\1/
349 q
350 }
351 s/.*/./; q'`
352 test -d "$as_dir" && break
353 done
354 test -z "$as_dirs" || eval "mkdir $as_dirs"
355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
356
357
358} # as_fn_mkdir_p
359
360# as_fn_executable_p FILE
361# -----------------------
362# Test if FILE is an executable regular file.
363as_fn_executable_p ()
364{
365 test -f "$1" && test -x "$1"
366} # as_fn_executable_p
367# as_fn_append VAR VALUE
368# ----------------------
369# Append the text in VALUE to the end of the definition contained in VAR. Take
370# advantage of any shell optimizations that allow amortized linear growth over
371# repeated appends, instead of the typical quadratic growth present in naive
372# implementations.
373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
374 eval 'as_fn_append ()
375 {
376 eval $1+=\$2
377 }'
378else
379 as_fn_append ()
380 {
381 eval $1=\$$1\$2
382 }
383fi # as_fn_append
384
385# as_fn_arith ARG...
386# ------------------
387# Perform arithmetic evaluation on the ARGs, and store the result in the
388# global $as_val. Take advantage of shells that can avoid forks. The arguments
389# must be portable across $(()) and expr.
390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
391 eval 'as_fn_arith ()
392 {
393 as_val=$(( $* ))
394 }'
395else
396 as_fn_arith ()
397 {
398 as_val=`expr "$@" || test $? -eq 1`
399 }
400fi # as_fn_arith
401
402
403# as_fn_error STATUS ERROR [LINENO LOG_FD]
404# ----------------------------------------
405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407# script with STATUS, using 1 if that was 0.
408as_fn_error ()
409{
410 as_status=$1; test $as_status -eq 0 && as_status=1
411 if test "$4"; then
412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 fi
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit $as_status
417} # as_fn_error
418
The Android Open Source Project2949f582009-03-03 19:30:46 -0800419if expr a : '\(a\)' >/dev/null 2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001; then
421 as_expr=expr
422else
423 as_expr=false
424fi
425
426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
427 as_basename=basename
428else
429 as_basename=false
430fi
431
JP Abgrall53f17a92014-02-12 14:02:41 -0800432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
433 as_dirname=dirname
434else
435 as_dirname=false
436fi
The Android Open Source Project2949f582009-03-03 19:30:46 -0800437
The Android Open Source Project2949f582009-03-03 19:30:46 -0800438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall53f17a92014-02-12 14:02:41 -0800442$as_echo X/"$0" |
The Android Open Source Project2949f582009-03-03 19:30:46 -0800443 sed '/^.*\/\([^/][^/]*\)\/*$/{
444 s//\1/
445 q
446 }
447 /^X\/\(\/\/\)$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\).*/{
452 s//\1/
453 q
454 }
455 s/.*/./; q'`
456
JP Abgrall53f17a92014-02-12 14:02:41 -0800457# Avoid depending upon Character Ranges.
458as_cr_letters='abcdefghijklmnopqrstuvwxyz'
459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460as_cr_Letters=$as_cr_letters$as_cr_LETTERS
461as_cr_digits='0123456789'
462as_cr_alnum=$as_cr_Letters$as_cr_digits
The Android Open Source Project2949f582009-03-03 19:30:46 -0800463
464
JP Abgrall53f17a92014-02-12 14:02:41 -0800465 as_lineno_1=$LINENO as_lineno_1a=$LINENO
466 as_lineno_2=$LINENO as_lineno_2a=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
The Android Open Source Project2949f582009-03-03 19:30:46 -0800470 sed -n '
471 p
472 /[$]LINENO/=
473 ' <$as_myself |
474 sed '
475 s/[$]LINENO.*/&-/
476 t lineno
477 b
478 :lineno
479 N
480 :loop
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
482 t loop
483 s/-\n.*//
484 ' >$as_me.lineno &&
485 chmod +x "$as_me.lineno" ||
JP Abgrall53f17a92014-02-12 14:02:41 -0800486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
The Android Open Source Project2949f582009-03-03 19:30:46 -0800487
JP Abgrall53f17a92014-02-12 14:02:41 -0800488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec=no; export _as_can_reexec
The Android Open Source Project2949f582009-03-03 19:30:46 -0800492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
495 . "./$as_me.lineno"
496 # Exit status is that of the last command.
497 exit
498}
499
The Android Open Source Project2949f582009-03-03 19:30:46 -0800500ECHO_C= ECHO_N= ECHO_T=
JP Abgrall53f17a92014-02-12 14:02:41 -0800501case `echo -n x` in #(((((
The Android Open Source Project2949f582009-03-03 19:30:46 -0800502-n*)
JP Abgrall53f17a92014-02-12 14:02:41 -0800503 case `echo 'xy\c'` in
The Android Open Source Project2949f582009-03-03 19:30:46 -0800504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
JP Abgrall53f17a92014-02-12 14:02:41 -0800505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
The Android Open Source Project2949f582009-03-03 19:30:46 -0800508 esac;;
509*)
510 ECHO_N='-n';;
511esac
512
The Android Open Source Project2949f582009-03-03 19:30:46 -0800513rm -f conf$$ conf$$.exe conf$$.file
514if test -d conf$$.dir; then
515 rm -f conf$$.dir/conf$$.file
516else
517 rm -f conf$$.dir
JP Abgrall53f17a92014-02-12 14:02:41 -0800518 mkdir conf$$.dir 2>/dev/null
The Android Open Source Project2949f582009-03-03 19:30:46 -0800519fi
JP Abgrall53f17a92014-02-12 14:02:41 -0800520if (echo >conf$$.file) 2>/dev/null; then
521 if ln -s conf$$.file conf$$ 2>/dev/null; then
522 as_ln_s='ln -s'
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
528 as_ln_s='cp -pR'
529 elif ln conf$$.file conf$$ 2>/dev/null; then
530 as_ln_s=ln
531 else
532 as_ln_s='cp -pR'
533 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -0800534else
JP Abgrall53f17a92014-02-12 14:02:41 -0800535 as_ln_s='cp -pR'
The Android Open Source Project2949f582009-03-03 19:30:46 -0800536fi
537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
538rmdir conf$$.dir 2>/dev/null
539
540if mkdir -p . 2>/dev/null; then
JP Abgrall53f17a92014-02-12 14:02:41 -0800541 as_mkdir_p='mkdir -p "$as_dir"'
The Android Open Source Project2949f582009-03-03 19:30:46 -0800542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
JP Abgrall53f17a92014-02-12 14:02:41 -0800547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
The Android Open Source Project2949f582009-03-03 19:30:46 -0800549
550# Sed expression to map a string onto a valid CPP name.
551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552
553# Sed expression to map a string onto a valid variable name.
554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
555
556
JP Abgrall53f17a92014-02-12 14:02:41 -0800557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
The Android Open Source Project2949f582009-03-03 19:30:46 -0800559
560# Name of the host.
JP Abgrall53f17a92014-02-12 14:02:41 -0800561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
The Android Open Source Project2949f582009-03-03 19:30:46 -0800562# so uname gets run too.
563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
564
565#
566# Initializations.
567#
568ac_default_prefix=/usr/local
569ac_clean_files=
570ac_config_libobj_dir=.
571LIBOBJS=
572cross_compiling=no
573subdirs=
574MFLAGS=
575MAKEFLAGS=
The Android Open Source Project2949f582009-03-03 19:30:46 -0800576
577# Identity of this package.
Elliott Hughes820eced2021-08-20 18:00:50 -0700578PACKAGE_NAME='tcpdump'
579PACKAGE_TARNAME='tcpdump'
580PACKAGE_VERSION='4.99.1'
581PACKAGE_STRING='tcpdump 4.99.1'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
The Android Open Source Project2949f582009-03-03 19:30:46 -0800584
585ac_unique_file="tcpdump.c"
586# Factoring default headers for most tests.
587ac_includes_default="\
588#include <stdio.h>
589#ifdef HAVE_SYS_TYPES_H
590# include <sys/types.h>
591#endif
592#ifdef HAVE_SYS_STAT_H
593# include <sys/stat.h>
594#endif
595#ifdef STDC_HEADERS
596# include <stdlib.h>
597# include <stddef.h>
598#else
599# ifdef HAVE_STDLIB_H
600# include <stdlib.h>
601# endif
602#endif
603#ifdef HAVE_STRING_H
604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
605# include <memory.h>
606# endif
607# include <string.h>
608#endif
609#ifdef HAVE_STRINGS_H
610# include <strings.h>
611#endif
612#ifdef HAVE_INTTYPES_H
613# include <inttypes.h>
614#endif
615#ifdef HAVE_STDINT_H
616# include <stdint.h>
617#endif
618#ifdef HAVE_UNISTD_H
619# include <unistd.h>
620#endif"
621
JP Abgrall53f17a92014-02-12 14:02:41 -0800622ac_subst_vars='LTLIBOBJS
The Android Open Source Project2949f582009-03-03 19:30:46 -0800623INSTALL_DATA
JP Abgrall53f17a92014-02-12 14:02:41 -0800624INSTALL_SCRIPT
625INSTALL_PROGRAM
626MAN_MISC_INFO
627MAN_FILE_FORMATS
628LOCALSRC
629V_PCAPDEP
630V_INCLS
631V_GROUP
632V_DEFS
633V_CCOPT
634MKDEP
635DEPENDENCY_CFLAG
Elliott Hughes892a68b2015-10-19 14:43:53 -0700636AR
JP Abgrall53f17a92014-02-12 14:02:41 -0800637RANLIB
638PCAP_CONFIG
Elliott Hughes820eced2021-08-20 18:00:50 -0700639PKG_CONFIG
JP Abgrall53f17a92014-02-12 14:02:41 -0800640LIBOBJS
641EGREP
642GREP
643CPP
644OBJEXT
645EXEEXT
646ac_ct_CC
647CPPFLAGS
648LDFLAGS
649CFLAGS
650CC
651SHLICC2
652host_os
653host_vendor
654host_cpu
655host
656build_os
657build_vendor
658build_cpu
659build
660target_alias
661host_alias
662build_alias
663LIBS
664ECHO_T
665ECHO_N
666ECHO_C
667DEFS
668mandir
669localedir
670libdir
671psdir
672pdfdir
673dvidir
674htmldir
675infodir
676docdir
677oldincludedir
678includedir
Elliott Hughes820eced2021-08-20 18:00:50 -0700679runstatedir
JP Abgrall53f17a92014-02-12 14:02:41 -0800680localstatedir
681sharedstatedir
682sysconfdir
683datadir
684datarootdir
685libexecdir
686sbindir
687bindir
688program_transform_name
689prefix
690exec_prefix
691PACKAGE_URL
692PACKAGE_BUGREPORT
693PACKAGE_STRING
694PACKAGE_VERSION
695PACKAGE_TARNAME
696PACKAGE_NAME
697PATH_SEPARATOR
698SHELL'
The Android Open Source Project2949f582009-03-03 19:30:46 -0800699ac_subst_files=''
JP Abgrall53f17a92014-02-12 14:02:41 -0800700ac_user_opts='
701enable_option_checking
702with_gcc
703enable_universal
704with_smi
705enable_smb
706with_user
707with_chroot
Elliott Hughes892a68b2015-10-19 14:43:53 -0700708with_sandbox_capsicum
Elliott Hughes820eced2021-08-20 18:00:50 -0700709enable_local_libpcap
JP Abgrall53f17a92014-02-12 14:02:41 -0800710with_crypto
Elliott Hughes892a68b2015-10-19 14:43:53 -0700711with_cap_ng
JP Abgrall53f17a92014-02-12 14:02:41 -0800712'
The Android Open Source Project2949f582009-03-03 19:30:46 -0800713 ac_precious_vars='build_alias
714host_alias
715target_alias
716CC
717CFLAGS
718LDFLAGS
719LIBS
720CPPFLAGS
721CPP'
722
723
724# Initialize some variables set by options.
725ac_init_help=
726ac_init_version=false
JP Abgrall53f17a92014-02-12 14:02:41 -0800727ac_unrecognized_opts=
728ac_unrecognized_sep=
The Android Open Source Project2949f582009-03-03 19:30:46 -0800729# The variables have the same names as the options, with
730# dashes changed to underlines.
731cache_file=/dev/null
732exec_prefix=NONE
733no_create=
734no_recursion=
735prefix=NONE
736program_prefix=NONE
737program_suffix=NONE
738program_transform_name=s,x,x,
739silent=
740site=
741srcdir=
742verbose=
743x_includes=NONE
744x_libraries=NONE
745
746# Installation directory options.
747# These are left unexpanded so users can "make install exec_prefix=/foo"
748# and all the variables that are supposed to be based on exec_prefix
749# by default will actually change.
750# Use braces instead of parens because sh, perl, etc. also accept them.
751# (The list follows the same order as the GNU Coding Standards.)
752bindir='${exec_prefix}/bin'
753sbindir='${exec_prefix}/sbin'
754libexecdir='${exec_prefix}/libexec'
755datarootdir='${prefix}/share'
756datadir='${datarootdir}'
757sysconfdir='${prefix}/etc'
758sharedstatedir='${prefix}/com'
759localstatedir='${prefix}/var'
Elliott Hughes820eced2021-08-20 18:00:50 -0700760runstatedir='${localstatedir}/run'
The Android Open Source Project2949f582009-03-03 19:30:46 -0800761includedir='${prefix}/include'
762oldincludedir='/usr/include'
Elliott Hughes820eced2021-08-20 18:00:50 -0700763docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
The Android Open Source Project2949f582009-03-03 19:30:46 -0800764infodir='${datarootdir}/info'
765htmldir='${docdir}'
766dvidir='${docdir}'
767pdfdir='${docdir}'
768psdir='${docdir}'
769libdir='${exec_prefix}/lib'
770localedir='${datarootdir}/locale'
771mandir='${datarootdir}/man'
772
773ac_prev=
774ac_dashdash=
775for ac_option
776do
777 # If the previous option needs an argument, assign it.
778 if test -n "$ac_prev"; then
779 eval $ac_prev=\$ac_option
780 ac_prev=
781 continue
782 fi
783
784 case $ac_option in
JP Abgrall53f17a92014-02-12 14:02:41 -0800785 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
786 *=) ac_optarg= ;;
787 *) ac_optarg=yes ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -0800788 esac
789
790 # Accept the important Cygnus configure options, so we can diagnose typos.
791
792 case $ac_dashdash$ac_option in
793 --)
794 ac_dashdash=yes ;;
795
796 -bindir | --bindir | --bindi | --bind | --bin | --bi)
797 ac_prev=bindir ;;
798 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
799 bindir=$ac_optarg ;;
800
801 -build | --build | --buil | --bui | --bu)
802 ac_prev=build_alias ;;
803 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
804 build_alias=$ac_optarg ;;
805
806 -cache-file | --cache-file | --cache-fil | --cache-fi \
807 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
808 ac_prev=cache_file ;;
809 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
810 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
811 cache_file=$ac_optarg ;;
812
813 --config-cache | -C)
814 cache_file=config.cache ;;
815
816 -datadir | --datadir | --datadi | --datad)
817 ac_prev=datadir ;;
818 -datadir=* | --datadir=* | --datadi=* | --datad=*)
819 datadir=$ac_optarg ;;
820
821 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
822 | --dataroo | --dataro | --datar)
823 ac_prev=datarootdir ;;
824 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
825 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
826 datarootdir=$ac_optarg ;;
827
828 -disable-* | --disable-*)
JP Abgrall53f17a92014-02-12 14:02:41 -0800829 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
The Android Open Source Project2949f582009-03-03 19:30:46 -0800830 # Reject names that are not valid shell variable names.
JP Abgrall53f17a92014-02-12 14:02:41 -0800831 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
832 as_fn_error $? "invalid feature name: $ac_useropt"
833 ac_useropt_orig=$ac_useropt
834 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
835 case $ac_user_opts in
836 *"
837"enable_$ac_useropt"
838"*) ;;
839 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
840 ac_unrecognized_sep=', ';;
841 esac
842 eval enable_$ac_useropt=no ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -0800843
844 -docdir | --docdir | --docdi | --doc | --do)
845 ac_prev=docdir ;;
846 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
847 docdir=$ac_optarg ;;
848
849 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
850 ac_prev=dvidir ;;
851 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
852 dvidir=$ac_optarg ;;
853
854 -enable-* | --enable-*)
JP Abgrall53f17a92014-02-12 14:02:41 -0800855 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
The Android Open Source Project2949f582009-03-03 19:30:46 -0800856 # Reject names that are not valid shell variable names.
JP Abgrall53f17a92014-02-12 14:02:41 -0800857 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
858 as_fn_error $? "invalid feature name: $ac_useropt"
859 ac_useropt_orig=$ac_useropt
860 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
861 case $ac_user_opts in
862 *"
863"enable_$ac_useropt"
864"*) ;;
865 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
866 ac_unrecognized_sep=', ';;
867 esac
868 eval enable_$ac_useropt=\$ac_optarg ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -0800869
870 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
871 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
872 | --exec | --exe | --ex)
873 ac_prev=exec_prefix ;;
874 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
875 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
876 | --exec=* | --exe=* | --ex=*)
877 exec_prefix=$ac_optarg ;;
878
879 -gas | --gas | --ga | --g)
880 # Obsolete; use --with-gas.
881 with_gas=yes ;;
882
883 -help | --help | --hel | --he | -h)
884 ac_init_help=long ;;
885 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
886 ac_init_help=recursive ;;
887 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
888 ac_init_help=short ;;
889
890 -host | --host | --hos | --ho)
891 ac_prev=host_alias ;;
892 -host=* | --host=* | --hos=* | --ho=*)
893 host_alias=$ac_optarg ;;
894
895 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
896 ac_prev=htmldir ;;
897 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
898 | --ht=*)
899 htmldir=$ac_optarg ;;
900
901 -includedir | --includedir | --includedi | --included | --include \
902 | --includ | --inclu | --incl | --inc)
903 ac_prev=includedir ;;
904 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
905 | --includ=* | --inclu=* | --incl=* | --inc=*)
906 includedir=$ac_optarg ;;
907
908 -infodir | --infodir | --infodi | --infod | --info | --inf)
909 ac_prev=infodir ;;
910 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
911 infodir=$ac_optarg ;;
912
913 -libdir | --libdir | --libdi | --libd)
914 ac_prev=libdir ;;
915 -libdir=* | --libdir=* | --libdi=* | --libd=*)
916 libdir=$ac_optarg ;;
917
918 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
919 | --libexe | --libex | --libe)
920 ac_prev=libexecdir ;;
921 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
922 | --libexe=* | --libex=* | --libe=*)
923 libexecdir=$ac_optarg ;;
924
925 -localedir | --localedir | --localedi | --localed | --locale)
926 ac_prev=localedir ;;
927 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
928 localedir=$ac_optarg ;;
929
930 -localstatedir | --localstatedir | --localstatedi | --localstated \
931 | --localstate | --localstat | --localsta | --localst | --locals)
932 ac_prev=localstatedir ;;
933 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
934 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
935 localstatedir=$ac_optarg ;;
936
937 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
938 ac_prev=mandir ;;
939 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
940 mandir=$ac_optarg ;;
941
942 -nfp | --nfp | --nf)
943 # Obsolete; use --without-fp.
944 with_fp=no ;;
945
946 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
947 | --no-cr | --no-c | -n)
948 no_create=yes ;;
949
950 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
952 no_recursion=yes ;;
953
954 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
955 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
956 | --oldin | --oldi | --old | --ol | --o)
957 ac_prev=oldincludedir ;;
958 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
959 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
960 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
961 oldincludedir=$ac_optarg ;;
962
963 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
964 ac_prev=prefix ;;
965 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
966 prefix=$ac_optarg ;;
967
968 -program-prefix | --program-prefix | --program-prefi | --program-pref \
969 | --program-pre | --program-pr | --program-p)
970 ac_prev=program_prefix ;;
971 -program-prefix=* | --program-prefix=* | --program-prefi=* \
972 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
973 program_prefix=$ac_optarg ;;
974
975 -program-suffix | --program-suffix | --program-suffi | --program-suff \
976 | --program-suf | --program-su | --program-s)
977 ac_prev=program_suffix ;;
978 -program-suffix=* | --program-suffix=* | --program-suffi=* \
979 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
980 program_suffix=$ac_optarg ;;
981
982 -program-transform-name | --program-transform-name \
983 | --program-transform-nam | --program-transform-na \
984 | --program-transform-n | --program-transform- \
985 | --program-transform | --program-transfor \
986 | --program-transfo | --program-transf \
987 | --program-trans | --program-tran \
988 | --progr-tra | --program-tr | --program-t)
989 ac_prev=program_transform_name ;;
990 -program-transform-name=* | --program-transform-name=* \
991 | --program-transform-nam=* | --program-transform-na=* \
992 | --program-transform-n=* | --program-transform-=* \
993 | --program-transform=* | --program-transfor=* \
994 | --program-transfo=* | --program-transf=* \
995 | --program-trans=* | --program-tran=* \
996 | --progr-tra=* | --program-tr=* | --program-t=*)
997 program_transform_name=$ac_optarg ;;
998
999 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1000 ac_prev=pdfdir ;;
1001 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1002 pdfdir=$ac_optarg ;;
1003
1004 -psdir | --psdir | --psdi | --psd | --ps)
1005 ac_prev=psdir ;;
1006 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1007 psdir=$ac_optarg ;;
1008
1009 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1010 | -silent | --silent | --silen | --sile | --sil)
1011 silent=yes ;;
1012
Elliott Hughes820eced2021-08-20 18:00:50 -07001013 -runstatedir | --runstatedir | --runstatedi | --runstated \
1014 | --runstate | --runstat | --runsta | --runst | --runs \
1015 | --run | --ru | --r)
1016 ac_prev=runstatedir ;;
1017 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
1018 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
1019 | --run=* | --ru=* | --r=*)
1020 runstatedir=$ac_optarg ;;
1021
The Android Open Source Project2949f582009-03-03 19:30:46 -08001022 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1023 ac_prev=sbindir ;;
1024 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1025 | --sbi=* | --sb=*)
1026 sbindir=$ac_optarg ;;
1027
1028 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1029 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1030 | --sharedst | --shareds | --shared | --share | --shar \
1031 | --sha | --sh)
1032 ac_prev=sharedstatedir ;;
1033 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1034 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1035 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1036 | --sha=* | --sh=*)
1037 sharedstatedir=$ac_optarg ;;
1038
1039 -site | --site | --sit)
1040 ac_prev=site ;;
1041 -site=* | --site=* | --sit=*)
1042 site=$ac_optarg ;;
1043
1044 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1045 ac_prev=srcdir ;;
1046 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1047 srcdir=$ac_optarg ;;
1048
1049 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1050 | --syscon | --sysco | --sysc | --sys | --sy)
1051 ac_prev=sysconfdir ;;
1052 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1053 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1054 sysconfdir=$ac_optarg ;;
1055
1056 -target | --target | --targe | --targ | --tar | --ta | --t)
1057 ac_prev=target_alias ;;
1058 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1059 target_alias=$ac_optarg ;;
1060
1061 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1062 verbose=yes ;;
1063
1064 -version | --version | --versio | --versi | --vers | -V)
1065 ac_init_version=: ;;
1066
1067 -with-* | --with-*)
JP Abgrall53f17a92014-02-12 14:02:41 -08001068 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
The Android Open Source Project2949f582009-03-03 19:30:46 -08001069 # Reject names that are not valid shell variable names.
JP Abgrall53f17a92014-02-12 14:02:41 -08001070 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1071 as_fn_error $? "invalid package name: $ac_useropt"
1072 ac_useropt_orig=$ac_useropt
1073 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1074 case $ac_user_opts in
1075 *"
1076"with_$ac_useropt"
1077"*) ;;
1078 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1079 ac_unrecognized_sep=', ';;
1080 esac
1081 eval with_$ac_useropt=\$ac_optarg ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08001082
1083 -without-* | --without-*)
JP Abgrall53f17a92014-02-12 14:02:41 -08001084 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
The Android Open Source Project2949f582009-03-03 19:30:46 -08001085 # Reject names that are not valid shell variable names.
JP Abgrall53f17a92014-02-12 14:02:41 -08001086 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1087 as_fn_error $? "invalid package name: $ac_useropt"
1088 ac_useropt_orig=$ac_useropt
1089 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1090 case $ac_user_opts in
1091 *"
1092"with_$ac_useropt"
1093"*) ;;
1094 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1095 ac_unrecognized_sep=', ';;
1096 esac
1097 eval with_$ac_useropt=no ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08001098
1099 --x)
1100 # Obsolete; use --with-x.
1101 with_x=yes ;;
1102
1103 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1104 | --x-incl | --x-inc | --x-in | --x-i)
1105 ac_prev=x_includes ;;
1106 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1107 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1108 x_includes=$ac_optarg ;;
1109
1110 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1111 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1112 ac_prev=x_libraries ;;
1113 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1114 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1115 x_libraries=$ac_optarg ;;
1116
JP Abgrall53f17a92014-02-12 14:02:41 -08001117 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1118Try \`$0 --help' for more information"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001119 ;;
1120
1121 *=*)
1122 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1123 # Reject names that are not valid shell variable names.
JP Abgrall53f17a92014-02-12 14:02:41 -08001124 case $ac_envvar in #(
1125 '' | [0-9]* | *[!_$as_cr_alnum]* )
1126 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1127 esac
The Android Open Source Project2949f582009-03-03 19:30:46 -08001128 eval $ac_envvar=\$ac_optarg
1129 export $ac_envvar ;;
1130
1131 *)
1132 # FIXME: should be removed in autoconf 3.0.
JP Abgrall53f17a92014-02-12 14:02:41 -08001133 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
The Android Open Source Project2949f582009-03-03 19:30:46 -08001134 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
JP Abgrall53f17a92014-02-12 14:02:41 -08001135 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1136 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001137 ;;
1138
1139 esac
1140done
1141
1142if test -n "$ac_prev"; then
1143 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
JP Abgrall53f17a92014-02-12 14:02:41 -08001144 as_fn_error $? "missing argument to $ac_option"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001145fi
1146
JP Abgrall53f17a92014-02-12 14:02:41 -08001147if test -n "$ac_unrecognized_opts"; then
1148 case $enable_option_checking in
1149 no) ;;
1150 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1151 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1152 esac
1153fi
1154
1155# Check all directory arguments for consistency.
The Android Open Source Project2949f582009-03-03 19:30:46 -08001156for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1157 datadir sysconfdir sharedstatedir localstatedir includedir \
1158 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
Elliott Hughes820eced2021-08-20 18:00:50 -07001159 libdir localedir mandir runstatedir
The Android Open Source Project2949f582009-03-03 19:30:46 -08001160do
1161 eval ac_val=\$$ac_var
JP Abgrall53f17a92014-02-12 14:02:41 -08001162 # Remove trailing slashes.
1163 case $ac_val in
1164 */ )
1165 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1166 eval $ac_var=\$ac_val;;
1167 esac
1168 # Be sure to have absolute directory names.
The Android Open Source Project2949f582009-03-03 19:30:46 -08001169 case $ac_val in
1170 [\\/$]* | ?:[\\/]* ) continue;;
1171 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1172 esac
JP Abgrall53f17a92014-02-12 14:02:41 -08001173 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001174done
1175
1176# There might be people who depend on the old broken behavior: `$host'
1177# used to hold the argument of --host etc.
1178# FIXME: To remove some day.
1179build=$build_alias
1180host=$host_alias
1181target=$target_alias
1182
1183# FIXME: To remove some day.
1184if test "x$host_alias" != x; then
1185 if test "x$build_alias" = x; then
1186 cross_compiling=maybe
The Android Open Source Project2949f582009-03-03 19:30:46 -08001187 elif test "x$build_alias" != "x$host_alias"; then
1188 cross_compiling=yes
1189 fi
1190fi
1191
1192ac_tool_prefix=
1193test -n "$host_alias" && ac_tool_prefix=$host_alias-
1194
1195test "$silent" = yes && exec 6>/dev/null
1196
1197
1198ac_pwd=`pwd` && test -n "$ac_pwd" &&
1199ac_ls_di=`ls -di .` &&
1200ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
JP Abgrall53f17a92014-02-12 14:02:41 -08001201 as_fn_error $? "working directory cannot be determined"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001202test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
JP Abgrall53f17a92014-02-12 14:02:41 -08001203 as_fn_error $? "pwd does not report name of working directory"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001204
1205
1206# Find the source files, if location was not specified.
1207if test -z "$srcdir"; then
1208 ac_srcdir_defaulted=yes
1209 # Try the directory containing this script, then the parent directory.
JP Abgrall53f17a92014-02-12 14:02:41 -08001210 ac_confdir=`$as_dirname -- "$as_myself" ||
1211$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1212 X"$as_myself" : 'X\(//\)[^/]' \| \
1213 X"$as_myself" : 'X\(//\)$' \| \
1214 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1215$as_echo X"$as_myself" |
The Android Open Source Project2949f582009-03-03 19:30:46 -08001216 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1217 s//\1/
1218 q
1219 }
1220 /^X\(\/\/\)[^/].*/{
1221 s//\1/
1222 q
1223 }
1224 /^X\(\/\/\)$/{
1225 s//\1/
1226 q
1227 }
1228 /^X\(\/\).*/{
1229 s//\1/
1230 q
1231 }
1232 s/.*/./; q'`
1233 srcdir=$ac_confdir
1234 if test ! -r "$srcdir/$ac_unique_file"; then
1235 srcdir=..
1236 fi
1237else
1238 ac_srcdir_defaulted=no
1239fi
1240if test ! -r "$srcdir/$ac_unique_file"; then
1241 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
JP Abgrall53f17a92014-02-12 14:02:41 -08001242 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001243fi
1244ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1245ac_abs_confdir=`(
JP Abgrall53f17a92014-02-12 14:02:41 -08001246 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001247 pwd)`
1248# When building in place, set srcdir=.
1249if test "$ac_abs_confdir" = "$ac_pwd"; then
1250 srcdir=.
1251fi
1252# Remove unnecessary trailing slashes from srcdir.
1253# Double slashes in file names in object file debugging info
1254# mess up M-x gdb in Emacs.
1255case $srcdir in
1256*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1257esac
1258for ac_var in $ac_precious_vars; do
1259 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1260 eval ac_env_${ac_var}_value=\$${ac_var}
1261 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1262 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1263done
1264
1265#
1266# Report the --help message.
1267#
1268if test "$ac_init_help" = "long"; then
1269 # Omit some internal or obsolete options to make the list less imposing.
1270 # This message is too long to be a string in the A/UX 3.1 sh.
1271 cat <<_ACEOF
Elliott Hughes820eced2021-08-20 18:00:50 -07001272\`configure' configures tcpdump 4.99.1 to adapt to many kinds of systems.
The Android Open Source Project2949f582009-03-03 19:30:46 -08001273
1274Usage: $0 [OPTION]... [VAR=VALUE]...
1275
1276To assign environment variables (e.g., CC, CFLAGS...), specify them as
1277VAR=VALUE. See below for descriptions of some of the useful variables.
1278
1279Defaults for the options are specified in brackets.
1280
1281Configuration:
1282 -h, --help display this help and exit
1283 --help=short display options specific to this package
1284 --help=recursive display the short help of all the included packages
1285 -V, --version display version information and exit
JP Abgrall53f17a92014-02-12 14:02:41 -08001286 -q, --quiet, --silent do not print \`checking ...' messages
The Android Open Source Project2949f582009-03-03 19:30:46 -08001287 --cache-file=FILE cache test results in FILE [disabled]
1288 -C, --config-cache alias for \`--cache-file=config.cache'
1289 -n, --no-create do not create output files
1290 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1291
1292Installation directories:
1293 --prefix=PREFIX install architecture-independent files in PREFIX
JP Abgrall53f17a92014-02-12 14:02:41 -08001294 [$ac_default_prefix]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001295 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
JP Abgrall53f17a92014-02-12 14:02:41 -08001296 [PREFIX]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001297
1298By default, \`make install' will install all the files in
1299\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1300an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1301for instance \`--prefix=\$HOME'.
1302
1303For better control, use the options below.
1304
1305Fine tuning of the installation directories:
JP Abgrall53f17a92014-02-12 14:02:41 -08001306 --bindir=DIR user executables [EPREFIX/bin]
1307 --sbindir=DIR system admin executables [EPREFIX/sbin]
1308 --libexecdir=DIR program executables [EPREFIX/libexec]
1309 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1310 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1311 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
Elliott Hughes820eced2021-08-20 18:00:50 -07001312 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
JP Abgrall53f17a92014-02-12 14:02:41 -08001313 --libdir=DIR object code libraries [EPREFIX/lib]
1314 --includedir=DIR C header files [PREFIX/include]
1315 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1316 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1317 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1318 --infodir=DIR info documentation [DATAROOTDIR/info]
1319 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1320 --mandir=DIR man documentation [DATAROOTDIR/man]
Elliott Hughes820eced2021-08-20 18:00:50 -07001321 --docdir=DIR documentation root [DATAROOTDIR/doc/tcpdump]
JP Abgrall53f17a92014-02-12 14:02:41 -08001322 --htmldir=DIR html documentation [DOCDIR]
1323 --dvidir=DIR dvi documentation [DOCDIR]
1324 --pdfdir=DIR pdf documentation [DOCDIR]
1325 --psdir=DIR ps documentation [DOCDIR]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001326_ACEOF
1327
1328 cat <<\_ACEOF
1329
1330System types:
1331 --build=BUILD configure for building on BUILD [guessed]
1332 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1333_ACEOF
1334fi
1335
1336if test -n "$ac_init_help"; then
Elliott Hughes820eced2021-08-20 18:00:50 -07001337 case $ac_init_help in
1338 short | recursive ) echo "Configuration of tcpdump 4.99.1:";;
1339 esac
The Android Open Source Project2949f582009-03-03 19:30:46 -08001340 cat <<\_ACEOF
1341
1342Optional Features:
JP Abgrall53f17a92014-02-12 14:02:41 -08001343 --disable-option-checking ignore unrecognized --enable/--with options
The Android Open Source Project2949f582009-03-03 19:30:46 -08001344 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1345 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Elliott Hughes820eced2021-08-20 18:00:50 -07001346 --disable-universal don't build universal on macOS
1347 --enable-smb enable possibly-buggy SMB printer default=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08001348 --disable-smb disable possibly-buggy SMB printer
Elliott Hughes820eced2021-08-20 18:00:50 -07001349 --disable-local-libpcap don't look for a local libpcap [default=check for a
1350 local libpcap]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001351
1352Optional Packages:
1353 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1354 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1355 --without-gcc don't use gcc
JP Abgrall53f17a92014-02-12 14:02:41 -08001356 --with-smi link with libsmi (allows to load MIBs on the fly to decode SNMP packets. default=yes
1357 --without-smi don't link with libsmi
The Android Open Source Project2949f582009-03-03 19:30:46 -08001358 --with-user=USERNAME drop privileges by default to USERNAME
1359 --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY
Elliott Hughes892a68b2015-10-19 14:43:53 -07001360 --with-sandbox-capsicum use Capsicum security functions [default=yes, if
1361 available]
Elliott Hughese2e3bd12017-05-15 10:59:29 -07001362 --with-crypto[=DIR] use OpenSSL/libressl libcrypto (located in directory
1363 DIR, if specified) [default=yes, if available]
Elliott Hughes892a68b2015-10-19 14:43:53 -07001364 --with-cap-ng use libcap-ng [default=yes, if available]
The Android Open Source Project2949f582009-03-03 19:30:46 -08001365
1366Some influential environment variables:
1367 CC C compiler command
1368 CFLAGS C compiler flags
1369 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1370 nonstandard directory <lib dir>
1371 LIBS libraries to pass to the linker, e.g. -l<library>
JP Abgrall53f17a92014-02-12 14:02:41 -08001372 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
The Android Open Source Project2949f582009-03-03 19:30:46 -08001373 you have headers in a nonstandard directory <include dir>
1374 CPP C preprocessor
1375
1376Use these variables to override the choices made by `configure' or to help
1377it to find libraries and programs with nonstandard names/locations.
1378
JP Abgrall53f17a92014-02-12 14:02:41 -08001379Report bugs to the package provider.
The Android Open Source Project2949f582009-03-03 19:30:46 -08001380_ACEOF
1381ac_status=$?
1382fi
1383
1384if test "$ac_init_help" = "recursive"; then
1385 # If there are subdirs, report their specific --help.
1386 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
JP Abgrall53f17a92014-02-12 14:02:41 -08001387 test -d "$ac_dir" ||
1388 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1389 continue
The Android Open Source Project2949f582009-03-03 19:30:46 -08001390 ac_builddir=.
1391
1392case "$ac_dir" in
1393.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1394*)
JP Abgrall53f17a92014-02-12 14:02:41 -08001395 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
The Android Open Source Project2949f582009-03-03 19:30:46 -08001396 # A ".." for each directory in $ac_dir_suffix.
JP Abgrall53f17a92014-02-12 14:02:41 -08001397 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
The Android Open Source Project2949f582009-03-03 19:30:46 -08001398 case $ac_top_builddir_sub in
1399 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1400 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1401 esac ;;
1402esac
1403ac_abs_top_builddir=$ac_pwd
1404ac_abs_builddir=$ac_pwd$ac_dir_suffix
1405# for backward compatibility:
1406ac_top_builddir=$ac_top_build_prefix
1407
1408case $srcdir in
1409 .) # We are building in place.
1410 ac_srcdir=.
1411 ac_top_srcdir=$ac_top_builddir_sub
1412 ac_abs_top_srcdir=$ac_pwd ;;
1413 [\\/]* | ?:[\\/]* ) # Absolute name.
1414 ac_srcdir=$srcdir$ac_dir_suffix;
1415 ac_top_srcdir=$srcdir
1416 ac_abs_top_srcdir=$srcdir ;;
1417 *) # Relative name.
1418 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1419 ac_top_srcdir=$ac_top_build_prefix$srcdir
1420 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1421esac
1422ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1423
1424 cd "$ac_dir" || { ac_status=$?; continue; }
1425 # Check for guested configure.
1426 if test -f "$ac_srcdir/configure.gnu"; then
1427 echo &&
1428 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1429 elif test -f "$ac_srcdir/configure"; then
1430 echo &&
1431 $SHELL "$ac_srcdir/configure" --help=recursive
1432 else
JP Abgrall53f17a92014-02-12 14:02:41 -08001433 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
The Android Open Source Project2949f582009-03-03 19:30:46 -08001434 fi || ac_status=$?
1435 cd "$ac_pwd" || { ac_status=$?; break; }
1436 done
1437fi
1438
1439test -n "$ac_init_help" && exit $ac_status
1440if $ac_init_version; then
1441 cat <<\_ACEOF
Elliott Hughes820eced2021-08-20 18:00:50 -07001442tcpdump configure 4.99.1
JP Abgrall53f17a92014-02-12 14:02:41 -08001443generated by GNU Autoconf 2.69
The Android Open Source Project2949f582009-03-03 19:30:46 -08001444
JP Abgrall53f17a92014-02-12 14:02:41 -08001445Copyright (C) 2012 Free Software Foundation, Inc.
The Android Open Source Project2949f582009-03-03 19:30:46 -08001446This configure script is free software; the Free Software Foundation
1447gives unlimited permission to copy, distribute and modify it.
1448_ACEOF
1449 exit
1450fi
JP Abgrall53f17a92014-02-12 14:02:41 -08001451
1452## ------------------------ ##
1453## Autoconf initialization. ##
1454## ------------------------ ##
1455
1456# ac_fn_c_try_compile LINENO
1457# --------------------------
1458# Try to compile conftest.$ac_ext, and return whether this succeeded.
1459ac_fn_c_try_compile ()
1460{
1461 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1462 rm -f conftest.$ac_objext
1463 if { { ac_try="$ac_compile"
1464case "(($ac_try" in
1465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1466 *) ac_try_echo=$ac_try;;
1467esac
1468eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1469$as_echo "$ac_try_echo"; } >&5
1470 (eval "$ac_compile") 2>conftest.err
1471 ac_status=$?
1472 if test -s conftest.err; then
1473 grep -v '^ *+' conftest.err >conftest.er1
1474 cat conftest.er1 >&5
1475 mv -f conftest.er1 conftest.err
1476 fi
1477 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1478 test $ac_status = 0; } && {
1479 test -z "$ac_c_werror_flag" ||
1480 test ! -s conftest.err
1481 } && test -s conftest.$ac_objext; then :
1482 ac_retval=0
1483else
1484 $as_echo "$as_me: failed program was:" >&5
1485sed 's/^/| /' conftest.$ac_ext >&5
1486
1487 ac_retval=1
1488fi
1489 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1490 as_fn_set_status $ac_retval
1491
1492} # ac_fn_c_try_compile
1493
1494# ac_fn_c_try_cpp LINENO
1495# ----------------------
1496# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1497ac_fn_c_try_cpp ()
1498{
1499 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1500 if { { ac_try="$ac_cpp conftest.$ac_ext"
1501case "(($ac_try" in
1502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1503 *) ac_try_echo=$ac_try;;
1504esac
1505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1506$as_echo "$ac_try_echo"; } >&5
1507 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1508 ac_status=$?
1509 if test -s conftest.err; then
1510 grep -v '^ *+' conftest.err >conftest.er1
1511 cat conftest.er1 >&5
1512 mv -f conftest.er1 conftest.err
1513 fi
1514 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1515 test $ac_status = 0; } > conftest.i && {
1516 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1517 test ! -s conftest.err
1518 }; then :
1519 ac_retval=0
1520else
1521 $as_echo "$as_me: failed program was:" >&5
1522sed 's/^/| /' conftest.$ac_ext >&5
1523
1524 ac_retval=1
1525fi
1526 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1527 as_fn_set_status $ac_retval
1528
1529} # ac_fn_c_try_cpp
1530
1531# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1532# -------------------------------------------------------
1533# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1534# the include files in INCLUDES and setting the cache variable VAR
1535# accordingly.
1536ac_fn_c_check_header_mongrel ()
1537{
1538 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1539 if eval \${$3+:} false; then :
1540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1541$as_echo_n "checking for $2... " >&6; }
1542if eval \${$3+:} false; then :
1543 $as_echo_n "(cached) " >&6
1544fi
1545eval ac_res=\$$3
1546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1547$as_echo "$ac_res" >&6; }
1548else
1549 # Is the header compilable?
1550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1551$as_echo_n "checking $2 usability... " >&6; }
1552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1553/* end confdefs.h. */
1554$4
1555#include <$2>
1556_ACEOF
1557if ac_fn_c_try_compile "$LINENO"; then :
1558 ac_header_compiler=yes
1559else
1560 ac_header_compiler=no
1561fi
1562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1563{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1564$as_echo "$ac_header_compiler" >&6; }
1565
1566# Is the header present?
1567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1568$as_echo_n "checking $2 presence... " >&6; }
1569cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1570/* end confdefs.h. */
1571#include <$2>
1572_ACEOF
1573if ac_fn_c_try_cpp "$LINENO"; then :
1574 ac_header_preproc=yes
1575else
1576 ac_header_preproc=no
1577fi
1578rm -f conftest.err conftest.i conftest.$ac_ext
1579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1580$as_echo "$ac_header_preproc" >&6; }
1581
1582# So? What about this header?
1583case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1584 yes:no: )
1585 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1586$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1587 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1588$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1589 ;;
1590 no:yes:* )
1591 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1592$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1593 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1594$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1595 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1596$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1597 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1598$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1599 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1600$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1601 ;;
1602esac
1603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1604$as_echo_n "checking for $2... " >&6; }
1605if eval \${$3+:} false; then :
1606 $as_echo_n "(cached) " >&6
1607else
1608 eval "$3=\$ac_header_compiler"
1609fi
1610eval ac_res=\$$3
1611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1612$as_echo "$ac_res" >&6; }
1613fi
1614 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1615
1616} # ac_fn_c_check_header_mongrel
1617
1618# ac_fn_c_try_run LINENO
1619# ----------------------
1620# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1621# that executables *can* be run.
1622ac_fn_c_try_run ()
1623{
1624 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1625 if { { ac_try="$ac_link"
1626case "(($ac_try" in
1627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628 *) ac_try_echo=$ac_try;;
1629esac
1630eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631$as_echo "$ac_try_echo"; } >&5
1632 (eval "$ac_link") 2>&5
1633 ac_status=$?
1634 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1636 { { case "(($ac_try" in
1637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1638 *) ac_try_echo=$ac_try;;
1639esac
1640eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1641$as_echo "$ac_try_echo"; } >&5
1642 (eval "$ac_try") 2>&5
1643 ac_status=$?
1644 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1645 test $ac_status = 0; }; }; then :
1646 ac_retval=0
1647else
1648 $as_echo "$as_me: program exited with status $ac_status" >&5
1649 $as_echo "$as_me: failed program was:" >&5
1650sed 's/^/| /' conftest.$ac_ext >&5
1651
1652 ac_retval=$ac_status
1653fi
1654 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1655 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1656 as_fn_set_status $ac_retval
1657
1658} # ac_fn_c_try_run
1659
1660# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1661# -------------------------------------------------------
1662# Tests whether HEADER exists and can be compiled using the include files in
1663# INCLUDES, setting the cache variable VAR accordingly.
1664ac_fn_c_check_header_compile ()
1665{
1666 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1668$as_echo_n "checking for $2... " >&6; }
1669if eval \${$3+:} false; then :
1670 $as_echo_n "(cached) " >&6
1671else
1672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1673/* end confdefs.h. */
1674$4
1675#include <$2>
1676_ACEOF
1677if ac_fn_c_try_compile "$LINENO"; then :
1678 eval "$3=yes"
1679else
1680 eval "$3=no"
1681fi
1682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1683fi
1684eval ac_res=\$$3
1685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1686$as_echo "$ac_res" >&6; }
1687 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1688
1689} # ac_fn_c_check_header_compile
1690
1691# ac_fn_c_try_link LINENO
1692# -----------------------
1693# Try to link conftest.$ac_ext, and return whether this succeeded.
1694ac_fn_c_try_link ()
1695{
1696 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1697 rm -f conftest.$ac_objext conftest$ac_exeext
1698 if { { ac_try="$ac_link"
1699case "(($ac_try" in
1700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1701 *) ac_try_echo=$ac_try;;
1702esac
1703eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1704$as_echo "$ac_try_echo"; } >&5
1705 (eval "$ac_link") 2>conftest.err
1706 ac_status=$?
1707 if test -s conftest.err; then
1708 grep -v '^ *+' conftest.err >conftest.er1
1709 cat conftest.er1 >&5
1710 mv -f conftest.er1 conftest.err
1711 fi
1712 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1713 test $ac_status = 0; } && {
1714 test -z "$ac_c_werror_flag" ||
1715 test ! -s conftest.err
1716 } && test -s conftest$ac_exeext && {
1717 test "$cross_compiling" = yes ||
1718 test -x conftest$ac_exeext
1719 }; then :
1720 ac_retval=0
1721else
1722 $as_echo "$as_me: failed program was:" >&5
1723sed 's/^/| /' conftest.$ac_ext >&5
1724
1725 ac_retval=1
1726fi
1727 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1728 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1729 # interfere with the next link command; also delete a directory that is
1730 # left behind by Apple's compiler. We do this before executing the actions.
1731 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1732 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1733 as_fn_set_status $ac_retval
1734
1735} # ac_fn_c_try_link
1736
1737# ac_fn_c_check_func LINENO FUNC VAR
1738# ----------------------------------
1739# Tests whether FUNC exists, setting the cache variable VAR accordingly
1740ac_fn_c_check_func ()
1741{
1742 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1744$as_echo_n "checking for $2... " >&6; }
1745if eval \${$3+:} false; then :
1746 $as_echo_n "(cached) " >&6
1747else
1748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1749/* end confdefs.h. */
1750/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1751 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1752#define $2 innocuous_$2
1753
1754/* System header to define __stub macros and hopefully few prototypes,
1755 which can conflict with char $2 (); below.
1756 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1757 <limits.h> exists even on freestanding compilers. */
1758
1759#ifdef __STDC__
1760# include <limits.h>
1761#else
1762# include <assert.h>
1763#endif
1764
1765#undef $2
1766
1767/* Override any GCC internal prototype to avoid an error.
1768 Use char because int might match the return type of a GCC
1769 builtin and then its argument prototype would still apply. */
1770#ifdef __cplusplus
1771extern "C"
1772#endif
1773char $2 ();
1774/* The GNU C library defines this for functions which it implements
1775 to always fail with ENOSYS. Some functions are actually named
1776 something starting with __ and the normal name is an alias. */
1777#if defined __stub_$2 || defined __stub___$2
1778choke me
1779#endif
1780
1781int
1782main ()
1783{
1784return $2 ();
1785 ;
1786 return 0;
1787}
1788_ACEOF
1789if ac_fn_c_try_link "$LINENO"; then :
1790 eval "$3=yes"
1791else
1792 eval "$3=no"
1793fi
1794rm -f core conftest.err conftest.$ac_objext \
1795 conftest$ac_exeext conftest.$ac_ext
1796fi
1797eval ac_res=\$$3
1798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1799$as_echo "$ac_res" >&6; }
1800 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1801
1802} # ac_fn_c_check_func
1803
1804# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1805# ---------------------------------------------
1806# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1807# accordingly.
1808ac_fn_c_check_decl ()
1809{
1810 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1811 as_decl_name=`echo $2|sed 's/ *(.*//'`
1812 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1814$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1815if eval \${$3+:} false; then :
1816 $as_echo_n "(cached) " >&6
1817else
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819/* end confdefs.h. */
1820$4
1821int
1822main ()
1823{
1824#ifndef $as_decl_name
1825#ifdef __cplusplus
1826 (void) $as_decl_use;
1827#else
1828 (void) $as_decl_name;
1829#endif
1830#endif
1831
1832 ;
1833 return 0;
1834}
1835_ACEOF
1836if ac_fn_c_try_compile "$LINENO"; then :
1837 eval "$3=yes"
1838else
1839 eval "$3=no"
1840fi
1841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842fi
1843eval ac_res=\$$3
1844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1845$as_echo "$ac_res" >&6; }
1846 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1847
1848} # ac_fn_c_check_decl
1849
1850# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1851# -------------------------------------------
1852# Tests whether TYPE exists after having included INCLUDES, setting cache
1853# variable VAR accordingly.
1854ac_fn_c_check_type ()
1855{
1856 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1858$as_echo_n "checking for $2... " >&6; }
1859if eval \${$3+:} false; then :
1860 $as_echo_n "(cached) " >&6
1861else
1862 eval "$3=no"
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865$4
1866int
1867main ()
1868{
1869if (sizeof ($2))
1870 return 0;
1871 ;
1872 return 0;
1873}
1874_ACEOF
1875if ac_fn_c_try_compile "$LINENO"; then :
1876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1877/* end confdefs.h. */
1878$4
1879int
1880main ()
1881{
1882if (sizeof (($2)))
1883 return 0;
1884 ;
1885 return 0;
1886}
1887_ACEOF
1888if ac_fn_c_try_compile "$LINENO"; then :
1889
1890else
1891 eval "$3=yes"
1892fi
1893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1894fi
1895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1896fi
1897eval ac_res=\$$3
1898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1899$as_echo "$ac_res" >&6; }
1900 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1901
1902} # ac_fn_c_check_type
The Android Open Source Project2949f582009-03-03 19:30:46 -08001903cat >config.log <<_ACEOF
1904This file contains any messages produced by compilers while
1905running configure, to aid debugging if configure makes a mistake.
1906
Elliott Hughes820eced2021-08-20 18:00:50 -07001907It was created by tcpdump $as_me 4.99.1, which was
JP Abgrall53f17a92014-02-12 14:02:41 -08001908generated by GNU Autoconf 2.69. Invocation command line was
The Android Open Source Project2949f582009-03-03 19:30:46 -08001909
1910 $ $0 $@
1911
1912_ACEOF
1913exec 5>>config.log
1914{
1915cat <<_ASUNAME
1916## --------- ##
1917## Platform. ##
1918## --------- ##
1919
1920hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1921uname -m = `(uname -m) 2>/dev/null || echo unknown`
1922uname -r = `(uname -r) 2>/dev/null || echo unknown`
1923uname -s = `(uname -s) 2>/dev/null || echo unknown`
1924uname -v = `(uname -v) 2>/dev/null || echo unknown`
1925
1926/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1927/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1928
1929/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1930/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1931/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1932/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1933/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1934/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1935/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1936
1937_ASUNAME
1938
1939as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1940for as_dir in $PATH
1941do
1942 IFS=$as_save_IFS
1943 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08001944 $as_echo "PATH: $as_dir"
1945 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08001946IFS=$as_save_IFS
1947
1948} >&5
1949
1950cat >&5 <<_ACEOF
1951
1952
1953## ----------- ##
1954## Core tests. ##
1955## ----------- ##
1956
1957_ACEOF
1958
1959
1960# Keep a trace of the command line.
1961# Strip out --no-create and --no-recursion so they do not pile up.
1962# Strip out --silent because we don't want to record it for future runs.
1963# Also quote any args containing shell meta-characters.
1964# Make two passes to allow for proper duplicate-argument suppression.
1965ac_configure_args=
1966ac_configure_args0=
1967ac_configure_args1=
1968ac_must_keep_next=false
1969for ac_pass in 1 2
1970do
1971 for ac_arg
1972 do
1973 case $ac_arg in
1974 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1975 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1976 | -silent | --silent | --silen | --sile | --sil)
1977 continue ;;
1978 *\'*)
JP Abgrall53f17a92014-02-12 14:02:41 -08001979 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08001980 esac
1981 case $ac_pass in
JP Abgrall53f17a92014-02-12 14:02:41 -08001982 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08001983 2)
JP Abgrall53f17a92014-02-12 14:02:41 -08001984 as_fn_append ac_configure_args1 " '$ac_arg'"
The Android Open Source Project2949f582009-03-03 19:30:46 -08001985 if test $ac_must_keep_next = true; then
1986 ac_must_keep_next=false # Got value, back to normal.
1987 else
1988 case $ac_arg in
1989 *=* | --config-cache | -C | -disable-* | --disable-* \
1990 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1991 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1992 | -with-* | --with-* | -without-* | --without-* | --x)
1993 case "$ac_configure_args0 " in
1994 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1995 esac
1996 ;;
1997 -* ) ac_must_keep_next=true ;;
1998 esac
1999 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002000 as_fn_append ac_configure_args " '$ac_arg'"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002001 ;;
2002 esac
2003 done
2004done
JP Abgrall53f17a92014-02-12 14:02:41 -08002005{ ac_configure_args0=; unset ac_configure_args0;}
2006{ ac_configure_args1=; unset ac_configure_args1;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002007
2008# When interrupted or exit'd, cleanup temporary files, and complete
2009# config.log. We remove comments because anyway the quotes in there
2010# would cause problems or look ugly.
2011# WARNING: Use '\'' to represent an apostrophe within the trap.
2012# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2013trap 'exit_status=$?
2014 # Save into config.log some information that might help in debugging.
2015 {
2016 echo
2017
JP Abgrall53f17a92014-02-12 14:02:41 -08002018 $as_echo "## ---------------- ##
The Android Open Source Project2949f582009-03-03 19:30:46 -08002019## Cache variables. ##
JP Abgrall53f17a92014-02-12 14:02:41 -08002020## ---------------- ##"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002021 echo
2022 # The following way of writing the cache mishandles newlines in values,
2023(
2024 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2025 eval ac_val=\$$ac_var
2026 case $ac_val in #(
2027 *${as_nl}*)
2028 case $ac_var in #(
JP Abgrall53f17a92014-02-12 14:02:41 -08002029 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2030$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002031 esac
2032 case $ac_var in #(
2033 _ | IFS | as_nl) ;; #(
JP Abgrall53f17a92014-02-12 14:02:41 -08002034 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2035 *) { eval $ac_var=; unset $ac_var;} ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002036 esac ;;
2037 esac
2038 done
2039 (set) 2>&1 |
2040 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2041 *${as_nl}ac_space=\ *)
2042 sed -n \
2043 "s/'\''/'\''\\\\'\'''\''/g;
2044 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2045 ;; #(
2046 *)
2047 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2048 ;;
2049 esac |
2050 sort
2051)
2052 echo
2053
JP Abgrall53f17a92014-02-12 14:02:41 -08002054 $as_echo "## ----------------- ##
The Android Open Source Project2949f582009-03-03 19:30:46 -08002055## Output variables. ##
JP Abgrall53f17a92014-02-12 14:02:41 -08002056## ----------------- ##"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002057 echo
2058 for ac_var in $ac_subst_vars
2059 do
2060 eval ac_val=\$$ac_var
2061 case $ac_val in
JP Abgrall53f17a92014-02-12 14:02:41 -08002062 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002063 esac
JP Abgrall53f17a92014-02-12 14:02:41 -08002064 $as_echo "$ac_var='\''$ac_val'\''"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002065 done | sort
2066 echo
2067
2068 if test -n "$ac_subst_files"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002069 $as_echo "## ------------------- ##
The Android Open Source Project2949f582009-03-03 19:30:46 -08002070## File substitutions. ##
JP Abgrall53f17a92014-02-12 14:02:41 -08002071## ------------------- ##"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002072 echo
2073 for ac_var in $ac_subst_files
2074 do
2075 eval ac_val=\$$ac_var
2076 case $ac_val in
JP Abgrall53f17a92014-02-12 14:02:41 -08002077 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002078 esac
JP Abgrall53f17a92014-02-12 14:02:41 -08002079 $as_echo "$ac_var='\''$ac_val'\''"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002080 done | sort
2081 echo
2082 fi
2083
2084 if test -s confdefs.h; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002085 $as_echo "## ----------- ##
The Android Open Source Project2949f582009-03-03 19:30:46 -08002086## confdefs.h. ##
JP Abgrall53f17a92014-02-12 14:02:41 -08002087## ----------- ##"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002088 echo
2089 cat confdefs.h
2090 echo
2091 fi
2092 test "$ac_signal" != 0 &&
JP Abgrall53f17a92014-02-12 14:02:41 -08002093 $as_echo "$as_me: caught signal $ac_signal"
2094 $as_echo "$as_me: exit $exit_status"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002095 } >&5
2096 rm -f core *.core core.conftest.* &&
2097 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2098 exit $exit_status
2099' 0
2100for ac_signal in 1 2 13 15; do
JP Abgrall53f17a92014-02-12 14:02:41 -08002101 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
The Android Open Source Project2949f582009-03-03 19:30:46 -08002102done
2103ac_signal=0
2104
2105# confdefs.h avoids OS command line length limits that DEFS can exceed.
2106rm -f -r conftest* confdefs.h
2107
JP Abgrall53f17a92014-02-12 14:02:41 -08002108$as_echo "/* confdefs.h */" > confdefs.h
2109
The Android Open Source Project2949f582009-03-03 19:30:46 -08002110# Predefined preprocessor variables.
2111
2112cat >>confdefs.h <<_ACEOF
2113#define PACKAGE_NAME "$PACKAGE_NAME"
2114_ACEOF
2115
The Android Open Source Project2949f582009-03-03 19:30:46 -08002116cat >>confdefs.h <<_ACEOF
2117#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2118_ACEOF
2119
The Android Open Source Project2949f582009-03-03 19:30:46 -08002120cat >>confdefs.h <<_ACEOF
2121#define PACKAGE_VERSION "$PACKAGE_VERSION"
2122_ACEOF
2123
The Android Open Source Project2949f582009-03-03 19:30:46 -08002124cat >>confdefs.h <<_ACEOF
2125#define PACKAGE_STRING "$PACKAGE_STRING"
2126_ACEOF
2127
The Android Open Source Project2949f582009-03-03 19:30:46 -08002128cat >>confdefs.h <<_ACEOF
2129#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2130_ACEOF
2131
JP Abgrall53f17a92014-02-12 14:02:41 -08002132cat >>confdefs.h <<_ACEOF
2133#define PACKAGE_URL "$PACKAGE_URL"
2134_ACEOF
2135
The Android Open Source Project2949f582009-03-03 19:30:46 -08002136
2137# Let the site file select an alternate cache file if it wants to.
JP Abgrall53f17a92014-02-12 14:02:41 -08002138# Prefer an explicitly selected file to automatically selected ones.
2139ac_site_file1=NONE
2140ac_site_file2=NONE
The Android Open Source Project2949f582009-03-03 19:30:46 -08002141if test -n "$CONFIG_SITE"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002142 # We do not want a PATH search for config.site.
2143 case $CONFIG_SITE in #((
2144 -*) ac_site_file1=./$CONFIG_SITE;;
2145 */*) ac_site_file1=$CONFIG_SITE;;
2146 *) ac_site_file1=./$CONFIG_SITE;;
2147 esac
The Android Open Source Project2949f582009-03-03 19:30:46 -08002148elif test "x$prefix" != xNONE; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002149 ac_site_file1=$prefix/share/config.site
2150 ac_site_file2=$prefix/etc/config.site
The Android Open Source Project2949f582009-03-03 19:30:46 -08002151else
JP Abgrall53f17a92014-02-12 14:02:41 -08002152 ac_site_file1=$ac_default_prefix/share/config.site
2153 ac_site_file2=$ac_default_prefix/etc/config.site
The Android Open Source Project2949f582009-03-03 19:30:46 -08002154fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002155for ac_site_file in "$ac_site_file1" "$ac_site_file2"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002156do
JP Abgrall53f17a92014-02-12 14:02:41 -08002157 test "x$ac_site_file" = xNONE && continue
2158 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2159 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2160$as_echo "$as_me: loading site script $ac_site_file" >&6;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002161 sed 's/^/| /' "$ac_site_file" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08002162 . "$ac_site_file" \
2163 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2164$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2165as_fn_error $? "failed to load site script $ac_site_file
2166See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002167 fi
2168done
2169
2170if test -r "$cache_file"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002171 # Some versions of bash will fail to source /dev/null (special files
2172 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2173 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2174 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2175$as_echo "$as_me: loading cache $cache_file" >&6;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002176 case $cache_file in
2177 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2178 *) . "./$cache_file";;
2179 esac
2180 fi
2181else
JP Abgrall53f17a92014-02-12 14:02:41 -08002182 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2183$as_echo "$as_me: creating cache $cache_file" >&6;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002184 >$cache_file
2185fi
2186
2187# Check that the precious variables saved in the cache have kept the same
2188# value.
2189ac_cache_corrupted=false
2190for ac_var in $ac_precious_vars; do
2191 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2192 eval ac_new_set=\$ac_env_${ac_var}_set
2193 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2194 eval ac_new_val=\$ac_env_${ac_var}_value
2195 case $ac_old_set,$ac_new_set in
2196 set,)
JP Abgrall53f17a92014-02-12 14:02:41 -08002197 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2198$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002199 ac_cache_corrupted=: ;;
2200 ,set)
JP Abgrall53f17a92014-02-12 14:02:41 -08002201 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2202$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002203 ac_cache_corrupted=: ;;
2204 ,);;
2205 *)
2206 if test "x$ac_old_val" != "x$ac_new_val"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002207 # differences in whitespace do not lead to failure.
2208 ac_old_val_w=`echo x $ac_old_val`
2209 ac_new_val_w=`echo x $ac_new_val`
2210 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2211 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2212$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2213 ac_cache_corrupted=:
2214 else
2215 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2216$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2217 eval $ac_var=\$ac_old_val
2218 fi
2219 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2220$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2221 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2222$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002223 fi;;
2224 esac
2225 # Pass precious variables to config.status.
2226 if test "$ac_new_set" = set; then
2227 case $ac_new_val in
JP Abgrall53f17a92014-02-12 14:02:41 -08002228 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002229 *) ac_arg=$ac_var=$ac_new_val ;;
2230 esac
2231 case " $ac_configure_args " in
2232 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
JP Abgrall53f17a92014-02-12 14:02:41 -08002233 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002234 esac
2235 fi
2236done
2237if $ac_cache_corrupted; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002238 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2239$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2240 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2241$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2242 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002243fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002244## -------------------- ##
2245## Main body of script. ##
2246## -------------------- ##
The Android Open Source Project2949f582009-03-03 19:30:46 -08002247
2248ac_ext=c
2249ac_cpp='$CPP $CPPFLAGS'
2250ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2251ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2252ac_compiler_gnu=$ac_cv_c_compiler_gnu
2253
2254
2255
Elliott Hughes820eced2021-08-20 18:00:50 -07002256
The Android Open Source Project2949f582009-03-03 19:30:46 -08002257ac_aux_dir=
2258for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2259 if test -f "$ac_dir/install-sh"; then
2260 ac_aux_dir=$ac_dir
2261 ac_install_sh="$ac_aux_dir/install-sh -c"
2262 break
2263 elif test -f "$ac_dir/install.sh"; then
2264 ac_aux_dir=$ac_dir
2265 ac_install_sh="$ac_aux_dir/install.sh -c"
2266 break
2267 elif test -f "$ac_dir/shtool"; then
2268 ac_aux_dir=$ac_dir
2269 ac_install_sh="$ac_aux_dir/shtool install -c"
2270 break
2271 fi
2272done
2273if test -z "$ac_aux_dir"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002274 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002275fi
2276
2277# These three variables are undocumented and unsupported,
2278# and are intended to be withdrawn in a future Autoconf release.
2279# They can cause serious problems if a builder's source tree is in a directory
2280# whose full name contains unusual characters.
2281ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2282ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2283ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2284
2285
2286# Make sure we can run config.sub.
2287$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
JP Abgrall53f17a92014-02-12 14:02:41 -08002288 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002289
JP Abgrall53f17a92014-02-12 14:02:41 -08002290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2291$as_echo_n "checking build system type... " >&6; }
2292if ${ac_cv_build+:} false; then :
2293 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002294else
2295 ac_build_alias=$build_alias
2296test "x$ac_build_alias" = x &&
2297 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2298test "x$ac_build_alias" = x &&
JP Abgrall53f17a92014-02-12 14:02:41 -08002299 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002300ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
JP Abgrall53f17a92014-02-12 14:02:41 -08002301 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002302
2303fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2305$as_echo "$ac_cv_build" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002306case $ac_cv_build in
2307*-*-*) ;;
JP Abgrall53f17a92014-02-12 14:02:41 -08002308*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002309esac
2310build=$ac_cv_build
2311ac_save_IFS=$IFS; IFS='-'
2312set x $ac_cv_build
2313shift
2314build_cpu=$1
2315build_vendor=$2
2316shift; shift
2317# Remember, the first character of IFS is used to create $*,
2318# except with old shells:
2319build_os=$*
2320IFS=$ac_save_IFS
2321case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2322
2323
JP Abgrall53f17a92014-02-12 14:02:41 -08002324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2325$as_echo_n "checking host system type... " >&6; }
2326if ${ac_cv_host+:} false; then :
2327 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002328else
2329 if test "x$host_alias" = x; then
2330 ac_cv_host=$ac_cv_build
2331else
2332 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
JP Abgrall53f17a92014-02-12 14:02:41 -08002333 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002334fi
2335
2336fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002337{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2338$as_echo "$ac_cv_host" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002339case $ac_cv_host in
2340*-*-*) ;;
JP Abgrall53f17a92014-02-12 14:02:41 -08002341*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002342esac
2343host=$ac_cv_host
2344ac_save_IFS=$IFS; IFS='-'
2345set x $ac_cv_host
2346shift
2347host_cpu=$1
2348host_vendor=$2
2349shift; shift
2350# Remember, the first character of IFS is used to create $*,
2351# except with old shells:
2352host_os=$*
2353IFS=$ac_save_IFS
2354case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2355
2356
2357
2358
2359
2360
2361
2362
JP Abgrall53f17a92014-02-12 14:02:41 -08002363
The Android Open Source Project2949f582009-03-03 19:30:46 -08002364# Check whether --with-gcc was given.
JP Abgrall53f17a92014-02-12 14:02:41 -08002365if test "${with_gcc+set}" = set; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08002366 withval=$with_gcc;
2367fi
2368
The Android Open Source Project2949f582009-03-03 19:30:46 -08002369 V_INCLS=""
2370 if test "${srcdir}" != "." ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002371 V_INCLS="-I$srcdir"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002372 fi
2373 if test "${CFLAGS+set}" = set; then
2374 LBL_CFLAGS="$CFLAGS"
2375 fi
2376 if test -z "$CC" ; then
2377 case "$host_os" in
2378
2379 bsdi*)
2380 # Extract the first word of "shlicc2", so it can be a program name with args.
2381set dummy shlicc2; ac_word=$2
JP Abgrall53f17a92014-02-12 14:02:41 -08002382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2383$as_echo_n "checking for $ac_word... " >&6; }
2384if ${ac_cv_prog_SHLICC2+:} false; then :
2385 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002386else
2387 if test -n "$SHLICC2"; then
2388 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2389else
2390as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2391for as_dir in $PATH
2392do
2393 IFS=$as_save_IFS
2394 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08002395 for ac_exec_ext in '' $ac_executable_extensions; do
2396 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08002397 ac_cv_prog_SHLICC2="yes"
JP Abgrall53f17a92014-02-12 14:02:41 -08002398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002399 break 2
2400 fi
2401done
JP Abgrall53f17a92014-02-12 14:02:41 -08002402 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002403IFS=$as_save_IFS
2404
2405 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2406fi
2407fi
2408SHLICC2=$ac_cv_prog_SHLICC2
2409if test -n "$SHLICC2"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2411$as_echo "$SHLICC2" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002412else
JP Abgrall53f17a92014-02-12 14:02:41 -08002413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2414$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002415fi
2416
2417
2418 if test $SHLICC2 = yes ; then
2419 CC=shlicc2
2420 export CC
2421 fi
2422 ;;
2423 esac
2424 fi
2425 if test -z "$CC" -a "$with_gcc" = no ; then
2426 CC=cc
2427 export CC
2428 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002429
Elliott Hughes820eced2021-08-20 18:00:50 -07002430#
2431# Try to enable as many C99 features as we can.
2432# At minimum, we want C++/C99-style // comments.
2433#
JP Abgrall53f17a92014-02-12 14:02:41 -08002434ac_ext=c
The Android Open Source Project2949f582009-03-03 19:30:46 -08002435ac_cpp='$CPP $CPPFLAGS'
2436ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2437ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2438ac_compiler_gnu=$ac_cv_c_compiler_gnu
2439if test -n "$ac_tool_prefix"; then
2440 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2441set dummy ${ac_tool_prefix}gcc; ac_word=$2
JP Abgrall53f17a92014-02-12 14:02:41 -08002442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2443$as_echo_n "checking for $ac_word... " >&6; }
2444if ${ac_cv_prog_CC+:} false; then :
2445 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002446else
2447 if test -n "$CC"; then
2448 ac_cv_prog_CC="$CC" # Let the user override the test.
2449else
2450as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2451for as_dir in $PATH
2452do
2453 IFS=$as_save_IFS
2454 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08002455 for ac_exec_ext in '' $ac_executable_extensions; do
2456 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08002457 ac_cv_prog_CC="${ac_tool_prefix}gcc"
JP Abgrall53f17a92014-02-12 14:02:41 -08002458 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002459 break 2
2460 fi
2461done
JP Abgrall53f17a92014-02-12 14:02:41 -08002462 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002463IFS=$as_save_IFS
2464
2465fi
2466fi
2467CC=$ac_cv_prog_CC
2468if test -n "$CC"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2470$as_echo "$CC" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002471else
JP Abgrall53f17a92014-02-12 14:02:41 -08002472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2473$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002474fi
2475
2476
2477fi
2478if test -z "$ac_cv_prog_CC"; then
2479 ac_ct_CC=$CC
2480 # Extract the first word of "gcc", so it can be a program name with args.
2481set dummy gcc; ac_word=$2
JP Abgrall53f17a92014-02-12 14:02:41 -08002482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2483$as_echo_n "checking for $ac_word... " >&6; }
2484if ${ac_cv_prog_ac_ct_CC+:} false; then :
2485 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002486else
2487 if test -n "$ac_ct_CC"; then
2488 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2489else
2490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2491for as_dir in $PATH
2492do
2493 IFS=$as_save_IFS
2494 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08002495 for ac_exec_ext in '' $ac_executable_extensions; do
2496 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08002497 ac_cv_prog_ac_ct_CC="gcc"
JP Abgrall53f17a92014-02-12 14:02:41 -08002498 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002499 break 2
2500 fi
2501done
JP Abgrall53f17a92014-02-12 14:02:41 -08002502 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002503IFS=$as_save_IFS
2504
2505fi
2506fi
2507ac_ct_CC=$ac_cv_prog_ac_ct_CC
2508if test -n "$ac_ct_CC"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2510$as_echo "$ac_ct_CC" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002511else
JP Abgrall53f17a92014-02-12 14:02:41 -08002512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2513$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002514fi
2515
2516 if test "x$ac_ct_CC" = x; then
2517 CC=""
2518 else
2519 case $cross_compiling:$ac_tool_warned in
2520yes:)
JP Abgrall53f17a92014-02-12 14:02:41 -08002521{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2522$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002523ac_tool_warned=yes ;;
2524esac
2525 CC=$ac_ct_CC
2526 fi
2527else
2528 CC="$ac_cv_prog_CC"
2529fi
2530
2531if test -z "$CC"; then
2532 if test -n "$ac_tool_prefix"; then
2533 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2534set dummy ${ac_tool_prefix}cc; ac_word=$2
JP Abgrall53f17a92014-02-12 14:02:41 -08002535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2536$as_echo_n "checking for $ac_word... " >&6; }
2537if ${ac_cv_prog_CC+:} false; then :
2538 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002539else
2540 if test -n "$CC"; then
2541 ac_cv_prog_CC="$CC" # Let the user override the test.
2542else
2543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2544for as_dir in $PATH
2545do
2546 IFS=$as_save_IFS
2547 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08002548 for ac_exec_ext in '' $ac_executable_extensions; do
2549 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08002550 ac_cv_prog_CC="${ac_tool_prefix}cc"
JP Abgrall53f17a92014-02-12 14:02:41 -08002551 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002552 break 2
2553 fi
2554done
JP Abgrall53f17a92014-02-12 14:02:41 -08002555 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002556IFS=$as_save_IFS
2557
2558fi
2559fi
2560CC=$ac_cv_prog_CC
2561if test -n "$CC"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2563$as_echo "$CC" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002564else
JP Abgrall53f17a92014-02-12 14:02:41 -08002565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2566$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002567fi
2568
2569
2570 fi
2571fi
2572if test -z "$CC"; then
2573 # Extract the first word of "cc", so it can be a program name with args.
2574set dummy cc; ac_word=$2
JP Abgrall53f17a92014-02-12 14:02:41 -08002575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2576$as_echo_n "checking for $ac_word... " >&6; }
2577if ${ac_cv_prog_CC+:} false; then :
2578 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002579else
2580 if test -n "$CC"; then
2581 ac_cv_prog_CC="$CC" # Let the user override the test.
2582else
2583 ac_prog_rejected=no
2584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2585for as_dir in $PATH
2586do
2587 IFS=$as_save_IFS
2588 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08002589 for ac_exec_ext in '' $ac_executable_extensions; do
2590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08002591 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2592 ac_prog_rejected=yes
2593 continue
2594 fi
2595 ac_cv_prog_CC="cc"
JP Abgrall53f17a92014-02-12 14:02:41 -08002596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002597 break 2
2598 fi
2599done
JP Abgrall53f17a92014-02-12 14:02:41 -08002600 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002601IFS=$as_save_IFS
2602
2603if test $ac_prog_rejected = yes; then
2604 # We found a bogon in the path, so make sure we never use it.
2605 set dummy $ac_cv_prog_CC
2606 shift
2607 if test $# != 0; then
2608 # We chose a different compiler from the bogus one.
2609 # However, it has the same basename, so the bogon will be chosen
2610 # first if we set CC to just the basename; use the full file name.
2611 shift
2612 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2613 fi
2614fi
2615fi
2616fi
2617CC=$ac_cv_prog_CC
2618if test -n "$CC"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2620$as_echo "$CC" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002621else
JP Abgrall53f17a92014-02-12 14:02:41 -08002622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2623$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002624fi
2625
2626
2627fi
2628if test -z "$CC"; then
2629 if test -n "$ac_tool_prefix"; then
2630 for ac_prog in cl.exe
2631 do
2632 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
JP Abgrall53f17a92014-02-12 14:02:41 -08002634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2635$as_echo_n "checking for $ac_word... " >&6; }
2636if ${ac_cv_prog_CC+:} false; then :
2637 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002638else
2639 if test -n "$CC"; then
2640 ac_cv_prog_CC="$CC" # Let the user override the test.
2641else
2642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2643for as_dir in $PATH
2644do
2645 IFS=$as_save_IFS
2646 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08002647 for ac_exec_ext in '' $ac_executable_extensions; do
2648 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08002649 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
JP Abgrall53f17a92014-02-12 14:02:41 -08002650 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002651 break 2
2652 fi
2653done
JP Abgrall53f17a92014-02-12 14:02:41 -08002654 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002655IFS=$as_save_IFS
2656
2657fi
2658fi
2659CC=$ac_cv_prog_CC
2660if test -n "$CC"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2662$as_echo "$CC" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002663else
JP Abgrall53f17a92014-02-12 14:02:41 -08002664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2665$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002666fi
2667
2668
2669 test -n "$CC" && break
2670 done
2671fi
2672if test -z "$CC"; then
2673 ac_ct_CC=$CC
2674 for ac_prog in cl.exe
2675do
2676 # Extract the first word of "$ac_prog", so it can be a program name with args.
2677set dummy $ac_prog; ac_word=$2
JP Abgrall53f17a92014-02-12 14:02:41 -08002678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2679$as_echo_n "checking for $ac_word... " >&6; }
2680if ${ac_cv_prog_ac_ct_CC+:} false; then :
2681 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08002682else
2683 if test -n "$ac_ct_CC"; then
2684 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2685else
2686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2687for as_dir in $PATH
2688do
2689 IFS=$as_save_IFS
2690 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08002691 for ac_exec_ext in '' $ac_executable_extensions; do
2692 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08002693 ac_cv_prog_ac_ct_CC="$ac_prog"
JP Abgrall53f17a92014-02-12 14:02:41 -08002694 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002695 break 2
2696 fi
2697done
JP Abgrall53f17a92014-02-12 14:02:41 -08002698 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002699IFS=$as_save_IFS
2700
2701fi
2702fi
2703ac_ct_CC=$ac_cv_prog_ac_ct_CC
2704if test -n "$ac_ct_CC"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08002705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2706$as_echo "$ac_ct_CC" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002707else
JP Abgrall53f17a92014-02-12 14:02:41 -08002708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2709$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002710fi
2711
2712
2713 test -n "$ac_ct_CC" && break
2714done
2715
2716 if test "x$ac_ct_CC" = x; then
2717 CC=""
2718 else
2719 case $cross_compiling:$ac_tool_warned in
2720yes:)
JP Abgrall53f17a92014-02-12 14:02:41 -08002721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002723ac_tool_warned=yes ;;
2724esac
2725 CC=$ac_ct_CC
2726 fi
2727fi
2728
2729fi
2730
2731
JP Abgrall53f17a92014-02-12 14:02:41 -08002732test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2734as_fn_error $? "no acceptable C compiler found in \$PATH
2735See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002736
2737# Provide some information about the compiler.
JP Abgrall53f17a92014-02-12 14:02:41 -08002738$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2739set X $ac_compile
2740ac_compiler=$2
2741for ac_option in --version -v -V -qversion; do
2742 { { ac_try="$ac_compiler $ac_option >&5"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002743case "(($ac_try" in
2744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2745 *) ac_try_echo=$ac_try;;
2746esac
JP Abgrall53f17a92014-02-12 14:02:41 -08002747eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2748$as_echo "$ac_try_echo"; } >&5
2749 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
The Android Open Source Project2949f582009-03-03 19:30:46 -08002750 ac_status=$?
JP Abgrall53f17a92014-02-12 14:02:41 -08002751 if test -s conftest.err; then
2752 sed '10a\
2753... rest of stderr output deleted ...
2754 10q' conftest.err >conftest.er1
2755 cat conftest.er1 >&5
2756 fi
2757 rm -f conftest.er1 conftest.err
2758 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2759 test $ac_status = 0; }
2760done
The Android Open Source Project2949f582009-03-03 19:30:46 -08002761
JP Abgrall53f17a92014-02-12 14:02:41 -08002762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08002763/* end confdefs.h. */
2764
2765int
2766main ()
2767{
2768
2769 ;
2770 return 0;
2771}
2772_ACEOF
2773ac_clean_files_save=$ac_clean_files
JP Abgrall53f17a92014-02-12 14:02:41 -08002774ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002775# Try to create an executable without -o first, disregard a.out.
2776# It will help us diagnose broken compilers, and finding out an intuition
2777# of exeext.
JP Abgrall53f17a92014-02-12 14:02:41 -08002778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2779$as_echo_n "checking whether the C compiler works... " >&6; }
2780ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2781
2782# The possible output files:
2783ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2784
The Android Open Source Project2949f582009-03-03 19:30:46 -08002785ac_rmfiles=
2786for ac_file in $ac_files
2787do
2788 case $ac_file in
JP Abgrall53f17a92014-02-12 14:02:41 -08002789 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002790 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2791 esac
2792done
2793rm -f $ac_rmfiles
2794
JP Abgrall53f17a92014-02-12 14:02:41 -08002795if { { ac_try="$ac_link_default"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002796case "(($ac_try" in
2797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2798 *) ac_try_echo=$ac_try;;
2799esac
JP Abgrall53f17a92014-02-12 14:02:41 -08002800eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2801$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002802 (eval "$ac_link_default") 2>&5
2803 ac_status=$?
JP Abgrall53f17a92014-02-12 14:02:41 -08002804 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2805 test $ac_status = 0; }; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08002806 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2807# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2808# in a Makefile. We should not override ac_cv_exeext if it was cached,
2809# so that the user can short-circuit this test for compilers unknown to
2810# Autoconf.
2811for ac_file in $ac_files ''
2812do
2813 test -f "$ac_file" || continue
2814 case $ac_file in
JP Abgrall53f17a92014-02-12 14:02:41 -08002815 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
The Android Open Source Project2949f582009-03-03 19:30:46 -08002816 ;;
2817 [ab].out )
2818 # We found the default executable, but exeext='' is most
2819 # certainly right.
2820 break;;
2821 *.* )
JP Abgrall53f17a92014-02-12 14:02:41 -08002822 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002823 then :; else
2824 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2825 fi
2826 # We set ac_cv_exeext here because the later test for it is not
2827 # safe: cross compilers may not add the suffix if given an `-o'
2828 # argument, so we may need to know it at that point already.
2829 # Even if this section looks crufty: it has the advantage of
2830 # actually working.
2831 break;;
2832 * )
2833 break;;
2834 esac
2835done
2836test "$ac_cv_exeext" = no && ac_cv_exeext=
2837
2838else
2839 ac_file=''
2840fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002841if test -z "$ac_file"; then :
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2843$as_echo "no" >&6; }
2844$as_echo "$as_me: failed program was:" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002845sed 's/^/| /' conftest.$ac_ext >&5
2846
JP Abgrall53f17a92014-02-12 14:02:41 -08002847{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2848$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2849as_fn_error 77 "C compiler cannot create executables
2850See \`config.log' for more details" "$LINENO" 5; }
2851else
2852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2853$as_echo "yes" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002854fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2856$as_echo_n "checking for C compiler default output file name... " >&6; }
2857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2858$as_echo "$ac_file" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002859ac_exeext=$ac_cv_exeext
2860
JP Abgrall53f17a92014-02-12 14:02:41 -08002861rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
The Android Open Source Project2949f582009-03-03 19:30:46 -08002862ac_clean_files=$ac_clean_files_save
JP Abgrall53f17a92014-02-12 14:02:41 -08002863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2864$as_echo_n "checking for suffix of executables... " >&6; }
2865if { { ac_try="$ac_link"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002866case "(($ac_try" in
2867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2868 *) ac_try_echo=$ac_try;;
2869esac
JP Abgrall53f17a92014-02-12 14:02:41 -08002870eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2871$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002872 (eval "$ac_link") 2>&5
2873 ac_status=$?
JP Abgrall53f17a92014-02-12 14:02:41 -08002874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2875 test $ac_status = 0; }; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08002876 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2877# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2878# work properly (i.e., refer to `conftest.exe'), while it won't with
2879# `rm'.
2880for ac_file in conftest.exe conftest conftest.*; do
2881 test -f "$ac_file" || continue
2882 case $ac_file in
JP Abgrall53f17a92014-02-12 14:02:41 -08002883 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002884 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2885 break;;
2886 * ) break;;
2887 esac
2888done
2889else
JP Abgrall53f17a92014-02-12 14:02:41 -08002890 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2892as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2893See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002894fi
JP Abgrall53f17a92014-02-12 14:02:41 -08002895rm -f conftest conftest$ac_cv_exeext
2896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2897$as_echo "$ac_cv_exeext" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08002898
2899rm -f conftest.$ac_ext
2900EXEEXT=$ac_cv_exeext
2901ac_exeext=$EXEEXT
JP Abgrall53f17a92014-02-12 14:02:41 -08002902cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2903/* end confdefs.h. */
2904#include <stdio.h>
2905int
2906main ()
2907{
2908FILE *f = fopen ("conftest.out", "w");
2909 return ferror (f) || fclose (f) != 0;
2910
2911 ;
2912 return 0;
2913}
The Android Open Source Project2949f582009-03-03 19:30:46 -08002914_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08002915ac_clean_files="$ac_clean_files conftest.out"
2916# Check that the compiler produces executables we can run. If not, either
2917# the compiler is broken, or we cross compile.
2918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2919$as_echo_n "checking whether we are cross compiling... " >&6; }
2920if test "$cross_compiling" != yes; then
2921 { { ac_try="$ac_link"
2922case "(($ac_try" in
2923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2924 *) ac_try_echo=$ac_try;;
2925esac
2926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2927$as_echo "$ac_try_echo"; } >&5
2928 (eval "$ac_link") 2>&5
2929 ac_status=$?
2930 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2931 test $ac_status = 0; }
2932 if { ac_try='./conftest$ac_cv_exeext'
2933 { { case "(($ac_try" in
2934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2935 *) ac_try_echo=$ac_try;;
2936esac
2937eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2938$as_echo "$ac_try_echo"; } >&5
2939 (eval "$ac_try") 2>&5
2940 ac_status=$?
2941 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2942 test $ac_status = 0; }; }; then
2943 cross_compiling=no
2944 else
2945 if test "$cross_compiling" = maybe; then
2946 cross_compiling=yes
2947 else
2948 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2949$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2950as_fn_error $? "cannot run C compiled programs.
2951If you meant to cross compile, use \`--host'.
2952See \`config.log' for more details" "$LINENO" 5; }
2953 fi
2954 fi
2955fi
2956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2957$as_echo "$cross_compiling" >&6; }
2958
2959rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2960ac_clean_files=$ac_clean_files_save
2961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2962$as_echo_n "checking for suffix of object files... " >&6; }
2963if ${ac_cv_objext+:} false; then :
2964 $as_echo_n "(cached) " >&6
2965else
2966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08002967/* end confdefs.h. */
2968
2969int
2970main ()
2971{
2972
2973 ;
2974 return 0;
2975}
2976_ACEOF
2977rm -f conftest.o conftest.obj
JP Abgrall53f17a92014-02-12 14:02:41 -08002978if { { ac_try="$ac_compile"
The Android Open Source Project2949f582009-03-03 19:30:46 -08002979case "(($ac_try" in
2980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2981 *) ac_try_echo=$ac_try;;
2982esac
JP Abgrall53f17a92014-02-12 14:02:41 -08002983eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2984$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002985 (eval "$ac_compile") 2>&5
2986 ac_status=$?
JP Abgrall53f17a92014-02-12 14:02:41 -08002987 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2988 test $ac_status = 0; }; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08002989 for ac_file in conftest.o conftest.obj conftest.*; do
2990 test -f "$ac_file" || continue;
2991 case $ac_file in
JP Abgrall53f17a92014-02-12 14:02:41 -08002992 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08002993 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2994 break;;
2995 esac
2996done
2997else
JP Abgrall53f17a92014-02-12 14:02:41 -08002998 $as_echo "$as_me: failed program was:" >&5
The Android Open Source Project2949f582009-03-03 19:30:46 -08002999sed 's/^/| /' conftest.$ac_ext >&5
3000
JP Abgrall53f17a92014-02-12 14:02:41 -08003001{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3002$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3003as_fn_error $? "cannot compute suffix of object files: cannot compile
3004See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003005fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003006rm -f conftest.$ac_cv_objext conftest.$ac_ext
3007fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3009$as_echo "$ac_cv_objext" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003010OBJEXT=$ac_cv_objext
3011ac_objext=$OBJEXT
JP Abgrall53f17a92014-02-12 14:02:41 -08003012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3013$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3014if ${ac_cv_c_compiler_gnu+:} false; then :
3015 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003016else
JP Abgrall53f17a92014-02-12 14:02:41 -08003017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003018/* end confdefs.h. */
3019
3020int
3021main ()
3022{
3023#ifndef __GNUC__
3024 choke me
3025#endif
3026
3027 ;
3028 return 0;
3029}
3030_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003031if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003032 ac_compiler_gnu=yes
3033else
JP Abgrall53f17a92014-02-12 14:02:41 -08003034 ac_compiler_gnu=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08003035fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003036rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3037ac_cv_c_compiler_gnu=$ac_compiler_gnu
3038
3039fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3041$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3042if test $ac_compiler_gnu = yes; then
3043 GCC=yes
3044else
3045 GCC=
3046fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003047ac_test_CFLAGS=${CFLAGS+set}
3048ac_save_CFLAGS=$CFLAGS
JP Abgrall53f17a92014-02-12 14:02:41 -08003049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3050$as_echo_n "checking whether $CC accepts -g... " >&6; }
3051if ${ac_cv_prog_cc_g+:} false; then :
3052 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003053else
3054 ac_save_c_werror_flag=$ac_c_werror_flag
3055 ac_c_werror_flag=yes
3056 ac_cv_prog_cc_g=no
3057 CFLAGS="-g"
JP Abgrall53f17a92014-02-12 14:02:41 -08003058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003059/* end confdefs.h. */
3060
3061int
3062main ()
3063{
3064
3065 ;
3066 return 0;
3067}
3068_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003069if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003070 ac_cv_prog_cc_g=yes
3071else
JP Abgrall53f17a92014-02-12 14:02:41 -08003072 CFLAGS=""
3073 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003074/* end confdefs.h. */
3075
3076int
3077main ()
3078{
3079
3080 ;
3081 return 0;
3082}
3083_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003084if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003085
JP Abgrall53f17a92014-02-12 14:02:41 -08003086else
3087 ac_c_werror_flag=$ac_save_c_werror_flag
The Android Open Source Project2949f582009-03-03 19:30:46 -08003088 CFLAGS="-g"
JP Abgrall53f17a92014-02-12 14:02:41 -08003089 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003090/* end confdefs.h. */
3091
3092int
3093main ()
3094{
3095
3096 ;
3097 return 0;
3098}
3099_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003100if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003101 ac_cv_prog_cc_g=yes
The Android Open Source Project2949f582009-03-03 19:30:46 -08003102fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3104fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3106fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3108 ac_c_werror_flag=$ac_save_c_werror_flag
3109fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3111$as_echo "$ac_cv_prog_cc_g" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003112if test "$ac_test_CFLAGS" = set; then
3113 CFLAGS=$ac_save_CFLAGS
3114elif test $ac_cv_prog_cc_g = yes; then
3115 if test "$GCC" = yes; then
3116 CFLAGS="-g -O2"
3117 else
3118 CFLAGS="-g"
3119 fi
3120else
3121 if test "$GCC" = yes; then
3122 CFLAGS="-O2"
3123 else
3124 CFLAGS=
3125 fi
3126fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3128$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3129if ${ac_cv_prog_cc_c89+:} false; then :
3130 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003131else
3132 ac_cv_prog_cc_c89=no
3133ac_save_CC=$CC
JP Abgrall53f17a92014-02-12 14:02:41 -08003134cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003135/* end confdefs.h. */
3136#include <stdarg.h>
3137#include <stdio.h>
JP Abgrall53f17a92014-02-12 14:02:41 -08003138struct stat;
The Android Open Source Project2949f582009-03-03 19:30:46 -08003139/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3140struct buf { int x; };
3141FILE * (*rcsopen) (struct buf *, struct stat *, int);
3142static char *e (p, i)
3143 char **p;
3144 int i;
3145{
3146 return p[i];
3147}
3148static char *f (char * (*g) (char **, int), char **p, ...)
3149{
3150 char *s;
3151 va_list v;
3152 va_start (v,p);
3153 s = g (p, va_arg (v,int));
3154 va_end (v);
3155 return s;
3156}
3157
3158/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3159 function prototypes and stuff, but not '\xHH' hex character constants.
3160 These don't provoke an error unfortunately, instead are silently treated
3161 as 'x'. The following induces an error, until -std is added to get
3162 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3163 array size at least. It's necessary to write '\x00'==0 to get something
3164 that's true only with -std. */
3165int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3166
3167/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3168 inside strings and character constants. */
3169#define FOO(x) 'x'
3170int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3171
3172int test (int i, double x);
3173struct s1 {int (*f) (int a);};
3174struct s2 {int (*f) (double a);};
3175int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3176int argc;
3177char **argv;
3178int
3179main ()
3180{
3181return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3182 ;
3183 return 0;
3184}
3185_ACEOF
3186for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3187 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3188do
3189 CC="$ac_save_CC $ac_arg"
JP Abgrall53f17a92014-02-12 14:02:41 -08003190 if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003191 ac_cv_prog_cc_c89=$ac_arg
The Android Open Source Project2949f582009-03-03 19:30:46 -08003192fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003193rm -f core conftest.err conftest.$ac_objext
3194 test "x$ac_cv_prog_cc_c89" != "xno" && break
3195done
3196rm -f conftest.$ac_ext
3197CC=$ac_save_CC
3198
3199fi
3200# AC_CACHE_VAL
3201case "x$ac_cv_prog_cc_c89" in
3202 x)
JP Abgrall53f17a92014-02-12 14:02:41 -08003203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3204$as_echo "none needed" >&6; } ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08003205 xno)
JP Abgrall53f17a92014-02-12 14:02:41 -08003206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3207$as_echo "unsupported" >&6; } ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08003208 *)
3209 CC="$CC $ac_cv_prog_cc_c89"
JP Abgrall53f17a92014-02-12 14:02:41 -08003210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3211$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08003212esac
JP Abgrall53f17a92014-02-12 14:02:41 -08003213if test "x$ac_cv_prog_cc_c89" != xno; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003214
JP Abgrall53f17a92014-02-12 14:02:41 -08003215fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003216
3217ac_ext=c
3218ac_cpp='$CPP $CPPFLAGS'
3219ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3220ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3221ac_compiler_gnu=$ac_cv_c_compiler_gnu
3222
Elliott Hughes820eced2021-08-20 18:00:50 -07003223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3224$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3225if ${ac_cv_prog_cc_c99+:} false; then :
3226 $as_echo_n "(cached) " >&6
3227else
3228 ac_cv_prog_cc_c99=no
3229ac_save_CC=$CC
3230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3231/* end confdefs.h. */
3232#include <stdarg.h>
3233#include <stdbool.h>
3234#include <stdlib.h>
3235#include <wchar.h>
3236#include <stdio.h>
JP Abgrall53f17a92014-02-12 14:02:41 -08003237
Elliott Hughes820eced2021-08-20 18:00:50 -07003238// Check varargs macros. These examples are taken from C99 6.10.3.5.
3239#define debug(...) fprintf (stderr, __VA_ARGS__)
3240#define showlist(...) puts (#__VA_ARGS__)
3241#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3242static void
3243test_varargs_macros (void)
3244{
3245 int x = 1234;
3246 int y = 5678;
3247 debug ("Flag");
3248 debug ("X = %d\n", x);
3249 showlist (The first, second, and third items.);
3250 report (x>y, "x is %d but y is %d", x, y);
3251}
3252
3253// Check long long types.
3254#define BIG64 18446744073709551615ull
3255#define BIG32 4294967295ul
3256#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3257#if !BIG_OK
3258 your preprocessor is broken;
3259#endif
3260#if BIG_OK
3261#else
3262 your preprocessor is broken;
3263#endif
3264static long long int bignum = -9223372036854775807LL;
3265static unsigned long long int ubignum = BIG64;
3266
3267struct incomplete_array
3268{
3269 int datasize;
3270 double data[];
3271};
3272
3273struct named_init {
3274 int number;
3275 const wchar_t *name;
3276 double average;
3277};
3278
3279typedef const char *ccp;
3280
3281static inline int
3282test_restrict (ccp restrict text)
3283{
3284 // See if C++-style comments work.
3285 // Iterate through items via the restricted pointer.
3286 // Also check for declarations in for loops.
3287 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3288 continue;
3289 return 0;
3290}
3291
3292// Check varargs and va_copy.
3293static void
3294test_varargs (const char *format, ...)
3295{
3296 va_list args;
3297 va_start (args, format);
3298 va_list args_copy;
3299 va_copy (args_copy, args);
3300
3301 const char *str;
3302 int number;
3303 float fnumber;
3304
3305 while (*format)
3306 {
3307 switch (*format++)
3308 {
3309 case 's': // string
3310 str = va_arg (args_copy, const char *);
3311 break;
3312 case 'd': // int
3313 number = va_arg (args_copy, int);
3314 break;
3315 case 'f': // float
3316 fnumber = va_arg (args_copy, double);
3317 break;
3318 default:
3319 break;
3320 }
3321 }
3322 va_end (args_copy);
3323 va_end (args);
3324}
3325
3326int
3327main ()
3328{
3329
3330 // Check bool.
3331 _Bool success = false;
3332
3333 // Check restrict.
3334 if (test_restrict ("String literal") == 0)
3335 success = true;
3336 char *restrict newvar = "Another string";
3337
3338 // Check varargs.
3339 test_varargs ("s, d' f .", "string", 65, 34.234);
3340 test_varargs_macros ();
3341
3342 // Check flexible array members.
3343 struct incomplete_array *ia =
3344 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3345 ia->datasize = 10;
3346 for (int i = 0; i < ia->datasize; ++i)
3347 ia->data[i] = i * 1.234;
3348
3349 // Check named initializers.
3350 struct named_init ni = {
3351 .number = 34,
3352 .name = L"Test wide string",
3353 .average = 543.34343,
3354 };
3355
3356 ni.number = 58;
3357
3358 int dynamic_array[ni.number];
3359 dynamic_array[ni.number - 1] = 543;
3360
3361 // work around unused variable warnings
3362 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3363 || dynamic_array[ni.number - 1] != 543);
3364
3365 ;
3366 return 0;
3367}
3368_ACEOF
3369for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3370do
3371 CC="$ac_save_CC $ac_arg"
3372 if ac_fn_c_try_compile "$LINENO"; then :
3373 ac_cv_prog_cc_c99=$ac_arg
3374fi
3375rm -f core conftest.err conftest.$ac_objext
3376 test "x$ac_cv_prog_cc_c99" != "xno" && break
3377done
3378rm -f conftest.$ac_ext
3379CC=$ac_save_CC
3380
3381fi
3382# AC_CACHE_VAL
3383case "x$ac_cv_prog_cc_c99" in
3384 x)
3385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3386$as_echo "none needed" >&6; } ;;
3387 xno)
3388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3389$as_echo "unsupported" >&6; } ;;
3390 *)
3391 CC="$CC $ac_cv_prog_cc_c99"
3392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3393$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3394esac
3395if test "x$ac_cv_prog_cc_c99" != xno; then :
3396
3397fi
3398
3399
3400if test "$ac_cv_prog_cc_c99" = "no"; then
3401 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5
3402$as_echo "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;}
3403fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003404
3405
3406
3407
The Android Open Source Project2949f582009-03-03 19:30:46 -08003408 if test "$GCC" = yes ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08003409 #
3410 # -Werror forces warnings to be errors.
3411 #
3412 ac_lbl_cc_force_warning_errors=-Werror
The Android Open Source Project2949f582009-03-03 19:30:46 -08003413 else
The Android Open Source Project2949f582009-03-03 19:30:46 -08003414 V_INCLS="$V_INCLS -I/usr/local/include"
3415 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3416
3417 case "$host_os" in
3418
JP Abgrall53f17a92014-02-12 14:02:41 -08003419 darwin*)
3420 #
3421 # This is assumed either to be GCC or clang, both
3422 # of which use -Werror to force warnings to be errors.
3423 #
3424 ac_lbl_cc_force_warning_errors=-Werror
3425 ;;
3426
3427 hpux*)
3428 #
3429 # HP C, which is what we presume we're using, doesn't
3430 # exit with a non-zero exit status if we hand it an
3431 # invalid -W flag, can't be forced to do so even with
3432 # +We, and doesn't handle GCC-style -W flags, so we
3433 # don't want to try using GCC-style -W flags.
3434 #
3435 ac_lbl_cc_dont_try_gcc_dashW=yes
3436 ;;
3437
The Android Open Source Project2949f582009-03-03 19:30:46 -08003438 irix*)
JP Abgrall53f17a92014-02-12 14:02:41 -08003439 #
3440 # MIPS C, which is what we presume we're using, doesn't
3441 # necessarily exit with a non-zero exit status if we
3442 # hand it an invalid -W flag, can't be forced to do
3443 # so, and doesn't handle GCC-style -W flags, so we
3444 # don't want to try using GCC-style -W flags.
3445 #
3446 ac_lbl_cc_dont_try_gcc_dashW=yes
3447 #
3448 # It also, apparently, defaults to "char" being
3449 # unsigned, unlike most other C implementations;
3450 # I suppose we could say "signed char" whenever
3451 # we want to guarantee a signed "char", but let's
3452 # just force signed chars.
3453 #
3454 # -xansi is normally the default, but the
3455 # configure script was setting it; perhaps -cckr
3456 # was the default in the Old Days. (Then again,
3457 # that would probably be for backwards compatibility
3458 # in the days when ANSI C was Shiny and New, i.e.
3459 # 1989 and the early '90's, so maybe we can just
3460 # drop support for those compilers.)
3461 #
3462 # -g is equivalent to -g2, which turns off
3463 # optimization; we choose -g3, which generates
3464 # debugging information but doesn't turn off
3465 # optimization (even if the optimization would
3466 # cause inaccuracies in debugging).
3467 #
3468 V_CCOPT="$V_CCOPT -xansi -signed -g3"
The Android Open Source Project2949f582009-03-03 19:30:46 -08003469 ;;
3470
3471 osf*)
Elliott Hughes820eced2021-08-20 18:00:50 -07003472 #
JP Abgrall53f17a92014-02-12 14:02:41 -08003473 # Presumed to be DEC OSF/1, Digital UNIX, or
3474 # Tru64 UNIX.
3475 #
3476 # The DEC C compiler, which is what we presume we're
3477 # using, doesn't exit with a non-zero exit status if we
3478 # hand it an invalid -W flag, can't be forced to do
3479 # so, and doesn't handle GCC-style -W flags, so we
3480 # don't want to try using GCC-style -W flags.
3481 #
3482 ac_lbl_cc_dont_try_gcc_dashW=yes
3483 #
3484 # -g is equivalent to -g2, which turns off
3485 # optimization; we choose -g3, which generates
3486 # debugging information but doesn't turn off
3487 # optimization (even if the optimization would
3488 # cause inaccuracies in debugging).
3489 #
3490 V_CCOPT="$V_CCOPT -g3"
3491 ;;
3492
3493 solaris*)
3494 #
3495 # Assumed to be Sun C, which requires -errwarn to force
3496 # warnings to be treated as errors.
3497 #
3498 ac_lbl_cc_force_warning_errors=-errwarn
The Android Open Source Project2949f582009-03-03 19:30:46 -08003499 ;;
3500
3501 ultrix*)
JP Abgrall53f17a92014-02-12 14:02:41 -08003502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
3503$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
3504 if ${ac_cv_lbl_cc_const_proto+:} false; then :
3505 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003506else
Elliott Hughes820eced2021-08-20 18:00:50 -07003507
3508cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003509/* end confdefs.h. */
3510#include <sys/types.h>
3511int
3512main ()
3513{
3514struct a { int b; };
3515 void c(const struct a *)
3516 ;
3517 return 0;
3518}
3519_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003520if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003521 ac_cv_lbl_cc_const_proto=yes
3522else
JP Abgrall53f17a92014-02-12 14:02:41 -08003523 ac_cv_lbl_cc_const_proto=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08003524fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3526fi
3527
JP Abgrall53f17a92014-02-12 14:02:41 -08003528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
3529$as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003530 if test $ac_cv_lbl_cc_const_proto = no ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08003531
3532$as_echo "#define const /**/" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08003533
3534 fi
3535 ;;
3536 esac
JP Abgrall53f17a92014-02-12 14:02:41 -08003537 V_CCOPT="$V_CCOPT -O"
The Android Open Source Project2949f582009-03-03 19:30:46 -08003538 fi
3539
JP Abgrall53f17a92014-02-12 14:02:41 -08003540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
3541$as_echo_n "checking for inline... " >&6; }
3542 save_CFLAGS="$CFLAGS"
3543 CFLAGS="$V_CCOPT"
3544 if ${ac_cv_lbl_inline+:} false; then :
3545 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003546else
3547
3548 ac_cv_lbl_inline=""
3549 ac_lbl_cc_inline=no
3550 for ac_lbl_inline in inline __inline__ __inline
3551 do
JP Abgrall53f17a92014-02-12 14:02:41 -08003552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003553/* end confdefs.h. */
3554#define inline $ac_lbl_inline
3555 static inline struct iltest *foo(void);
3556 struct iltest {
3557 int iltest1;
3558 int iltest2;
3559 };
3560
3561 static inline struct iltest *
3562 foo()
3563 {
3564 static struct iltest xxx;
3565
3566 return &xxx;
3567 }
3568int
3569main ()
3570{
3571
3572 ;
3573 return 0;
3574}
3575_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003576if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003577 ac_lbl_cc_inline=yes
The Android Open Source Project2949f582009-03-03 19:30:46 -08003578fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3580 if test "$ac_lbl_cc_inline" = yes ; then
3581 break;
3582 fi
3583 done
3584 if test "$ac_lbl_cc_inline" = yes ; then
3585 ac_cv_lbl_inline=$ac_lbl_inline
3586 fi
3587fi
3588
JP Abgrall53f17a92014-02-12 14:02:41 -08003589 CFLAGS="$save_CFLAGS"
The Android Open Source Project2949f582009-03-03 19:30:46 -08003590 if test ! -z "$ac_cv_lbl_inline" ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08003591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
3592$as_echo "$ac_cv_lbl_inline" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003593 else
JP Abgrall53f17a92014-02-12 14:02:41 -08003594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3595$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003596 fi
3597
3598cat >>confdefs.h <<_ACEOF
3599#define inline $ac_cv_lbl_inline
3600_ACEOF
3601
3602
The Android Open Source Project2949f582009-03-03 19:30:46 -08003603ac_ext=c
3604ac_cpp='$CPP $CPPFLAGS'
3605ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3606ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3607ac_compiler_gnu=$ac_cv_c_compiler_gnu
JP Abgrall53f17a92014-02-12 14:02:41 -08003608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3609$as_echo_n "checking how to run the C preprocessor... " >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003610# On Suns, sometimes $CPP names a directory.
3611if test -n "$CPP" && test -d "$CPP"; then
3612 CPP=
3613fi
3614if test -z "$CPP"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08003615 if ${ac_cv_prog_CPP+:} false; then :
3616 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003617else
3618 # Double quotes because CPP needs to be expanded
3619 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3620 do
3621 ac_preproc_ok=false
3622for ac_c_preproc_warn_flag in '' yes
3623do
3624 # Use a header file that comes with gcc, so configuring glibc
3625 # with a fresh cross-compiler works.
3626 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3627 # <limits.h> exists even on freestanding compilers.
3628 # On the NeXT, cc -E runs the code through the compiler's parser,
3629 # not just through cpp. "Syntax error" is here to catch this case.
JP Abgrall53f17a92014-02-12 14:02:41 -08003630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003631/* end confdefs.h. */
3632#ifdef __STDC__
3633# include <limits.h>
3634#else
3635# include <assert.h>
3636#endif
3637 Syntax error
3638_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003639if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003640
JP Abgrall53f17a92014-02-12 14:02:41 -08003641else
The Android Open Source Project2949f582009-03-03 19:30:46 -08003642 # Broken: fails on valid input.
3643continue
3644fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003645rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003646
3647 # OK, works on sane cases. Now check whether nonexistent headers
3648 # can be detected and how.
JP Abgrall53f17a92014-02-12 14:02:41 -08003649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003650/* end confdefs.h. */
3651#include <ac_nonexistent.h>
3652_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003653if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003654 # Broken: success on invalid input.
3655continue
3656else
The Android Open Source Project2949f582009-03-03 19:30:46 -08003657 # Passes both tests.
3658ac_preproc_ok=:
3659break
3660fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003661rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003662
3663done
3664# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
JP Abgrall53f17a92014-02-12 14:02:41 -08003665rm -f conftest.i conftest.err conftest.$ac_ext
3666if $ac_preproc_ok; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003667 break
3668fi
3669
3670 done
3671 ac_cv_prog_CPP=$CPP
3672
3673fi
3674 CPP=$ac_cv_prog_CPP
3675else
3676 ac_cv_prog_CPP=$CPP
3677fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3679$as_echo "$CPP" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003680ac_preproc_ok=false
3681for ac_c_preproc_warn_flag in '' yes
3682do
3683 # Use a header file that comes with gcc, so configuring glibc
3684 # with a fresh cross-compiler works.
3685 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3686 # <limits.h> exists even on freestanding compilers.
3687 # On the NeXT, cc -E runs the code through the compiler's parser,
3688 # not just through cpp. "Syntax error" is here to catch this case.
JP Abgrall53f17a92014-02-12 14:02:41 -08003689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003690/* end confdefs.h. */
3691#ifdef __STDC__
3692# include <limits.h>
3693#else
3694# include <assert.h>
3695#endif
3696 Syntax error
3697_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003698if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003699
JP Abgrall53f17a92014-02-12 14:02:41 -08003700else
The Android Open Source Project2949f582009-03-03 19:30:46 -08003701 # Broken: fails on valid input.
3702continue
3703fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003704rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003705
3706 # OK, works on sane cases. Now check whether nonexistent headers
3707 # can be detected and how.
JP Abgrall53f17a92014-02-12 14:02:41 -08003708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003709/* end confdefs.h. */
3710#include <ac_nonexistent.h>
3711_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003712if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003713 # Broken: success on invalid input.
3714continue
3715else
The Android Open Source Project2949f582009-03-03 19:30:46 -08003716 # Passes both tests.
3717ac_preproc_ok=:
3718break
3719fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003720rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003721
3722done
3723# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
JP Abgrall53f17a92014-02-12 14:02:41 -08003724rm -f conftest.i conftest.err conftest.$ac_ext
3725if $ac_preproc_ok; then :
3726
The Android Open Source Project2949f582009-03-03 19:30:46 -08003727else
JP Abgrall53f17a92014-02-12 14:02:41 -08003728 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3730as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3731See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003732fi
3733
3734ac_ext=c
3735ac_cpp='$CPP $CPPFLAGS'
3736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3738ac_compiler_gnu=$ac_cv_c_compiler_gnu
3739
3740
JP Abgrall53f17a92014-02-12 14:02:41 -08003741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3742$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3743if ${ac_cv_path_GREP+:} false; then :
3744 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003745else
JP Abgrall53f17a92014-02-12 14:02:41 -08003746 if test -z "$GREP"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08003747 ac_path_GREP_found=false
JP Abgrall53f17a92014-02-12 14:02:41 -08003748 # Loop through the user's path and test for each of PROGNAME-LIST
3749 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
The Android Open Source Project2949f582009-03-03 19:30:46 -08003750for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3751do
3752 IFS=$as_save_IFS
3753 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08003754 for ac_prog in grep ggrep; do
3755 for ac_exec_ext in '' $ac_executable_extensions; do
3756 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3757 as_fn_executable_p "$ac_path_GREP" || continue
3758# Check for GNU ac_path_GREP and select it if it is found.
The Android Open Source Project2949f582009-03-03 19:30:46 -08003759 # Check for GNU $ac_path_GREP
3760case `"$ac_path_GREP" --version 2>&1` in
3761*GNU*)
3762 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3763*)
3764 ac_count=0
JP Abgrall53f17a92014-02-12 14:02:41 -08003765 $as_echo_n 0123456789 >"conftest.in"
The Android Open Source Project2949f582009-03-03 19:30:46 -08003766 while :
3767 do
3768 cat "conftest.in" "conftest.in" >"conftest.tmp"
3769 mv "conftest.tmp" "conftest.in"
3770 cp "conftest.in" "conftest.nl"
JP Abgrall53f17a92014-02-12 14:02:41 -08003771 $as_echo 'GREP' >> "conftest.nl"
The Android Open Source Project2949f582009-03-03 19:30:46 -08003772 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3773 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
JP Abgrall53f17a92014-02-12 14:02:41 -08003774 as_fn_arith $ac_count + 1 && ac_count=$as_val
The Android Open Source Project2949f582009-03-03 19:30:46 -08003775 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3776 # Best one so far, save it but keep looking for a better one
3777 ac_cv_path_GREP="$ac_path_GREP"
3778 ac_path_GREP_max=$ac_count
3779 fi
3780 # 10*(2^10) chars as input seems more than enough
3781 test $ac_count -gt 10 && break
3782 done
3783 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3784esac
3785
JP Abgrall53f17a92014-02-12 14:02:41 -08003786 $ac_path_GREP_found && break 3
3787 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08003788 done
JP Abgrall53f17a92014-02-12 14:02:41 -08003789 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08003790IFS=$as_save_IFS
JP Abgrall53f17a92014-02-12 14:02:41 -08003791 if test -z "$ac_cv_path_GREP"; then
3792 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3793 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003794else
3795 ac_cv_path_GREP=$GREP
3796fi
3797
The Android Open Source Project2949f582009-03-03 19:30:46 -08003798fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3800$as_echo "$ac_cv_path_GREP" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003801 GREP="$ac_cv_path_GREP"
3802
3803
JP Abgrall53f17a92014-02-12 14:02:41 -08003804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3805$as_echo_n "checking for egrep... " >&6; }
3806if ${ac_cv_path_EGREP+:} false; then :
3807 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003808else
3809 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3810 then ac_cv_path_EGREP="$GREP -E"
3811 else
JP Abgrall53f17a92014-02-12 14:02:41 -08003812 if test -z "$EGREP"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08003813 ac_path_EGREP_found=false
JP Abgrall53f17a92014-02-12 14:02:41 -08003814 # Loop through the user's path and test for each of PROGNAME-LIST
3815 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
The Android Open Source Project2949f582009-03-03 19:30:46 -08003816for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3817do
3818 IFS=$as_save_IFS
3819 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08003820 for ac_prog in egrep; do
3821 for ac_exec_ext in '' $ac_executable_extensions; do
3822 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3823 as_fn_executable_p "$ac_path_EGREP" || continue
3824# Check for GNU ac_path_EGREP and select it if it is found.
The Android Open Source Project2949f582009-03-03 19:30:46 -08003825 # Check for GNU $ac_path_EGREP
3826case `"$ac_path_EGREP" --version 2>&1` in
3827*GNU*)
3828 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3829*)
3830 ac_count=0
JP Abgrall53f17a92014-02-12 14:02:41 -08003831 $as_echo_n 0123456789 >"conftest.in"
The Android Open Source Project2949f582009-03-03 19:30:46 -08003832 while :
3833 do
3834 cat "conftest.in" "conftest.in" >"conftest.tmp"
3835 mv "conftest.tmp" "conftest.in"
3836 cp "conftest.in" "conftest.nl"
JP Abgrall53f17a92014-02-12 14:02:41 -08003837 $as_echo 'EGREP' >> "conftest.nl"
The Android Open Source Project2949f582009-03-03 19:30:46 -08003838 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3839 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
JP Abgrall53f17a92014-02-12 14:02:41 -08003840 as_fn_arith $ac_count + 1 && ac_count=$as_val
The Android Open Source Project2949f582009-03-03 19:30:46 -08003841 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3842 # Best one so far, save it but keep looking for a better one
3843 ac_cv_path_EGREP="$ac_path_EGREP"
3844 ac_path_EGREP_max=$ac_count
3845 fi
3846 # 10*(2^10) chars as input seems more than enough
3847 test $ac_count -gt 10 && break
3848 done
3849 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3850esac
3851
JP Abgrall53f17a92014-02-12 14:02:41 -08003852 $ac_path_EGREP_found && break 3
3853 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08003854 done
JP Abgrall53f17a92014-02-12 14:02:41 -08003855 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08003856IFS=$as_save_IFS
JP Abgrall53f17a92014-02-12 14:02:41 -08003857 if test -z "$ac_cv_path_EGREP"; then
3858 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3859 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003860else
3861 ac_cv_path_EGREP=$EGREP
3862fi
3863
The Android Open Source Project2949f582009-03-03 19:30:46 -08003864 fi
3865fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3867$as_echo "$ac_cv_path_EGREP" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003868 EGREP="$ac_cv_path_EGREP"
3869
3870
JP Abgrall53f17a92014-02-12 14:02:41 -08003871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3872$as_echo_n "checking for ANSI C header files... " >&6; }
3873if ${ac_cv_header_stdc+:} false; then :
3874 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08003875else
JP Abgrall53f17a92014-02-12 14:02:41 -08003876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003877/* end confdefs.h. */
3878#include <stdlib.h>
3879#include <stdarg.h>
3880#include <string.h>
3881#include <float.h>
3882
3883int
3884main ()
3885{
3886
3887 ;
3888 return 0;
3889}
3890_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003891if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003892 ac_cv_header_stdc=yes
3893else
JP Abgrall53f17a92014-02-12 14:02:41 -08003894 ac_cv_header_stdc=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08003895fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08003896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3897
3898if test $ac_cv_header_stdc = yes; then
3899 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
JP Abgrall53f17a92014-02-12 14:02:41 -08003900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003901/* end confdefs.h. */
3902#include <string.h>
3903
3904_ACEOF
3905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08003906 $EGREP "memchr" >/dev/null 2>&1; then :
3907
The Android Open Source Project2949f582009-03-03 19:30:46 -08003908else
3909 ac_cv_header_stdc=no
3910fi
3911rm -f conftest*
3912
3913fi
3914
3915if test $ac_cv_header_stdc = yes; then
3916 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
JP Abgrall53f17a92014-02-12 14:02:41 -08003917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003918/* end confdefs.h. */
3919#include <stdlib.h>
3920
3921_ACEOF
3922if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08003923 $EGREP "free" >/dev/null 2>&1; then :
3924
The Android Open Source Project2949f582009-03-03 19:30:46 -08003925else
3926 ac_cv_header_stdc=no
3927fi
3928rm -f conftest*
3929
3930fi
3931
3932if test $ac_cv_header_stdc = yes; then
3933 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
JP Abgrall53f17a92014-02-12 14:02:41 -08003934 if test "$cross_compiling" = yes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003935 :
3936else
JP Abgrall53f17a92014-02-12 14:02:41 -08003937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003938/* end confdefs.h. */
3939#include <ctype.h>
3940#include <stdlib.h>
3941#if ((' ' & 0x0FF) == 0x020)
3942# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3943# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3944#else
3945# define ISLOWER(c) \
3946 (('a' <= (c) && (c) <= 'i') \
3947 || ('j' <= (c) && (c) <= 'r') \
3948 || ('s' <= (c) && (c) <= 'z'))
3949# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3950#endif
3951
3952#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3953int
3954main ()
3955{
3956 int i;
3957 for (i = 0; i < 256; i++)
3958 if (XOR (islower (i), ISLOWER (i))
3959 || toupper (i) != TOUPPER (i))
3960 return 2;
3961 return 0;
3962}
3963_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003964if ac_fn_c_try_run "$LINENO"; then :
3965
The Android Open Source Project2949f582009-03-03 19:30:46 -08003966else
JP Abgrall53f17a92014-02-12 14:02:41 -08003967 ac_cv_header_stdc=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08003968fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3970 conftest.$ac_objext conftest.beam conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08003971fi
3972
The Android Open Source Project2949f582009-03-03 19:30:46 -08003973fi
3974fi
JP Abgrall53f17a92014-02-12 14:02:41 -08003975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3976$as_echo "$ac_cv_header_stdc" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08003977if test $ac_cv_header_stdc = yes; then
3978
JP Abgrall53f17a92014-02-12 14:02:41 -08003979$as_echo "#define STDC_HEADERS 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08003980
3981fi
3982
3983# On IRIX 5.3, sys/types and inttypes.h are conflicting.
The Android Open Source Project2949f582009-03-03 19:30:46 -08003984for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3985 inttypes.h stdint.h unistd.h
JP Abgrall53f17a92014-02-12 14:02:41 -08003986do :
3987 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3988ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3989"
3990if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08003991 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08003992#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08003993_ACEOF
3994
3995fi
3996
3997done
3998
3999
Elliott Hughes820eced2021-08-20 18:00:50 -07004000for ac_header in fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h
JP Abgrall53f17a92014-02-12 14:02:41 -08004001do :
4002 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4003ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4004if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004005 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08004006#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08004007_ACEOF
4008
4009fi
4010
4011done
4012
The Android Open Source Project2949f582009-03-03 19:30:46 -08004013for ac_header in net/pfvar.h
JP Abgrall53f17a92014-02-12 14:02:41 -08004014do :
4015 ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
The Android Open Source Project2949f582009-03-03 19:30:46 -08004016#include <sys/socket.h>
4017#include <net/if.h>
JP Abgrall53f17a92014-02-12 14:02:41 -08004018"
4019if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004020 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08004021#define HAVE_NET_PFVAR_H 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08004022_ACEOF
4023
4024fi
4025
4026done
4027
JP Abgrall53f17a92014-02-12 14:02:41 -08004028if test "$ac_cv_header_net_pfvar_h" = yes; then
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004029 for ac_header in net/if_pflog.h
4030do :
4031 ac_fn_c_check_header_compile "$LINENO" "net/if_pflog.h" "ac_cv_header_net_if_pflog_h" "#include <sys/types.h>
4032 #include <sys/socket.h>
4033 #include <net/if.h>
4034 #include <net/pfvar.h>
4035"
4036if test "x$ac_cv_header_net_if_pflog_h" = xyes; then :
4037 cat >>confdefs.h <<_ACEOF
4038#define HAVE_NET_IF_PFLOG_H 1
4039_ACEOF
4040
4041fi
4042
4043done
4044
4045 if test "$ac_cv_header_net_if_pflog_h" = yes; then
4046 LOCALSRC="print-pflog.c $LOCALSRC"
4047 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08004048fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08004049
4050case "$host_os" in
4051
JP Abgrall53f17a92014-02-12 14:02:41 -08004052darwin*)
4053 # Check whether --enable-universal was given.
4054if test "${enable_universal+set}" = set; then :
4055 enableval=$enable_universal;
4056fi
4057
4058 if test "$enable_universal" != "no"; then
4059 case "$host_os" in
4060
4061 darwin9.*)
4062 #
4063 # Leopard. Build for x86 and 32-bit PowerPC, with
4064 # x86 first. (That's what Apple does.)
4065 #
4066 V_CCOPT="$V_CCOPT -arch i386 -arch ppc"
4067 LDFLAGS="$LDFLAGS -arch i386 -arch ppc"
4068 ;;
4069
4070 darwin10.*)
4071 #
4072 # Snow Leopard. Build for x86-64 and x86, with
4073 # x86-64 first. (That's what Apple does.)
4074 #
4075 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
4076 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
4077 ;;
4078 esac
4079 fi
4080 ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08004081esac
4082
4083
4084
JP Abgrall53f17a92014-02-12 14:02:41 -08004085# Check whether --with-smi was given.
4086if test "${with_smi+set}" = set; then :
4087 withval=$with_smi;
4088else
4089 with_smi=yes
4090fi
4091
4092
4093if test "x$with_smi" != "xno" ; then
Elliott Hughes892a68b2015-10-19 14:43:53 -07004094 ac_fn_c_check_header_mongrel "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default"
JP Abgrall53f17a92014-02-12 14:02:41 -08004095if test "x$ac_cv_header_smi_h" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004096
Elliott Hughes892a68b2015-10-19 14:43:53 -07004097 #
4098 # OK, we found smi.h. Do we have libsmi with smiInit?
4099 #
4100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004101$as_echo_n "checking for smiInit in -lsmi... " >&6; }
4102if ${ac_cv_lib_smi_smiInit+:} false; then :
4103 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08004104else
4105 ac_check_lib_save_LIBS=$LIBS
4106LIBS="-lsmi $LIBS"
JP Abgrall53f17a92014-02-12 14:02:41 -08004107cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004108/* end confdefs.h. */
4109
4110/* Override any GCC internal prototype to avoid an error.
4111 Use char because int might match the return type of a GCC
4112 builtin and then its argument prototype would still apply. */
4113#ifdef __cplusplus
4114extern "C"
4115#endif
4116char smiInit ();
4117int
4118main ()
4119{
4120return smiInit ();
4121 ;
4122 return 0;
4123}
4124_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08004125if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004126 ac_cv_lib_smi_smiInit=yes
4127else
JP Abgrall53f17a92014-02-12 14:02:41 -08004128 ac_cv_lib_smi_smiInit=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08004129fi
JP Abgrall53f17a92014-02-12 14:02:41 -08004130rm -f core conftest.err conftest.$ac_objext \
4131 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004132LIBS=$ac_check_lib_save_LIBS
4133fi
JP Abgrall53f17a92014-02-12 14:02:41 -08004134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smi_smiInit" >&5
4135$as_echo "$ac_cv_lib_smi_smiInit" >&6; }
4136if test "x$ac_cv_lib_smi_smiInit" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004137
Elliott Hughes892a68b2015-10-19 14:43:53 -07004138 #
4139 # OK, we have libsmi with smiInit. Can we use it?
4140 #
4141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004142$as_echo_n "checking whether to enable libsmi... " >&6; }
Elliott Hughes892a68b2015-10-19 14:43:53 -07004143 savedlibs="$LIBS"
4144 LIBS="-lsmi $LIBS"
4145 if test "$cross_compiling" = yes; then :
4146
4147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004148$as_echo "not when cross-compiling" >&6; }
Elliott Hughes892a68b2015-10-19 14:43:53 -07004149 LIBS="$savedlibs"
4150
The Android Open Source Project2949f582009-03-03 19:30:46 -08004151
4152else
JP Abgrall53f17a92014-02-12 14:02:41 -08004153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004154/* end confdefs.h. */
Elliott Hughes892a68b2015-10-19 14:43:53 -07004155
4156/* libsmi available check */
The Android Open Source Project2949f582009-03-03 19:30:46 -08004157#include <smi.h>
4158main()
4159{
4160 int current, revision, age, n;
4161 const int required = 2;
4162 if (smiInit(""))
4163 exit(1);
4164 if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
4165 exit(2);
4166 n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
4167 if (n != 3)
4168 exit(3);
4169 if (required < current - age || required > current)
4170 exit(4);
4171 exit(0);
4172}
4173
4174_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08004175if ac_fn_c_try_run "$LINENO"; then :
Elliott Hughes892a68b2015-10-19 14:43:53 -07004176
4177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004178$as_echo "yes" >&6; }
4179
Elliott Hughes892a68b2015-10-19 14:43:53 -07004180$as_echo "#define USE_LIBSMI 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08004181
Elliott Hughes892a68b2015-10-19 14:43:53 -07004182
The Android Open Source Project2949f582009-03-03 19:30:46 -08004183else
Elliott Hughes892a68b2015-10-19 14:43:53 -07004184
4185 case $? in
4186 1) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004187$as_echo "no - smiInit failed" >&6; } ;;
Elliott Hughes892a68b2015-10-19 14:43:53 -07004188 2) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004189$as_echo "no - header/library version mismatch" >&6; } ;;
Elliott Hughes892a68b2015-10-19 14:43:53 -07004190 3) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004191$as_echo "no - can't determine library version" >&6; } ;;
Elliott Hughes892a68b2015-10-19 14:43:53 -07004192 4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004193$as_echo "no - too old" >&6; } ;;
Elliott Hughes892a68b2015-10-19 14:43:53 -07004194 *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004195$as_echo "no" >&6; } ;;
Elliott Hughes892a68b2015-10-19 14:43:53 -07004196 esac
4197 LIBS="$savedlibs"
4198
The Android Open Source Project2949f582009-03-03 19:30:46 -08004199fi
JP Abgrall53f17a92014-02-12 14:02:41 -08004200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4201 conftest.$ac_objext conftest.beam conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004202fi
4203
Elliott Hughes892a68b2015-10-19 14:43:53 -07004204
JP Abgrall53f17a92014-02-12 14:02:41 -08004205fi
Elliott Hughes892a68b2015-10-19 14:43:53 -07004206
4207
4208fi
4209
4210
The Android Open Source Project2949f582009-03-03 19:30:46 -08004211fi
4212
JP Abgrall53f17a92014-02-12 14:02:41 -08004213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable the possibly-buggy SMB printer" >&5
4214$as_echo_n "checking whether to enable the possibly-buggy SMB printer... " >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004215# Check whether --enable-smb was given.
JP Abgrall53f17a92014-02-12 14:02:41 -08004216if test "${enable_smb+set}" = set; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004217 enableval=$enable_smb;
4218else
Elliott Hughes820eced2021-08-20 18:00:50 -07004219 enableval=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08004220fi
4221
4222case "$enableval" in
JP Abgrall53f17a92014-02-12 14:02:41 -08004223yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4224$as_echo "yes" >&6; }
JP Abgrall53f17a92014-02-12 14:02:41 -08004225
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004226$as_echo "#define ENABLE_SMB 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08004227
4228 LOCALSRC="print-smb.c smbutil.c $LOCALSRC"
4229 ;;
JP Abgrall53f17a92014-02-12 14:02:41 -08004230*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4231$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004232 ;;
4233esac
4234
4235
4236# Check whether --with-user was given.
JP Abgrall53f17a92014-02-12 14:02:41 -08004237if test "${with_user+set}" = set; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004238 withval=$with_user;
4239fi
4240
JP Abgrall53f17a92014-02-12 14:02:41 -08004241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to drop root privileges by default" >&5
4242$as_echo_n "checking whether to drop root privileges by default... " >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004243if test ! -z "$with_user" ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08004244
4245cat >>confdefs.h <<_ACEOF
The Android Open Source Project2949f582009-03-03 19:30:46 -08004246#define WITH_USER "$withval"
4247_ACEOF
4248
JP Abgrall53f17a92014-02-12 14:02:41 -08004249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
4250$as_echo "to \"$withval\"" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004251else
JP Abgrall53f17a92014-02-12 14:02:41 -08004252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4253$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004254fi
4255
4256
4257# Check whether --with-chroot was given.
JP Abgrall53f17a92014-02-12 14:02:41 -08004258if test "${with_chroot+set}" = set; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004259 withval=$with_chroot;
4260fi
4261
JP Abgrall53f17a92014-02-12 14:02:41 -08004262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to chroot" >&5
4263$as_echo_n "checking whether to chroot... " >&6; }
4264if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then
4265
4266cat >>confdefs.h <<_ACEOF
The Android Open Source Project2949f582009-03-03 19:30:46 -08004267#define WITH_CHROOT "$withval"
4268_ACEOF
4269
JP Abgrall53f17a92014-02-12 14:02:41 -08004270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: to \"$withval\"" >&5
4271$as_echo "to \"$withval\"" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004272else
JP Abgrall53f17a92014-02-12 14:02:41 -08004273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4274$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004275fi
4276
Elliott Hughes892a68b2015-10-19 14:43:53 -07004277
4278# Check whether --with-sandbox-capsicum was given.
4279if test "${with_sandbox_capsicum+set}" = set; then :
4280 withval=$with_sandbox_capsicum;
4281fi
4282
4283#
4284# Check whether various functions are available. If any are, set
4285# ac_lbl_capsicum_function_seen to yes; if any are not, set
4286# ac_lbl_capsicum_function_not_seen to yes.
4287#
4288# We don't check cap_rights_init(), as it's a macro, wrapping another
4289# function, in at least some versions of FreeBSD, and AC_CHECK_FUNCS()
4290# doesn't handle that.
4291#
4292# All of the ones we check for must be available in order to enable
4293# capsicum sandboxing.
4294#
4295# XXX - do we need to check for all of them, or are there some that, if
4296# present, imply others are present?
4297#
Elliott Hughes820eced2021-08-20 18:00:50 -07004298if test ! -z "$with_sandbox_capsicum" && test "$with_sandbox_capsicum" != "no" ; then
4299 #
4300 # First, make sure we have the required header.
4301 #
4302 ac_fn_c_check_header_mongrel "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default"
4303if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
4304
4305 #
4306 # We do; now make sure we have the required functions.
4307 #
4308 for ac_func in cap_enter cap_rights_limit cap_ioctls_limit openat
Elliott Hughes892a68b2015-10-19 14:43:53 -07004309do :
4310 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4311ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4312if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
4313 cat >>confdefs.h <<_ACEOF
4314#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
4315_ACEOF
4316 ac_lbl_capsicum_function_seen=yes
4317else
4318 ac_lbl_capsicum_function_not_seen=yes
4319fi
4320done
4321
Elliott Hughes820eced2021-08-20 18:00:50 -07004322
4323fi
4324
4325
4326 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcasper" >&5
4327$as_echo_n "checking for cap_init in -lcasper... " >&6; }
4328if ${ac_cv_lib_casper_cap_init+:} false; then :
4329 $as_echo_n "(cached) " >&6
4330else
4331 ac_check_lib_save_LIBS=$LIBS
4332LIBS="-lcasper $LIBS"
4333cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4334/* end confdefs.h. */
4335
4336/* Override any GCC internal prototype to avoid an error.
4337 Use char because int might match the return type of a GCC
4338 builtin and then its argument prototype would still apply. */
4339#ifdef __cplusplus
4340extern "C"
4341#endif
4342char cap_init ();
4343int
4344main ()
4345{
4346return cap_init ();
4347 ;
4348 return 0;
4349}
4350_ACEOF
4351if ac_fn_c_try_link "$LINENO"; then :
4352 ac_cv_lib_casper_cap_init=yes
4353else
4354 ac_cv_lib_casper_cap_init=no
4355fi
4356rm -f core conftest.err conftest.$ac_objext \
4357 conftest$ac_exeext conftest.$ac_ext
4358LIBS=$ac_check_lib_save_LIBS
4359fi
4360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_casper_cap_init" >&5
4361$as_echo "$ac_cv_lib_casper_cap_init" >&6; }
4362if test "x$ac_cv_lib_casper_cap_init" = xyes; then :
4363 LIBS="$LIBS -lcasper"
4364fi
4365
4366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cap_gethostbyaddr in -lcap_dns" >&5
4367$as_echo_n "checking for cap_gethostbyaddr in -lcap_dns... " >&6; }
4368if ${ac_cv_lib_cap_dns_cap_gethostbyaddr+:} false; then :
4369 $as_echo_n "(cached) " >&6
4370else
4371 ac_check_lib_save_LIBS=$LIBS
4372LIBS="-lcap_dns $LIBS"
4373cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4374/* end confdefs.h. */
4375
4376/* Override any GCC internal prototype to avoid an error.
4377 Use char because int might match the return type of a GCC
4378 builtin and then its argument prototype would still apply. */
4379#ifdef __cplusplus
4380extern "C"
4381#endif
4382char cap_gethostbyaddr ();
4383int
4384main ()
4385{
4386return cap_gethostbyaddr ();
4387 ;
4388 return 0;
4389}
4390_ACEOF
4391if ac_fn_c_try_link "$LINENO"; then :
4392 ac_cv_lib_cap_dns_cap_gethostbyaddr=yes
4393else
4394 ac_cv_lib_cap_dns_cap_gethostbyaddr=no
4395fi
4396rm -f core conftest.err conftest.$ac_objext \
4397 conftest$ac_exeext conftest.$ac_ext
4398LIBS=$ac_check_lib_save_LIBS
4399fi
4400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_dns_cap_gethostbyaddr" >&5
4401$as_echo "$ac_cv_lib_cap_dns_cap_gethostbyaddr" >&6; }
4402if test "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = xyes; then :
4403 LIBS="$LIBS -lcap_dns"
4404fi
4405
Elliott Hughes892a68b2015-10-19 14:43:53 -07004406fi
4407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using capsicum" >&5
4408$as_echo_n "checking whether to sandbox using capsicum... " >&6; }
4409if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then
4410
4411$as_echo "#define HAVE_CAPSICUM 1" >>confdefs.h
4412
4413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4414$as_echo "yes" >&6; }
4415else
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4417$as_echo "no" >&6; }
4418fi
Elliott Hughes820eced2021-08-20 18:00:50 -07004419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using Casper library" >&5
4420$as_echo_n "checking whether to sandbox using Casper library... " >&6; }
4421if test "x$ac_cv_lib_casper_cap_init" = "xyes" -a "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = "xyes"; then
4422
4423$as_echo "#define HAVE_CASPER 1" >>confdefs.h
4424
4425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4426$as_echo "yes" >&6; }
4427else
4428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4429$as_echo "no" >&6; }
4430fi
Elliott Hughes892a68b2015-10-19 14:43:53 -07004431
JP Abgrall53f17a92014-02-12 14:02:41 -08004432#
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004433# We must check this before checking whether to check the OS's IPv6,
4434# support because, on some platforms (such as SunOS 5.x), the test
4435# program requires the extra networking libraries.
JP Abgrall53f17a92014-02-12 14:02:41 -08004436#
4437
4438 # Most operating systems have gethostbyname() in the default searched
4439 # libraries (i.e. libc):
4440 # Some OSes (eg. Solaris) place it in libnsl
4441 # Some strange OSes (SINIX) have it in libsocket:
4442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
4443$as_echo_n "checking for library containing gethostbyname... " >&6; }
4444if ${ac_cv_search_gethostbyname+:} false; then :
4445 $as_echo_n "(cached) " >&6
4446else
4447 ac_func_search_save_LIBS=$LIBS
4448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4449/* end confdefs.h. */
4450
4451/* Override any GCC internal prototype to avoid an error.
4452 Use char because int might match the return type of a GCC
4453 builtin and then its argument prototype would still apply. */
4454#ifdef __cplusplus
4455extern "C"
4456#endif
4457char gethostbyname ();
4458int
4459main ()
4460{
4461return gethostbyname ();
4462 ;
4463 return 0;
4464}
The Android Open Source Project2949f582009-03-03 19:30:46 -08004465_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08004466for ac_lib in '' nsl socket resolv; do
4467 if test -z "$ac_lib"; then
4468 ac_res="none required"
4469 else
4470 ac_res=-l$ac_lib
4471 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4472 fi
4473 if ac_fn_c_try_link "$LINENO"; then :
4474 ac_cv_search_gethostbyname=$ac_res
4475fi
4476rm -f core conftest.err conftest.$ac_objext \
4477 conftest$ac_exeext
4478 if ${ac_cv_search_gethostbyname+:} false; then :
4479 break
4480fi
4481done
4482if ${ac_cv_search_gethostbyname+:} false; then :
4483
4484else
4485 ac_cv_search_gethostbyname=no
4486fi
4487rm conftest.$ac_ext
4488LIBS=$ac_func_search_save_LIBS
4489fi
4490{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
4491$as_echo "$ac_cv_search_gethostbyname" >&6; }
4492ac_res=$ac_cv_search_gethostbyname
4493if test "$ac_res" != no; then :
4494 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4495
4496fi
4497
4498 # Unfortunately libsocket sometimes depends on libnsl and
4499 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
4500 if test "$ac_cv_search_gethostbyname" = "no"
4501 then
4502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
4503$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
4504if ${ac_cv_lib_socket_gethostbyname+:} false; then :
4505 $as_echo_n "(cached) " >&6
4506else
4507 ac_check_lib_save_LIBS=$LIBS
4508LIBS="-lsocket -lnsl $LIBS"
4509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4510/* end confdefs.h. */
4511
4512/* Override any GCC internal prototype to avoid an error.
4513 Use char because int might match the return type of a GCC
4514 builtin and then its argument prototype would still apply. */
4515#ifdef __cplusplus
4516extern "C"
4517#endif
4518char gethostbyname ();
4519int
4520main ()
4521{
4522return gethostbyname ();
4523 ;
4524 return 0;
4525}
4526_ACEOF
4527if ac_fn_c_try_link "$LINENO"; then :
4528 ac_cv_lib_socket_gethostbyname=yes
4529else
4530 ac_cv_lib_socket_gethostbyname=no
4531fi
4532rm -f core conftest.err conftest.$ac_objext \
4533 conftest$ac_exeext conftest.$ac_ext
4534LIBS=$ac_check_lib_save_LIBS
4535fi
4536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
4537$as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
4538if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then :
4539 LIBS="-lsocket -lnsl $LIBS"
4540fi
4541
4542 fi
4543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
4544$as_echo_n "checking for library containing socket... " >&6; }
4545if ${ac_cv_search_socket+:} false; then :
4546 $as_echo_n "(cached) " >&6
4547else
4548 ac_func_search_save_LIBS=$LIBS
4549cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4550/* end confdefs.h. */
4551
4552/* Override any GCC internal prototype to avoid an error.
4553 Use char because int might match the return type of a GCC
4554 builtin and then its argument prototype would still apply. */
4555#ifdef __cplusplus
4556extern "C"
4557#endif
4558char socket ();
4559int
4560main ()
4561{
4562return socket ();
4563 ;
4564 return 0;
4565}
4566_ACEOF
4567for ac_lib in '' socket; do
4568 if test -z "$ac_lib"; then
4569 ac_res="none required"
4570 else
4571 ac_res=-l$ac_lib
4572 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4573 fi
4574 if ac_fn_c_try_link "$LINENO"; then :
4575 ac_cv_search_socket=$ac_res
4576fi
4577rm -f core conftest.err conftest.$ac_objext \
4578 conftest$ac_exeext
4579 if ${ac_cv_search_socket+:} false; then :
4580 break
4581fi
4582done
4583if ${ac_cv_search_socket+:} false; then :
4584
4585else
4586 ac_cv_search_socket=no
4587fi
4588rm conftest.$ac_ext
4589LIBS=$ac_func_search_save_LIBS
4590fi
4591{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
4592$as_echo "$ac_cv_search_socket" >&6; }
4593ac_res=$ac_cv_search_socket
4594if test "$ac_res" != no; then :
4595 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4596
4597else
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
4599$as_echo_n "checking for socket in -lsocket... " >&6; }
4600if ${ac_cv_lib_socket_socket+:} false; then :
4601 $as_echo_n "(cached) " >&6
4602else
4603 ac_check_lib_save_LIBS=$LIBS
4604LIBS="-lsocket -lnsl $LIBS"
4605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4606/* end confdefs.h. */
4607
4608/* Override any GCC internal prototype to avoid an error.
4609 Use char because int might match the return type of a GCC
4610 builtin and then its argument prototype would still apply. */
4611#ifdef __cplusplus
4612extern "C"
4613#endif
4614char socket ();
4615int
4616main ()
4617{
4618return socket ();
4619 ;
4620 return 0;
4621}
4622_ACEOF
4623if ac_fn_c_try_link "$LINENO"; then :
4624 ac_cv_lib_socket_socket=yes
4625else
4626 ac_cv_lib_socket_socket=no
4627fi
4628rm -f core conftest.err conftest.$ac_objext \
4629 conftest$ac_exeext conftest.$ac_ext
4630LIBS=$ac_check_lib_save_LIBS
4631fi
4632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
4633$as_echo "$ac_cv_lib_socket_socket" >&6; }
4634if test "x$ac_cv_lib_socket_socket" = xyes; then :
4635 LIBS="-lsocket -lnsl $LIBS"
4636fi
4637
4638fi
4639
4640 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
4642$as_echo_n "checking for library containing putmsg... " >&6; }
4643if ${ac_cv_search_putmsg+:} false; then :
4644 $as_echo_n "(cached) " >&6
4645else
4646 ac_func_search_save_LIBS=$LIBS
4647cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4648/* end confdefs.h. */
4649
4650/* Override any GCC internal prototype to avoid an error.
4651 Use char because int might match the return type of a GCC
4652 builtin and then its argument prototype would still apply. */
4653#ifdef __cplusplus
4654extern "C"
4655#endif
4656char putmsg ();
4657int
4658main ()
4659{
4660return putmsg ();
4661 ;
4662 return 0;
4663}
4664_ACEOF
4665for ac_lib in '' str; do
4666 if test -z "$ac_lib"; then
4667 ac_res="none required"
4668 else
4669 ac_res=-l$ac_lib
4670 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4671 fi
4672 if ac_fn_c_try_link "$LINENO"; then :
4673 ac_cv_search_putmsg=$ac_res
4674fi
4675rm -f core conftest.err conftest.$ac_objext \
4676 conftest$ac_exeext
4677 if ${ac_cv_search_putmsg+:} false; then :
4678 break
4679fi
4680done
4681if ${ac_cv_search_putmsg+:} false; then :
4682
4683else
4684 ac_cv_search_putmsg=no
4685fi
4686rm conftest.$ac_ext
4687LIBS=$ac_func_search_save_LIBS
4688fi
4689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
4690$as_echo "$ac_cv_search_putmsg" >&6; }
4691ac_res=$ac_cv_search_putmsg
4692if test "$ac_res" != no; then :
4693 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4694
4695fi
4696
4697
4698
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004699#
4700# Check whether AF_INET6 and struct in6_addr are defined.
4701# If they aren't both defined, we don't have sufficient OS
4702# support for IPv6, so we don't look for IPv6 support libraries,
4703# and we define AF_INET6 and struct in6_addr ourselves.
4704#
4705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports IPv6" >&5
4706$as_echo_n "checking whether the operating system supports IPv6... " >&6; }
4707cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004708/* end confdefs.h. */
JP Abgrall53f17a92014-02-12 14:02:41 -08004709
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004710
4711/* AF_INET6 available check */
The Android Open Source Project2949f582009-03-03 19:30:46 -08004712#include <sys/types.h>
Elliott Hughes820eced2021-08-20 18:00:50 -07004713#ifdef _WIN32
4714#include <ws2tcpip.h>
4715#else
The Android Open Source Project2949f582009-03-03 19:30:46 -08004716#include <sys/socket.h>
JP Abgrall53f17a92014-02-12 14:02:41 -08004717#include <netinet/in.h>
Elliott Hughes820eced2021-08-20 18:00:50 -07004718#endif
JP Abgrall53f17a92014-02-12 14:02:41 -08004719#ifdef AF_INET6
4720void
4721foo(struct in6_addr *addr)
The Android Open Source Project2949f582009-03-03 19:30:46 -08004722{
JP Abgrall53f17a92014-02-12 14:02:41 -08004723 memset(addr, 0, sizeof (struct in6_addr));
The Android Open Source Project2949f582009-03-03 19:30:46 -08004724}
JP Abgrall53f17a92014-02-12 14:02:41 -08004725#else
4726#error "AF_INET6 not defined"
4727#endif
4728
The Android Open Source Project2949f582009-03-03 19:30:46 -08004729
4730_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08004731if ac_fn_c_try_compile "$LINENO"; then :
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004732
4733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004734$as_echo "yes" >&6; }
JP Abgrall53f17a92014-02-12 14:02:41 -08004735
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004736$as_echo "#define HAVE_OS_IPV6_SUPPORT 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08004737
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004738 ipv6=yes
4739
The Android Open Source Project2949f582009-03-03 19:30:46 -08004740else
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004741
4742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08004743$as_echo "no" >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004744 ipv6=no
4745
4746
The Android Open Source Project2949f582009-03-03 19:30:46 -08004747fi
JP Abgrall53f17a92014-02-12 14:02:41 -08004748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004749
4750ipv6type=unknown
4751ipv6lib=none
4752ipv6trylibc=no
4753
4754if test "$ipv6" = "yes"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08004755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5
4756$as_echo_n "checking ipv6 stack type... " >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004757 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do
4758 case $i in
4759 inria)
JP Abgrall53f17a92014-02-12 14:02:41 -08004760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004761/* end confdefs.h. */
4762#include <netinet/in.h>
4763#ifdef IPV6_INRIA_VERSION
4764yes
4765#endif
4766_ACEOF
4767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08004768 $EGREP "yes" >/dev/null 2>&1; then :
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004769 ipv6type=$i
The Android Open Source Project2949f582009-03-03 19:30:46 -08004770fi
4771rm -f conftest*
4772
4773 ;;
4774 kame)
JP Abgrall53f17a92014-02-12 14:02:41 -08004775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004776/* end confdefs.h. */
4777#include <netinet/in.h>
4778#ifdef __KAME__
4779yes
4780#endif
4781_ACEOF
4782if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08004783 $EGREP "yes" >/dev/null 2>&1; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004784 ipv6type=$i;
4785 ipv6lib=inet6;
4786 ipv6libdir=/usr/local/v6/lib;
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004787 ipv6trylibc=yes
The Android Open Source Project2949f582009-03-03 19:30:46 -08004788fi
4789rm -f conftest*
4790
4791 ;;
4792 linux-glibc)
JP Abgrall53f17a92014-02-12 14:02:41 -08004793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004794/* end confdefs.h. */
4795#include <features.h>
4796#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
4797yes
4798#endif
4799_ACEOF
4800if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08004801 $EGREP "yes" >/dev/null 2>&1; then :
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004802 ipv6type=$i
The Android Open Source Project2949f582009-03-03 19:30:46 -08004803fi
4804rm -f conftest*
4805
4806 ;;
4807 linux-libinet6)
4808 if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then
4809 ipv6type=$i
4810 ipv6lib=inet6
4811 ipv6libdir=/usr/inet6/lib
4812 ipv6trylibc=yes;
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004813 CFLAGS="-I/usr/inet6/include $CFLAGS"
The Android Open Source Project2949f582009-03-03 19:30:46 -08004814 fi
4815 ;;
4816 toshiba)
JP Abgrall53f17a92014-02-12 14:02:41 -08004817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004818/* end confdefs.h. */
4819#include <sys/param.h>
4820#ifdef _TOSHIBA_INET6
4821yes
4822#endif
4823_ACEOF
4824if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08004825 $EGREP "yes" >/dev/null 2>&1; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004826 ipv6type=$i;
4827 ipv6lib=inet6;
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004828 ipv6libdir=/usr/local/v6/lib
The Android Open Source Project2949f582009-03-03 19:30:46 -08004829fi
4830rm -f conftest*
4831
4832 ;;
4833 v6d)
JP Abgrall53f17a92014-02-12 14:02:41 -08004834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004835/* end confdefs.h. */
4836#include </usr/local/v6/include/sys/v6config.h>
4837#ifdef __V6D__
4838yes
4839#endif
4840_ACEOF
4841if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08004842 $EGREP "yes" >/dev/null 2>&1; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004843 ipv6type=$i;
4844 ipv6lib=v6;
4845 ipv6libdir=/usr/local/v6/lib;
4846 CFLAGS="-I/usr/local/v6/include $CFLAGS"
4847fi
4848rm -f conftest*
4849
4850 ;;
4851 zeta)
JP Abgrall53f17a92014-02-12 14:02:41 -08004852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08004853/* end confdefs.h. */
4854#include <sys/param.h>
4855#ifdef _ZETA_MINAMI_INET6
4856yes
4857#endif
4858_ACEOF
4859if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall53f17a92014-02-12 14:02:41 -08004860 $EGREP "yes" >/dev/null 2>&1; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004861 ipv6type=$i;
4862 ipv6lib=inet6;
Elliott Hughese2e3bd12017-05-15 10:59:29 -07004863 ipv6libdir=/usr/local/v6/lib
The Android Open Source Project2949f582009-03-03 19:30:46 -08004864fi
4865rm -f conftest*
4866
4867 ;;
4868 esac
4869 if test "$ipv6type" != "unknown"; then
4870 break
4871 fi
4872 done
JP Abgrall53f17a92014-02-12 14:02:41 -08004873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5
4874$as_echo "$ipv6type" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08004875fi
4876
4877if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
4878 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
4879 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
4880 echo "You have $ipv6lib library, using it"
4881 else
4882 if test "$ipv6trylibc" = "yes"; then
4883 echo "You do not have $ipv6lib library, using libc"
4884 else
4885 echo 'Fatal: no $ipv6lib library found. cannot continue.'
4886 echo "You need to fetch lib$ipv6lib.a from appropriate"
4887 echo 'ipv6 kit and compile beforehand.'
4888 exit 1
4889 fi
4890 fi
4891fi
4892
JP Abgrall53f17a92014-02-12 14:02:41 -08004893ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat"
4894if test "x$ac_cv_func_strlcat" = xyes; then :
4895 $as_echo "#define HAVE_STRLCAT 1" >>confdefs.h
4896
The Android Open Source Project2949f582009-03-03 19:30:46 -08004897else
JP Abgrall53f17a92014-02-12 14:02:41 -08004898 case " $LIBOBJS " in
4899 *" strlcat.$ac_objext "* ) ;;
4900 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext"
4901 ;;
4902esac
The Android Open Source Project2949f582009-03-03 19:30:46 -08004903
The Android Open Source Project2949f582009-03-03 19:30:46 -08004904fi
4905
JP Abgrall53f17a92014-02-12 14:02:41 -08004906ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy"
4907if test "x$ac_cv_func_strlcpy" = xyes; then :
4908 $as_echo "#define HAVE_STRLCPY 1" >>confdefs.h
4909
4910else
4911 case " $LIBOBJS " in
4912 *" strlcpy.$ac_objext "* ) ;;
4913 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext"
4914 ;;
4915esac
4916
The Android Open Source Project2949f582009-03-03 19:30:46 -08004917fi
JP Abgrall53f17a92014-02-12 14:02:41 -08004918
4919ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
4920if test "x$ac_cv_func_strdup" = xyes; then :
4921 $as_echo "#define HAVE_STRDUP 1" >>confdefs.h
4922
4923else
4924 case " $LIBOBJS " in
4925 *" strdup.$ac_objext "* ) ;;
4926 *) LIBOBJS="$LIBOBJS strdup.$ac_objext"
4927 ;;
4928esac
4929
4930fi
4931
4932ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
4933if test "x$ac_cv_func_strsep" = xyes; then :
4934 $as_echo "#define HAVE_STRSEP 1" >>confdefs.h
4935
4936else
4937 case " $LIBOBJS " in
4938 *" strsep.$ac_objext "* ) ;;
4939 *) LIBOBJS="$LIBOBJS strsep.$ac_objext"
4940 ;;
4941esac
4942
4943fi
4944
Elliott Hughes820eced2021-08-20 18:00:50 -07004945ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent"
4946if test "x$ac_cv_func_getservent" = xyes; then :
4947 $as_echo "#define HAVE_GETSERVENT 1" >>confdefs.h
4948
4949else
4950 case " $LIBOBJS " in
4951 *" getservent.$ac_objext "* ) ;;
4952 *) LIBOBJS="$LIBOBJS getservent.$ac_objext"
4953 ;;
4954esac
4955
4956fi
4957
Elliott Hughes892a68b2015-10-19 14:43:53 -07004958ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long"
4959if test "x$ac_cv_func_getopt_long" = xyes; then :
4960 $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h
4961
4962else
4963 case " $LIBOBJS " in
4964 *" getopt_long.$ac_objext "* ) ;;
4965 *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
4966 ;;
4967esac
4968
4969fi
4970
JP Abgrall53f17a92014-02-12 14:02:41 -08004971
4972for ac_func in fork vfork strftime
4973do :
4974 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4975ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4976if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004977 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08004978#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08004979_ACEOF
4980
4981fi
4982done
4983
Elliott Hughes820eced2021-08-20 18:00:50 -07004984for ac_func in setlinebuf
JP Abgrall53f17a92014-02-12 14:02:41 -08004985do :
Elliott Hughes820eced2021-08-20 18:00:50 -07004986 ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf"
4987if test "x$ac_cv_func_setlinebuf" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08004988 cat >>confdefs.h <<_ACEOF
Elliott Hughes820eced2021-08-20 18:00:50 -07004989#define HAVE_SETLINEBUF 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08004990_ACEOF
4991
4992fi
4993done
4994
4995
Elliott Hughes820eced2021-08-20 18:00:50 -07004996#
4997# Make sure we have vsnprintf() and snprintf(); we require them.
4998#
4999ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
5000if test "x$ac_cv_func_vsnprintf" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005001
5002else
Elliott Hughes820eced2021-08-20 18:00:50 -07005003 as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08005004fi
5005
Elliott Hughes820eced2021-08-20 18:00:50 -07005006ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
5007if test "x$ac_cv_func_snprintf" = xyes; then :
JP Abgrall53f17a92014-02-12 14:02:41 -08005008
The Android Open Source Project2949f582009-03-03 19:30:46 -08005009else
Elliott Hughes820eced2021-08-20 18:00:50 -07005010 as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08005011fi
5012
5013
JP Abgrall53f17a92014-02-12 14:02:41 -08005014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
5015$as_echo_n "checking for main in -lrpc... " >&6; }
5016if ${ac_cv_lib_rpc_main+:} false; then :
5017 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08005018else
5019 ac_check_lib_save_LIBS=$LIBS
5020LIBS="-lrpc $LIBS"
JP Abgrall53f17a92014-02-12 14:02:41 -08005021cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08005022/* end confdefs.h. */
5023
5024
5025int
5026main ()
5027{
5028return main ();
5029 ;
5030 return 0;
5031}
5032_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08005033if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005034 ac_cv_lib_rpc_main=yes
5035else
JP Abgrall53f17a92014-02-12 14:02:41 -08005036 ac_cv_lib_rpc_main=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08005037fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005038rm -f core conftest.err conftest.$ac_objext \
5039 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08005040LIBS=$ac_check_lib_save_LIBS
5041fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpc_main" >&5
5043$as_echo "$ac_cv_lib_rpc_main" >&6; }
5044if test "x$ac_cv_lib_rpc_main" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005045 cat >>confdefs.h <<_ACEOF
5046#define HAVE_LIBRPC 1
5047_ACEOF
5048
5049 LIBS="-lrpc $LIBS"
5050
5051fi
5052
JP Abgrall53f17a92014-02-12 14:02:41 -08005053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrpcbynumber" >&5
5054$as_echo_n "checking for library containing getrpcbynumber... " >&6; }
5055if ${ac_cv_search_getrpcbynumber+:} false; then :
5056 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08005057else
5058 ac_func_search_save_LIBS=$LIBS
JP Abgrall53f17a92014-02-12 14:02:41 -08005059cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08005060/* end confdefs.h. */
5061
5062/* Override any GCC internal prototype to avoid an error.
5063 Use char because int might match the return type of a GCC
5064 builtin and then its argument prototype would still apply. */
5065#ifdef __cplusplus
5066extern "C"
5067#endif
5068char getrpcbynumber ();
5069int
5070main ()
5071{
5072return getrpcbynumber ();
5073 ;
5074 return 0;
5075}
5076_ACEOF
5077for ac_lib in '' nsl; do
5078 if test -z "$ac_lib"; then
5079 ac_res="none required"
5080 else
5081 ac_res=-l$ac_lib
5082 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5083 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005084 if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005085 ac_cv_search_getrpcbynumber=$ac_res
The Android Open Source Project2949f582009-03-03 19:30:46 -08005086fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005087rm -f core conftest.err conftest.$ac_objext \
5088 conftest$ac_exeext
5089 if ${ac_cv_search_getrpcbynumber+:} false; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005090 break
5091fi
5092done
JP Abgrall53f17a92014-02-12 14:02:41 -08005093if ${ac_cv_search_getrpcbynumber+:} false; then :
5094
The Android Open Source Project2949f582009-03-03 19:30:46 -08005095else
5096 ac_cv_search_getrpcbynumber=no
5097fi
5098rm conftest.$ac_ext
5099LIBS=$ac_func_search_save_LIBS
5100fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrpcbynumber" >&5
5102$as_echo "$ac_cv_search_getrpcbynumber" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08005103ac_res=$ac_cv_search_getrpcbynumber
JP Abgrall53f17a92014-02-12 14:02:41 -08005104if test "$ac_res" != no; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005105 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5106
JP Abgrall53f17a92014-02-12 14:02:41 -08005107$as_echo "#define HAVE_GETRPCBYNUMBER 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08005108
5109fi
5110
The Android Open Source Project2949f582009-03-03 19:30:46 -08005111
5112
The Android Open Source Project2949f582009-03-03 19:30:46 -08005113 LBL_LIBS="$LIBS"
5114 pfopen=/usr/examples/packetfilter/pfopen.c
5115 if test -f $pfopen ; then
Elliott Hughes820eced2021-08-20 18:00:50 -07005116 for ac_func in pfopen
JP Abgrall53f17a92014-02-12 14:02:41 -08005117do :
5118 ac_fn_c_check_func "$LINENO" "pfopen" "ac_cv_func_pfopen"
5119if test "x$ac_cv_func_pfopen" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005120 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08005121#define HAVE_PFOPEN 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08005122_ACEOF
5123
5124fi
5125done
5126
Elliott Hughes820eced2021-08-20 18:00:50 -07005127 if test $ac_cv_func_pfopen = "no" ; then
5128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using $pfopen" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08005129$as_echo "Using $pfopen" >&6; }
Elliott Hughes820eced2021-08-20 18:00:50 -07005130 LIBS="$LIBS $pfopen"
5131 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08005132 fi
Elliott Hughes820eced2021-08-20 18:00:50 -07005133 libpcap=FAIL
5134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to look for a local libpcap" >&5
5135$as_echo_n "checking whether to look for a local libpcap... " >&6; }
5136 # Check whether --enable-local-libpcap was given.
5137if test "${enable_local_libpcap+set}" = set; then :
5138 enableval=$enable_local_libpcap;
5139else
5140 enableval=yes
Elliott Hughes892a68b2015-10-19 14:43:53 -07005141fi
5142
Elliott Hughes820eced2021-08-20 18:00:50 -07005143 case "$enableval" in
JP Abgrall53f17a92014-02-12 14:02:41 -08005144
Elliott Hughes820eced2021-08-20 18:00:50 -07005145 no)
5146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
5148 #
5149 # Don't look for a local libpcap.
5150 #
5151 using_local_libpcap=no
5152 ;;
5153
5154 *)
5155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5156$as_echo "yes" >&6; }
5157 #
5158 # Look for a local pcap library.
5159 #
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5
5161$as_echo_n "checking for local pcap library... " >&6; }
5162 lastdir=FAIL
5163 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
5164 egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
5165 places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
5166 egrep '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'`
5167 for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
5168 basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \
5169 sed -e 's/-PRE-GIT$//' `
5170 if test $lastdir = $basedir ; then
5171 continue;
5172 fi
5173 lastdir=$dir
5174 if test -r $dir/libpcap.a ; then
5175 libpcap=$dir/libpcap.a
5176 local_pcap_dir=$dir
5177 fi
5178 done
5179 if test $libpcap = FAIL ; then
5180 #
5181 # We didn't find a local libpcap.
5182 #
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5184$as_echo "not found" >&6; }
5185 using_local_libpcap=no;
5186 else
5187 #
5188 # We found a local libpcap.
5189 #
5190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5
5191$as_echo "$libpcap" >&6; }
5192 using_local_libpcap=yes
5193 fi
5194 ;;
5195 esac
5196
5197 if test $using_local_libpcap = no ; then
5198 #
5199 # We didn't find a local libpcap.
5200 # Look for an installed pkg-config.
5201 #
5202 if test -n "$ac_tool_prefix"; then
5203 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
5204set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
5205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5206$as_echo_n "checking for $ac_word... " >&6; }
5207if ${ac_cv_path_PKG_CONFIG+:} false; then :
5208 $as_echo_n "(cached) " >&6
5209else
5210 case $PKG_CONFIG in
5211 [\\/]* | ?:[\\/]*)
5212 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
5213 ;;
5214 *)
5215 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5216for as_dir in $PATH
5217do
5218 IFS=$as_save_IFS
5219 test -z "$as_dir" && as_dir=.
5220 for ac_exec_ext in '' $ac_executable_extensions; do
5221 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5222 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5223 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5224 break 2
5225 fi
5226done
5227 done
5228IFS=$as_save_IFS
5229
5230 ;;
5231esac
5232fi
5233PKG_CONFIG=$ac_cv_path_PKG_CONFIG
5234if test -n "$PKG_CONFIG"; then
5235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
5236$as_echo "$PKG_CONFIG" >&6; }
5237else
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5239$as_echo "no" >&6; }
5240fi
5241
5242
5243fi
5244if test -z "$ac_cv_path_PKG_CONFIG"; then
5245 ac_pt_PKG_CONFIG=$PKG_CONFIG
5246 # Extract the first word of "pkg-config", so it can be a program name with args.
5247set dummy pkg-config; ac_word=$2
5248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5249$as_echo_n "checking for $ac_word... " >&6; }
5250if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
5251 $as_echo_n "(cached) " >&6
5252else
5253 case $ac_pt_PKG_CONFIG in
5254 [\\/]* | ?:[\\/]*)
5255 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
5256 ;;
5257 *)
5258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259for as_dir in $PATH
5260do
5261 IFS=$as_save_IFS
5262 test -z "$as_dir" && as_dir=.
5263 for ac_exec_ext in '' $ac_executable_extensions; do
5264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5265 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5267 break 2
5268 fi
5269done
5270 done
5271IFS=$as_save_IFS
5272
5273 ;;
5274esac
5275fi
5276ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
5277if test -n "$ac_pt_PKG_CONFIG"; then
5278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
5279$as_echo "$ac_pt_PKG_CONFIG" >&6; }
5280else
5281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282$as_echo "no" >&6; }
5283fi
5284
5285 if test "x$ac_pt_PKG_CONFIG" = x; then
5286 PKG_CONFIG=""
5287 else
5288 case $cross_compiling:$ac_tool_warned in
5289yes:)
5290{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5291$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5292ac_tool_warned=yes ;;
5293esac
5294 PKG_CONFIG=$ac_pt_PKG_CONFIG
5295 fi
5296else
5297 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
5298fi
5299
5300 if test -n "$PKG_CONFIG" ; then
5301 #
5302 # We have it. Are there .pc files for libpcap?
5303 #
5304 # --exists was introduced in pkg-config 0.4.0; that
5305 # dates back to late 2000, so we won't worry about
5306 # earlier releases that lack it.
5307 #
5308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether there are .pc files for libpcap" >&5
5309$as_echo_n "checking whether there are .pc files for libpcap... " >&6; }
5310 if "$PKG_CONFIG" libpcap --exists ; then
5311 #
5312 # Yes, so we can use pkg-config to get configuration
5313 # information for libpcap.
5314 #
5315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5316$as_echo "yes" >&6; }
5317 pkg_config_usable=yes
5318 else
5319 #
5320 # No, so we can't use pkg-config to get configuration
5321 # information for libpcap.
5322 #
5323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5324$as_echo "no" >&6; }
5325 pkg_config_usable=no
5326 fi
5327 else
5328 #
5329 # We don't have it, so we obviously can't use it.
5330 #
5331 pkg_config_usable=no
5332 fi
5333 if test "$pkg_config_usable" = "yes" ; then
5334 #
5335 # Found both - use pkg-config to get the include flags for
5336 # libpcap and the flags to link with libpcap.
5337 #
5338 # Please read section 11.6 "Shell Substitutions"
5339 # in the autoconf manual before doing anything
5340 # to this that involves quoting. Especially note
5341 # the statement "There is just no portable way to use
5342 # double-quoted strings inside double-quoted back-quoted
5343 # expressions (pfew!)."
5344 #
5345 cflags=`"$PKG_CONFIG" libpcap --cflags`
5346 V_INCLS="$cflags $V_INCLS"
5347 libpcap=`"$PKG_CONFIG" libpcap --libs`
5348 else
5349 #
5350 # No pkg-config
5351 # Look for an installed pcap-config.
5352 #
5353 if test -n "$ac_tool_prefix"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08005354 # Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args.
5355set dummy ${ac_tool_prefix}pcap-config; ac_word=$2
5356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5357$as_echo_n "checking for $ac_word... " >&6; }
5358if ${ac_cv_path_PCAP_CONFIG+:} false; then :
5359 $as_echo_n "(cached) " >&6
5360else
5361 case $PCAP_CONFIG in
5362 [\\/]* | ?:[\\/]*)
5363 ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
5364 ;;
5365 *)
5366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5367for as_dir in $PATH
5368do
5369 IFS=$as_save_IFS
5370 test -z "$as_dir" && as_dir=.
5371 for ac_exec_ext in '' $ac_executable_extensions; do
5372 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5373 ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5374 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5375 break 2
5376 fi
5377done
5378 done
5379IFS=$as_save_IFS
5380
5381 ;;
5382esac
5383fi
5384PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
5385if test -n "$PCAP_CONFIG"; then
5386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
5387$as_echo "$PCAP_CONFIG" >&6; }
5388else
5389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5390$as_echo "no" >&6; }
5391fi
5392
5393
5394fi
5395if test -z "$ac_cv_path_PCAP_CONFIG"; then
5396 ac_pt_PCAP_CONFIG=$PCAP_CONFIG
5397 # Extract the first word of "pcap-config", so it can be a program name with args.
5398set dummy pcap-config; ac_word=$2
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400$as_echo_n "checking for $ac_word... " >&6; }
5401if ${ac_cv_path_ac_pt_PCAP_CONFIG+:} false; then :
5402 $as_echo_n "(cached) " >&6
5403else
5404 case $ac_pt_PCAP_CONFIG in
5405 [\\/]* | ?:[\\/]*)
5406 ac_cv_path_ac_pt_PCAP_CONFIG="$ac_pt_PCAP_CONFIG" # Let the user override the test with a path.
5407 ;;
5408 *)
5409 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5410for as_dir in $PATH
5411do
5412 IFS=$as_save_IFS
5413 test -z "$as_dir" && as_dir=.
5414 for ac_exec_ext in '' $ac_executable_extensions; do
5415 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5416 ac_cv_path_ac_pt_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5417 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5418 break 2
5419 fi
5420done
5421 done
5422IFS=$as_save_IFS
5423
5424 ;;
5425esac
5426fi
5427ac_pt_PCAP_CONFIG=$ac_cv_path_ac_pt_PCAP_CONFIG
5428if test -n "$ac_pt_PCAP_CONFIG"; then
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCAP_CONFIG" >&5
5430$as_echo "$ac_pt_PCAP_CONFIG" >&6; }
5431else
5432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5433$as_echo "no" >&6; }
5434fi
5435
5436 if test "x$ac_pt_PCAP_CONFIG" = x; then
5437 PCAP_CONFIG=""
5438 else
5439 case $cross_compiling:$ac_tool_warned in
5440yes:)
5441{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5442$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5443ac_tool_warned=yes ;;
5444esac
5445 PCAP_CONFIG=$ac_pt_PCAP_CONFIG
5446 fi
5447else
5448 PCAP_CONFIG="$ac_cv_path_PCAP_CONFIG"
5449fi
5450
Elliott Hughes820eced2021-08-20 18:00:50 -07005451 if test -n "$PCAP_CONFIG" ; then
5452 #
5453 # Found - use it to get the include flags for
5454 # libpcap and the flags to link with libpcap.
5455 #
5456 # Please read section 11.6 "Shell Substitutions"
5457 # in the autoconf manual before doing anything
5458 # to this that involves quoting. Especially note
5459 # the statement "There is just no portable way to use
5460 # double-quoted strings inside double-quoted back-quoted
5461 # expressions (pfew!)."
5462 #
5463 cflags=`"$PCAP_CONFIG" --cflags`
5464 V_INCLS="$cflags $V_INCLS"
5465 libpcap=`"$PCAP_CONFIG" --libs`
5466 else
5467 #
5468 # Not found; look for an installed pcap.
5469 #
5470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08005471$as_echo_n "checking for main in -lpcap... " >&6; }
5472if ${ac_cv_lib_pcap_main+:} false; then :
5473 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08005474else
5475 ac_check_lib_save_LIBS=$LIBS
5476LIBS="-lpcap $LIBS"
JP Abgrall53f17a92014-02-12 14:02:41 -08005477cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08005478/* end confdefs.h. */
5479
5480
5481int
5482main ()
5483{
5484return main ();
5485 ;
5486 return 0;
5487}
5488_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08005489if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005490 ac_cv_lib_pcap_main=yes
5491else
JP Abgrall53f17a92014-02-12 14:02:41 -08005492 ac_cv_lib_pcap_main=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08005493fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005494rm -f core conftest.err conftest.$ac_objext \
5495 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08005496LIBS=$ac_check_lib_save_LIBS
5497fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5
5499$as_echo "$ac_cv_lib_pcap_main" >&6; }
5500if test "x$ac_cv_lib_pcap_main" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005501 libpcap="-lpcap"
5502fi
5503
Elliott Hughes820eced2021-08-20 18:00:50 -07005504 if test $libpcap = FAIL ; then
5505 as_fn_error $? "see the INSTALL doc for more info" "$LINENO" 5
5506 fi
5507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08005508$as_echo_n "checking for extraneous pcap header directories... " >&6; }
Elliott Hughes820eced2021-08-20 18:00:50 -07005509 if test \( ! -r /usr/local/include/pcap.h \) -a \
5510 \( ! -r /usr/include/pcap.h \); then
5511 if test -r /usr/local/include/pcap/pcap.h; then
5512 d="/usr/local/include/pcap"
5513 elif test -r /usr/include/pcap/pcap.h; then
5514 d="/usr/include/pcap"
5515 fi
5516 fi
5517 if test -z "$d" ; then
5518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08005519$as_echo "not found" >&6; }
Elliott Hughes820eced2021-08-20 18:00:50 -07005520 else
5521 V_INCLS="-I$d $V_INCLS"
5522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08005523$as_echo "found -- -I$d added" >&6; }
Elliott Hughes820eced2021-08-20 18:00:50 -07005524 fi
Elliott Hughes892a68b2015-10-19 14:43:53 -07005525 fi
Elliott Hughes820eced2021-08-20 18:00:50 -07005526 fi
5527 else
5528 #
5529 # We found a local libpcap. Add it to the dependencies for
5530 # tcpdump.
5531 #
5532 V_PCAPDEP=$libpcap
Elliott Hughes892a68b2015-10-19 14:43:53 -07005533
Elliott Hughes820eced2021-08-20 18:00:50 -07005534 #
5535 # Look for its pcap-config script.
5536 #
5537 # Extract the first word of "pcap-config", so it can be a program name with args.
JP Abgrall53f17a92014-02-12 14:02:41 -08005538set dummy pcap-config; ac_word=$2
5539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5540$as_echo_n "checking for $ac_word... " >&6; }
5541if ${ac_cv_path_PCAP_CONFIG+:} false; then :
5542 $as_echo_n "(cached) " >&6
5543else
5544 case $PCAP_CONFIG in
5545 [\\/]* | ?:[\\/]*)
5546 ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path.
5547 ;;
5548 *)
5549 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Elliott Hughes820eced2021-08-20 18:00:50 -07005550for as_dir in $local_pcap_dir
JP Abgrall53f17a92014-02-12 14:02:41 -08005551do
5552 IFS=$as_save_IFS
5553 test -z "$as_dir" && as_dir=.
5554 for ac_exec_ext in '' $ac_executable_extensions; do
5555 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5556 ac_cv_path_PCAP_CONFIG="$as_dir/$ac_word$ac_exec_ext"
5557 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5558 break 2
5559 fi
5560done
5561 done
5562IFS=$as_save_IFS
5563
5564 ;;
5565esac
5566fi
5567PCAP_CONFIG=$ac_cv_path_PCAP_CONFIG
5568if test -n "$PCAP_CONFIG"; then
5569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5
5570$as_echo "$PCAP_CONFIG" >&6; }
5571else
5572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5573$as_echo "no" >&6; }
5574fi
5575
5576
The Android Open Source Project2949f582009-03-03 19:30:46 -08005577
Elliott Hughes820eced2021-08-20 18:00:50 -07005578 if test -n "$PCAP_CONFIG"; then
5579 #
5580 # We don't want its --cflags or --libs output, because
5581 # those presume it's installed. For the C compiler flags,
5582 # we add the source directory for the local libpcap, so
5583 # we pick up its header files.
5584 #
5585 # We do, however, want its additional libraries, as required
5586 # when linking statically, because it makes calls to
5587 # routines in those libraries, so we'll need to link with
5588 # them, because we'll be linking statically with it.
5589 #
5590 V_INCLS="-I$local_pcap_dir $V_INCLS"
5591 additional_libs=`"$PCAP_CONFIG" --static --additional-libs`
5592 libpcap="$libpcap $additional_libs"
5593 else
5594 #
5595 # It doesn't have a pcap-config script.
5596 # Make sure it has a pcap.h file.
5597 #
5598 places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \
5599 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
5600 places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \
5601 egrep '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'`
5602 pcapH=FAIL
5603 if test -r $local_pcap_dir/pcap.h; then
5604 pcapH=$local_pcap_dir
5605 else
5606 for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do
5607 if test -r $dir/pcap.h ; then
5608 pcapH=$dir
5609 fi
5610 done
5611 fi
5612
5613 if test $pcapH = FAIL ; then
5614 as_fn_error $? "cannot find pcap.h: see INSTALL" "$LINENO" 5
5615 fi
5616
5617 #
5618 # Force the compiler to look for header files in the
5619 # directory containing pcap.h.
5620 #
5621 V_INCLS="-I$pcapH $V_INCLS"
5622 fi
5623 fi
5624
5625 if test -z "$PKG_CONFIG" -a -z "$PCAP_CONFIG"; then
5626 #
5627 # We don't have pkg-config or pcap-config; find out any additional
5628 # link flags we need. (If we have pkg-config or pcap-config, we
5629 # assume it tells us what we need.)
5630 #
5631 case "$host_os" in
5632
5633 aix*)
5634 #
5635 # If libpcap is DLPI-based, we have to use /lib/pse.exp if
5636 # present, as we use the STREAMS routines.
5637 #
5638 # (XXX - true only if we're linking with a static libpcap?)
5639 #
5640 pseexe="/lib/pse.exp"
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08005642$as_echo_n "checking for $pseexe... " >&6; }
Elliott Hughes820eced2021-08-20 18:00:50 -07005643 if test -f $pseexe ; then
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08005645$as_echo "yes" >&6; }
Elliott Hughes820eced2021-08-20 18:00:50 -07005646 LIBS="$LIBS -I:$pseexe"
5647 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005648
Elliott Hughes820eced2021-08-20 18:00:50 -07005649 #
5650 # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as
5651 # we use them to load the BPF module.
5652 #
5653 # (XXX - true only if we're linking with a static libpcap?)
5654 #
5655 LIBS="$LIBS -lodm -lcfg"
5656 ;;
5657
5658 solaris*)
5659 # libdlpi is needed for Solaris 11 and later.
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
5661$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
5662if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
5663 $as_echo_n "(cached) " >&6
5664else
5665 ac_check_lib_save_LIBS=$LIBS
5666LIBS="-ldlpi -L/lib $LIBS"
5667cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5668/* end confdefs.h. */
5669
5670/* Override any GCC internal prototype to avoid an error.
5671 Use char because int might match the return type of a GCC
5672 builtin and then its argument prototype would still apply. */
5673#ifdef __cplusplus
5674extern "C"
5675#endif
5676char dlpi_walk ();
5677int
5678main ()
5679{
5680return dlpi_walk ();
5681 ;
5682 return 0;
5683}
5684_ACEOF
5685if ac_fn_c_try_link "$LINENO"; then :
5686 ac_cv_lib_dlpi_dlpi_walk=yes
5687else
5688 ac_cv_lib_dlpi_dlpi_walk=no
5689fi
5690rm -f core conftest.err conftest.$ac_objext \
5691 conftest$ac_exeext conftest.$ac_ext
5692LIBS=$ac_check_lib_save_LIBS
5693fi
5694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
5695$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
5696if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
5697 LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS"
5698fi
5699
5700 ;;
5701 esac
JP Abgrall53f17a92014-02-12 14:02:41 -08005702 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08005703
Elliott Hughes820eced2021-08-20 18:00:50 -07005704 LIBS="$libpcap $LIBS"
5705
JP Abgrall53f17a92014-02-12 14:02:41 -08005706 ac_fn_c_check_func "$LINENO" "pcap_loop" "ac_cv_func_pcap_loop"
5707if test "x$ac_cv_func_pcap_loop" = xyes; then :
5708
The Android Open Source Project2949f582009-03-03 19:30:46 -08005709else
The Android Open Source Project2949f582009-03-03 19:30:46 -08005710
Elliott Hughes820eced2021-08-20 18:00:50 -07005711 as_fn_error $? "This is a bug, please follow the guidelines in CONTRIBUTING and include the
JP Abgrall53f17a92014-02-12 14:02:41 -08005712config.log file in your report. If you have downloaded libpcap from
5713tcpdump.org, and built it yourself, please also include the config.log
5714file from the libpcap source directory, the Makefile from the libpcap
5715source directory, and the output of the make process for libpcap, as
5716this could be a problem with the libpcap that was built, and we will
5717not be able to determine why this is happening, and thus will not be
5718able to fix it, without that information, as we have not been able to
5719reproduce this problem ourselves." "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08005720
The Android Open Source Project2949f582009-03-03 19:30:46 -08005721fi
5722
JP Abgrall53f17a92014-02-12 14:02:41 -08005723
The Android Open Source Project2949f582009-03-03 19:30:46 -08005724
5725#
5726# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate
5727# libraries (e.g., "-lsocket -lnsl" on Solaris).
5728#
The Android Open Source Project2949f582009-03-03 19:30:46 -08005729# You are in a twisty little maze of UN*Xes, all different.
5730# Some might not have ether_ntohost().
Elliott Hughes820eced2021-08-20 18:00:50 -07005731# Some might have it and declare it in <net/ethernet.h>.
5732# Some might have it and declare it in <netinet/ether.h>
5733# Some might have it and declare it in <sys/ethernet.h>.
5734# Some might have it and declare it in <arpa/inet.h>.
5735# Some might have it and declare it in <netinet/if_ether.h>.
5736# Some might have it and not declare it in any header file.
The Android Open Source Project2949f582009-03-03 19:30:46 -08005737#
5738# Before you is a C compiler.
5739#
The Android Open Source Project2949f582009-03-03 19:30:46 -08005740for ac_func in ether_ntohost
JP Abgrall53f17a92014-02-12 14:02:41 -08005741do :
5742 ac_fn_c_check_func "$LINENO" "ether_ntohost" "ac_cv_func_ether_ntohost"
5743if test "x$ac_cv_func_ether_ntohost" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005744 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08005745#define HAVE_ETHER_NTOHOST 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08005746_ACEOF
5747
JP Abgrall53f17a92014-02-12 14:02:41 -08005748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for buggy ether_ntohost" >&5
5749$as_echo_n "checking for buggy ether_ntohost... " >&6; }
5750if ${ac_cv_buggy_ether_ntohost+:} false; then :
5751 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08005752else
5753
JP Abgrall53f17a92014-02-12 14:02:41 -08005754 if test "$cross_compiling" = yes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005755 ac_cv_buggy_ether_ntohost="not while cross-compiling"
5756else
JP Abgrall53f17a92014-02-12 14:02:41 -08005757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08005758/* end confdefs.h. */
5759
5760 #include <netdb.h>
5761 #include <sys/types.h>
5762 #include <sys/param.h>
5763 #include <sys/socket.h>
5764
5765 int
5766 main(int argc, char **argv)
5767 {
5768 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff };
5769 char name[MAXHOSTNAMELEN];
5770
5771 ether_ntohost(name, (struct ether_addr *)ea);
5772 exit(0);
5773 }
5774
5775_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08005776if ac_fn_c_try_run "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005777 ac_cv_buggy_ether_ntohost=no
5778else
JP Abgrall53f17a92014-02-12 14:02:41 -08005779 ac_cv_buggy_ether_ntohost=yes
The Android Open Source Project2949f582009-03-03 19:30:46 -08005780fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5782 conftest.$ac_objext conftest.beam conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08005783fi
5784
The Android Open Source Project2949f582009-03-03 19:30:46 -08005785fi
JP Abgrall53f17a92014-02-12 14:02:41 -08005786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_ether_ntohost" >&5
5787$as_echo "$ac_cv_buggy_ether_ntohost" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08005788 if test "$ac_cv_buggy_ether_ntohost" = "no"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08005789
5790$as_echo "#define USE_ETHER_NTOHOST 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08005791
5792 fi
5793
5794fi
5795done
5796
5797if test "$ac_cv_func_ether_ntohost" = yes -a \
5798 "$ac_cv_buggy_ether_ntohost" = "no"; then
5799 #
Elliott Hughes820eced2021-08-20 18:00:50 -07005800 # OK, we have ether_ntohost(). Is it declared in <net/ethernet.h>?
The Android Open Source Project2949f582009-03-03 19:30:46 -08005801 #
Elliott Hughes820eced2021-08-20 18:00:50 -07005802 # This test fails if we don't have <net/ethernet.h> or if we do
5803 # but it doesn't declare ether_ntohost().
5804 #
5805 ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
5806#include <net/ethernet.h>
5807
5808"
5809if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
5810
5811
5812$as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
5813
5814
5815fi
5816
5817 #
5818 # Did that succeed?
5819 #
5820 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08005821 #
Elliott Hughes820eced2021-08-20 18:00:50 -07005822 # No, how about <netinet/ether.h>, as on Linux?
The Android Open Source Project2949f582009-03-03 19:30:46 -08005823 #
Elliott Hughes820eced2021-08-20 18:00:50 -07005824 # This test fails if we don't have <netinet/ether.h>
5825 # or if we do but it doesn't declare ether_ntohost().
5826 #
5827 # Unset ac_cv_have_decl_ether_ntohost so we don't
5828 # treat the previous failure as a cached value and
5829 # suppress the next test.
5830 #
5831 unset ac_cv_have_decl_ether_ntohost
5832 ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
5833#include <netinet/ether.h>
5834
5835"
5836if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
5837
5838
5839$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
5840
5841
5842fi
5843
5844 fi
5845 #
5846 # Did that succeed?
5847 #
5848 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
5849 #
5850 # No, how about <sys/ethernet.h>, as on Solaris 10
5851 # and later?
5852 #
5853 # This test fails if we don't have <sys/ethernet.h>
5854 # or if we do but it doesn't declare ether_ntohost().
5855 #
5856 # Unset ac_cv_have_decl_ether_ntohost so we don't
5857 # treat the previous failure as a cached value and
5858 # suppress the next test.
5859 #
5860 unset ac_cv_have_decl_ether_ntohost
5861 ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
5862#include <sys/ethernet.h>
5863
5864"
5865if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
5866
5867
5868$as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
5869
5870
5871fi
5872
5873 fi
5874 #
5875 # Did that succeed?
5876 #
5877 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
5878 #
5879 # No, how about <arpa/inet.h>, as in AIX?
5880 #
5881 # This test fails if we don't have <arpa/inet.h>
5882 # (if we have ether_ntohost(), we should have
5883 # networking, and if we have networking, we should
5884 # have <arpa/inet.h>) or if we do but it doesn't
5885 # declare ether_ntohost().
5886 #
5887 # Unset ac_cv_have_decl_ether_ntohost so we don't
5888 # treat the previous failure as a cached value and
5889 # suppress the next test.
5890 #
5891 unset ac_cv_have_decl_ether_ntohost
5892 ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
5893#include <arpa/inet.h>
5894
5895"
5896if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
5897
5898
5899$as_echo "#define ARPA_INET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
5900
5901
5902fi
5903
5904 fi
5905 #
5906 # Did that succeed?
5907 #
5908 if test "$ac_cv_have_decl_ether_ntohost" != yes; then
5909 #
5910 # No, how about <netinet/if_ether.h>?
5911 # On some platforms, it requires <net/if.h> and
5912 # <netinet/in.h>, and we always include it with
5913 # both of them, so test it with both of them.
5914 #
5915 # This test fails if we don't have <netinet/if_ether.h>
5916 # and the headers we include before it, or if we do but
5917 # <netinet/if_ether.h> doesn't declare ether_hostton().
5918 #
5919 # Unset ac_cv_have_decl_ether_ntohost so we don't
5920 # treat the previous failure as a cached value and
5921 # suppress the next test.
5922 #
5923 unset ac_cv_have_decl_ether_ntohost
JP Abgrall53f17a92014-02-12 14:02:41 -08005924 ac_fn_c_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" "
The Android Open Source Project2949f582009-03-03 19:30:46 -08005925#include <sys/types.h>
5926#include <sys/socket.h>
The Android Open Source Project2949f582009-03-03 19:30:46 -08005927#include <net/if.h>
Elliott Hughes820eced2021-08-20 18:00:50 -07005928#include <netinet/in.h>
The Android Open Source Project2949f582009-03-03 19:30:46 -08005929#include <netinet/if_ether.h>
5930
JP Abgrall53f17a92014-02-12 14:02:41 -08005931"
5932if test "x$ac_cv_have_decl_ether_ntohost" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005933
5934
JP Abgrall53f17a92014-02-12 14:02:41 -08005935$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08005936
5937
5938fi
5939
5940 fi
5941 #
Elliott Hughes820eced2021-08-20 18:00:50 -07005942 # After all that, is ether_ntohost() declared?
The Android Open Source Project2949f582009-03-03 19:30:46 -08005943 #
Elliott Hughes820eced2021-08-20 18:00:50 -07005944 if test "$ac_cv_have_decl_ether_ntohost" = yes; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08005945 #
Elliott Hughes820eced2021-08-20 18:00:50 -07005946 # Yes.
The Android Open Source Project2949f582009-03-03 19:30:46 -08005947 #
The Android Open Source Project2949f582009-03-03 19:30:46 -08005948
Elliott Hughes820eced2021-08-20 18:00:50 -07005949$as_echo "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08005950
Elliott Hughes820eced2021-08-20 18:00:50 -07005951 else
The Android Open Source Project2949f582009-03-03 19:30:46 -08005952 #
5953 # No, we'll have to declare it ourselves.
Elliott Hughes820eced2021-08-20 18:00:50 -07005954 # Do we have "struct ether_addr" if we include
5955 # <netinet/if_ether.h>?
The Android Open Source Project2949f582009-03-03 19:30:46 -08005956 #
JP Abgrall53f17a92014-02-12 14:02:41 -08005957 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
Elliott Hughes820eced2021-08-20 18:00:50 -07005958 #include <sys/types.h>
5959 #include <sys/socket.h>
5960 #include <net/if.h>
5961 #include <netinet/in.h>
5962 #include <netinet/if_ether.h>
The Android Open Source Project2949f582009-03-03 19:30:46 -08005963
JP Abgrall53f17a92014-02-12 14:02:41 -08005964"
5965if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08005966
5967cat >>confdefs.h <<_ACEOF
5968#define HAVE_STRUCT_ETHER_ADDR 1
5969_ACEOF
5970
5971
5972fi
5973
The Android Open Source Project2949f582009-03-03 19:30:46 -08005974 fi
5975fi
5976
Elliott Hughes892a68b2015-10-19 14:43:53 -07005977ac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks"
5978if test "x$ac_cv_func_pcap_list_datalinks" = xyes; then :
5979
5980
5981$as_echo "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h
5982
5983 for ac_func in pcap_free_datalinks
5984do :
5985 ac_fn_c_check_func "$LINENO" "pcap_free_datalinks" "ac_cv_func_pcap_free_datalinks"
5986if test "x$ac_cv_func_pcap_free_datalinks" = xyes; then :
5987 cat >>confdefs.h <<_ACEOF
5988#define HAVE_PCAP_FREE_DATALINKS 1
5989_ACEOF
5990
5991fi
5992done
5993
5994
5995else
5996
5997 case " $LIBOBJS " in
5998 *" datalinks.$ac_objext "* ) ;;
5999 *) LIBOBJS="$LIBOBJS datalinks.$ac_objext"
6000 ;;
6001esac
6002
6003
6004fi
6005
Elliott Hughes892a68b2015-10-19 14:43:53 -07006006
6007ac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val"
6008if test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes; then :
6009
6010
6011$as_echo "#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1" >>confdefs.h
6012
6013 ac_fn_c_check_func "$LINENO" "pcap_datalink_val_to_description" "ac_cv_func_pcap_datalink_val_to_description"
6014if test "x$ac_cv_func_pcap_datalink_val_to_description" = xyes; then :
6015
6016$as_echo "#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1" >>confdefs.h
6017
6018else
6019
6020 case " $LIBOBJS " in
6021 *" dlnames.$ac_objext "* ) ;;
6022 *) LIBOBJS="$LIBOBJS dlnames.$ac_objext"
6023 ;;
6024esac
6025
6026
6027fi
6028
6029
6030else
6031
6032 case " $LIBOBJS " in
6033 *" dlnames.$ac_objext "* ) ;;
6034 *) LIBOBJS="$LIBOBJS dlnames.$ac_objext"
6035 ;;
6036esac
6037
6038
6039fi
6040
6041
Elliott Hughes820eced2021-08-20 18:00:50 -07006042for ac_func in pcap_set_datalink
6043do :
6044 ac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink"
6045if test "x$ac_cv_func_pcap_set_datalink" = xyes; then :
6046 cat >>confdefs.h <<_ACEOF
6047#define HAVE_PCAP_SET_DATALINK 1
6048_ACEOF
6049
6050fi
6051done
6052
6053
Elliott Hughes892a68b2015-10-19 14:43:53 -07006054for ac_func in pcap_breakloop
6055do :
6056 ac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop"
6057if test "x$ac_cv_func_pcap_breakloop" = xyes; then :
6058 cat >>confdefs.h <<_ACEOF
6059#define HAVE_PCAP_BREAKLOOP 1
6060_ACEOF
6061
6062fi
6063done
6064
6065
JP Abgrall53f17a92014-02-12 14:02:41 -08006066#
6067# Do we have the new open API? Check for pcap_create, and assume that,
6068# if we do, we also have pcap_activate() and the other new routines
6069# introduced in libpcap 1.0.0.
6070#
6071for ac_func in pcap_create
6072do :
6073 ac_fn_c_check_func "$LINENO" "pcap_create" "ac_cv_func_pcap_create"
6074if test "x$ac_cv_func_pcap_create" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006075 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08006076#define HAVE_PCAP_CREATE 1
6077_ACEOF
6078
6079fi
6080done
6081
6082if test $ac_cv_func_pcap_create = "yes" ; then
6083 #
6084 # OK, do we have pcap_set_tstamp_type? If so, assume we have
6085 # pcap_list_tstamp_types and pcap_free_tstamp_types as well.
6086 #
6087 for ac_func in pcap_set_tstamp_type
6088do :
6089 ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_type" "ac_cv_func_pcap_set_tstamp_type"
6090if test "x$ac_cv_func_pcap_set_tstamp_type" = xyes; then :
6091 cat >>confdefs.h <<_ACEOF
6092#define HAVE_PCAP_SET_TSTAMP_TYPE 1
6093_ACEOF
6094
6095fi
6096done
6097
Elliott Hughes892a68b2015-10-19 14:43:53 -07006098 #
6099 # And do we have pcap_set_tstamp_precision? If so, we assume
6100 # we also have pcap_open_offline_with_tstamp_precision.
6101 #
6102 for ac_func in pcap_set_tstamp_precision
6103do :
6104 ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_precision" "ac_cv_func_pcap_set_tstamp_precision"
6105if test "x$ac_cv_func_pcap_set_tstamp_precision" = xyes; then :
6106 cat >>confdefs.h <<_ACEOF
6107#define HAVE_PCAP_SET_TSTAMP_PRECISION 1
6108_ACEOF
6109
6110fi
6111done
6112
JP Abgrall53f17a92014-02-12 14:02:41 -08006113fi
6114
Elliott Hughes892a68b2015-10-19 14:43:53 -07006115#
6116# Check for a miscellaneous collection of functions which we use
6117# if we have them.
6118#
Elliott Hughes820eced2021-08-20 18:00:50 -07006119for ac_func in pcap_findalldevs
JP Abgrall53f17a92014-02-12 14:02:41 -08006120do :
Elliott Hughes820eced2021-08-20 18:00:50 -07006121 ac_fn_c_check_func "$LINENO" "pcap_findalldevs" "ac_cv_func_pcap_findalldevs"
6122if test "x$ac_cv_func_pcap_findalldevs" = xyes; then :
JP Abgrall53f17a92014-02-12 14:02:41 -08006123 cat >>confdefs.h <<_ACEOF
Elliott Hughes820eced2021-08-20 18:00:50 -07006124#define HAVE_PCAP_FINDALLDEVS 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08006125_ACEOF
6126
6127fi
6128done
6129
6130if test $ac_cv_func_pcap_findalldevs = "yes" ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08006131 savedcppflags="$CPPFLAGS"
6132 CPPFLAGS="$CPPFLAGS $V_INCLS"
6133 ac_fn_c_check_type "$LINENO" "pcap_if_t" "ac_cv_type_pcap_if_t" "#include <pcap.h>
6134"
6135if test "x$ac_cv_type_pcap_if_t" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006136
6137cat >>confdefs.h <<_ACEOF
6138#define HAVE_PCAP_IF_T 1
6139_ACEOF
6140
6141
6142fi
6143
JP Abgrall53f17a92014-02-12 14:02:41 -08006144 CPPFLAGS="$savedcppflags"
The Android Open Source Project2949f582009-03-03 19:30:46 -08006145fi
Elliott Hughes820eced2021-08-20 18:00:50 -07006146for ac_func in pcap_dump_flush pcap_lib_version
6147do :
6148 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6149ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6150if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6151 cat >>confdefs.h <<_ACEOF
6152#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6153_ACEOF
6154
6155fi
6156done
The Android Open Source Project2949f582009-03-03 19:30:46 -08006157
6158if test $ac_cv_func_pcap_lib_version = "no" ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08006159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_version is defined by libpcap" >&5
6160$as_echo_n "checking whether pcap_version is defined by libpcap... " >&6; }
6161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08006162/* end confdefs.h. */
6163
6164int
6165main ()
6166{
6167
6168 extern char pcap_version[];
6169
6170 return (int)pcap_version;
6171
6172 ;
6173 return 0;
6174}
6175_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08006176if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006177 ac_lbl_cv_pcap_version_defined=yes
6178else
JP Abgrall53f17a92014-02-12 14:02:41 -08006179 ac_lbl_cv_pcap_version_defined=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08006180fi
JP Abgrall53f17a92014-02-12 14:02:41 -08006181rm -f core conftest.err conftest.$ac_objext \
6182 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08006183 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then
Elliott Hughes892a68b2015-10-19 14:43:53 -07006184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08006185$as_echo "yes" >&6; }
6186
6187$as_echo "#define HAVE_PCAP_VERSION 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006188
6189 else
JP Abgrall53f17a92014-02-12 14:02:41 -08006190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6191$as_echo "no" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08006192 fi
6193fi
Elliott Hughes820eced2021-08-20 18:00:50 -07006194for ac_func in pcap_setdirection pcap_set_immediate_mode pcap_dump_ftell64
6195do :
6196 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6197ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6198if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6199 cat >>confdefs.h <<_ACEOF
6200#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6201_ACEOF
6202
6203fi
6204done
6205
6206for ac_func in pcap_open pcap_findalldevs_ex
6207do :
6208 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6209ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6210if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6211 cat >>confdefs.h <<_ACEOF
6212#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6213_ACEOF
6214
6215fi
6216done
6217
6218ac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell"
6219if test "x$ac_cv_func_pcap_dump_ftell" = xyes; then :
6220 $as_echo "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h
6221
6222else
6223 case " $LIBOBJS " in
6224 *" pcap_dump_ftell.$ac_objext "* ) ;;
6225 *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext"
6226 ;;
6227esac
6228
6229fi
6230
6231
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006232
6233#
6234# Check for special debugging functions
6235#
6236for ac_func in pcap_set_parser_debug
6237do :
6238 ac_fn_c_check_func "$LINENO" "pcap_set_parser_debug" "ac_cv_func_pcap_set_parser_debug"
6239if test "x$ac_cv_func_pcap_set_parser_debug" = xyes; then :
6240 cat >>confdefs.h <<_ACEOF
6241#define HAVE_PCAP_SET_PARSER_DEBUG 1
6242_ACEOF
6243
6244fi
6245done
6246
6247if test "$ac_cv_func_pcap_set_parser_debug" = "no" ; then
6248 #
6249 # OK, we don't have pcap_set_parser_debug() to set the libpcap
6250 # filter expression parser debug flag; can we directly set the
6251 # flag?
6252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pcap_debug is defined by libpcap" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08006253$as_echo_n "checking whether pcap_debug is defined by libpcap... " >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08006255/* end confdefs.h. */
6256
6257int
6258main ()
6259{
6260
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006261 extern int pcap_debug;
The Android Open Source Project2949f582009-03-03 19:30:46 -08006262
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006263 return pcap_debug;
The Android Open Source Project2949f582009-03-03 19:30:46 -08006264
6265 ;
6266 return 0;
6267}
6268_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08006269if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006270 ac_lbl_cv_pcap_debug_defined=yes
6271else
JP Abgrall53f17a92014-02-12 14:02:41 -08006272 ac_lbl_cv_pcap_debug_defined=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08006273fi
JP Abgrall53f17a92014-02-12 14:02:41 -08006274rm -f core conftest.err conftest.$ac_objext \
6275 conftest$ac_exeext conftest.$ac_ext
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006276 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then
6277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08006278$as_echo "yes" >&6; }
6279
6280$as_echo "#define HAVE_PCAP_DEBUG 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006281
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006282 else
6283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08006284$as_echo "no" >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006285 #
6286 # OK, what about "yydebug"?
6287 #
6288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yydebug is defined by libpcap" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08006289$as_echo_n "checking whether yydebug is defined by libpcap... " >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08006291/* end confdefs.h. */
6292
6293int
6294main ()
6295{
6296
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006297 extern int yydebug;
The Android Open Source Project2949f582009-03-03 19:30:46 -08006298
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006299 return yydebug;
The Android Open Source Project2949f582009-03-03 19:30:46 -08006300
6301 ;
6302 return 0;
6303}
6304_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08006305if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006306 ac_lbl_cv_yydebug_defined=yes
6307else
JP Abgrall53f17a92014-02-12 14:02:41 -08006308 ac_lbl_cv_yydebug_defined=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08006309fi
JP Abgrall53f17a92014-02-12 14:02:41 -08006310rm -f core conftest.err conftest.$ac_objext \
6311 conftest$ac_exeext conftest.$ac_ext
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006312 if test "$ac_lbl_cv_yydebug_defined" = yes ; then
6313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08006314$as_echo "yes" >&6; }
6315
6316$as_echo "#define HAVE_YYDEBUG 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006317
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006318 else
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08006320$as_echo "no" >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006321 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08006322 fi
6323fi
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006324for ac_func in pcap_set_optimizer_debug
6325do :
6326 ac_fn_c_check_func "$LINENO" "pcap_set_optimizer_debug" "ac_cv_func_pcap_set_optimizer_debug"
6327if test "x$ac_cv_func_pcap_set_optimizer_debug" = xyes; then :
6328 cat >>confdefs.h <<_ACEOF
6329#define HAVE_PCAP_SET_OPTIMIZER_DEBUG 1
6330_ACEOF
6331
6332fi
6333done
6334
JP Abgrall53f17a92014-02-12 14:02:41 -08006335ac_fn_c_check_func "$LINENO" "bpf_dump" "ac_cv_func_bpf_dump"
6336if test "x$ac_cv_func_bpf_dump" = xyes; then :
6337 $as_echo "#define HAVE_BPF_DUMP 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006338
6339else
6340 case " $LIBOBJS " in
JP Abgrall53f17a92014-02-12 14:02:41 -08006341 *" bpf_dump.$ac_objext "* ) ;;
6342 *) LIBOBJS="$LIBOBJS bpf_dump.$ac_objext"
The Android Open Source Project2949f582009-03-03 19:30:46 -08006343 ;;
6344esac
6345
6346fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08006347
6348
6349V_GROUP=0
6350if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
6351 V_GROUP=wheel
6352fi
JP Abgrall53f17a92014-02-12 14:02:41 -08006353#
6354# Assume V7/BSD convention for man pages (file formats in section 5,
6355# miscellaneous info in section 7).
6356#
6357MAN_FILE_FORMATS=5
6358MAN_MISC_INFO=7
The Android Open Source Project2949f582009-03-03 19:30:46 -08006359case "$host_os" in
6360
6361aix*)
The Android Open Source Project2949f582009-03-03 19:30:46 -08006362
JP Abgrall53f17a92014-02-12 14:02:41 -08006363$as_echo "#define _SUN 1" >>confdefs.h
6364
6365 ;;
6366
6367hpux*)
6368 #
6369 # Use System V conventions for man pages.
6370 #
6371 MAN_FILE_FORMATS=4
6372 MAN_MISC_INFO=5
The Android Open Source Project2949f582009-03-03 19:30:46 -08006373 ;;
6374
6375irix*)
6376 V_GROUP=sys
JP Abgrall53f17a92014-02-12 14:02:41 -08006377
6378 #
6379 # Use System V conventions for man pages.
6380 #
6381 MAN_FILE_FORMATS=4
6382 MAN_MISC_INFO=5
The Android Open Source Project2949f582009-03-03 19:30:46 -08006383 ;;
6384
6385osf*)
6386 V_GROUP=system
JP Abgrall53f17a92014-02-12 14:02:41 -08006387
6388 #
6389 # Use System V conventions for man pages.
6390 #
6391 MAN_FILE_FORMATS=4
6392 MAN_MISC_INFO=5
The Android Open Source Project2949f582009-03-03 19:30:46 -08006393 ;;
6394
6395solaris*)
6396 V_GROUP=sys
JP Abgrall53f17a92014-02-12 14:02:41 -08006397
6398 #
6399 # Use System V conventions for man pages.
6400 #
6401 MAN_FILE_FORMATS=4
6402 MAN_MISC_INFO=5
The Android Open Source Project2949f582009-03-03 19:30:46 -08006403 ;;
6404esac
6405
6406if test -f /dev/bpf0 ; then
6407 V_GROUP=bpf
6408fi
6409
JP Abgrall53f17a92014-02-12 14:02:41 -08006410#
Elliott Hughes892a68b2015-10-19 14:43:53 -07006411# Make sure we have a definition for C99's uintptr_t (regardless of
6412# whether the environment is a C99 environment or not).
JP Abgrall53f17a92014-02-12 14:02:41 -08006413#
Elliott Hughes892a68b2015-10-19 14:43:53 -07006414
6415 ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default"
6416if test "x$ac_cv_type_uintptr_t" = xyes; then :
6417
6418$as_echo "#define HAVE_UINTPTR_T 1" >>confdefs.h
6419
6420else
6421 for ac_type in 'unsigned int' 'unsigned long int' \
6422 'unsigned long long int'; do
6423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6424/* end confdefs.h. */
6425$ac_includes_default
6426int
6427main ()
6428{
6429static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))];
6430test_array [0] = 0;
6431return test_array [0];
6432
6433 ;
6434 return 0;
6435}
6436_ACEOF
6437if ac_fn_c_try_compile "$LINENO"; then :
6438
6439cat >>confdefs.h <<_ACEOF
6440#define uintptr_t $ac_type
The Android Open Source Project2949f582009-03-03 19:30:46 -08006441_ACEOF
6442
Elliott Hughes892a68b2015-10-19 14:43:53 -07006443 ac_type=
6444fi
6445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6446 test -z "$ac_type" && break
6447 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08006448fi
6449
The Android Open Source Project2949f582009-03-03 19:30:46 -08006450
6451
Elliott Hughes892a68b2015-10-19 14:43:53 -07006452#
Elliott Hughes820eced2021-08-20 18:00:50 -07006453# Check whether we have pcap/pcap-inttypes.h.
6454# If we do, we use that to get the C99 types defined.
6455#
6456savedcppflags="$CPPFLAGS"
6457CPPFLAGS="$CPPFLAGS $V_INCLS"
6458for ac_header in pcap/pcap-inttypes.h
6459do :
6460 ac_fn_c_check_header_mongrel "$LINENO" "pcap/pcap-inttypes.h" "ac_cv_header_pcap_pcap_inttypes_h" "$ac_includes_default"
6461if test "x$ac_cv_header_pcap_pcap_inttypes_h" = xyes; then :
6462 cat >>confdefs.h <<_ACEOF
6463#define HAVE_PCAP_PCAP_INTTYPES_H 1
6464_ACEOF
6465
6466fi
6467
6468done
6469
6470CPPFLAGS="$savedcppflags"
6471
6472#
Elliott Hughes892a68b2015-10-19 14:43:53 -07006473# Define the old BSD specified-width types in terms of the C99 types;
6474# we may need them with libpcap include files.
6475#
JP Abgrall53f17a92014-02-12 14:02:41 -08006476ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default
Elliott Hughes892a68b2015-10-19 14:43:53 -07006477#include <sys/types.h>
6478
JP Abgrall53f17a92014-02-12 14:02:41 -08006479"
6480if test "x$ac_cv_type_u_int8_t" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006481
The Android Open Source Project2949f582009-03-03 19:30:46 -08006482else
6483
Elliott Hughes892a68b2015-10-19 14:43:53 -07006484$as_echo "#define u_int8_t uint8_t" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006485
6486fi
6487
JP Abgrall53f17a92014-02-12 14:02:41 -08006488ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default
Elliott Hughes892a68b2015-10-19 14:43:53 -07006489#include <sys/types.h>
6490
JP Abgrall53f17a92014-02-12 14:02:41 -08006491"
6492if test "x$ac_cv_type_u_int16_t" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006493
The Android Open Source Project2949f582009-03-03 19:30:46 -08006494else
6495
Elliott Hughes892a68b2015-10-19 14:43:53 -07006496$as_echo "#define u_int16_t uint16_t" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006497
6498fi
6499
JP Abgrall53f17a92014-02-12 14:02:41 -08006500ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default
Elliott Hughes892a68b2015-10-19 14:43:53 -07006501#include <sys/types.h>
6502
JP Abgrall53f17a92014-02-12 14:02:41 -08006503"
6504if test "x$ac_cv_type_u_int32_t" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006505
The Android Open Source Project2949f582009-03-03 19:30:46 -08006506else
6507
Elliott Hughes892a68b2015-10-19 14:43:53 -07006508$as_echo "#define u_int32_t uint32_t" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006509
6510fi
6511
JP Abgrall53f17a92014-02-12 14:02:41 -08006512ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
Elliott Hughes892a68b2015-10-19 14:43:53 -07006513#include <sys/types.h>
6514
JP Abgrall53f17a92014-02-12 14:02:41 -08006515"
6516if test "x$ac_cv_type_u_int64_t" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08006517
The Android Open Source Project2949f582009-03-03 19:30:46 -08006518else
6519
Elliott Hughes892a68b2015-10-19 14:43:53 -07006520$as_echo "#define u_int64_t uint64_t" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08006521
6522fi
6523
6524
JP Abgrall53f17a92014-02-12 14:02:41 -08006525if test -n "$ac_tool_prefix"; then
6526 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6527set dummy ${ac_tool_prefix}ranlib; ac_word=$2
6528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6529$as_echo_n "checking for $ac_word... " >&6; }
6530if ${ac_cv_prog_RANLIB+:} false; then :
6531 $as_echo_n "(cached) " >&6
6532else
6533 if test -n "$RANLIB"; then
6534 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
6535else
6536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6537for as_dir in $PATH
6538do
6539 IFS=$as_save_IFS
6540 test -z "$as_dir" && as_dir=.
6541 for ac_exec_ext in '' $ac_executable_extensions; do
6542 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6543 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
6544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6545 break 2
6546 fi
6547done
6548 done
6549IFS=$as_save_IFS
6550
6551fi
6552fi
6553RANLIB=$ac_cv_prog_RANLIB
6554if test -n "$RANLIB"; then
6555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6556$as_echo "$RANLIB" >&6; }
6557else
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6559$as_echo "no" >&6; }
6560fi
6561
6562
6563fi
6564if test -z "$ac_cv_prog_RANLIB"; then
6565 ac_ct_RANLIB=$RANLIB
6566 # Extract the first word of "ranlib", so it can be a program name with args.
6567set dummy ranlib; ac_word=$2
6568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6569$as_echo_n "checking for $ac_word... " >&6; }
6570if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
6571 $as_echo_n "(cached) " >&6
6572else
6573 if test -n "$ac_ct_RANLIB"; then
6574 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
6575else
6576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6577for as_dir in $PATH
6578do
6579 IFS=$as_save_IFS
6580 test -z "$as_dir" && as_dir=.
6581 for ac_exec_ext in '' $ac_executable_extensions; do
6582 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6583 ac_cv_prog_ac_ct_RANLIB="ranlib"
6584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6585 break 2
6586 fi
6587done
6588 done
6589IFS=$as_save_IFS
6590
6591fi
6592fi
6593ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
6594if test -n "$ac_ct_RANLIB"; then
6595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6596$as_echo "$ac_ct_RANLIB" >&6; }
6597else
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6599$as_echo "no" >&6; }
6600fi
6601
6602 if test "x$ac_ct_RANLIB" = x; then
6603 RANLIB=":"
6604 else
6605 case $cross_compiling:$ac_tool_warned in
6606yes:)
6607{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6608$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6609ac_tool_warned=yes ;;
6610esac
6611 RANLIB=$ac_ct_RANLIB
6612 fi
6613else
6614 RANLIB="$ac_cv_prog_RANLIB"
6615fi
6616
Elliott Hughes892a68b2015-10-19 14:43:53 -07006617if test -n "$ac_tool_prefix"; then
6618 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6619set dummy ${ac_tool_prefix}ar; ac_word=$2
6620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6621$as_echo_n "checking for $ac_word... " >&6; }
6622if ${ac_cv_prog_AR+:} false; then :
6623 $as_echo_n "(cached) " >&6
6624else
6625 if test -n "$AR"; then
6626 ac_cv_prog_AR="$AR" # Let the user override the test.
6627else
6628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6629for as_dir in $PATH
6630do
6631 IFS=$as_save_IFS
6632 test -z "$as_dir" && as_dir=.
6633 for ac_exec_ext in '' $ac_executable_extensions; do
6634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6635 ac_cv_prog_AR="${ac_tool_prefix}ar"
6636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6637 break 2
6638 fi
6639done
6640 done
6641IFS=$as_save_IFS
6642
6643fi
6644fi
6645AR=$ac_cv_prog_AR
6646if test -n "$AR"; then
6647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6648$as_echo "$AR" >&6; }
6649else
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6651$as_echo "no" >&6; }
6652fi
6653
6654
6655fi
6656if test -z "$ac_cv_prog_AR"; then
6657 ac_ct_AR=$AR
6658 # Extract the first word of "ar", so it can be a program name with args.
6659set dummy ar; ac_word=$2
6660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6661$as_echo_n "checking for $ac_word... " >&6; }
6662if ${ac_cv_prog_ac_ct_AR+:} false; then :
6663 $as_echo_n "(cached) " >&6
6664else
6665 if test -n "$ac_ct_AR"; then
6666 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
6667else
6668as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6669for as_dir in $PATH
6670do
6671 IFS=$as_save_IFS
6672 test -z "$as_dir" && as_dir=.
6673 for ac_exec_ext in '' $ac_executable_extensions; do
6674 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6675 ac_cv_prog_ac_ct_AR="ar"
6676 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6677 break 2
6678 fi
6679done
6680 done
6681IFS=$as_save_IFS
6682
6683fi
6684fi
6685ac_ct_AR=$ac_cv_prog_ac_ct_AR
6686if test -n "$ac_ct_AR"; then
6687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6688$as_echo "$ac_ct_AR" >&6; }
6689else
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6691$as_echo "no" >&6; }
6692fi
6693
6694 if test "x$ac_ct_AR" = x; then
6695 AR=""
6696 else
6697 case $cross_compiling:$ac_tool_warned in
6698yes:)
6699{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6700$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6701ac_tool_warned=yes ;;
6702esac
6703 AR=$ac_ct_AR
6704 fi
6705else
6706 AR="$ac_cv_prog_AR"
6707fi
6708
JP Abgrall53f17a92014-02-12 14:02:41 -08006709
The Android Open Source Project2949f582009-03-03 19:30:46 -08006710rm -f os-proto.h
6711 if test "${LBL_CFLAGS+set}" = set; then
6712 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
6713 fi
6714 if test -f .devel ; then
JP Abgrall53f17a92014-02-12 14:02:41 -08006715 #
6716 # Skip all the warning option stuff on some compilers.
6717 #
6718 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08006719
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
6721$as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
6722 save_CFLAGS="$CFLAGS"
6723 CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
6724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6725/* end confdefs.h. */
6726
6727int
6728main ()
6729{
6730return 0
6731 ;
6732 return 0;
6733}
6734_ACEOF
6735if ac_fn_c_try_compile "$LINENO"; then :
6736
6737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6738$as_echo "no" >&6; }
6739 #
6740 # We're assuming this is clang, where
6741 # -Werror=unknown-warning-option is the appropriate
6742 # option to force the compiler to fail.
6743 #
6744 ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
6745
6746else
6747
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6749$as_echo "yes" >&6; }
6750
6751fi
6752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6753 CFLAGS="$save_CFLAGS"
6754
6755
Elliott Hughes820eced2021-08-20 18:00:50 -07006756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5
6757$as_echo_n "checking whether the compiler supports the -W option... " >&6; }
6758 save_CFLAGS="$CFLAGS"
6759 if expr "x-W" : "x-W.*" >/dev/null
6760 then
6761 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -W"
6762 elif expr "x-W" : "x-f.*" >/dev/null
6763 then
6764 CFLAGS="$CFLAGS -Werror -W"
6765 elif expr "x-W" : "x-m.*" >/dev/null
6766 then
6767 CFLAGS="$CFLAGS -Werror -W"
6768 else
6769 CFLAGS="$CFLAGS -W"
6770 fi
6771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6772/* end confdefs.h. */
6773
6774int
6775main ()
6776{
6777return 0
6778 ;
6779 return 0;
6780}
6781_ACEOF
6782if ac_fn_c_try_compile "$LINENO"; then :
6783
6784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6785$as_echo "yes" >&6; }
6786 CFLAGS="$save_CFLAGS"
6787 V_CCOPT="$V_CCOPT -W"
6788
6789else
6790
6791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6792$as_echo "no" >&6; }
6793 CFLAGS="$save_CFLAGS"
6794
6795fi
6796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6797
6798
JP Abgrall53f17a92014-02-12 14:02:41 -08006799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
6800$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
6801 save_CFLAGS="$CFLAGS"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006802 if expr "x-Wall" : "x-W.*" >/dev/null
6803 then
6804 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
6805 elif expr "x-Wall" : "x-f.*" >/dev/null
6806 then
6807 CFLAGS="$CFLAGS -Werror -Wall"
6808 elif expr "x-Wall" : "x-m.*" >/dev/null
6809 then
6810 CFLAGS="$CFLAGS -Werror -Wall"
6811 else
6812 CFLAGS="$CFLAGS -Wall"
6813 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08006814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6815/* end confdefs.h. */
The Android Open Source Project2949f582009-03-03 19:30:46 -08006816
JP Abgrall53f17a92014-02-12 14:02:41 -08006817int
6818main ()
6819{
6820return 0
6821 ;
6822 return 0;
6823}
6824_ACEOF
6825if ac_fn_c_try_compile "$LINENO"; then :
6826
6827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6828$as_echo "yes" >&6; }
6829 CFLAGS="$save_CFLAGS"
6830 V_CCOPT="$V_CCOPT -Wall"
6831
6832else
6833
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6835$as_echo "no" >&6; }
6836 CFLAGS="$save_CFLAGS"
6837
6838fi
6839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6840
6841
Elliott Hughes820eced2021-08-20 18:00:50 -07006842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wassign-enum option" >&5
6843$as_echo_n "checking whether the compiler supports the -Wassign-enum option... " >&6; }
JP Abgrall53f17a92014-02-12 14:02:41 -08006844 save_CFLAGS="$CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07006845 if expr "x-Wassign-enum" : "x-W.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006846 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006847 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wassign-enum"
6848 elif expr "x-Wassign-enum" : "x-f.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006849 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006850 CFLAGS="$CFLAGS -Werror -Wassign-enum"
6851 elif expr "x-Wassign-enum" : "x-m.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006852 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006853 CFLAGS="$CFLAGS -Werror -Wassign-enum"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006854 else
Elliott Hughes820eced2021-08-20 18:00:50 -07006855 CFLAGS="$CFLAGS -Wassign-enum"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006856 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08006857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6858/* end confdefs.h. */
6859
6860int
6861main ()
6862{
6863return 0
6864 ;
6865 return 0;
6866}
6867_ACEOF
6868if ac_fn_c_try_compile "$LINENO"; then :
6869
6870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6871$as_echo "yes" >&6; }
6872 CFLAGS="$save_CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07006873 V_CCOPT="$V_CCOPT -Wassign-enum"
JP Abgrall53f17a92014-02-12 14:02:41 -08006874
6875else
6876
6877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6878$as_echo "no" >&6; }
6879 CFLAGS="$save_CFLAGS"
6880
6881fi
6882rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6883
6884
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5
6886$as_echo_n "checking whether the compiler supports the -Wcast-qual option... " >&6; }
6887 save_CFLAGS="$CFLAGS"
6888 if expr "x-Wcast-qual" : "x-W.*" >/dev/null
6889 then
6890 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcast-qual"
6891 elif expr "x-Wcast-qual" : "x-f.*" >/dev/null
6892 then
6893 CFLAGS="$CFLAGS -Werror -Wcast-qual"
6894 elif expr "x-Wcast-qual" : "x-m.*" >/dev/null
6895 then
6896 CFLAGS="$CFLAGS -Werror -Wcast-qual"
6897 else
6898 CFLAGS="$CFLAGS -Wcast-qual"
6899 fi
6900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6901/* end confdefs.h. */
6902
6903int
6904main ()
6905{
6906return 0
6907 ;
6908 return 0;
6909}
6910_ACEOF
6911if ac_fn_c_try_compile "$LINENO"; then :
6912
6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6914$as_echo "yes" >&6; }
6915 CFLAGS="$save_CFLAGS"
6916 V_CCOPT="$V_CCOPT -Wcast-qual"
6917
6918else
6919
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6921$as_echo "no" >&6; }
6922 CFLAGS="$save_CFLAGS"
6923
6924fi
6925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6926
6927
Elliott Hughes820eced2021-08-20 18:00:50 -07006928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
6929$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006930 save_CFLAGS="$CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07006931 if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006932 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006933 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
6934 elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006935 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006936 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
6937 elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006938 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006939 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006940 else
Elliott Hughes820eced2021-08-20 18:00:50 -07006941 CFLAGS="$CFLAGS -Wmissing-prototypes"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006942 fi
6943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6944/* end confdefs.h. */
6945
6946int
6947main ()
6948{
6949return 0
6950 ;
6951 return 0;
6952}
6953_ACEOF
6954if ac_fn_c_try_compile "$LINENO"; then :
6955
6956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6957$as_echo "yes" >&6; }
6958 CFLAGS="$save_CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07006959 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006960
6961else
6962
6963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6964$as_echo "no" >&6; }
6965 CFLAGS="$save_CFLAGS"
6966
6967fi
6968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6969
6970
Elliott Hughes820eced2021-08-20 18:00:50 -07006971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
6972$as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006973 save_CFLAGS="$CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07006974 if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006975 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006976 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
6977 elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006978 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006979 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
6980 elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006981 then
Elliott Hughes820eced2021-08-20 18:00:50 -07006982 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006983 else
Elliott Hughes820eced2021-08-20 18:00:50 -07006984 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07006985 fi
6986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6987/* end confdefs.h. */
6988
6989int
6990main ()
6991{
6992return 0
6993 ;
6994 return 0;
6995}
6996_ACEOF
6997if ac_fn_c_try_compile "$LINENO"; then :
6998
6999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7000$as_echo "yes" >&6; }
7001 CFLAGS="$save_CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07007002 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007003
7004else
7005
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7007$as_echo "no" >&6; }
7008 CFLAGS="$save_CFLAGS"
7009
7010fi
7011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7012
7013
7014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5
7015$as_echo_n "checking whether the compiler supports the -Wold-style-definition option... " >&6; }
7016 save_CFLAGS="$CFLAGS"
7017 if expr "x-Wold-style-definition" : "x-W.*" >/dev/null
7018 then
7019 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wold-style-definition"
7020 elif expr "x-Wold-style-definition" : "x-f.*" >/dev/null
7021 then
7022 CFLAGS="$CFLAGS -Werror -Wold-style-definition"
7023 elif expr "x-Wold-style-definition" : "x-m.*" >/dev/null
7024 then
7025 CFLAGS="$CFLAGS -Werror -Wold-style-definition"
7026 else
7027 CFLAGS="$CFLAGS -Wold-style-definition"
7028 fi
7029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7030/* end confdefs.h. */
7031
7032int
7033main ()
7034{
7035return 0
7036 ;
7037 return 0;
7038}
7039_ACEOF
7040if ac_fn_c_try_compile "$LINENO"; then :
7041
7042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7043$as_echo "yes" >&6; }
7044 CFLAGS="$save_CFLAGS"
7045 V_CCOPT="$V_CCOPT -Wold-style-definition"
7046
7047else
7048
7049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7050$as_echo "no" >&6; }
7051 CFLAGS="$save_CFLAGS"
7052
7053fi
7054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7055
7056
Elliott Hughes820eced2021-08-20 18:00:50 -07007057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5
7058$as_echo_n "checking whether the compiler supports the -Wpedantic option... " >&6; }
7059 save_CFLAGS="$CFLAGS"
7060 if expr "x-Wpedantic" : "x-W.*" >/dev/null
7061 then
7062 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpedantic"
7063 elif expr "x-Wpedantic" : "x-f.*" >/dev/null
7064 then
7065 CFLAGS="$CFLAGS -Werror -Wpedantic"
7066 elif expr "x-Wpedantic" : "x-m.*" >/dev/null
7067 then
7068 CFLAGS="$CFLAGS -Werror -Wpedantic"
7069 else
7070 CFLAGS="$CFLAGS -Wpedantic"
7071 fi
7072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7073/* end confdefs.h. */
7074
7075int
7076main ()
7077{
7078return 0
7079 ;
7080 return 0;
7081}
7082_ACEOF
7083if ac_fn_c_try_compile "$LINENO"; then :
7084
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7086$as_echo "yes" >&6; }
7087 CFLAGS="$save_CFLAGS"
7088 V_CCOPT="$V_CCOPT -Wpedantic"
7089
7090else
7091
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7093$as_echo "no" >&6; }
7094 CFLAGS="$save_CFLAGS"
7095
7096fi
7097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7098
7099
7100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5
7101$as_echo_n "checking whether the compiler supports the -Wpointer-arith option... " >&6; }
7102 save_CFLAGS="$CFLAGS"
7103 if expr "x-Wpointer-arith" : "x-W.*" >/dev/null
7104 then
7105 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-arith"
7106 elif expr "x-Wpointer-arith" : "x-f.*" >/dev/null
7107 then
7108 CFLAGS="$CFLAGS -Werror -Wpointer-arith"
7109 elif expr "x-Wpointer-arith" : "x-m.*" >/dev/null
7110 then
7111 CFLAGS="$CFLAGS -Werror -Wpointer-arith"
7112 else
7113 CFLAGS="$CFLAGS -Wpointer-arith"
7114 fi
7115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7116/* end confdefs.h. */
7117
7118int
7119main ()
7120{
7121return 0
7122 ;
7123 return 0;
7124}
7125_ACEOF
7126if ac_fn_c_try_compile "$LINENO"; then :
7127
7128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7129$as_echo "yes" >&6; }
7130 CFLAGS="$save_CFLAGS"
7131 V_CCOPT="$V_CCOPT -Wpointer-arith"
7132
7133else
7134
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136$as_echo "no" >&6; }
7137 CFLAGS="$save_CFLAGS"
7138
7139fi
7140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7141
7142
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5
7144$as_echo_n "checking whether the compiler supports the -Wpointer-sign option... " >&6; }
7145 save_CFLAGS="$CFLAGS"
7146 if expr "x-Wpointer-sign" : "x-W.*" >/dev/null
7147 then
7148 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wpointer-sign"
7149 elif expr "x-Wpointer-sign" : "x-f.*" >/dev/null
7150 then
7151 CFLAGS="$CFLAGS -Werror -Wpointer-sign"
7152 elif expr "x-Wpointer-sign" : "x-m.*" >/dev/null
7153 then
7154 CFLAGS="$CFLAGS -Werror -Wpointer-sign"
7155 else
7156 CFLAGS="$CFLAGS -Wpointer-sign"
7157 fi
7158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7159/* end confdefs.h. */
7160
7161int
7162main ()
7163{
7164return 0
7165 ;
7166 return 0;
7167}
7168_ACEOF
7169if ac_fn_c_try_compile "$LINENO"; then :
7170
7171 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7172$as_echo "yes" >&6; }
7173 CFLAGS="$save_CFLAGS"
7174 V_CCOPT="$V_CCOPT -Wpointer-sign"
7175
7176else
7177
7178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7179$as_echo "no" >&6; }
7180 CFLAGS="$save_CFLAGS"
7181
7182fi
7183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7184
7185
7186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
7187$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
7188 save_CFLAGS="$CFLAGS"
7189 if expr "x-Wshadow" : "x-W.*" >/dev/null
7190 then
7191 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
7192 elif expr "x-Wshadow" : "x-f.*" >/dev/null
7193 then
7194 CFLAGS="$CFLAGS -Werror -Wshadow"
7195 elif expr "x-Wshadow" : "x-m.*" >/dev/null
7196 then
7197 CFLAGS="$CFLAGS -Werror -Wshadow"
7198 else
7199 CFLAGS="$CFLAGS -Wshadow"
7200 fi
7201 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7202/* end confdefs.h. */
7203
7204int
7205main ()
7206{
7207return 0
7208 ;
7209 return 0;
7210}
7211_ACEOF
7212if ac_fn_c_try_compile "$LINENO"; then :
7213
7214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7215$as_echo "yes" >&6; }
7216 CFLAGS="$save_CFLAGS"
7217 V_CCOPT="$V_CCOPT -Wshadow"
7218
7219else
7220
7221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
7223 CFLAGS="$save_CFLAGS"
7224
7225fi
7226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7227
7228
7229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
7230$as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
7231 save_CFLAGS="$CFLAGS"
7232 if expr "x-Wsign-compare" : "x-W.*" >/dev/null
7233 then
7234 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
7235 elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
7236 then
7237 CFLAGS="$CFLAGS -Werror -Wsign-compare"
7238 elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
7239 then
7240 CFLAGS="$CFLAGS -Werror -Wsign-compare"
7241 else
7242 CFLAGS="$CFLAGS -Wsign-compare"
7243 fi
7244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7245/* end confdefs.h. */
7246
7247int
7248main ()
7249{
7250return 0
7251 ;
7252 return 0;
7253}
7254_ACEOF
7255if ac_fn_c_try_compile "$LINENO"; then :
7256
7257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7258$as_echo "yes" >&6; }
7259 CFLAGS="$save_CFLAGS"
7260 V_CCOPT="$V_CCOPT -Wsign-compare"
7261
7262else
7263
7264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7265$as_echo "no" >&6; }
7266 CFLAGS="$save_CFLAGS"
7267
7268fi
7269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7270
7271
7272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
7273$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
7274 save_CFLAGS="$CFLAGS"
7275 if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
7276 then
7277 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
7278 elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
7279 then
7280 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
7281 elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
7282 then
7283 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
7284 else
7285 CFLAGS="$CFLAGS -Wstrict-prototypes"
7286 fi
7287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7288/* end confdefs.h. */
7289
7290int
7291main ()
7292{
7293return 0
7294 ;
7295 return 0;
7296}
7297_ACEOF
7298if ac_fn_c_try_compile "$LINENO"; then :
7299
7300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7301$as_echo "yes" >&6; }
7302 CFLAGS="$save_CFLAGS"
7303 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
7304
7305else
7306
7307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7308$as_echo "no" >&6; }
7309 CFLAGS="$save_CFLAGS"
7310
7311fi
7312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7313
7314
7315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code-return option" >&5
7316$as_echo_n "checking whether the compiler supports the -Wunreachable-code-return option... " >&6; }
7317 save_CFLAGS="$CFLAGS"
7318 if expr "x-Wunreachable-code-return" : "x-W.*" >/dev/null
7319 then
7320 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code-return"
7321 elif expr "x-Wunreachable-code-return" : "x-f.*" >/dev/null
7322 then
7323 CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
7324 elif expr "x-Wunreachable-code-return" : "x-m.*" >/dev/null
7325 then
7326 CFLAGS="$CFLAGS -Werror -Wunreachable-code-return"
7327 else
7328 CFLAGS="$CFLAGS -Wunreachable-code-return"
7329 fi
7330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7331/* end confdefs.h. */
7332
7333int
7334main ()
7335{
7336return 0
7337 ;
7338 return 0;
7339}
7340_ACEOF
7341if ac_fn_c_try_compile "$LINENO"; then :
7342
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7344$as_echo "yes" >&6; }
7345 CFLAGS="$save_CFLAGS"
7346 V_CCOPT="$V_CCOPT -Wunreachable-code-return"
7347
7348else
7349
7350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7351$as_echo "no" >&6; }
7352 CFLAGS="$save_CFLAGS"
7353
7354fi
7355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7356
7357
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
7359$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
7360 save_CFLAGS="$CFLAGS"
7361 if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
7362 then
7363 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
7364 elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
7365 then
7366 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
7367 elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
7368 then
7369 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
7370 else
7371 CFLAGS="$CFLAGS -Wused-but-marked-unused"
7372 fi
7373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7374/* end confdefs.h. */
7375
7376int
7377main ()
7378{
7379return 0
7380 ;
7381 return 0;
7382}
7383_ACEOF
7384if ac_fn_c_try_compile "$LINENO"; then :
7385
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7387$as_echo "yes" >&6; }
7388 CFLAGS="$save_CFLAGS"
7389 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
7390
7391else
7392
7393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394$as_echo "no" >&6; }
7395 CFLAGS="$save_CFLAGS"
7396
7397fi
7398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7399
7400
Elliott Hughes820eced2021-08-20 18:00:50 -07007401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5
7402$as_echo_n "checking whether the compiler supports the -Wwrite-strings option... " >&6; }
JP Abgrall53f17a92014-02-12 14:02:41 -08007403 save_CFLAGS="$CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07007404 if expr "x-Wwrite-strings" : "x-W.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007405 then
Elliott Hughes820eced2021-08-20 18:00:50 -07007406 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wwrite-strings"
7407 elif expr "x-Wwrite-strings" : "x-f.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007408 then
Elliott Hughes820eced2021-08-20 18:00:50 -07007409 CFLAGS="$CFLAGS -Werror -Wwrite-strings"
7410 elif expr "x-Wwrite-strings" : "x-m.*" >/dev/null
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007411 then
Elliott Hughes820eced2021-08-20 18:00:50 -07007412 CFLAGS="$CFLAGS -Werror -Wwrite-strings"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007413 else
Elliott Hughes820eced2021-08-20 18:00:50 -07007414 CFLAGS="$CFLAGS -Wwrite-strings"
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007415 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08007416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7417/* end confdefs.h. */
7418
7419int
7420main ()
7421{
7422return 0
7423 ;
7424 return 0;
7425}
7426_ACEOF
7427if ac_fn_c_try_compile "$LINENO"; then :
7428
7429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7430$as_echo "yes" >&6; }
7431 CFLAGS="$save_CFLAGS"
Elliott Hughes820eced2021-08-20 18:00:50 -07007432 V_CCOPT="$V_CCOPT -Wwrite-strings"
JP Abgrall53f17a92014-02-12 14:02:41 -08007433
7434else
7435
7436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
7438 CFLAGS="$save_CFLAGS"
7439
7440fi
7441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7442
The Android Open Source Project2949f582009-03-03 19:30:46 -08007443 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08007444
7445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
7446$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
7447 if test "$GCC" = yes ; then
7448 #
7449 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
7450 # though it's not); we assume that, in this case, the flag
7451 # would be -M.
7452 #
7453 ac_lbl_dependency_flag="-M"
7454 else
7455 #
7456 # Not GCC or a compiler deemed to be GCC; what platform is
7457 # this? (We're assuming that if the compiler isn't GCC
7458 # it's the compiler from the vendor of the OS; that won't
7459 # necessarily be true for x86 platforms, where it might be
7460 # the Intel C compiler.)
7461 #
7462 case "$host_os" in
7463
7464 irix*|osf*|darwin*)
7465 #
7466 # MIPS C for IRIX, DEC C, and clang all use -M.
7467 #
7468 ac_lbl_dependency_flag="-M"
7469 ;;
7470
7471 solaris*)
7472 #
7473 # Sun C uses -xM.
7474 #
7475 ac_lbl_dependency_flag="-xM"
7476 ;;
7477
7478 hpux*)
7479 #
7480 # HP's older C compilers don't support this.
7481 # HP's newer C compilers support this with
7482 # either +M or +Make; the older compilers
7483 # interpret +M as something completely
7484 # different, so we use +Make so we don't
7485 # think it works with the older compilers.
7486 #
7487 ac_lbl_dependency_flag="+Make"
7488 ;;
7489
7490 *)
7491 #
7492 # Not one of the above; assume no support for
7493 # generating dependencies.
7494 #
7495 ac_lbl_dependency_flag=""
7496 ;;
7497 esac
7498 fi
7499
7500 #
7501 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
7502 # complain about it?
7503 #
7504 # Note: clang doesn't seem to exit with an error status when handed
7505 # an unknown non-warning error, even if you pass it
7506 # -Werror=unknown-warning-option. However, it always supports
7507 # -M, so the fact that this test always succeeds with clang
7508 # isn't an issue.
7509 #
7510 if test ! -z "$ac_lbl_dependency_flag"; then
7511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7512/* end confdefs.h. */
7513int main(void) { return 0; }
7514_ACEOF
Elliott Hughes820eced2021-08-20 18:00:50 -07007515 if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
7516 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
7517 ac_status=$?
7518 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7519 test $ac_status = 0; }; then
JP Abgrall53f17a92014-02-12 14:02:41 -08007520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
7521$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
7522 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
Elliott Hughes820eced2021-08-20 18:00:50 -07007523 MKDEP='${top_srcdir}/mkdep'
JP Abgrall53f17a92014-02-12 14:02:41 -08007524 else
7525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7526$as_echo "no" >&6; }
7527 #
7528 # We can't run mkdep, so have "make depend" do
7529 # nothing.
7530 #
7531 MKDEP=:
7532 fi
7533 rm -rf conftest*
7534 else
7535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7536$as_echo "no" >&6; }
7537 #
7538 # We can't run mkdep, so have "make depend" do
7539 # nothing.
7540 #
7541 MKDEP=:
7542 fi
7543
7544
7545
7546 #
7547 # We used to set -n32 for IRIX 6 when not using GCC (presumed
7548 # to mean that we're using MIPS C or MIPSpro C); it specified
7549 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
7550 # not sure why that would be something to do *only* with a
7551 # .devel file; why should the ABI for which we produce code
7552 # depend on .devel?
7553 #
The Android Open Source Project2949f582009-03-03 19:30:46 -08007554 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
7555 name="lbl/os-$os.h"
7556 if test -f $name ; then
7557 ln -s $name os-proto.h
JP Abgrall53f17a92014-02-12 14:02:41 -08007558
7559$as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
The Android Open Source Project2949f582009-03-03 19:30:46 -08007560
7561 else
JP Abgrall53f17a92014-02-12 14:02:41 -08007562 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
7563$as_echo "$as_me: WARNING: can't find $name" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08007564 fi
7565 fi
7566
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007567# Check for OpenSSL/libressl libcrypto
7568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL/libressl libcrypto" >&5
7569$as_echo_n "checking whether to use OpenSSL/libressl libcrypto... " >&6; }
JP Abgrall53f17a92014-02-12 14:02:41 -08007570# Specify location for both includes and libraries.
7571want_libcrypto=ifavailable
The Android Open Source Project2949f582009-03-03 19:30:46 -08007572
7573# Check whether --with-crypto was given.
JP Abgrall53f17a92014-02-12 14:02:41 -08007574if test "${with_crypto+set}" = set; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08007575 withval=$with_crypto;
JP Abgrall53f17a92014-02-12 14:02:41 -08007576 if test $withval = no
7577 then
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007578 # User doesn't want to link with libcrypto.
JP Abgrall53f17a92014-02-12 14:02:41 -08007579 want_libcrypto=no
7580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7581$as_echo "no" >&6; }
7582 elif test $withval = yes
7583 then
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007584 # User wants to link with libcrypto but hasn't specified
7585 # a directory.
JP Abgrall53f17a92014-02-12 14:02:41 -08007586 want_libcrypto=yes
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7588$as_echo "yes" >&6; }
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007589 else
7590 # User wants to link with libcrypto and has specified
7591 # a directory, so use the provided value.
7592 want_libcrypto=yes
7593 libcrypto_root=$withval
7594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using the version installed in $withval" >&5
7595$as_echo "yes, using the version installed in $withval" >&6; }
7596
7597 #
7598 # Put the subdirectories of the libcrypto root directory
7599 # at the front of the header and library search path.
7600 #
7601 CFLAGS="-I$withval/include $CFLAGS"
7602 LIBS="-L$withval/lib $LIBS"
JP Abgrall53f17a92014-02-12 14:02:41 -08007603 fi
7604
The Android Open Source Project2949f582009-03-03 19:30:46 -08007605else
7606
JP Abgrall53f17a92014-02-12 14:02:41 -08007607 #
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007608 # Use libcrypto if it's present, otherwise don't; no directory
7609 # was specified.
JP Abgrall53f17a92014-02-12 14:02:41 -08007610 #
7611 want_libcrypto=ifavailable
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5
7613$as_echo "yes, if available" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08007614
The Android Open Source Project2949f582009-03-03 19:30:46 -08007615fi
7616
JP Abgrall53f17a92014-02-12 14:02:41 -08007617if test "$want_libcrypto" != "no"; then
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007618 #
7619 # Don't check for libcrypto unless we have its headers;
7620 # Apple, bless their pointy little heads, apparently ship
7621 # libcrypto as a library, but not the header files, in
7622 # El Capitan, probably because they don't want you writing
7623 # nasty portable code that could run on other UN*Xes, they
7624 # want you writing code that uses their Shiny New Crypto
Elliott Hughes820eced2021-08-20 18:00:50 -07007625 # Library and that only runs on macOS.
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007626 #
7627 ac_fn_c_check_header_mongrel "$LINENO" "openssl/crypto.h" "ac_cv_header_openssl_crypto_h" "$ac_includes_default"
7628if test "x$ac_cv_header_openssl_crypto_h" = xyes; then :
7629
7630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DES_cbc_encrypt in -lcrypto" >&5
JP Abgrall53f17a92014-02-12 14:02:41 -08007631$as_echo_n "checking for DES_cbc_encrypt in -lcrypto... " >&6; }
7632if ${ac_cv_lib_crypto_DES_cbc_encrypt+:} false; then :
7633 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08007634else
7635 ac_check_lib_save_LIBS=$LIBS
7636LIBS="-lcrypto $LIBS"
JP Abgrall53f17a92014-02-12 14:02:41 -08007637cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08007638/* end confdefs.h. */
7639
7640/* Override any GCC internal prototype to avoid an error.
7641 Use char because int might match the return type of a GCC
7642 builtin and then its argument prototype would still apply. */
7643#ifdef __cplusplus
7644extern "C"
7645#endif
7646char DES_cbc_encrypt ();
7647int
7648main ()
7649{
7650return DES_cbc_encrypt ();
7651 ;
7652 return 0;
7653}
7654_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08007655if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08007656 ac_cv_lib_crypto_DES_cbc_encrypt=yes
7657else
JP Abgrall53f17a92014-02-12 14:02:41 -08007658 ac_cv_lib_crypto_DES_cbc_encrypt=no
The Android Open Source Project2949f582009-03-03 19:30:46 -08007659fi
JP Abgrall53f17a92014-02-12 14:02:41 -08007660rm -f core conftest.err conftest.$ac_objext \
7661 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project2949f582009-03-03 19:30:46 -08007662LIBS=$ac_check_lib_save_LIBS
7663fi
JP Abgrall53f17a92014-02-12 14:02:41 -08007664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_DES_cbc_encrypt" >&5
7665$as_echo "$ac_cv_lib_crypto_DES_cbc_encrypt" >&6; }
7666if test "x$ac_cv_lib_crypto_DES_cbc_encrypt" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08007667 cat >>confdefs.h <<_ACEOF
7668#define HAVE_LIBCRYPTO 1
7669_ACEOF
7670
7671 LIBS="-lcrypto $LIBS"
7672
7673fi
7674
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007675 if test "$ac_cv_lib_crypto_DES_cbc_encrypt" = "yes"; then
7676 for ac_header in openssl/evp.h
JP Abgrall53f17a92014-02-12 14:02:41 -08007677do :
7678 ac_fn_c_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
7679if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08007680 cat >>confdefs.h <<_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08007681#define HAVE_OPENSSL_EVP_H 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08007682_ACEOF
7683
7684fi
7685
7686done
7687
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007688 #
Elliott Hughescec480a2017-12-19 16:54:57 -08007689 # OK, then:
7690 #
7691 # 1) do we have EVP_CIPHER_CTX_new?
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007692 # If so, we use it to allocate an
7693 # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be
7694 # opaque; otherwise, we allocate it ourselves.
7695 #
Elliott Hughes820eced2021-08-20 18:00:50 -07007696 # 2) do we have EVP_DecryptInit_ex()?
Elliott Hughescec480a2017-12-19 16:54:57 -08007697 # If so, we use it, because we need to be
7698 # able to make two "initialize the cipher"
7699 # calls, one with the cipher and key, and
7700 # one with the IV, and, as of OpenSSL 1.1,
Elliott Hughes820eced2021-08-20 18:00:50 -07007701 # You Can't Do That with EVP_DecryptInit(),
7702 # because a call to EVP_DecryptInit() will
Elliott Hughescec480a2017-12-19 16:54:57 -08007703 # unconditionally clear the context, and
7704 # if you don't supply a cipher, it'll
7705 # clear the cipher, rendering the context
7706 # unusable and causing a crash.
7707 #
Elliott Hughes820eced2021-08-20 18:00:50 -07007708 for ac_func in EVP_CIPHER_CTX_new EVP_DecryptInit_ex
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007709do :
Elliott Hughescec480a2017-12-19 16:54:57 -08007710 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7711ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7712if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007713 cat >>confdefs.h <<_ACEOF
Elliott Hughescec480a2017-12-19 16:54:57 -08007714#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Elliott Hughese2e3bd12017-05-15 10:59:29 -07007715_ACEOF
7716
7717fi
7718done
7719
7720 fi
7721
7722fi
7723
7724
The Android Open Source Project2949f582009-03-03 19:30:46 -08007725fi
7726
Elliott Hughes892a68b2015-10-19 14:43:53 -07007727# Check for libcap-ng
7728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use libcap-ng" >&5
7729$as_echo_n "checking whether to use libcap-ng... " >&6; }
7730# Specify location for both includes and libraries.
7731want_libcap_ng=ifavailable
7732
7733# Check whether --with-cap_ng was given.
7734if test "${with_cap_ng+set}" = set; then :
7735 withval=$with_cap_ng;
7736 if test $withval = no
7737 then
7738 want_libcap_ng=no
7739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7740$as_echo "no" >&6; }
7741 elif test $withval = yes
7742 then
7743 want_libcap_ng=yes
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7745$as_echo "yes" >&6; }
7746 fi
7747
7748else
7749
7750 #
7751 # Use libcap-ng if it's present, otherwise don't.
7752 #
7753 want_libcap_ng=ifavailable
7754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5
7755$as_echo "yes, if available" >&6; }
7756
7757fi
7758
7759if test "$want_libcap_ng" != "no"; then
7760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capng_change_id in -lcap-ng" >&5
7761$as_echo_n "checking for capng_change_id in -lcap-ng... " >&6; }
7762if ${ac_cv_lib_cap_ng_capng_change_id+:} false; then :
7763 $as_echo_n "(cached) " >&6
7764else
7765 ac_check_lib_save_LIBS=$LIBS
7766LIBS="-lcap-ng $LIBS"
7767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7768/* end confdefs.h. */
7769
7770/* Override any GCC internal prototype to avoid an error.
7771 Use char because int might match the return type of a GCC
7772 builtin and then its argument prototype would still apply. */
7773#ifdef __cplusplus
7774extern "C"
7775#endif
7776char capng_change_id ();
7777int
7778main ()
7779{
7780return capng_change_id ();
7781 ;
7782 return 0;
7783}
7784_ACEOF
7785if ac_fn_c_try_link "$LINENO"; then :
7786 ac_cv_lib_cap_ng_capng_change_id=yes
7787else
7788 ac_cv_lib_cap_ng_capng_change_id=no
7789fi
7790rm -f core conftest.err conftest.$ac_objext \
7791 conftest$ac_exeext conftest.$ac_ext
7792LIBS=$ac_check_lib_save_LIBS
7793fi
7794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_ng_capng_change_id" >&5
7795$as_echo "$ac_cv_lib_cap_ng_capng_change_id" >&6; }
7796if test "x$ac_cv_lib_cap_ng_capng_change_id" = xyes; then :
7797 cat >>confdefs.h <<_ACEOF
7798#define HAVE_LIBCAP_NG 1
7799_ACEOF
7800
7801 LIBS="-lcap-ng $LIBS"
7802
7803fi
7804
7805 for ac_header in cap-ng.h
7806do :
7807 ac_fn_c_check_header_mongrel "$LINENO" "cap-ng.h" "ac_cv_header_cap_ng_h" "$ac_includes_default"
7808if test "x$ac_cv_header_cap_ng_h" = xyes; then :
7809 cat >>confdefs.h <<_ACEOF
7810#define HAVE_CAP_NG_H 1
7811_ACEOF
7812
7813fi
7814
7815done
7816
7817fi
7818
The Android Open Source Project2949f582009-03-03 19:30:46 -08007819if test "$missing_includes" = "yes"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08007820 CPPFLAGS="$CPPFLAGS -I$srcdir/missing"
7821 V_INCLS="$V_INCLS -I$srcdir/missing"
The Android Open Source Project2949f582009-03-03 19:30:46 -08007822fi
7823
7824
7825
7826
7827
7828
7829
7830
JP Abgrall53f17a92014-02-12 14:02:41 -08007831
7832
The Android Open Source Project2949f582009-03-03 19:30:46 -08007833# Find a good install program. We prefer a C program (faster),
7834# so one script is as good as another. But avoid the broken or
7835# incompatible versions:
7836# SysV /etc/install, /usr/sbin/install
7837# SunOS /usr/etc/install
7838# IRIX /sbin/install
7839# AIX /bin/install
7840# AmigaOS /C/install, which installs bootblocks on floppy discs
7841# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7842# AFS /usr/afsws/bin/install, which mishandles nonexistent args
7843# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7844# OS/2's system install, which has a completely different semantic
7845# ./install, which can be erroneously created by make from ./install.sh.
JP Abgrall53f17a92014-02-12 14:02:41 -08007846# Reject install programs that cannot install multiple files.
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7848$as_echo_n "checking for a BSD-compatible install... " >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08007849if test -z "$INSTALL"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08007850if ${ac_cv_path_install+:} false; then :
7851 $as_echo_n "(cached) " >&6
The Android Open Source Project2949f582009-03-03 19:30:46 -08007852else
7853 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7854for as_dir in $PATH
7855do
7856 IFS=$as_save_IFS
7857 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08007858 # Account for people who put trailing slashes in PATH elements.
7859case $as_dir/ in #((
7860 ./ | .// | /[cC]/* | \
The Android Open Source Project2949f582009-03-03 19:30:46 -08007861 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
JP Abgrall53f17a92014-02-12 14:02:41 -08007862 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
The Android Open Source Project2949f582009-03-03 19:30:46 -08007863 /usr/ucb/* ) ;;
7864 *)
7865 # OSF1 and SCO ODT 3.0 have their own names for install.
7866 # Don't use installbsd from OSF since it installs stuff as root
7867 # by default.
7868 for ac_prog in ginstall scoinst install; do
7869 for ac_exec_ext in '' $ac_executable_extensions; do
JP Abgrall53f17a92014-02-12 14:02:41 -08007870 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08007871 if test $ac_prog = install &&
7872 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7873 # AIX install. It has an incompatible calling convention.
7874 :
7875 elif test $ac_prog = install &&
7876 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7877 # program-specific install script used by HP pwplus--don't use.
7878 :
7879 else
JP Abgrall53f17a92014-02-12 14:02:41 -08007880 rm -rf conftest.one conftest.two conftest.dir
7881 echo one > conftest.one
7882 echo two > conftest.two
7883 mkdir conftest.dir
7884 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7885 test -s conftest.one && test -s conftest.two &&
7886 test -s conftest.dir/conftest.one &&
7887 test -s conftest.dir/conftest.two
7888 then
7889 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7890 break 3
7891 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08007892 fi
7893 fi
7894 done
7895 done
7896 ;;
7897esac
JP Abgrall53f17a92014-02-12 14:02:41 -08007898
7899 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08007900IFS=$as_save_IFS
7901
JP Abgrall53f17a92014-02-12 14:02:41 -08007902rm -rf conftest.one conftest.two conftest.dir
The Android Open Source Project2949f582009-03-03 19:30:46 -08007903
7904fi
7905 if test "${ac_cv_path_install+set}" = set; then
7906 INSTALL=$ac_cv_path_install
7907 else
7908 # As a last resort, use the slow shell script. Don't cache a
7909 # value for INSTALL within a source directory, because that will
7910 # break other packages using the cache if that directory is
7911 # removed, or if the value is a relative name.
7912 INSTALL=$ac_install_sh
7913 fi
7914fi
JP Abgrall53f17a92014-02-12 14:02:41 -08007915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7916$as_echo "$INSTALL" >&6; }
The Android Open Source Project2949f582009-03-03 19:30:46 -08007917
7918# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7919# It thinks the first close brace ends the variable substitution.
7920test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7921
7922test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7923
7924test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7925
7926
7927ac_config_headers="$ac_config_headers config.h"
7928
7929
7930ac_config_commands="$ac_config_commands default-1"
7931
JP Abgrall53f17a92014-02-12 14:02:41 -08007932ac_config_files="$ac_config_files Makefile tcpdump.1"
The Android Open Source Project2949f582009-03-03 19:30:46 -08007933
7934cat >confcache <<\_ACEOF
7935# This file is a shell script that caches the results of configure
7936# tests run on this system so they can be shared between configure
7937# scripts and configure runs, see configure's option --config-cache.
7938# It is not useful on other systems. If it contains results you don't
7939# want to keep, you may remove or edit it.
7940#
7941# config.status only pays attention to the cache file if you give it
7942# the --recheck option to rerun configure.
7943#
7944# `ac_cv_env_foo' variables (set or unset) will be overridden when
7945# loading this file, other *unset* `ac_cv_foo' will be assigned the
7946# following values.
7947
7948_ACEOF
7949
7950# The following way of writing the cache mishandles newlines in values,
7951# but we know of no workaround that is simple, portable, and efficient.
7952# So, we kill variables containing newlines.
7953# Ultrix sh set writes to stderr and can't be redirected directly,
7954# and sets the high bit in the cache file unless we assign to the vars.
7955(
7956 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
7957 eval ac_val=\$$ac_var
7958 case $ac_val in #(
7959 *${as_nl}*)
7960 case $ac_var in #(
JP Abgrall53f17a92014-02-12 14:02:41 -08007961 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
7962$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08007963 esac
7964 case $ac_var in #(
7965 _ | IFS | as_nl) ;; #(
JP Abgrall53f17a92014-02-12 14:02:41 -08007966 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
7967 *) { eval $ac_var=; unset $ac_var;} ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08007968 esac ;;
7969 esac
7970 done
7971
7972 (set) 2>&1 |
7973 case $as_nl`(ac_space=' '; set) 2>&1` in #(
7974 *${as_nl}ac_space=\ *)
JP Abgrall53f17a92014-02-12 14:02:41 -08007975 # `set' does not quote correctly, so add quotes: double-quote
7976 # substitution turns \\\\ into \\, and sed turns \\ into \.
The Android Open Source Project2949f582009-03-03 19:30:46 -08007977 sed -n \
7978 "s/'/'\\\\''/g;
7979 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
7980 ;; #(
7981 *)
7982 # `set' quotes correctly as required by POSIX, so do not add quotes.
7983 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
7984 ;;
7985 esac |
7986 sort
7987) |
7988 sed '
7989 /^ac_cv_env_/b end
7990 t clear
7991 :clear
7992 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
7993 t end
7994 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
7995 :end' >>confcache
7996if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
7997 if test -w "$cache_file"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08007998 if test "x$cache_file" != "x/dev/null"; then
7999 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
8000$as_echo "$as_me: updating cache $cache_file" >&6;}
8001 if test ! -f "$cache_file" || test -h "$cache_file"; then
8002 cat confcache >"$cache_file"
8003 else
8004 case $cache_file in #(
8005 */* | ?:*)
8006 mv -f confcache "$cache_file"$$ &&
8007 mv -f "$cache_file"$$ "$cache_file" ;; #(
8008 *)
8009 mv -f confcache "$cache_file" ;;
8010 esac
8011 fi
8012 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08008013 else
JP Abgrall53f17a92014-02-12 14:02:41 -08008014 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
8015$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08008016 fi
8017fi
8018rm -f confcache
8019
8020test "x$prefix" = xNONE && prefix=$ac_default_prefix
8021# Let make expand exec_prefix.
8022test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
8023
8024DEFS=-DHAVE_CONFIG_H
8025
8026ac_libobjs=
8027ac_ltlibobjs=
JP Abgrall53f17a92014-02-12 14:02:41 -08008028U=
The Android Open Source Project2949f582009-03-03 19:30:46 -08008029for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
8030 # 1. Remove the extension, and $U if already installed.
8031 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
JP Abgrall53f17a92014-02-12 14:02:41 -08008032 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
The Android Open Source Project2949f582009-03-03 19:30:46 -08008033 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
8034 # will be set to the directory where LIBOBJS objects are built.
JP Abgrall53f17a92014-02-12 14:02:41 -08008035 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
8036 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
The Android Open Source Project2949f582009-03-03 19:30:46 -08008037done
8038LIBOBJS=$ac_libobjs
8039
8040LTLIBOBJS=$ac_ltlibobjs
8041
8042
8043
JP Abgrall53f17a92014-02-12 14:02:41 -08008044: "${CONFIG_STATUS=./config.status}"
8045ac_write_fail=0
The Android Open Source Project2949f582009-03-03 19:30:46 -08008046ac_clean_files_save=$ac_clean_files
8047ac_clean_files="$ac_clean_files $CONFIG_STATUS"
JP Abgrall53f17a92014-02-12 14:02:41 -08008048{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
8049$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
8050as_write_fail=0
8051cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008052#! $SHELL
8053# Generated by $as_me.
8054# Run this file to recreate the current configuration.
8055# Compiler output produced by configure, useful for debugging
8056# configure, is in config.log if it exists.
8057
8058debug=false
8059ac_cs_recheck=false
8060ac_cs_silent=false
The Android Open Source Project2949f582009-03-03 19:30:46 -08008061
JP Abgrall53f17a92014-02-12 14:02:41 -08008062SHELL=\${CONFIG_SHELL-$SHELL}
8063export SHELL
8064_ASEOF
8065cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
8066## -------------------- ##
8067## M4sh Initialization. ##
8068## -------------------- ##
The Android Open Source Project2949f582009-03-03 19:30:46 -08008069
8070# Be more Bourne compatible
8071DUALCASE=1; export DUALCASE # for MKS sh
JP Abgrall53f17a92014-02-12 14:02:41 -08008072if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
The Android Open Source Project2949f582009-03-03 19:30:46 -08008073 emulate sh
8074 NULLCMD=:
JP Abgrall53f17a92014-02-12 14:02:41 -08008075 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
The Android Open Source Project2949f582009-03-03 19:30:46 -08008076 # is contrary to our usage. Disable this feature.
8077 alias -g '${1+"$@"}'='"$@"'
8078 setopt NO_GLOB_SUBST
8079else
JP Abgrall53f17a92014-02-12 14:02:41 -08008080 case `(set -o) 2>/dev/null` in #(
8081 *posix*) :
8082 set -o posix ;; #(
8083 *) :
8084 ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008085esac
The Android Open Source Project2949f582009-03-03 19:30:46 -08008086fi
8087
8088
JP Abgrall53f17a92014-02-12 14:02:41 -08008089as_nl='
8090'
8091export as_nl
8092# Printing a long string crashes Solaris 7 /usr/bin/printf.
8093as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
8094as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
8095as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
8096# Prefer a ksh shell builtin over an external printf program on Solaris,
8097# but without wasting forks for bash or zsh.
8098if test -z "$BASH_VERSION$ZSH_VERSION" \
8099 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
8100 as_echo='print -r --'
8101 as_echo_n='print -rn --'
8102elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
8103 as_echo='printf %s\n'
8104 as_echo_n='printf %s'
8105else
8106 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
8107 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
8108 as_echo_n='/usr/ucb/echo -n'
8109 else
8110 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
8111 as_echo_n_body='eval
8112 arg=$1;
8113 case $arg in #(
8114 *"$as_nl"*)
8115 expr "X$arg" : "X\\(.*\\)$as_nl";
8116 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
8117 esac;
8118 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
8119 '
8120 export as_echo_n_body
8121 as_echo_n='sh -c $as_echo_n_body as_echo'
8122 fi
8123 export as_echo_body
8124 as_echo='sh -c $as_echo_body as_echo'
8125fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08008126
8127# The user is always right.
8128if test "${PATH_SEPARATOR+set}" != set; then
JP Abgrall53f17a92014-02-12 14:02:41 -08008129 PATH_SEPARATOR=:
8130 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8131 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8132 PATH_SEPARATOR=';'
8133 }
The Android Open Source Project2949f582009-03-03 19:30:46 -08008134fi
8135
8136
8137# IFS
8138# We need space, tab and new line, in precisely that order. Quoting is
8139# there to prevent editors from complaining about space-tab.
8140# (If _AS_PATH_WALK were called with IFS unset, it would disable word
8141# splitting by setting IFS to empty value.)
The Android Open Source Project2949f582009-03-03 19:30:46 -08008142IFS=" "" $as_nl"
8143
8144# Find who we are. Look in the path if we contain no directory separator.
JP Abgrall53f17a92014-02-12 14:02:41 -08008145as_myself=
8146case $0 in #((
The Android Open Source Project2949f582009-03-03 19:30:46 -08008147 *[\\/]* ) as_myself=$0 ;;
8148 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8149for as_dir in $PATH
8150do
8151 IFS=$as_save_IFS
8152 test -z "$as_dir" && as_dir=.
JP Abgrall53f17a92014-02-12 14:02:41 -08008153 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
8154 done
The Android Open Source Project2949f582009-03-03 19:30:46 -08008155IFS=$as_save_IFS
8156
8157 ;;
8158esac
8159# We did not find ourselves, most probably we were run as `sh COMMAND'
8160# in which case we are not to be found in the path.
8161if test "x$as_myself" = x; then
8162 as_myself=$0
8163fi
8164if test ! -f "$as_myself"; then
JP Abgrall53f17a92014-02-12 14:02:41 -08008165 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
8166 exit 1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008167fi
8168
JP Abgrall53f17a92014-02-12 14:02:41 -08008169# Unset variables that we do not need and which cause bugs (e.g. in
8170# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
8171# suppresses any "Segmentation fault" message there. '((' could
8172# trigger a bug in pdksh 5.2.14.
8173for as_var in BASH_ENV ENV MAIL MAILPATH
8174do eval test x\${$as_var+set} = xset \
8175 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
The Android Open Source Project2949f582009-03-03 19:30:46 -08008176done
8177PS1='$ '
8178PS2='> '
8179PS4='+ '
8180
8181# NLS nuisances.
JP Abgrall53f17a92014-02-12 14:02:41 -08008182LC_ALL=C
8183export LC_ALL
8184LANGUAGE=C
8185export LANGUAGE
The Android Open Source Project2949f582009-03-03 19:30:46 -08008186
JP Abgrall53f17a92014-02-12 14:02:41 -08008187# CDPATH.
8188(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
8189
8190
8191# as_fn_error STATUS ERROR [LINENO LOG_FD]
8192# ----------------------------------------
8193# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
8194# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
8195# script with STATUS, using 1 if that was 0.
8196as_fn_error ()
8197{
8198 as_status=$1; test $as_status -eq 0 && as_status=1
8199 if test "$4"; then
8200 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
8201 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
8202 fi
8203 $as_echo "$as_me: error: $2" >&2
8204 as_fn_exit $as_status
8205} # as_fn_error
8206
8207
8208# as_fn_set_status STATUS
8209# -----------------------
8210# Set $? to STATUS, without forking.
8211as_fn_set_status ()
8212{
8213 return $1
8214} # as_fn_set_status
8215
8216# as_fn_exit STATUS
8217# -----------------
8218# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
8219as_fn_exit ()
8220{
8221 set +e
8222 as_fn_set_status $1
8223 exit $1
8224} # as_fn_exit
8225
8226# as_fn_unset VAR
8227# ---------------
8228# Portably unset VAR.
8229as_fn_unset ()
8230{
8231 { eval $1=; unset $1;}
8232}
8233as_unset=as_fn_unset
8234# as_fn_append VAR VALUE
8235# ----------------------
8236# Append the text in VALUE to the end of the definition contained in VAR. Take
8237# advantage of any shell optimizations that allow amortized linear growth over
8238# repeated appends, instead of the typical quadratic growth present in naive
8239# implementations.
8240if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
8241 eval 'as_fn_append ()
8242 {
8243 eval $1+=\$2
8244 }'
8245else
8246 as_fn_append ()
8247 {
8248 eval $1=\$$1\$2
8249 }
8250fi # as_fn_append
8251
8252# as_fn_arith ARG...
8253# ------------------
8254# Perform arithmetic evaluation on the ARGs, and store the result in the
8255# global $as_val. Take advantage of shells that can avoid forks. The arguments
8256# must be portable across $(()) and expr.
8257if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
8258 eval 'as_fn_arith ()
8259 {
8260 as_val=$(( $* ))
8261 }'
8262else
8263 as_fn_arith ()
8264 {
8265 as_val=`expr "$@" || test $? -eq 1`
8266 }
8267fi # as_fn_arith
8268
8269
The Android Open Source Project2949f582009-03-03 19:30:46 -08008270if expr a : '\(a\)' >/dev/null 2>&1 &&
8271 test "X`expr 00001 : '.*\(...\)'`" = X001; then
8272 as_expr=expr
8273else
8274 as_expr=false
8275fi
8276
8277if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
8278 as_basename=basename
8279else
8280 as_basename=false
8281fi
8282
JP Abgrall53f17a92014-02-12 14:02:41 -08008283if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
8284 as_dirname=dirname
8285else
8286 as_dirname=false
8287fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08008288
The Android Open Source Project2949f582009-03-03 19:30:46 -08008289as_me=`$as_basename -- "$0" ||
8290$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
8291 X"$0" : 'X\(//\)$' \| \
8292 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall53f17a92014-02-12 14:02:41 -08008293$as_echo X/"$0" |
The Android Open Source Project2949f582009-03-03 19:30:46 -08008294 sed '/^.*\/\([^/][^/]*\)\/*$/{
8295 s//\1/
8296 q
8297 }
8298 /^X\/\(\/\/\)$/{
8299 s//\1/
8300 q
8301 }
8302 /^X\/\(\/\).*/{
8303 s//\1/
8304 q
8305 }
8306 s/.*/./; q'`
8307
JP Abgrall53f17a92014-02-12 14:02:41 -08008308# Avoid depending upon Character Ranges.
8309as_cr_letters='abcdefghijklmnopqrstuvwxyz'
8310as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
8311as_cr_Letters=$as_cr_letters$as_cr_LETTERS
8312as_cr_digits='0123456789'
8313as_cr_alnum=$as_cr_Letters$as_cr_digits
The Android Open Source Project2949f582009-03-03 19:30:46 -08008314
8315ECHO_C= ECHO_N= ECHO_T=
JP Abgrall53f17a92014-02-12 14:02:41 -08008316case `echo -n x` in #(((((
The Android Open Source Project2949f582009-03-03 19:30:46 -08008317-n*)
JP Abgrall53f17a92014-02-12 14:02:41 -08008318 case `echo 'xy\c'` in
The Android Open Source Project2949f582009-03-03 19:30:46 -08008319 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
JP Abgrall53f17a92014-02-12 14:02:41 -08008320 xy) ECHO_C='\c';;
8321 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
8322 ECHO_T=' ';;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008323 esac;;
8324*)
8325 ECHO_N='-n';;
8326esac
8327
The Android Open Source Project2949f582009-03-03 19:30:46 -08008328rm -f conf$$ conf$$.exe conf$$.file
8329if test -d conf$$.dir; then
8330 rm -f conf$$.dir/conf$$.file
8331else
8332 rm -f conf$$.dir
JP Abgrall53f17a92014-02-12 14:02:41 -08008333 mkdir conf$$.dir 2>/dev/null
The Android Open Source Project2949f582009-03-03 19:30:46 -08008334fi
JP Abgrall53f17a92014-02-12 14:02:41 -08008335if (echo >conf$$.file) 2>/dev/null; then
8336 if ln -s conf$$.file conf$$ 2>/dev/null; then
8337 as_ln_s='ln -s'
8338 # ... but there are two gotchas:
8339 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
8340 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
8341 # In both cases, we have to default to `cp -pR'.
8342 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
8343 as_ln_s='cp -pR'
8344 elif ln conf$$.file conf$$ 2>/dev/null; then
8345 as_ln_s=ln
8346 else
8347 as_ln_s='cp -pR'
8348 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08008349else
JP Abgrall53f17a92014-02-12 14:02:41 -08008350 as_ln_s='cp -pR'
The Android Open Source Project2949f582009-03-03 19:30:46 -08008351fi
8352rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
8353rmdir conf$$.dir 2>/dev/null
8354
JP Abgrall53f17a92014-02-12 14:02:41 -08008355
8356# as_fn_mkdir_p
8357# -------------
8358# Create "$as_dir" as a directory, including parents if necessary.
8359as_fn_mkdir_p ()
8360{
8361
8362 case $as_dir in #(
8363 -*) as_dir=./$as_dir;;
8364 esac
8365 test -d "$as_dir" || eval $as_mkdir_p || {
8366 as_dirs=
8367 while :; do
8368 case $as_dir in #(
8369 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
8370 *) as_qdir=$as_dir;;
8371 esac
8372 as_dirs="'$as_qdir' $as_dirs"
8373 as_dir=`$as_dirname -- "$as_dir" ||
8374$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
8375 X"$as_dir" : 'X\(//\)[^/]' \| \
8376 X"$as_dir" : 'X\(//\)$' \| \
8377 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
8378$as_echo X"$as_dir" |
8379 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
8380 s//\1/
8381 q
8382 }
8383 /^X\(\/\/\)[^/].*/{
8384 s//\1/
8385 q
8386 }
8387 /^X\(\/\/\)$/{
8388 s//\1/
8389 q
8390 }
8391 /^X\(\/\).*/{
8392 s//\1/
8393 q
8394 }
8395 s/.*/./; q'`
8396 test -d "$as_dir" && break
8397 done
8398 test -z "$as_dirs" || eval "mkdir $as_dirs"
8399 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
8400
8401
8402} # as_fn_mkdir_p
The Android Open Source Project2949f582009-03-03 19:30:46 -08008403if mkdir -p . 2>/dev/null; then
JP Abgrall53f17a92014-02-12 14:02:41 -08008404 as_mkdir_p='mkdir -p "$as_dir"'
The Android Open Source Project2949f582009-03-03 19:30:46 -08008405else
8406 test -d ./-p && rmdir ./-p
8407 as_mkdir_p=false
8408fi
8409
JP Abgrall53f17a92014-02-12 14:02:41 -08008410
8411# as_fn_executable_p FILE
8412# -----------------------
8413# Test if FILE is an executable regular file.
8414as_fn_executable_p ()
8415{
8416 test -f "$1" && test -x "$1"
8417} # as_fn_executable_p
8418as_test_x='test -x'
8419as_executable_p=as_fn_executable_p
The Android Open Source Project2949f582009-03-03 19:30:46 -08008420
8421# Sed expression to map a string onto a valid CPP name.
8422as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
8423
8424# Sed expression to map a string onto a valid variable name.
8425as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
8426
8427
8428exec 6>&1
JP Abgrall53f17a92014-02-12 14:02:41 -08008429## ----------------------------------- ##
8430## Main body of $CONFIG_STATUS script. ##
8431## ----------------------------------- ##
8432_ASEOF
8433test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008434
JP Abgrall53f17a92014-02-12 14:02:41 -08008435cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8436# Save the log message, to keep $0 and so on meaningful, and to
The Android Open Source Project2949f582009-03-03 19:30:46 -08008437# report actual input values of CONFIG_FILES etc. instead of their
8438# values after options handling.
8439ac_log="
Elliott Hughes820eced2021-08-20 18:00:50 -07008440This file was extended by tcpdump $as_me 4.99.1, which was
JP Abgrall53f17a92014-02-12 14:02:41 -08008441generated by GNU Autoconf 2.69. Invocation command line was
The Android Open Source Project2949f582009-03-03 19:30:46 -08008442
8443 CONFIG_FILES = $CONFIG_FILES
8444 CONFIG_HEADERS = $CONFIG_HEADERS
8445 CONFIG_LINKS = $CONFIG_LINKS
8446 CONFIG_COMMANDS = $CONFIG_COMMANDS
8447 $ $0 $@
8448
8449on `(hostname || uname -n) 2>/dev/null | sed 1q`
8450"
8451
8452_ACEOF
8453
JP Abgrall53f17a92014-02-12 14:02:41 -08008454case $ac_config_files in *"
8455"*) set x $ac_config_files; shift; ac_config_files=$*;;
8456esac
8457
8458case $ac_config_headers in *"
8459"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
8460esac
8461
8462
8463cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008464# Files that config.status was made for.
8465config_files="$ac_config_files"
8466config_headers="$ac_config_headers"
8467config_commands="$ac_config_commands"
8468
8469_ACEOF
8470
JP Abgrall53f17a92014-02-12 14:02:41 -08008471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008472ac_cs_usage="\
JP Abgrall53f17a92014-02-12 14:02:41 -08008473\`$as_me' instantiates files and other configuration actions
8474from templates according to the current configuration. Unless the files
8475and actions are specified as TAGs, all are instantiated by default.
The Android Open Source Project2949f582009-03-03 19:30:46 -08008476
JP Abgrall53f17a92014-02-12 14:02:41 -08008477Usage: $0 [OPTION]... [TAG]...
The Android Open Source Project2949f582009-03-03 19:30:46 -08008478
8479 -h, --help print this help, then exit
8480 -V, --version print version number and configuration settings, then exit
JP Abgrall53f17a92014-02-12 14:02:41 -08008481 --config print configuration, then exit
8482 -q, --quiet, --silent
8483 do not print progress messages
The Android Open Source Project2949f582009-03-03 19:30:46 -08008484 -d, --debug don't remove temporary files
8485 --recheck update $as_me by reconfiguring in the same conditions
JP Abgrall53f17a92014-02-12 14:02:41 -08008486 --file=FILE[:TEMPLATE]
8487 instantiate the configuration file FILE
8488 --header=FILE[:TEMPLATE]
8489 instantiate the configuration header FILE
The Android Open Source Project2949f582009-03-03 19:30:46 -08008490
8491Configuration files:
8492$config_files
8493
8494Configuration headers:
8495$config_headers
8496
8497Configuration commands:
8498$config_commands
8499
JP Abgrall53f17a92014-02-12 14:02:41 -08008500Report bugs to the package provider."
The Android Open Source Project2949f582009-03-03 19:30:46 -08008501
8502_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08008503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8504ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008505ac_cs_version="\\
Elliott Hughes820eced2021-08-20 18:00:50 -07008506tcpdump config.status 4.99.1
JP Abgrall53f17a92014-02-12 14:02:41 -08008507configured by $0, generated by GNU Autoconf 2.69,
8508 with options \\"\$ac_cs_config\\"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008509
JP Abgrall53f17a92014-02-12 14:02:41 -08008510Copyright (C) 2012 Free Software Foundation, Inc.
The Android Open Source Project2949f582009-03-03 19:30:46 -08008511This config.status script is free software; the Free Software Foundation
8512gives unlimited permission to copy, distribute and modify it."
8513
8514ac_pwd='$ac_pwd'
8515srcdir='$srcdir'
8516INSTALL='$INSTALL'
JP Abgrall53f17a92014-02-12 14:02:41 -08008517test -n "\$AWK" || AWK=awk
The Android Open Source Project2949f582009-03-03 19:30:46 -08008518_ACEOF
8519
JP Abgrall53f17a92014-02-12 14:02:41 -08008520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8521# The default lists apply if the user does not specify any file.
The Android Open Source Project2949f582009-03-03 19:30:46 -08008522ac_need_defaults=:
8523while test $# != 0
8524do
8525 case $1 in
JP Abgrall53f17a92014-02-12 14:02:41 -08008526 --*=?*)
The Android Open Source Project2949f582009-03-03 19:30:46 -08008527 ac_option=`expr "X$1" : 'X\([^=]*\)='`
8528 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
8529 ac_shift=:
8530 ;;
JP Abgrall53f17a92014-02-12 14:02:41 -08008531 --*=)
8532 ac_option=`expr "X$1" : 'X\([^=]*\)='`
8533 ac_optarg=
8534 ac_shift=:
8535 ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008536 *)
8537 ac_option=$1
8538 ac_optarg=$2
8539 ac_shift=shift
8540 ;;
8541 esac
8542
8543 case $ac_option in
8544 # Handling of the options.
8545 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
8546 ac_cs_recheck=: ;;
8547 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
JP Abgrall53f17a92014-02-12 14:02:41 -08008548 $as_echo "$ac_cs_version"; exit ;;
8549 --config | --confi | --conf | --con | --co | --c )
8550 $as_echo "$ac_cs_config"; exit ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008551 --debug | --debu | --deb | --de | --d | -d )
8552 debug=: ;;
8553 --file | --fil | --fi | --f )
8554 $ac_shift
JP Abgrall53f17a92014-02-12 14:02:41 -08008555 case $ac_optarg in
8556 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
8557 '') as_fn_error $? "missing file argument" ;;
8558 esac
8559 as_fn_append CONFIG_FILES " '$ac_optarg'"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008560 ac_need_defaults=false;;
8561 --header | --heade | --head | --hea )
8562 $ac_shift
JP Abgrall53f17a92014-02-12 14:02:41 -08008563 case $ac_optarg in
8564 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
8565 esac
8566 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008567 ac_need_defaults=false;;
8568 --he | --h)
8569 # Conflict between --help and --header
JP Abgrall53f17a92014-02-12 14:02:41 -08008570 as_fn_error $? "ambiguous option: \`$1'
8571Try \`$0 --help' for more information.";;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008572 --help | --hel | -h )
JP Abgrall53f17a92014-02-12 14:02:41 -08008573 $as_echo "$ac_cs_usage"; exit ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008574 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
8575 | -silent | --silent | --silen | --sile | --sil | --si | --s)
8576 ac_cs_silent=: ;;
8577
8578 # This is an error.
JP Abgrall53f17a92014-02-12 14:02:41 -08008579 -*) as_fn_error $? "unrecognized option: \`$1'
8580Try \`$0 --help' for more information." ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008581
JP Abgrall53f17a92014-02-12 14:02:41 -08008582 *) as_fn_append ac_config_targets " $1"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008583 ac_need_defaults=false ;;
8584
8585 esac
8586 shift
8587done
8588
8589ac_configure_extra_args=
8590
8591if $ac_cs_silent; then
8592 exec 6>/dev/null
8593 ac_configure_extra_args="$ac_configure_extra_args --silent"
8594fi
8595
8596_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08008597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008598if \$ac_cs_recheck; then
JP Abgrall53f17a92014-02-12 14:02:41 -08008599 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
8600 shift
8601 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
8602 CONFIG_SHELL='$SHELL'
The Android Open Source Project2949f582009-03-03 19:30:46 -08008603 export CONFIG_SHELL
JP Abgrall53f17a92014-02-12 14:02:41 -08008604 exec "\$@"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008605fi
8606
8607_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08008608cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008609exec 5>>config.log
8610{
8611 echo
8612 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
8613## Running $as_me. ##
8614_ASBOX
JP Abgrall53f17a92014-02-12 14:02:41 -08008615 $as_echo "$ac_log"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008616} >&5
8617
8618_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08008619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008620#
8621# INIT-COMMANDS
8622#
8623
8624
8625_ACEOF
8626
JP Abgrall53f17a92014-02-12 14:02:41 -08008627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08008628
8629# Handling of arguments.
8630for ac_config_target in $ac_config_targets
8631do
8632 case $ac_config_target in
8633 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
8634 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
8635 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
JP Abgrall53f17a92014-02-12 14:02:41 -08008636 "tcpdump.1") CONFIG_FILES="$CONFIG_FILES tcpdump.1" ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008637
JP Abgrall53f17a92014-02-12 14:02:41 -08008638 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008639 esac
8640done
8641
8642
8643# If the user did not use the arguments to specify the items to instantiate,
8644# then the envvar interface is used. Set only those that are not.
8645# We use the long form for the default assignment because of an extremely
8646# bizarre bug on SunOS 4.1.3.
8647if $ac_need_defaults; then
8648 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
8649 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
8650 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
8651fi
8652
8653# Have a temporary directory for convenience. Make it in the build tree
8654# simply because there is no reason against having it here, and in addition,
8655# creating and moving files from /tmp can sometimes cause problems.
8656# Hook for its removal unless debugging.
8657# Note that there is a small window in which the directory will not be cleaned:
8658# after its creation but before its name has been assigned to `$tmp'.
8659$debug ||
8660{
JP Abgrall53f17a92014-02-12 14:02:41 -08008661 tmp= ac_tmp=
The Android Open Source Project2949f582009-03-03 19:30:46 -08008662 trap 'exit_status=$?
JP Abgrall53f17a92014-02-12 14:02:41 -08008663 : "${ac_tmp:=$tmp}"
8664 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
The Android Open Source Project2949f582009-03-03 19:30:46 -08008665' 0
JP Abgrall53f17a92014-02-12 14:02:41 -08008666 trap 'as_fn_exit 1' 1 2 13 15
The Android Open Source Project2949f582009-03-03 19:30:46 -08008667}
8668# Create a (secure) tmp directory for tmp files.
8669
8670{
8671 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
JP Abgrall53f17a92014-02-12 14:02:41 -08008672 test -d "$tmp"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008673} ||
8674{
8675 tmp=./conf$$-$RANDOM
8676 (umask 077 && mkdir "$tmp")
JP Abgrall53f17a92014-02-12 14:02:41 -08008677} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
8678ac_tmp=$tmp
The Android Open Source Project2949f582009-03-03 19:30:46 -08008679
JP Abgrall53f17a92014-02-12 14:02:41 -08008680# Set up the scripts for CONFIG_FILES section.
8681# No need to generate them if there are no CONFIG_FILES.
8682# This happens for instance with `./config.status config.h'.
The Android Open Source Project2949f582009-03-03 19:30:46 -08008683if test -n "$CONFIG_FILES"; then
8684
JP Abgrall53f17a92014-02-12 14:02:41 -08008685
8686ac_cr=`echo X | tr X '\015'`
8687# On cygwin, bash can eat \r inside `` if the user requested igncr.
8688# But we know of no other shell where ac_cr would be empty at this
8689# point, so we can use a bashism as a fallback.
8690if test "x$ac_cr" = x; then
8691 eval ac_cr=\$\'\\r\'
8692fi
8693ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
8694if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
8695 ac_cs_awk_cr='\\r'
8696else
8697 ac_cs_awk_cr=$ac_cr
8698fi
8699
8700echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
The Android Open Source Project2949f582009-03-03 19:30:46 -08008701_ACEOF
8702
8703
JP Abgrall53f17a92014-02-12 14:02:41 -08008704{
8705 echo "cat >conf$$subs.awk <<_ACEOF" &&
8706 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
8707 echo "_ACEOF"
8708} >conf$$subs.sh ||
8709 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8710ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
The Android Open Source Project2949f582009-03-03 19:30:46 -08008711ac_delim='%!_!# '
8712for ac_last_try in false false false false false :; do
JP Abgrall53f17a92014-02-12 14:02:41 -08008713 . ./conf$$subs.sh ||
8714 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08008715
JP Abgrall53f17a92014-02-12 14:02:41 -08008716 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
8717 if test $ac_delim_n = $ac_delim_num; then
The Android Open Source Project2949f582009-03-03 19:30:46 -08008718 break
8719 elif $ac_last_try; then
JP Abgrall53f17a92014-02-12 14:02:41 -08008720 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
8721 else
8722 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8723 fi
8724done
8725rm -f conf$$subs.sh
8726
8727cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8728cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
8729_ACEOF
8730sed -n '
8731h
8732s/^/S["/; s/!.*/"]=/
8733p
8734g
8735s/^[^!]*!//
8736:repl
8737t repl
8738s/'"$ac_delim"'$//
8739t delim
8740:nl
8741h
8742s/\(.\{148\}\)..*/\1/
8743t more1
8744s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
8745p
8746n
8747b repl
8748:more1
8749s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8750p
8751g
8752s/.\{148\}//
8753t nl
8754:delim
8755h
8756s/\(.\{148\}\)..*/\1/
8757t more2
8758s/["\\]/\\&/g; s/^/"/; s/$/"/
8759p
8760b
8761:more2
8762s/["\\]/\\&/g; s/^/"/; s/$/"\\/
8763p
8764g
8765s/.\{148\}//
8766t delim
8767' <conf$$subs.awk | sed '
8768/^[^""]/{
8769 N
8770 s/\n//
8771}
8772' >>$CONFIG_STATUS || ac_write_fail=1
8773rm -f conf$$subs.awk
8774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8775_ACAWK
8776cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
8777 for (key in S) S_is_set[key] = 1
8778 FS = ""
8779
8780}
8781{
8782 line = $ 0
8783 nfields = split(line, field, "@")
8784 substed = 0
8785 len = length(field[1])
8786 for (i = 2; i < nfields; i++) {
8787 key = field[i]
8788 keylen = length(key)
8789 if (S_is_set[key]) {
8790 value = S[key]
8791 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
8792 len += length(value) + length(field[++i])
8793 substed = 1
8794 } else
8795 len += 1 + keylen
8796 }
8797
8798 print line
8799}
8800
8801_ACAWK
8802_ACEOF
8803cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8804if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
8805 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
8806else
8807 cat
8808fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
8809 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
8810_ACEOF
8811
8812# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
8813# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
8814# trailing colons and then remove the whole line if VPATH becomes empty
8815# (actually we leave an empty line to preserve line numbers).
8816if test "x$srcdir" = x.; then
8817 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
8818h
8819s///
8820s/^/:/
8821s/[ ]*$/:/
8822s/:\$(srcdir):/:/g
8823s/:\${srcdir}:/:/g
8824s/:@srcdir@:/:/g
8825s/^:*//
8826s/:*$//
8827x
8828s/\(=[ ]*\).*/\1/
8829G
8830s/\n//
8831s/^[^=]*=[ ]*$//
8832}'
8833fi
8834
8835cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8836fi # test -n "$CONFIG_FILES"
8837
8838# Set up the scripts for CONFIG_HEADERS section.
8839# No need to generate them if there are no CONFIG_HEADERS.
8840# This happens for instance with `./config.status Makefile'.
8841if test -n "$CONFIG_HEADERS"; then
8842cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
8843BEGIN {
8844_ACEOF
8845
8846# Transform confdefs.h into an awk script `defines.awk', embedded as
8847# here-document in config.status, that substitutes the proper values into
8848# config.h.in to produce config.h.
8849
8850# Create a delimiter string that does not exist in confdefs.h, to ease
8851# handling of long lines.
8852ac_delim='%!_!# '
8853for ac_last_try in false false :; do
8854 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
8855 if test -z "$ac_tt"; then
8856 break
8857 elif $ac_last_try; then
8858 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08008859 else
8860 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
8861 fi
8862done
8863
JP Abgrall53f17a92014-02-12 14:02:41 -08008864# For the awk script, D is an array of macro values keyed by name,
8865# likewise P contains macro parameters if any. Preserve backslash
8866# newline sequences.
The Android Open Source Project2949f582009-03-03 19:30:46 -08008867
JP Abgrall53f17a92014-02-12 14:02:41 -08008868ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
8869sed -n '
8870s/.\{148\}/&'"$ac_delim"'/g
8871t rset
8872:rset
8873s/^[ ]*#[ ]*define[ ][ ]*/ /
8874t def
8875d
8876:def
8877s/\\$//
8878t bsnl
8879s/["\\]/\\&/g
8880s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
8881D["\1"]=" \3"/p
8882s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
8883d
8884:bsnl
8885s/["\\]/\\&/g
8886s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
8887D["\1"]=" \3\\\\\\n"\\/p
8888t cont
8889s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
8890t cont
8891d
8892:cont
8893n
8894s/.\{148\}/&'"$ac_delim"'/g
8895t clear
8896:clear
8897s/\\$//
8898t bsnlc
8899s/["\\]/\\&/g; s/^/"/; s/$/"/p
8900d
8901:bsnlc
8902s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
8903b cont
8904' <confdefs.h | sed '
8905s/'"$ac_delim"'/"\\\
8906"/g' >>$CONFIG_STATUS || ac_write_fail=1
8907
8908cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
8909 for (key in D) D_is_set[key] = 1
8910 FS = ""
8911}
8912/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
8913 line = \$ 0
8914 split(line, arg, " ")
8915 if (arg[1] == "#") {
8916 defundef = arg[2]
8917 mac1 = arg[3]
8918 } else {
8919 defundef = substr(arg[1], 2)
8920 mac1 = arg[2]
8921 }
8922 split(mac1, mac2, "(") #)
8923 macro = mac2[1]
8924 prefix = substr(line, 1, index(line, defundef) - 1)
8925 if (D_is_set[macro]) {
8926 # Preserve the white space surrounding the "#".
8927 print prefix "define", macro P[macro] D[macro]
8928 next
8929 } else {
8930 # Replace #undef with comments. This is necessary, for example,
8931 # in the case of _POSIX_SOURCE, which is predefined and required
8932 # on some systems where configure will not decide to define it.
8933 if (defundef == "undef") {
8934 print "/*", prefix defundef, macro, "*/"
8935 next
8936 }
8937 }
8938}
8939{ print }
8940_ACAWK
The Android Open Source Project2949f582009-03-03 19:30:46 -08008941_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08008942cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
8943 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
8944fi # test -n "$CONFIG_HEADERS"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008945
8946
JP Abgrall53f17a92014-02-12 14:02:41 -08008947eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
8948shift
8949for ac_tag
The Android Open Source Project2949f582009-03-03 19:30:46 -08008950do
8951 case $ac_tag in
8952 :[FHLC]) ac_mode=$ac_tag; continue;;
8953 esac
8954 case $ac_mode$ac_tag in
8955 :[FHL]*:*);;
JP Abgrall53f17a92014-02-12 14:02:41 -08008956 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008957 :[FH]-) ac_tag=-:-;;
8958 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
8959 esac
8960 ac_save_IFS=$IFS
8961 IFS=:
8962 set x $ac_tag
8963 IFS=$ac_save_IFS
8964 shift
8965 ac_file=$1
8966 shift
8967
8968 case $ac_mode in
8969 :L) ac_source=$1;;
8970 :[FH])
8971 ac_file_inputs=
8972 for ac_f
8973 do
8974 case $ac_f in
JP Abgrall53f17a92014-02-12 14:02:41 -08008975 -) ac_f="$ac_tmp/stdin";;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008976 *) # Look for the file first in the build tree, then in the source tree
8977 # (if the path is not absolute). The absolute path cannot be DOS-style,
8978 # because $ac_f cannot contain `:'.
8979 test -f "$ac_f" ||
8980 case $ac_f in
8981 [\\/$]*) false;;
8982 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
8983 esac ||
JP Abgrall53f17a92014-02-12 14:02:41 -08008984 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08008985 esac
JP Abgrall53f17a92014-02-12 14:02:41 -08008986 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
8987 as_fn_append ac_file_inputs " '$ac_f'"
The Android Open Source Project2949f582009-03-03 19:30:46 -08008988 done
8989
8990 # Let's still pretend it is `configure' which instantiates (i.e., don't
8991 # use $as_me), people would be surprised to read:
8992 # /* config.h. Generated by config.status. */
JP Abgrall53f17a92014-02-12 14:02:41 -08008993 configure_input='Generated from '`
8994 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
8995 `' by configure.'
The Android Open Source Project2949f582009-03-03 19:30:46 -08008996 if test x"$ac_file" != x-; then
8997 configure_input="$ac_file. $configure_input"
JP Abgrall53f17a92014-02-12 14:02:41 -08008998 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
8999$as_echo "$as_me: creating $ac_file" >&6;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08009000 fi
JP Abgrall53f17a92014-02-12 14:02:41 -08009001 # Neutralize special characters interpreted by sed in replacement strings.
9002 case $configure_input in #(
9003 *\&* | *\|* | *\\* )
9004 ac_sed_conf_input=`$as_echo "$configure_input" |
9005 sed 's/[\\\\&|]/\\\\&/g'`;; #(
9006 *) ac_sed_conf_input=$configure_input;;
9007 esac
The Android Open Source Project2949f582009-03-03 19:30:46 -08009008
9009 case $ac_tag in
JP Abgrall53f17a92014-02-12 14:02:41 -08009010 *:-:* | *:-) cat >"$ac_tmp/stdin" \
9011 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08009012 esac
9013 ;;
9014 esac
9015
9016 ac_dir=`$as_dirname -- "$ac_file" ||
9017$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9018 X"$ac_file" : 'X\(//\)[^/]' \| \
9019 X"$ac_file" : 'X\(//\)$' \| \
9020 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall53f17a92014-02-12 14:02:41 -08009021$as_echo X"$ac_file" |
The Android Open Source Project2949f582009-03-03 19:30:46 -08009022 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9023 s//\1/
9024 q
9025 }
9026 /^X\(\/\/\)[^/].*/{
9027 s//\1/
9028 q
9029 }
9030 /^X\(\/\/\)$/{
9031 s//\1/
9032 q
9033 }
9034 /^X\(\/\).*/{
9035 s//\1/
9036 q
9037 }
9038 s/.*/./; q'`
JP Abgrall53f17a92014-02-12 14:02:41 -08009039 as_dir="$ac_dir"; as_fn_mkdir_p
The Android Open Source Project2949f582009-03-03 19:30:46 -08009040 ac_builddir=.
9041
9042case "$ac_dir" in
9043.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
9044*)
JP Abgrall53f17a92014-02-12 14:02:41 -08009045 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
The Android Open Source Project2949f582009-03-03 19:30:46 -08009046 # A ".." for each directory in $ac_dir_suffix.
JP Abgrall53f17a92014-02-12 14:02:41 -08009047 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
The Android Open Source Project2949f582009-03-03 19:30:46 -08009048 case $ac_top_builddir_sub in
9049 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
9050 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
9051 esac ;;
9052esac
9053ac_abs_top_builddir=$ac_pwd
9054ac_abs_builddir=$ac_pwd$ac_dir_suffix
9055# for backward compatibility:
9056ac_top_builddir=$ac_top_build_prefix
9057
9058case $srcdir in
9059 .) # We are building in place.
9060 ac_srcdir=.
9061 ac_top_srcdir=$ac_top_builddir_sub
9062 ac_abs_top_srcdir=$ac_pwd ;;
9063 [\\/]* | ?:[\\/]* ) # Absolute name.
9064 ac_srcdir=$srcdir$ac_dir_suffix;
9065 ac_top_srcdir=$srcdir
9066 ac_abs_top_srcdir=$srcdir ;;
9067 *) # Relative name.
9068 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
9069 ac_top_srcdir=$ac_top_build_prefix$srcdir
9070 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
9071esac
9072ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
9073
9074
9075 case $ac_mode in
9076 :F)
9077 #
9078 # CONFIG_FILE
9079 #
9080
9081 case $INSTALL in
9082 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
9083 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
9084 esac
9085_ACEOF
9086
JP Abgrall53f17a92014-02-12 14:02:41 -08009087cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08009088# If the template does not know about datarootdir, expand it.
9089# FIXME: This hack should be removed a few years after 2.60.
9090ac_datarootdir_hack=; ac_datarootdir_seen=
JP Abgrall53f17a92014-02-12 14:02:41 -08009091ac_sed_dataroot='
9092/datarootdir/ {
The Android Open Source Project2949f582009-03-03 19:30:46 -08009093 p
9094 q
9095}
9096/@datadir@/p
9097/@docdir@/p
9098/@infodir@/p
9099/@localedir@/p
JP Abgrall53f17a92014-02-12 14:02:41 -08009100/@mandir@/p'
9101case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
The Android Open Source Project2949f582009-03-03 19:30:46 -08009102*datarootdir*) ac_datarootdir_seen=yes;;
9103*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
JP Abgrall53f17a92014-02-12 14:02:41 -08009104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
9105$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08009106_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08009107cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08009108 ac_datarootdir_hack='
9109 s&@datadir@&$datadir&g
9110 s&@docdir@&$docdir&g
9111 s&@infodir@&$infodir&g
9112 s&@localedir@&$localedir&g
9113 s&@mandir@&$mandir&g
JP Abgrall53f17a92014-02-12 14:02:41 -08009114 s&\\\${datarootdir}&$datarootdir&g' ;;
The Android Open Source Project2949f582009-03-03 19:30:46 -08009115esac
9116_ACEOF
9117
9118# Neutralize VPATH when `$srcdir' = `.'.
9119# Shell code in configure.ac might set extrasub.
9120# FIXME: do we really want to maintain this feature?
JP Abgrall53f17a92014-02-12 14:02:41 -08009121cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9122ac_sed_extra="$ac_vpsub
The Android Open Source Project2949f582009-03-03 19:30:46 -08009123$extrasub
9124_ACEOF
JP Abgrall53f17a92014-02-12 14:02:41 -08009125cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project2949f582009-03-03 19:30:46 -08009126:t
9127/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
JP Abgrall53f17a92014-02-12 14:02:41 -08009128s|@configure_input@|$ac_sed_conf_input|;t t
The Android Open Source Project2949f582009-03-03 19:30:46 -08009129s&@top_builddir@&$ac_top_builddir_sub&;t t
JP Abgrall53f17a92014-02-12 14:02:41 -08009130s&@top_build_prefix@&$ac_top_build_prefix&;t t
The Android Open Source Project2949f582009-03-03 19:30:46 -08009131s&@srcdir@&$ac_srcdir&;t t
9132s&@abs_srcdir@&$ac_abs_srcdir&;t t
9133s&@top_srcdir@&$ac_top_srcdir&;t t
9134s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
9135s&@builddir@&$ac_builddir&;t t
9136s&@abs_builddir@&$ac_abs_builddir&;t t
9137s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
9138s&@INSTALL@&$ac_INSTALL&;t t
9139$ac_datarootdir_hack
JP Abgrall53f17a92014-02-12 14:02:41 -08009140"
9141eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
9142 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08009143
9144test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
JP Abgrall53f17a92014-02-12 14:02:41 -08009145 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
9146 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
9147 "$ac_tmp/out"`; test -z "$ac_out"; } &&
9148 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9149which seems to be undefined. Please make sure it is defined" >&5
9150$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
9151which seems to be undefined. Please make sure it is defined" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08009152
JP Abgrall53f17a92014-02-12 14:02:41 -08009153 rm -f "$ac_tmp/stdin"
The Android Open Source Project2949f582009-03-03 19:30:46 -08009154 case $ac_file in
JP Abgrall53f17a92014-02-12 14:02:41 -08009155 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
9156 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
9157 esac \
9158 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08009159 ;;
9160 :H)
9161 #
9162 # CONFIG_HEADER
9163 #
The Android Open Source Project2949f582009-03-03 19:30:46 -08009164 if test x"$ac_file" != x-; then
JP Abgrall53f17a92014-02-12 14:02:41 -08009165 {
9166 $as_echo "/* $configure_input */" \
9167 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
9168 } >"$ac_tmp/config.h" \
9169 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
9170 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
9171 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
9172$as_echo "$as_me: $ac_file is unchanged" >&6;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08009173 else
JP Abgrall53f17a92014-02-12 14:02:41 -08009174 rm -f "$ac_file"
9175 mv "$ac_tmp/config.h" "$ac_file" \
9176 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08009177 fi
9178 else
JP Abgrall53f17a92014-02-12 14:02:41 -08009179 $as_echo "/* $configure_input */" \
9180 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
9181 || as_fn_error $? "could not create -" "$LINENO" 5
The Android Open Source Project2949f582009-03-03 19:30:46 -08009182 fi
The Android Open Source Project2949f582009-03-03 19:30:46 -08009183 ;;
9184
JP Abgrall53f17a92014-02-12 14:02:41 -08009185 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
9186$as_echo "$as_me: executing $ac_file commands" >&6;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08009187 ;;
9188 esac
9189
9190
9191 case $ac_file$ac_mode in
9192 "default-1":C) if test -f .devel; then
9193 echo timestamp > stamp-h
Elliott Hughes820eced2021-08-20 18:00:50 -07009194 cat $srcdir/Makefile-devel-adds >> Makefile
The Android Open Source Project2949f582009-03-03 19:30:46 -08009195 make depend
9196fi ;;
9197
9198 esac
9199done # for ac_tag
9200
9201
JP Abgrall53f17a92014-02-12 14:02:41 -08009202as_fn_exit 0
The Android Open Source Project2949f582009-03-03 19:30:46 -08009203_ACEOF
The Android Open Source Project2949f582009-03-03 19:30:46 -08009204ac_clean_files=$ac_clean_files_save
9205
JP Abgrall53f17a92014-02-12 14:02:41 -08009206test $ac_write_fail = 0 ||
9207 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
9208
The Android Open Source Project2949f582009-03-03 19:30:46 -08009209
9210# configure is writing to config.log, and then calls config.status.
9211# config.status does its own redirection, appending to config.log.
9212# Unfortunately, on DOS this fails, as config.log is still kept open
9213# by configure, so config.status won't be able to write to it; its
9214# output is simply discarded. So we exec the FD to /dev/null,
9215# effectively closing config.log, so it can be properly (re)opened and
9216# appended to by config.status. When coming back to configure, we
9217# need to make the FD available again.
9218if test "$no_create" != yes; then
9219 ac_cs_success=:
9220 ac_config_status_args=
9221 test "$silent" = yes &&
9222 ac_config_status_args="$ac_config_status_args --quiet"
9223 exec 5>/dev/null
9224 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
9225 exec 5>>config.log
9226 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
9227 # would make configure fail if this is the last instruction.
JP Abgrall53f17a92014-02-12 14:02:41 -08009228 $ac_cs_success || as_fn_exit 1
9229fi
9230if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
9231 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
9232$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
The Android Open Source Project2949f582009-03-03 19:30:46 -08009233fi
9234
9235exit 0