blob: 9a8c1588f4c6eff15fe8c9a0dc3c4d7dcd7d65dd [file] [log] [blame]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001#! /bin/sh
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002# Guess values for system-dependent variables and create Makefiles.
Haibo Huang165065a2018-07-23 17:26:52 -07003# Generated by GNU Autoconf 2.69 for pcap 1.9.0-PRE-GIT.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004#
JP Abgrall511eca32014-02-12 13:46:45 -08005#
6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
7#
8#
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
JP Abgrall511eca32014-02-12 13:46:45 -080011## -------------------- ##
12## M4sh Initialization. ##
13## -------------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080014
15# Be more Bourne compatible
16DUALCASE=1; export DUALCASE # for MKS sh
JP Abgrall511eca32014-02-12 13:46:45 -080017if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080018 emulate sh
19 NULLCMD=:
JP Abgrall511eca32014-02-12 13:46:45 -080020 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080021 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24else
JP Abgrall511eca32014-02-12 13:46:45 -080025 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
29 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080030esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080031fi
32
33
JP Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -080071
72# The user is always right.
73if test "${PATH_SEPARATOR+set}" != set; then
JP Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -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 Project478ab6c2009-03-03 19:30:05 -080087IFS=" "" $as_nl"
88
89# Find who we are. Look in the path if we contain no directory separator.
JP Abgrall511eca32014-02-12 13:46:45 -080090as_myself=
91case $0 in #((
The Android Open Source Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -080098 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -0800110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800112fi
113
JP Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -0800121done
122PS1='$ '
123PS2='> '
124PS4='+ '
125
126# NLS nuisances.
JP Abgrall511eca32014-02-12 13:46:45 -0800127LC_ALL=C
128export LC_ALL
129LANGUAGE=C
130export LANGUAGE
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800131
JP Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -0800437
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800438as_me=`$as_basename -- "$0" ||
439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall511eca32014-02-12 13:46:45 -0800442$as_echo X/"$0" |
The Android Open Source Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -0800463
464
JP Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -0800487
JP Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -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 Project478ab6c2009-03-03 19:30:05 -0800500ECHO_C= ECHO_N= ECHO_T=
JP Abgrall511eca32014-02-12 13:46:45 -0800501case `echo -n x` in #(((((
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800502-n*)
JP Abgrall511eca32014-02-12 13:46:45 -0800503 case `echo 'xy\c'` in
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800504 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
JP Abgrall511eca32014-02-12 13:46:45 -0800505 xy) ECHO_C='\c';;
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
507 ECHO_T=' ';;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800508 esac;;
509*)
510 ECHO_N='-n';;
511esac
512
The Android Open Source Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -0800518 mkdir conf$$.dir 2>/dev/null
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800519fi
JP Abgrall511eca32014-02-12 13:46:45 -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 Project478ab6c2009-03-03 19:30:05 -0800534else
JP Abgrall511eca32014-02-12 13:46:45 -0800535 as_ln_s='cp -pR'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -0800541 as_mkdir_p='mkdir -p "$as_dir"'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800542else
543 test -d ./-p && rmdir ./-p
544 as_mkdir_p=false
545fi
546
JP Abgrall511eca32014-02-12 13:46:45 -0800547as_test_x='test -x'
548as_executable_p=as_fn_executable_p
The Android Open Source Project478ab6c2009-03-03 19:30:05 -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 Abgrall511eca32014-02-12 13:46:45 -0800557test -n "$DJDIR" || exec 7<&0 </dev/null
558exec 6>&1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800559
560# Name of the host.
JP Abgrall511eca32014-02-12 13:46:45 -0800561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
The Android Open Source Project478ab6c2009-03-03 19:30:05 -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 Project478ab6c2009-03-03 19:30:05 -0800576
577# Identity of this package.
Haibo Huang165065a2018-07-23 17:26:52 -0700578PACKAGE_NAME='pcap'
579PACKAGE_TARNAME='pcap'
580PACKAGE_VERSION='1.9.0-PRE-GIT'
581PACKAGE_STRING='pcap 1.9.0-PRE-GIT'
582PACKAGE_BUGREPORT=''
583PACKAGE_URL=''
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800584
585ac_unique_file="pcap.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 Abgrall511eca32014-02-12 13:46:45 -0800622ac_subst_vars='LTLIBOBJS
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800623INSTALL_DATA
JP Abgrall511eca32014-02-12 13:46:45 -0800624INSTALL_SCRIPT
625INSTALL_PROGRAM
Haibo Huang165065a2018-07-23 17:26:52 -0700626RDMA_SRC
627PCAP_SUPPORT_RDMASNIFF
JP Abgrall511eca32014-02-12 13:46:45 -0800628DBUS_SRC
629PCAP_SUPPORT_DBUS
630PKGCONFIG
Elliott Hughesd8845d72015-10-19 18:07:04 -0700631BT_MONITOR_SRC
JP Abgrall511eca32014-02-12 13:46:45 -0800632BT_SRC
633PCAP_SUPPORT_BT
Haibo Huang165065a2018-07-23 17:26:52 -0700634NETMAP_SRC
635PCAP_SUPPORT_NETMAP
JP Abgrall511eca32014-02-12 13:46:45 -0800636NETFILTER_SRC
637PCAP_SUPPORT_NETFILTER
638USB_SRC
639PCAP_SUPPORT_USB
Haibo Huang165065a2018-07-23 17:26:52 -0700640EXTRA_NETWORK_LIBS
641RPCAPD_LIBS
642INSTALL_RPCAPD
643BUILD_RPCAPD
644PTHREAD_LIBS
645MAN_ADMIN_COMMANDS
JP Abgrall511eca32014-02-12 13:46:45 -0800646MAN_MISC_INFO
647MAN_FILE_FORMATS
648DYEXT
649SSRC
650ADDLARCHIVEOBJS
651ADDLOBJS
Elliott Hughes965a4b52017-05-15 10:37:39 -0700652V_YACC
JP Abgrall511eca32014-02-12 13:46:45 -0800653V_RPATH_OPT
654V_SONAME_OPT
655V_SHLIB_OPT
656V_SHLIB_CMD
Haibo Huang165065a2018-07-23 17:26:52 -0700657V_SHLIB_CCOPT
JP Abgrall511eca32014-02-12 13:46:45 -0800658V_PCAP
Elliott Hughes965a4b52017-05-15 10:37:39 -0700659V_LEX
JP Abgrall511eca32014-02-12 13:46:45 -0800660V_INCLS
661V_FINDALLDEVS
662V_DEFS
663V_CCOPT
664MKDEP
665DEPENDENCY_CFLAG
666LN_S
667AR
668RANLIB
Elliott Hughes965a4b52017-05-15 10:37:39 -0700669YFLAGS
670YACC
671LEXLIB
672LEX_OUTPUT_ROOT
673LEX
Haibo Huang165065a2018-07-23 17:26:52 -0700674PCAP_SUPPORT_PACKET_RING
675VALGRINDTEST_SRC
JP Abgrall511eca32014-02-12 13:46:45 -0800676LIBOBJS
677EGREP
678GREP
679CPP
680OBJEXT
681EXEEXT
682ac_ct_CC
683CPPFLAGS
684LDFLAGS
685CFLAGS
686CC
687SHLICC2
688target_os
689target_vendor
690target_cpu
691target
692host_os
693host_vendor
694host_cpu
695host
696build_os
697build_vendor
698build_cpu
699build
700target_alias
701host_alias
702build_alias
703LIBS
704ECHO_T
705ECHO_N
706ECHO_C
707DEFS
708mandir
709localedir
710libdir
711psdir
712pdfdir
713dvidir
714htmldir
715infodir
716docdir
717oldincludedir
718includedir
719localstatedir
720sharedstatedir
721sysconfdir
722datadir
723datarootdir
724libexecdir
725sbindir
726bindir
727program_transform_name
728prefix
729exec_prefix
730PACKAGE_URL
731PACKAGE_BUGREPORT
732PACKAGE_STRING
733PACKAGE_VERSION
734PACKAGE_TARNAME
735PACKAGE_NAME
736PATH_SEPARATOR
737SHELL'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800738ac_subst_files=''
JP Abgrall511eca32014-02-12 13:46:45 -0800739ac_user_opts='
740enable_option_checking
741with_gcc
742enable_largefile
743enable_protochain
744with_sita
745with_pcap
746with_libnl
Haibo Huang165065a2018-07-23 17:26:52 -0700747enable_packet_ring
JP Abgrall511eca32014-02-12 13:46:45 -0800748enable_ipv6
JP Abgrall511eca32014-02-12 13:46:45 -0800749with_dag
750with_dag_includes
751with_dag_libraries
752with_septel
753with_snf
754with_snf_includes
755with_snf_libraries
Elliott Hughes965a4b52017-05-15 10:37:39 -0700756with_turbocap
Haibo Huang165065a2018-07-23 17:26:52 -0700757enable_remote
758enable_optimizer_dbg
759enable_yydebug
JP Abgrall511eca32014-02-12 13:46:45 -0800760enable_universal
761enable_shared
Elliott Hughesd8845d72015-10-19 18:07:04 -0700762enable_usb
Haibo Huang165065a2018-07-23 17:26:52 -0700763enable_netmap
JP Abgrall511eca32014-02-12 13:46:45 -0800764enable_bluetooth
JP Abgrall511eca32014-02-12 13:46:45 -0800765enable_dbus
Haibo Huang165065a2018-07-23 17:26:52 -0700766enable_rdma
JP Abgrall511eca32014-02-12 13:46:45 -0800767'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800768 ac_precious_vars='build_alias
769host_alias
770target_alias
771CC
772CFLAGS
773LDFLAGS
774LIBS
775CPPFLAGS
Elliott Hughes965a4b52017-05-15 10:37:39 -0700776CPP
777YACC
778YFLAGS'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800779
780
781# Initialize some variables set by options.
782ac_init_help=
783ac_init_version=false
JP Abgrall511eca32014-02-12 13:46:45 -0800784ac_unrecognized_opts=
785ac_unrecognized_sep=
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800786# The variables have the same names as the options, with
787# dashes changed to underlines.
788cache_file=/dev/null
789exec_prefix=NONE
790no_create=
791no_recursion=
792prefix=NONE
793program_prefix=NONE
794program_suffix=NONE
795program_transform_name=s,x,x,
796silent=
797site=
798srcdir=
799verbose=
800x_includes=NONE
801x_libraries=NONE
802
803# Installation directory options.
804# These are left unexpanded so users can "make install exec_prefix=/foo"
805# and all the variables that are supposed to be based on exec_prefix
806# by default will actually change.
807# Use braces instead of parens because sh, perl, etc. also accept them.
808# (The list follows the same order as the GNU Coding Standards.)
809bindir='${exec_prefix}/bin'
810sbindir='${exec_prefix}/sbin'
811libexecdir='${exec_prefix}/libexec'
812datarootdir='${prefix}/share'
813datadir='${datarootdir}'
814sysconfdir='${prefix}/etc'
815sharedstatedir='${prefix}/com'
816localstatedir='${prefix}/var'
817includedir='${prefix}/include'
818oldincludedir='/usr/include'
Haibo Huang165065a2018-07-23 17:26:52 -0700819docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800820infodir='${datarootdir}/info'
821htmldir='${docdir}'
822dvidir='${docdir}'
823pdfdir='${docdir}'
824psdir='${docdir}'
825libdir='${exec_prefix}/lib'
826localedir='${datarootdir}/locale'
827mandir='${datarootdir}/man'
828
829ac_prev=
830ac_dashdash=
831for ac_option
832do
833 # If the previous option needs an argument, assign it.
834 if test -n "$ac_prev"; then
835 eval $ac_prev=\$ac_option
836 ac_prev=
837 continue
838 fi
839
840 case $ac_option in
JP Abgrall511eca32014-02-12 13:46:45 -0800841 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
842 *=) ac_optarg= ;;
843 *) ac_optarg=yes ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800844 esac
845
846 # Accept the important Cygnus configure options, so we can diagnose typos.
847
848 case $ac_dashdash$ac_option in
849 --)
850 ac_dashdash=yes ;;
851
852 -bindir | --bindir | --bindi | --bind | --bin | --bi)
853 ac_prev=bindir ;;
854 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
855 bindir=$ac_optarg ;;
856
857 -build | --build | --buil | --bui | --bu)
858 ac_prev=build_alias ;;
859 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
860 build_alias=$ac_optarg ;;
861
862 -cache-file | --cache-file | --cache-fil | --cache-fi \
863 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
864 ac_prev=cache_file ;;
865 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
866 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
867 cache_file=$ac_optarg ;;
868
869 --config-cache | -C)
870 cache_file=config.cache ;;
871
872 -datadir | --datadir | --datadi | --datad)
873 ac_prev=datadir ;;
874 -datadir=* | --datadir=* | --datadi=* | --datad=*)
875 datadir=$ac_optarg ;;
876
877 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
878 | --dataroo | --dataro | --datar)
879 ac_prev=datarootdir ;;
880 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
881 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
882 datarootdir=$ac_optarg ;;
883
884 -disable-* | --disable-*)
JP Abgrall511eca32014-02-12 13:46:45 -0800885 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800886 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -0800887 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
888 as_fn_error $? "invalid feature name: $ac_useropt"
889 ac_useropt_orig=$ac_useropt
890 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
891 case $ac_user_opts in
892 *"
893"enable_$ac_useropt"
894"*) ;;
895 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
896 ac_unrecognized_sep=', ';;
897 esac
898 eval enable_$ac_useropt=no ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800899
900 -docdir | --docdir | --docdi | --doc | --do)
901 ac_prev=docdir ;;
902 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
903 docdir=$ac_optarg ;;
904
905 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
906 ac_prev=dvidir ;;
907 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
908 dvidir=$ac_optarg ;;
909
910 -enable-* | --enable-*)
JP Abgrall511eca32014-02-12 13:46:45 -0800911 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800912 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -0800913 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
914 as_fn_error $? "invalid feature name: $ac_useropt"
915 ac_useropt_orig=$ac_useropt
916 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
917 case $ac_user_opts in
918 *"
919"enable_$ac_useropt"
920"*) ;;
921 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
922 ac_unrecognized_sep=', ';;
923 esac
924 eval enable_$ac_useropt=\$ac_optarg ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800925
926 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
927 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
928 | --exec | --exe | --ex)
929 ac_prev=exec_prefix ;;
930 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
931 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
932 | --exec=* | --exe=* | --ex=*)
933 exec_prefix=$ac_optarg ;;
934
935 -gas | --gas | --ga | --g)
936 # Obsolete; use --with-gas.
937 with_gas=yes ;;
938
939 -help | --help | --hel | --he | -h)
940 ac_init_help=long ;;
941 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
942 ac_init_help=recursive ;;
943 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
944 ac_init_help=short ;;
945
946 -host | --host | --hos | --ho)
947 ac_prev=host_alias ;;
948 -host=* | --host=* | --hos=* | --ho=*)
949 host_alias=$ac_optarg ;;
950
951 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
952 ac_prev=htmldir ;;
953 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
954 | --ht=*)
955 htmldir=$ac_optarg ;;
956
957 -includedir | --includedir | --includedi | --included | --include \
958 | --includ | --inclu | --incl | --inc)
959 ac_prev=includedir ;;
960 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
961 | --includ=* | --inclu=* | --incl=* | --inc=*)
962 includedir=$ac_optarg ;;
963
964 -infodir | --infodir | --infodi | --infod | --info | --inf)
965 ac_prev=infodir ;;
966 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
967 infodir=$ac_optarg ;;
968
969 -libdir | --libdir | --libdi | --libd)
970 ac_prev=libdir ;;
971 -libdir=* | --libdir=* | --libdi=* | --libd=*)
972 libdir=$ac_optarg ;;
973
974 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
975 | --libexe | --libex | --libe)
976 ac_prev=libexecdir ;;
977 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
978 | --libexe=* | --libex=* | --libe=*)
979 libexecdir=$ac_optarg ;;
980
981 -localedir | --localedir | --localedi | --localed | --locale)
982 ac_prev=localedir ;;
983 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
984 localedir=$ac_optarg ;;
985
986 -localstatedir | --localstatedir | --localstatedi | --localstated \
987 | --localstate | --localstat | --localsta | --localst | --locals)
988 ac_prev=localstatedir ;;
989 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
990 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
991 localstatedir=$ac_optarg ;;
992
993 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
994 ac_prev=mandir ;;
995 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
996 mandir=$ac_optarg ;;
997
998 -nfp | --nfp | --nf)
999 # Obsolete; use --without-fp.
1000 with_fp=no ;;
1001
1002 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1003 | --no-cr | --no-c | -n)
1004 no_create=yes ;;
1005
1006 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1007 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1008 no_recursion=yes ;;
1009
1010 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1011 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1012 | --oldin | --oldi | --old | --ol | --o)
1013 ac_prev=oldincludedir ;;
1014 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1015 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1016 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1017 oldincludedir=$ac_optarg ;;
1018
1019 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1020 ac_prev=prefix ;;
1021 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1022 prefix=$ac_optarg ;;
1023
1024 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1025 | --program-pre | --program-pr | --program-p)
1026 ac_prev=program_prefix ;;
1027 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1028 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1029 program_prefix=$ac_optarg ;;
1030
1031 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1032 | --program-suf | --program-su | --program-s)
1033 ac_prev=program_suffix ;;
1034 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1035 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1036 program_suffix=$ac_optarg ;;
1037
1038 -program-transform-name | --program-transform-name \
1039 | --program-transform-nam | --program-transform-na \
1040 | --program-transform-n | --program-transform- \
1041 | --program-transform | --program-transfor \
1042 | --program-transfo | --program-transf \
1043 | --program-trans | --program-tran \
1044 | --progr-tra | --program-tr | --program-t)
1045 ac_prev=program_transform_name ;;
1046 -program-transform-name=* | --program-transform-name=* \
1047 | --program-transform-nam=* | --program-transform-na=* \
1048 | --program-transform-n=* | --program-transform-=* \
1049 | --program-transform=* | --program-transfor=* \
1050 | --program-transfo=* | --program-transf=* \
1051 | --program-trans=* | --program-tran=* \
1052 | --progr-tra=* | --program-tr=* | --program-t=*)
1053 program_transform_name=$ac_optarg ;;
1054
1055 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1056 ac_prev=pdfdir ;;
1057 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1058 pdfdir=$ac_optarg ;;
1059
1060 -psdir | --psdir | --psdi | --psd | --ps)
1061 ac_prev=psdir ;;
1062 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1063 psdir=$ac_optarg ;;
1064
1065 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1066 | -silent | --silent | --silen | --sile | --sil)
1067 silent=yes ;;
1068
1069 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1070 ac_prev=sbindir ;;
1071 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1072 | --sbi=* | --sb=*)
1073 sbindir=$ac_optarg ;;
1074
1075 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1076 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1077 | --sharedst | --shareds | --shared | --share | --shar \
1078 | --sha | --sh)
1079 ac_prev=sharedstatedir ;;
1080 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1081 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1082 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1083 | --sha=* | --sh=*)
1084 sharedstatedir=$ac_optarg ;;
1085
1086 -site | --site | --sit)
1087 ac_prev=site ;;
1088 -site=* | --site=* | --sit=*)
1089 site=$ac_optarg ;;
1090
1091 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1092 ac_prev=srcdir ;;
1093 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1094 srcdir=$ac_optarg ;;
1095
1096 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1097 | --syscon | --sysco | --sysc | --sys | --sy)
1098 ac_prev=sysconfdir ;;
1099 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1100 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1101 sysconfdir=$ac_optarg ;;
1102
1103 -target | --target | --targe | --targ | --tar | --ta | --t)
1104 ac_prev=target_alias ;;
1105 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1106 target_alias=$ac_optarg ;;
1107
1108 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1109 verbose=yes ;;
1110
1111 -version | --version | --versio | --versi | --vers | -V)
1112 ac_init_version=: ;;
1113
1114 -with-* | --with-*)
JP Abgrall511eca32014-02-12 13:46:45 -08001115 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001116 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -08001117 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1118 as_fn_error $? "invalid package name: $ac_useropt"
1119 ac_useropt_orig=$ac_useropt
1120 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1121 case $ac_user_opts in
1122 *"
1123"with_$ac_useropt"
1124"*) ;;
1125 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1126 ac_unrecognized_sep=', ';;
1127 esac
1128 eval with_$ac_useropt=\$ac_optarg ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001129
1130 -without-* | --without-*)
JP Abgrall511eca32014-02-12 13:46:45 -08001131 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001132 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -08001133 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1134 as_fn_error $? "invalid package name: $ac_useropt"
1135 ac_useropt_orig=$ac_useropt
1136 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1137 case $ac_user_opts in
1138 *"
1139"with_$ac_useropt"
1140"*) ;;
1141 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1142 ac_unrecognized_sep=', ';;
1143 esac
1144 eval with_$ac_useropt=no ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001145
1146 --x)
1147 # Obsolete; use --with-x.
1148 with_x=yes ;;
1149
1150 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1151 | --x-incl | --x-inc | --x-in | --x-i)
1152 ac_prev=x_includes ;;
1153 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1154 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1155 x_includes=$ac_optarg ;;
1156
1157 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1158 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1159 ac_prev=x_libraries ;;
1160 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1161 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1162 x_libraries=$ac_optarg ;;
1163
JP Abgrall511eca32014-02-12 13:46:45 -08001164 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1165Try \`$0 --help' for more information"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001166 ;;
1167
1168 *=*)
1169 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1170 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -08001171 case $ac_envvar in #(
1172 '' | [0-9]* | *[!_$as_cr_alnum]* )
1173 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1174 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001175 eval $ac_envvar=\$ac_optarg
1176 export $ac_envvar ;;
1177
1178 *)
1179 # FIXME: should be removed in autoconf 3.0.
JP Abgrall511eca32014-02-12 13:46:45 -08001180 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001181 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
JP Abgrall511eca32014-02-12 13:46:45 -08001182 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1183 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001184 ;;
1185
1186 esac
1187done
1188
1189if test -n "$ac_prev"; then
1190 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
JP Abgrall511eca32014-02-12 13:46:45 -08001191 as_fn_error $? "missing argument to $ac_option"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001192fi
1193
JP Abgrall511eca32014-02-12 13:46:45 -08001194if test -n "$ac_unrecognized_opts"; then
1195 case $enable_option_checking in
1196 no) ;;
1197 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1198 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1199 esac
1200fi
1201
1202# Check all directory arguments for consistency.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001203for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1204 datadir sysconfdir sharedstatedir localstatedir includedir \
1205 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1206 libdir localedir mandir
1207do
1208 eval ac_val=\$$ac_var
JP Abgrall511eca32014-02-12 13:46:45 -08001209 # Remove trailing slashes.
1210 case $ac_val in
1211 */ )
1212 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1213 eval $ac_var=\$ac_val;;
1214 esac
1215 # Be sure to have absolute directory names.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001216 case $ac_val in
1217 [\\/$]* | ?:[\\/]* ) continue;;
1218 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1219 esac
JP Abgrall511eca32014-02-12 13:46:45 -08001220 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001221done
1222
1223# There might be people who depend on the old broken behavior: `$host'
1224# used to hold the argument of --host etc.
1225# FIXME: To remove some day.
1226build=$build_alias
1227host=$host_alias
1228target=$target_alias
1229
1230# FIXME: To remove some day.
1231if test "x$host_alias" != x; then
1232 if test "x$build_alias" = x; then
1233 cross_compiling=maybe
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001234 elif test "x$build_alias" != "x$host_alias"; then
1235 cross_compiling=yes
1236 fi
1237fi
1238
1239ac_tool_prefix=
1240test -n "$host_alias" && ac_tool_prefix=$host_alias-
1241
1242test "$silent" = yes && exec 6>/dev/null
1243
1244
1245ac_pwd=`pwd` && test -n "$ac_pwd" &&
1246ac_ls_di=`ls -di .` &&
1247ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
JP Abgrall511eca32014-02-12 13:46:45 -08001248 as_fn_error $? "working directory cannot be determined"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001249test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
JP Abgrall511eca32014-02-12 13:46:45 -08001250 as_fn_error $? "pwd does not report name of working directory"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001251
1252
1253# Find the source files, if location was not specified.
1254if test -z "$srcdir"; then
1255 ac_srcdir_defaulted=yes
1256 # Try the directory containing this script, then the parent directory.
JP Abgrall511eca32014-02-12 13:46:45 -08001257 ac_confdir=`$as_dirname -- "$as_myself" ||
1258$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1259 X"$as_myself" : 'X\(//\)[^/]' \| \
1260 X"$as_myself" : 'X\(//\)$' \| \
1261 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1262$as_echo X"$as_myself" |
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001263 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1264 s//\1/
1265 q
1266 }
1267 /^X\(\/\/\)[^/].*/{
1268 s//\1/
1269 q
1270 }
1271 /^X\(\/\/\)$/{
1272 s//\1/
1273 q
1274 }
1275 /^X\(\/\).*/{
1276 s//\1/
1277 q
1278 }
1279 s/.*/./; q'`
1280 srcdir=$ac_confdir
1281 if test ! -r "$srcdir/$ac_unique_file"; then
1282 srcdir=..
1283 fi
1284else
1285 ac_srcdir_defaulted=no
1286fi
1287if test ! -r "$srcdir/$ac_unique_file"; then
1288 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
JP Abgrall511eca32014-02-12 13:46:45 -08001289 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001290fi
1291ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1292ac_abs_confdir=`(
JP Abgrall511eca32014-02-12 13:46:45 -08001293 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001294 pwd)`
1295# When building in place, set srcdir=.
1296if test "$ac_abs_confdir" = "$ac_pwd"; then
1297 srcdir=.
1298fi
1299# Remove unnecessary trailing slashes from srcdir.
1300# Double slashes in file names in object file debugging info
1301# mess up M-x gdb in Emacs.
1302case $srcdir in
1303*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1304esac
1305for ac_var in $ac_precious_vars; do
1306 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1307 eval ac_env_${ac_var}_value=\$${ac_var}
1308 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1309 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1310done
1311
1312#
1313# Report the --help message.
1314#
1315if test "$ac_init_help" = "long"; then
1316 # Omit some internal or obsolete options to make the list less imposing.
1317 # This message is too long to be a string in the A/UX 3.1 sh.
1318 cat <<_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07001319\`configure' configures pcap 1.9.0-PRE-GIT to adapt to many kinds of systems.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001320
1321Usage: $0 [OPTION]... [VAR=VALUE]...
1322
1323To assign environment variables (e.g., CC, CFLAGS...), specify them as
1324VAR=VALUE. See below for descriptions of some of the useful variables.
1325
1326Defaults for the options are specified in brackets.
1327
1328Configuration:
1329 -h, --help display this help and exit
1330 --help=short display options specific to this package
1331 --help=recursive display the short help of all the included packages
1332 -V, --version display version information and exit
JP Abgrall511eca32014-02-12 13:46:45 -08001333 -q, --quiet, --silent do not print \`checking ...' messages
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001334 --cache-file=FILE cache test results in FILE [disabled]
1335 -C, --config-cache alias for \`--cache-file=config.cache'
1336 -n, --no-create do not create output files
1337 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1338
1339Installation directories:
1340 --prefix=PREFIX install architecture-independent files in PREFIX
JP Abgrall511eca32014-02-12 13:46:45 -08001341 [$ac_default_prefix]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001342 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
JP Abgrall511eca32014-02-12 13:46:45 -08001343 [PREFIX]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001344
1345By default, \`make install' will install all the files in
1346\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1347an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1348for instance \`--prefix=\$HOME'.
1349
1350For better control, use the options below.
1351
1352Fine tuning of the installation directories:
JP Abgrall511eca32014-02-12 13:46:45 -08001353 --bindir=DIR user executables [EPREFIX/bin]
1354 --sbindir=DIR system admin executables [EPREFIX/sbin]
1355 --libexecdir=DIR program executables [EPREFIX/libexec]
1356 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1357 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1358 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1359 --libdir=DIR object code libraries [EPREFIX/lib]
1360 --includedir=DIR C header files [PREFIX/include]
1361 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1362 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1363 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1364 --infodir=DIR info documentation [DATAROOTDIR/info]
1365 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1366 --mandir=DIR man documentation [DATAROOTDIR/man]
Haibo Huang165065a2018-07-23 17:26:52 -07001367 --docdir=DIR documentation root [DATAROOTDIR/doc/pcap]
JP Abgrall511eca32014-02-12 13:46:45 -08001368 --htmldir=DIR html documentation [DOCDIR]
1369 --dvidir=DIR dvi documentation [DOCDIR]
1370 --pdfdir=DIR pdf documentation [DOCDIR]
1371 --psdir=DIR ps documentation [DOCDIR]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001372_ACEOF
1373
1374 cat <<\_ACEOF
1375
1376System types:
1377 --build=BUILD configure for building on BUILD [guessed]
1378 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1379 --target=TARGET configure for building compilers for TARGET [HOST]
1380_ACEOF
1381fi
1382
1383if test -n "$ac_init_help"; then
Haibo Huang165065a2018-07-23 17:26:52 -07001384 case $ac_init_help in
1385 short | recursive ) echo "Configuration of pcap 1.9.0-PRE-GIT:";;
1386 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001387 cat <<\_ACEOF
1388
1389Optional Features:
JP Abgrall511eca32014-02-12 13:46:45 -08001390 --disable-option-checking ignore unrecognized --enable/--with options
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001391 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1392 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
JP Abgrall511eca32014-02-12 13:46:45 -08001393 --disable-largefile omit support for large files
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001394 --disable-protochain disable \"protochain\" insn
Haibo Huang165065a2018-07-23 17:26:52 -07001395 --enable-packet-ring enable packet ring support on Linux [default=yes]
1396 --enable-ipv6 build IPv6-capable version [default=yes]
1397 --enable-remote enable remote packet capture [default=no]
1398 --disable-remote disable remote packet capture
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001399 --enable-optimizer-dbg build optimizer debugging code
1400 --enable-yydebug build parser debugging code
Haibo Huang165065a2018-07-23 17:26:52 -07001401 --disable-universal don't build universal on macOS
JP Abgrall511eca32014-02-12 13:46:45 -08001402 --enable-shared build shared libraries [default=yes, if support
1403 available]
Haibo Huang165065a2018-07-23 17:26:52 -07001404 --enable-usb enable USB capture support [default=yes, if support
1405 available]
1406 --enable-netmap enable netmap support [default=yes, if support
Elliott Hughesd8845d72015-10-19 18:07:04 -07001407 available]
JP Abgrall511eca32014-02-12 13:46:45 -08001408 --enable-bluetooth enable Bluetooth support [default=yes, if support
1409 available]
JP Abgrall511eca32014-02-12 13:46:45 -08001410 --enable-dbus enable D-Bus capture support [default=yes, if
1411 support available]
Haibo Huang165065a2018-07-23 17:26:52 -07001412 --enable-rdma enable RDMA capture support [default=yes, if support
1413 available]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001414
1415Optional Packages:
1416 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1417 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1418 --without-gcc don't use gcc
JP Abgrall511eca32014-02-12 13:46:45 -08001419 --with-sita include SITA support
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001420 --with-pcap=TYPE use packet capture TYPE
JP Abgrall511eca32014-02-12 13:46:45 -08001421 --without-libnl disable libnl support [default=yes, on Linux, if
1422 present]
Elliott Hughes965a4b52017-05-15 10:37:39 -07001423 --with-dag[=DIR] include Endace DAG support (located in directory
1424 DIR, if supplied). [default=yes, if present]
1425 --with-dag-includes=IDIR
1426 Endace DAG include directory, if not DIR/include
1427 --with-dag-libraries=LDIR
1428 Endace DAG library directory, if not DIR/lib
JP Abgrall511eca32014-02-12 13:46:45 -08001429 --with-septel[=DIR] include Septel support (located in directory DIR, if
Elliott Hughes965a4b52017-05-15 10:37:39 -07001430 supplied). [default=yes, if present]
1431 --with-snf[=DIR] include Myricom SNF support (located in directory
1432 DIR, if supplied). [default=yes, if present]
1433 --with-snf-includes=IDIR
1434 Myricom SNF include directory, if not DIR/include
1435 --with-snf-libraries=LDIR
1436 Myricom SNF library directory, if not DIR/lib
1437 --with-turbocap[=DIR] include Riverbed TurboCap support (located in
1438 directory DIR, if supplied). [default=yes, if
1439 present]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001440
1441Some influential environment variables:
1442 CC C compiler command
1443 CFLAGS C compiler flags
1444 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1445 nonstandard directory <lib dir>
1446 LIBS libraries to pass to the linker, e.g. -l<library>
JP Abgrall511eca32014-02-12 13:46:45 -08001447 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001448 you have headers in a nonstandard directory <include dir>
1449 CPP C preprocessor
Elliott Hughes965a4b52017-05-15 10:37:39 -07001450 YACC The `Yet Another Compiler Compiler' implementation to use.
1451 Defaults to the first program found out of: `bison -y', `byacc',
1452 `yacc'.
1453 YFLAGS The list of arguments that will be passed by default to $YACC.
1454 This script will default YFLAGS to the empty string to avoid a
1455 default value of `-d' given by some make applications.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001456
1457Use these variables to override the choices made by `configure' or to help
1458it to find libraries and programs with nonstandard names/locations.
1459
JP Abgrall511eca32014-02-12 13:46:45 -08001460Report bugs to the package provider.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001461_ACEOF
1462ac_status=$?
1463fi
1464
1465if test "$ac_init_help" = "recursive"; then
1466 # If there are subdirs, report their specific --help.
1467 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
JP Abgrall511eca32014-02-12 13:46:45 -08001468 test -d "$ac_dir" ||
1469 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1470 continue
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001471 ac_builddir=.
1472
1473case "$ac_dir" in
1474.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1475*)
JP Abgrall511eca32014-02-12 13:46:45 -08001476 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001477 # A ".." for each directory in $ac_dir_suffix.
JP Abgrall511eca32014-02-12 13:46:45 -08001478 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001479 case $ac_top_builddir_sub in
1480 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1481 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1482 esac ;;
1483esac
1484ac_abs_top_builddir=$ac_pwd
1485ac_abs_builddir=$ac_pwd$ac_dir_suffix
1486# for backward compatibility:
1487ac_top_builddir=$ac_top_build_prefix
1488
1489case $srcdir in
1490 .) # We are building in place.
1491 ac_srcdir=.
1492 ac_top_srcdir=$ac_top_builddir_sub
1493 ac_abs_top_srcdir=$ac_pwd ;;
1494 [\\/]* | ?:[\\/]* ) # Absolute name.
1495 ac_srcdir=$srcdir$ac_dir_suffix;
1496 ac_top_srcdir=$srcdir
1497 ac_abs_top_srcdir=$srcdir ;;
1498 *) # Relative name.
1499 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1500 ac_top_srcdir=$ac_top_build_prefix$srcdir
1501 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1502esac
1503ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1504
1505 cd "$ac_dir" || { ac_status=$?; continue; }
1506 # Check for guested configure.
1507 if test -f "$ac_srcdir/configure.gnu"; then
1508 echo &&
1509 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1510 elif test -f "$ac_srcdir/configure"; then
1511 echo &&
1512 $SHELL "$ac_srcdir/configure" --help=recursive
1513 else
JP Abgrall511eca32014-02-12 13:46:45 -08001514 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001515 fi || ac_status=$?
1516 cd "$ac_pwd" || { ac_status=$?; break; }
1517 done
1518fi
1519
1520test -n "$ac_init_help" && exit $ac_status
1521if $ac_init_version; then
1522 cat <<\_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07001523pcap configure 1.9.0-PRE-GIT
JP Abgrall511eca32014-02-12 13:46:45 -08001524generated by GNU Autoconf 2.69
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001525
JP Abgrall511eca32014-02-12 13:46:45 -08001526Copyright (C) 2012 Free Software Foundation, Inc.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001527This configure script is free software; the Free Software Foundation
1528gives unlimited permission to copy, distribute and modify it.
1529_ACEOF
1530 exit
1531fi
JP Abgrall511eca32014-02-12 13:46:45 -08001532
1533## ------------------------ ##
1534## Autoconf initialization. ##
1535## ------------------------ ##
1536
1537# ac_fn_c_try_compile LINENO
1538# --------------------------
1539# Try to compile conftest.$ac_ext, and return whether this succeeded.
1540ac_fn_c_try_compile ()
1541{
1542 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1543 rm -f conftest.$ac_objext
1544 if { { ac_try="$ac_compile"
1545case "(($ac_try" in
1546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1547 *) ac_try_echo=$ac_try;;
1548esac
1549eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1550$as_echo "$ac_try_echo"; } >&5
1551 (eval "$ac_compile") 2>conftest.err
1552 ac_status=$?
1553 if test -s conftest.err; then
1554 grep -v '^ *+' conftest.err >conftest.er1
1555 cat conftest.er1 >&5
1556 mv -f conftest.er1 conftest.err
1557 fi
1558 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1559 test $ac_status = 0; } && {
1560 test -z "$ac_c_werror_flag" ||
1561 test ! -s conftest.err
1562 } && test -s conftest.$ac_objext; then :
1563 ac_retval=0
1564else
1565 $as_echo "$as_me: failed program was:" >&5
1566sed 's/^/| /' conftest.$ac_ext >&5
1567
1568 ac_retval=1
1569fi
1570 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1571 as_fn_set_status $ac_retval
1572
1573} # ac_fn_c_try_compile
1574
Haibo Huang165065a2018-07-23 17:26:52 -07001575# ac_fn_c_try_link LINENO
1576# -----------------------
1577# Try to link conftest.$ac_ext, and return whether this succeeded.
1578ac_fn_c_try_link ()
1579{
1580 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1581 rm -f conftest.$ac_objext conftest$ac_exeext
1582 if { { ac_try="$ac_link"
1583case "(($ac_try" in
1584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1585 *) ac_try_echo=$ac_try;;
1586esac
1587eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1588$as_echo "$ac_try_echo"; } >&5
1589 (eval "$ac_link") 2>conftest.err
1590 ac_status=$?
1591 if test -s conftest.err; then
1592 grep -v '^ *+' conftest.err >conftest.er1
1593 cat conftest.er1 >&5
1594 mv -f conftest.er1 conftest.err
1595 fi
1596 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1597 test $ac_status = 0; } && {
1598 test -z "$ac_c_werror_flag" ||
1599 test ! -s conftest.err
1600 } && test -s conftest$ac_exeext && {
1601 test "$cross_compiling" = yes ||
1602 test -x conftest$ac_exeext
1603 }; then :
1604 ac_retval=0
1605else
1606 $as_echo "$as_me: failed program was:" >&5
1607sed 's/^/| /' conftest.$ac_ext >&5
1608
1609 ac_retval=1
1610fi
1611 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1612 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1613 # interfere with the next link command; also delete a directory that is
1614 # left behind by Apple's compiler. We do this before executing the actions.
1615 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1616 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1617 as_fn_set_status $ac_retval
1618
1619} # ac_fn_c_try_link
1620
JP Abgrall511eca32014-02-12 13:46:45 -08001621# ac_fn_c_try_cpp LINENO
1622# ----------------------
1623# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1624ac_fn_c_try_cpp ()
1625{
1626 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1627 if { { ac_try="$ac_cpp conftest.$ac_ext"
1628case "(($ac_try" in
1629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1630 *) ac_try_echo=$ac_try;;
1631esac
1632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1633$as_echo "$ac_try_echo"; } >&5
1634 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1635 ac_status=$?
1636 if test -s conftest.err; then
1637 grep -v '^ *+' conftest.err >conftest.er1
1638 cat conftest.er1 >&5
1639 mv -f conftest.er1 conftest.err
1640 fi
1641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1642 test $ac_status = 0; } > conftest.i && {
1643 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1644 test ! -s conftest.err
1645 }; then :
1646 ac_retval=0
1647else
1648 $as_echo "$as_me: failed program was:" >&5
1649sed 's/^/| /' conftest.$ac_ext >&5
1650
1651 ac_retval=1
1652fi
1653 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1654 as_fn_set_status $ac_retval
1655
1656} # ac_fn_c_try_cpp
1657
1658# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1659# -------------------------------------------------------
1660# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1661# the include files in INCLUDES and setting the cache variable VAR
1662# accordingly.
1663ac_fn_c_check_header_mongrel ()
1664{
1665 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1666 if eval \${$3+:} false; then :
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
1671fi
1672eval ac_res=\$$3
1673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1674$as_echo "$ac_res" >&6; }
1675else
1676 # Is the header compilable?
1677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1678$as_echo_n "checking $2 usability... " >&6; }
1679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1680/* end confdefs.h. */
1681$4
1682#include <$2>
1683_ACEOF
1684if ac_fn_c_try_compile "$LINENO"; then :
1685 ac_header_compiler=yes
1686else
1687 ac_header_compiler=no
1688fi
1689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1691$as_echo "$ac_header_compiler" >&6; }
1692
1693# Is the header present?
1694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1695$as_echo_n "checking $2 presence... " >&6; }
1696cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1697/* end confdefs.h. */
1698#include <$2>
1699_ACEOF
1700if ac_fn_c_try_cpp "$LINENO"; then :
1701 ac_header_preproc=yes
1702else
1703 ac_header_preproc=no
1704fi
1705rm -f conftest.err conftest.i conftest.$ac_ext
1706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1707$as_echo "$ac_header_preproc" >&6; }
1708
1709# So? What about this header?
1710case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1711 yes:no: )
1712 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1713$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1715$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1716 ;;
1717 no:yes:* )
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1719$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1720 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1721$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1722 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1723$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1725$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1727$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1728 ;;
1729esac
1730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1731$as_echo_n "checking for $2... " >&6; }
1732if eval \${$3+:} false; then :
1733 $as_echo_n "(cached) " >&6
1734else
1735 eval "$3=\$ac_header_compiler"
1736fi
1737eval ac_res=\$$3
1738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1739$as_echo "$ac_res" >&6; }
1740fi
1741 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1742
1743} # ac_fn_c_check_header_mongrel
1744
1745# ac_fn_c_try_run LINENO
1746# ----------------------
1747# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1748# that executables *can* be run.
1749ac_fn_c_try_run ()
1750{
1751 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1752 if { { ac_try="$ac_link"
1753case "(($ac_try" in
1754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1755 *) ac_try_echo=$ac_try;;
1756esac
1757eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1758$as_echo "$ac_try_echo"; } >&5
1759 (eval "$ac_link") 2>&5
1760 ac_status=$?
1761 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1762 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1763 { { case "(($ac_try" in
1764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1765 *) ac_try_echo=$ac_try;;
1766esac
1767eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1768$as_echo "$ac_try_echo"; } >&5
1769 (eval "$ac_try") 2>&5
1770 ac_status=$?
1771 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1772 test $ac_status = 0; }; }; then :
1773 ac_retval=0
1774else
1775 $as_echo "$as_me: program exited with status $ac_status" >&5
1776 $as_echo "$as_me: failed program was:" >&5
1777sed 's/^/| /' conftest.$ac_ext >&5
1778
1779 ac_retval=$ac_status
1780fi
1781 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1782 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1783 as_fn_set_status $ac_retval
1784
1785} # ac_fn_c_try_run
1786
1787# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1788# -------------------------------------------------------
1789# Tests whether HEADER exists and can be compiled using the include files in
1790# INCLUDES, setting the cache variable VAR accordingly.
1791ac_fn_c_check_header_compile ()
1792{
1793 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1795$as_echo_n "checking for $2... " >&6; }
1796if eval \${$3+:} false; then :
1797 $as_echo_n "(cached) " >&6
1798else
1799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1800/* end confdefs.h. */
1801$4
1802#include <$2>
1803_ACEOF
1804if ac_fn_c_try_compile "$LINENO"; then :
1805 eval "$3=yes"
1806else
1807 eval "$3=no"
1808fi
1809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1810fi
1811eval ac_res=\$$3
1812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1813$as_echo "$ac_res" >&6; }
1814 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1815
1816} # ac_fn_c_check_header_compile
1817
JP Abgrall511eca32014-02-12 13:46:45 -08001818# ac_fn_c_check_func LINENO FUNC VAR
1819# ----------------------------------
1820# Tests whether FUNC exists, setting the cache variable VAR accordingly
1821ac_fn_c_check_func ()
1822{
1823 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1825$as_echo_n "checking for $2... " >&6; }
1826if eval \${$3+:} false; then :
1827 $as_echo_n "(cached) " >&6
1828else
1829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1832 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1833#define $2 innocuous_$2
1834
1835/* System header to define __stub macros and hopefully few prototypes,
1836 which can conflict with char $2 (); below.
1837 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1838 <limits.h> exists even on freestanding compilers. */
1839
1840#ifdef __STDC__
1841# include <limits.h>
1842#else
1843# include <assert.h>
1844#endif
1845
1846#undef $2
1847
1848/* Override any GCC internal prototype to avoid an error.
1849 Use char because int might match the return type of a GCC
1850 builtin and then its argument prototype would still apply. */
1851#ifdef __cplusplus
1852extern "C"
1853#endif
1854char $2 ();
1855/* The GNU C library defines this for functions which it implements
1856 to always fail with ENOSYS. Some functions are actually named
1857 something starting with __ and the normal name is an alias. */
1858#if defined __stub_$2 || defined __stub___$2
1859choke me
1860#endif
1861
1862int
1863main ()
1864{
1865return $2 ();
1866 ;
1867 return 0;
1868}
1869_ACEOF
1870if ac_fn_c_try_link "$LINENO"; then :
1871 eval "$3=yes"
1872else
1873 eval "$3=no"
1874fi
1875rm -f core conftest.err conftest.$ac_objext \
1876 conftest$ac_exeext conftest.$ac_ext
1877fi
1878eval ac_res=\$$3
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1880$as_echo "$ac_res" >&6; }
1881 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1882
1883} # ac_fn_c_check_func
1884
1885# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1886# ---------------------------------------------
1887# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1888# accordingly.
1889ac_fn_c_check_decl ()
1890{
1891 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1892 as_decl_name=`echo $2|sed 's/ *(.*//'`
1893 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1895$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1896if eval \${$3+:} false; then :
1897 $as_echo_n "(cached) " >&6
1898else
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900/* end confdefs.h. */
1901$4
1902int
1903main ()
1904{
1905#ifndef $as_decl_name
1906#ifdef __cplusplus
1907 (void) $as_decl_use;
1908#else
1909 (void) $as_decl_name;
1910#endif
1911#endif
1912
1913 ;
1914 return 0;
1915}
1916_ACEOF
1917if ac_fn_c_try_compile "$LINENO"; then :
1918 eval "$3=yes"
1919else
1920 eval "$3=no"
1921fi
1922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1923fi
1924eval ac_res=\$$3
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1926$as_echo "$ac_res" >&6; }
1927 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1928
1929} # ac_fn_c_check_decl
Haibo Huang165065a2018-07-23 17:26:52 -07001930
1931# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1932# -------------------------------------------
1933# Tests whether TYPE exists after having included INCLUDES, setting cache
1934# variable VAR accordingly.
1935ac_fn_c_check_type ()
1936{
1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1939$as_echo_n "checking for $2... " >&6; }
1940if eval \${$3+:} false; then :
1941 $as_echo_n "(cached) " >&6
1942else
1943 eval "$3=no"
1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1945/* end confdefs.h. */
1946$4
1947int
1948main ()
1949{
1950if (sizeof ($2))
1951 return 0;
1952 ;
1953 return 0;
1954}
1955_ACEOF
1956if ac_fn_c_try_compile "$LINENO"; then :
1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1958/* end confdefs.h. */
1959$4
1960int
1961main ()
1962{
1963if (sizeof (($2)))
1964 return 0;
1965 ;
1966 return 0;
1967}
1968_ACEOF
1969if ac_fn_c_try_compile "$LINENO"; then :
1970
1971else
1972 eval "$3=yes"
1973fi
1974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1975fi
1976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977fi
1978eval ac_res=\$$3
1979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1980$as_echo "$ac_res" >&6; }
1981 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1982
1983} # ac_fn_c_check_type
1984
1985# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
1986# ----------------------------------------------------
1987# Tries to find if the field MEMBER exists in type AGGR, after including
1988# INCLUDES, setting cache variable VAR accordingly.
1989ac_fn_c_check_member ()
1990{
1991 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
1993$as_echo_n "checking for $2.$3... " >&6; }
1994if eval \${$4+:} false; then :
1995 $as_echo_n "(cached) " >&6
1996else
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998/* end confdefs.h. */
1999$5
2000int
2001main ()
2002{
2003static $2 ac_aggr;
2004if (ac_aggr.$3)
2005return 0;
2006 ;
2007 return 0;
2008}
2009_ACEOF
2010if ac_fn_c_try_compile "$LINENO"; then :
2011 eval "$4=yes"
2012else
2013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014/* end confdefs.h. */
2015$5
2016int
2017main ()
2018{
2019static $2 ac_aggr;
2020if (sizeof ac_aggr.$3)
2021return 0;
2022 ;
2023 return 0;
2024}
2025_ACEOF
2026if ac_fn_c_try_compile "$LINENO"; then :
2027 eval "$4=yes"
2028else
2029 eval "$4=no"
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032fi
2033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2034fi
2035eval ac_res=\$$4
2036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2037$as_echo "$ac_res" >&6; }
2038 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2039
2040} # ac_fn_c_check_member
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002041cat >config.log <<_ACEOF
2042This file contains any messages produced by compilers while
2043running configure, to aid debugging if configure makes a mistake.
2044
Haibo Huang165065a2018-07-23 17:26:52 -07002045It was created by pcap $as_me 1.9.0-PRE-GIT, which was
JP Abgrall511eca32014-02-12 13:46:45 -08002046generated by GNU Autoconf 2.69. Invocation command line was
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002047
2048 $ $0 $@
2049
2050_ACEOF
2051exec 5>>config.log
2052{
2053cat <<_ASUNAME
2054## --------- ##
2055## Platform. ##
2056## --------- ##
2057
2058hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2059uname -m = `(uname -m) 2>/dev/null || echo unknown`
2060uname -r = `(uname -r) 2>/dev/null || echo unknown`
2061uname -s = `(uname -s) 2>/dev/null || echo unknown`
2062uname -v = `(uname -v) 2>/dev/null || echo unknown`
2063
2064/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2065/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2066
2067/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2068/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2069/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2070/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2071/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2072/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2073/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2074
2075_ASUNAME
2076
2077as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2078for as_dir in $PATH
2079do
2080 IFS=$as_save_IFS
2081 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002082 $as_echo "PATH: $as_dir"
2083 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002084IFS=$as_save_IFS
2085
2086} >&5
2087
2088cat >&5 <<_ACEOF
2089
2090
2091## ----------- ##
2092## Core tests. ##
2093## ----------- ##
2094
2095_ACEOF
2096
2097
2098# Keep a trace of the command line.
2099# Strip out --no-create and --no-recursion so they do not pile up.
2100# Strip out --silent because we don't want to record it for future runs.
2101# Also quote any args containing shell meta-characters.
2102# Make two passes to allow for proper duplicate-argument suppression.
2103ac_configure_args=
2104ac_configure_args0=
2105ac_configure_args1=
2106ac_must_keep_next=false
2107for ac_pass in 1 2
2108do
2109 for ac_arg
2110 do
2111 case $ac_arg in
2112 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2113 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2114 | -silent | --silent | --silen | --sile | --sil)
2115 continue ;;
2116 *\'*)
JP Abgrall511eca32014-02-12 13:46:45 -08002117 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002118 esac
2119 case $ac_pass in
JP Abgrall511eca32014-02-12 13:46:45 -08002120 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002121 2)
JP Abgrall511eca32014-02-12 13:46:45 -08002122 as_fn_append ac_configure_args1 " '$ac_arg'"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002123 if test $ac_must_keep_next = true; then
2124 ac_must_keep_next=false # Got value, back to normal.
2125 else
2126 case $ac_arg in
2127 *=* | --config-cache | -C | -disable-* | --disable-* \
2128 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2129 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2130 | -with-* | --with-* | -without-* | --without-* | --x)
2131 case "$ac_configure_args0 " in
2132 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2133 esac
2134 ;;
2135 -* ) ac_must_keep_next=true ;;
2136 esac
2137 fi
JP Abgrall511eca32014-02-12 13:46:45 -08002138 as_fn_append ac_configure_args " '$ac_arg'"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002139 ;;
2140 esac
2141 done
2142done
JP Abgrall511eca32014-02-12 13:46:45 -08002143{ ac_configure_args0=; unset ac_configure_args0;}
2144{ ac_configure_args1=; unset ac_configure_args1;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002145
2146# When interrupted or exit'd, cleanup temporary files, and complete
2147# config.log. We remove comments because anyway the quotes in there
2148# would cause problems or look ugly.
2149# WARNING: Use '\'' to represent an apostrophe within the trap.
2150# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2151trap 'exit_status=$?
2152 # Save into config.log some information that might help in debugging.
2153 {
2154 echo
2155
JP Abgrall511eca32014-02-12 13:46:45 -08002156 $as_echo "## ---------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002157## Cache variables. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002158## ---------------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002159 echo
2160 # The following way of writing the cache mishandles newlines in values,
2161(
2162 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2163 eval ac_val=\$$ac_var
2164 case $ac_val in #(
2165 *${as_nl}*)
2166 case $ac_var in #(
JP Abgrall511eca32014-02-12 13:46:45 -08002167 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2168$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002169 esac
2170 case $ac_var in #(
2171 _ | IFS | as_nl) ;; #(
JP Abgrall511eca32014-02-12 13:46:45 -08002172 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2173 *) { eval $ac_var=; unset $ac_var;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002174 esac ;;
2175 esac
2176 done
2177 (set) 2>&1 |
2178 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2179 *${as_nl}ac_space=\ *)
2180 sed -n \
2181 "s/'\''/'\''\\\\'\'''\''/g;
2182 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2183 ;; #(
2184 *)
2185 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2186 ;;
2187 esac |
2188 sort
2189)
2190 echo
2191
JP Abgrall511eca32014-02-12 13:46:45 -08002192 $as_echo "## ----------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002193## Output variables. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002194## ----------------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002195 echo
2196 for ac_var in $ac_subst_vars
2197 do
2198 eval ac_val=\$$ac_var
2199 case $ac_val in
JP Abgrall511eca32014-02-12 13:46:45 -08002200 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002201 esac
JP Abgrall511eca32014-02-12 13:46:45 -08002202 $as_echo "$ac_var='\''$ac_val'\''"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002203 done | sort
2204 echo
2205
2206 if test -n "$ac_subst_files"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002207 $as_echo "## ------------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002208## File substitutions. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002209## ------------------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002210 echo
2211 for ac_var in $ac_subst_files
2212 do
2213 eval ac_val=\$$ac_var
2214 case $ac_val in
JP Abgrall511eca32014-02-12 13:46:45 -08002215 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002216 esac
JP Abgrall511eca32014-02-12 13:46:45 -08002217 $as_echo "$ac_var='\''$ac_val'\''"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002218 done | sort
2219 echo
2220 fi
2221
2222 if test -s confdefs.h; then
JP Abgrall511eca32014-02-12 13:46:45 -08002223 $as_echo "## ----------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002224## confdefs.h. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002225## ----------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002226 echo
2227 cat confdefs.h
2228 echo
2229 fi
2230 test "$ac_signal" != 0 &&
JP Abgrall511eca32014-02-12 13:46:45 -08002231 $as_echo "$as_me: caught signal $ac_signal"
2232 $as_echo "$as_me: exit $exit_status"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002233 } >&5
2234 rm -f core *.core core.conftest.* &&
2235 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2236 exit $exit_status
2237' 0
2238for ac_signal in 1 2 13 15; do
JP Abgrall511eca32014-02-12 13:46:45 -08002239 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002240done
2241ac_signal=0
2242
2243# confdefs.h avoids OS command line length limits that DEFS can exceed.
2244rm -f -r conftest* confdefs.h
2245
JP Abgrall511eca32014-02-12 13:46:45 -08002246$as_echo "/* confdefs.h */" > confdefs.h
2247
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002248# Predefined preprocessor variables.
2249
2250cat >>confdefs.h <<_ACEOF
2251#define PACKAGE_NAME "$PACKAGE_NAME"
2252_ACEOF
2253
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002254cat >>confdefs.h <<_ACEOF
2255#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2256_ACEOF
2257
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002258cat >>confdefs.h <<_ACEOF
2259#define PACKAGE_VERSION "$PACKAGE_VERSION"
2260_ACEOF
2261
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002262cat >>confdefs.h <<_ACEOF
2263#define PACKAGE_STRING "$PACKAGE_STRING"
2264_ACEOF
2265
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002266cat >>confdefs.h <<_ACEOF
2267#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2268_ACEOF
2269
JP Abgrall511eca32014-02-12 13:46:45 -08002270cat >>confdefs.h <<_ACEOF
2271#define PACKAGE_URL "$PACKAGE_URL"
2272_ACEOF
2273
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002274
2275# Let the site file select an alternate cache file if it wants to.
JP Abgrall511eca32014-02-12 13:46:45 -08002276# Prefer an explicitly selected file to automatically selected ones.
2277ac_site_file1=NONE
2278ac_site_file2=NONE
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002279if test -n "$CONFIG_SITE"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002280 # We do not want a PATH search for config.site.
2281 case $CONFIG_SITE in #((
2282 -*) ac_site_file1=./$CONFIG_SITE;;
2283 */*) ac_site_file1=$CONFIG_SITE;;
2284 *) ac_site_file1=./$CONFIG_SITE;;
2285 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002286elif test "x$prefix" != xNONE; then
JP Abgrall511eca32014-02-12 13:46:45 -08002287 ac_site_file1=$prefix/share/config.site
2288 ac_site_file2=$prefix/etc/config.site
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002289else
JP Abgrall511eca32014-02-12 13:46:45 -08002290 ac_site_file1=$ac_default_prefix/share/config.site
2291 ac_site_file2=$ac_default_prefix/etc/config.site
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002292fi
JP Abgrall511eca32014-02-12 13:46:45 -08002293for ac_site_file in "$ac_site_file1" "$ac_site_file2"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002294do
JP Abgrall511eca32014-02-12 13:46:45 -08002295 test "x$ac_site_file" = xNONE && continue
2296 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2297 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2298$as_echo "$as_me: loading site script $ac_site_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002299 sed 's/^/| /' "$ac_site_file" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08002300 . "$ac_site_file" \
2301 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2302$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2303as_fn_error $? "failed to load site script $ac_site_file
2304See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002305 fi
2306done
2307
2308if test -r "$cache_file"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002309 # Some versions of bash will fail to source /dev/null (special files
2310 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2311 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2312 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2313$as_echo "$as_me: loading cache $cache_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002314 case $cache_file in
2315 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2316 *) . "./$cache_file";;
2317 esac
2318 fi
2319else
JP Abgrall511eca32014-02-12 13:46:45 -08002320 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2321$as_echo "$as_me: creating cache $cache_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002322 >$cache_file
2323fi
2324
2325# Check that the precious variables saved in the cache have kept the same
2326# value.
2327ac_cache_corrupted=false
2328for ac_var in $ac_precious_vars; do
2329 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2330 eval ac_new_set=\$ac_env_${ac_var}_set
2331 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2332 eval ac_new_val=\$ac_env_${ac_var}_value
2333 case $ac_old_set,$ac_new_set in
2334 set,)
JP Abgrall511eca32014-02-12 13:46:45 -08002335 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2336$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002337 ac_cache_corrupted=: ;;
2338 ,set)
JP Abgrall511eca32014-02-12 13:46:45 -08002339 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2340$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002341 ac_cache_corrupted=: ;;
2342 ,);;
2343 *)
2344 if test "x$ac_old_val" != "x$ac_new_val"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002345 # differences in whitespace do not lead to failure.
2346 ac_old_val_w=`echo x $ac_old_val`
2347 ac_new_val_w=`echo x $ac_new_val`
2348 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2349 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2350$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2351 ac_cache_corrupted=:
2352 else
2353 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2354$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2355 eval $ac_var=\$ac_old_val
2356 fi
2357 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2358$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2359 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2360$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002361 fi;;
2362 esac
2363 # Pass precious variables to config.status.
2364 if test "$ac_new_set" = set; then
2365 case $ac_new_val in
JP Abgrall511eca32014-02-12 13:46:45 -08002366 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002367 *) ac_arg=$ac_var=$ac_new_val ;;
2368 esac
2369 case " $ac_configure_args " in
2370 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
JP Abgrall511eca32014-02-12 13:46:45 -08002371 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002372 esac
2373 fi
2374done
2375if $ac_cache_corrupted; then
JP Abgrall511eca32014-02-12 13:46:45 -08002376 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2378 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2379$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2380 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002381fi
JP Abgrall511eca32014-02-12 13:46:45 -08002382## -------------------- ##
2383## Main body of script. ##
2384## -------------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002385
2386ac_ext=c
2387ac_cpp='$CPP $CPPFLAGS'
2388ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2389ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2390ac_compiler_gnu=$ac_cv_c_compiler_gnu
2391
2392
2393
Haibo Huang165065a2018-07-23 17:26:52 -07002394
2395
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002396ac_aux_dir=
2397for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2398 if test -f "$ac_dir/install-sh"; then
2399 ac_aux_dir=$ac_dir
2400 ac_install_sh="$ac_aux_dir/install-sh -c"
2401 break
2402 elif test -f "$ac_dir/install.sh"; then
2403 ac_aux_dir=$ac_dir
2404 ac_install_sh="$ac_aux_dir/install.sh -c"
2405 break
2406 elif test -f "$ac_dir/shtool"; then
2407 ac_aux_dir=$ac_dir
2408 ac_install_sh="$ac_aux_dir/shtool install -c"
2409 break
2410 fi
2411done
2412if test -z "$ac_aux_dir"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002413 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002414fi
2415
2416# These three variables are undocumented and unsupported,
2417# and are intended to be withdrawn in a future Autoconf release.
2418# They can cause serious problems if a builder's source tree is in a directory
2419# whose full name contains unusual characters.
2420ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2421ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2422ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2423
2424
2425# Make sure we can run config.sub.
2426$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
JP Abgrall511eca32014-02-12 13:46:45 -08002427 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002428
JP Abgrall511eca32014-02-12 13:46:45 -08002429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2430$as_echo_n "checking build system type... " >&6; }
2431if ${ac_cv_build+:} false; then :
2432 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002433else
2434 ac_build_alias=$build_alias
2435test "x$ac_build_alias" = x &&
2436 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2437test "x$ac_build_alias" = x &&
JP Abgrall511eca32014-02-12 13:46:45 -08002438 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002439ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
JP Abgrall511eca32014-02-12 13:46:45 -08002440 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002441
2442fi
JP Abgrall511eca32014-02-12 13:46:45 -08002443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2444$as_echo "$ac_cv_build" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002445case $ac_cv_build in
2446*-*-*) ;;
JP Abgrall511eca32014-02-12 13:46:45 -08002447*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002448esac
2449build=$ac_cv_build
2450ac_save_IFS=$IFS; IFS='-'
2451set x $ac_cv_build
2452shift
2453build_cpu=$1
2454build_vendor=$2
2455shift; shift
2456# Remember, the first character of IFS is used to create $*,
2457# except with old shells:
2458build_os=$*
2459IFS=$ac_save_IFS
2460case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2461
2462
JP Abgrall511eca32014-02-12 13:46:45 -08002463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2464$as_echo_n "checking host system type... " >&6; }
2465if ${ac_cv_host+:} false; then :
2466 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002467else
2468 if test "x$host_alias" = x; then
2469 ac_cv_host=$ac_cv_build
2470else
2471 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
JP Abgrall511eca32014-02-12 13:46:45 -08002472 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002473fi
2474
2475fi
JP Abgrall511eca32014-02-12 13:46:45 -08002476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2477$as_echo "$ac_cv_host" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002478case $ac_cv_host in
2479*-*-*) ;;
JP Abgrall511eca32014-02-12 13:46:45 -08002480*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002481esac
2482host=$ac_cv_host
2483ac_save_IFS=$IFS; IFS='-'
2484set x $ac_cv_host
2485shift
2486host_cpu=$1
2487host_vendor=$2
2488shift; shift
2489# Remember, the first character of IFS is used to create $*,
2490# except with old shells:
2491host_os=$*
2492IFS=$ac_save_IFS
2493case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2494
2495
JP Abgrall511eca32014-02-12 13:46:45 -08002496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2497$as_echo_n "checking target system type... " >&6; }
2498if ${ac_cv_target+:} false; then :
2499 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002500else
2501 if test "x$target_alias" = x; then
2502 ac_cv_target=$ac_cv_host
2503else
2504 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
JP Abgrall511eca32014-02-12 13:46:45 -08002505 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002506fi
2507
2508fi
JP Abgrall511eca32014-02-12 13:46:45 -08002509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2510$as_echo "$ac_cv_target" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002511case $ac_cv_target in
2512*-*-*) ;;
JP Abgrall511eca32014-02-12 13:46:45 -08002513*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002514esac
2515target=$ac_cv_target
2516ac_save_IFS=$IFS; IFS='-'
2517set x $ac_cv_target
2518shift
2519target_cpu=$1
2520target_vendor=$2
2521shift; shift
2522# Remember, the first character of IFS is used to create $*,
2523# except with old shells:
2524target_os=$*
2525IFS=$ac_save_IFS
2526case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2527
2528
2529# The aliases save the names the user supplied, while $host etc.
2530# will get canonicalized.
2531test -n "$target_alias" &&
2532 test "$program_prefix$program_suffix$program_transform_name" = \
2533 NONENONEs,x,x, &&
2534 program_prefix=${target_alias}-
2535
2536
2537
2538
2539
2540
JP Abgrall511eca32014-02-12 13:46:45 -08002541
2542
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002543# Check whether --with-gcc was given.
JP Abgrall511eca32014-02-12 13:46:45 -08002544if test "${with_gcc+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002545 withval=$with_gcc;
2546fi
2547
JP Abgrall511eca32014-02-12 13:46:45 -08002548 V_CCOPT=""
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002549 if test "${srcdir}" != "." ; then
JP Abgrall511eca32014-02-12 13:46:45 -08002550 V_CCOPT="-I\$(srcdir)"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002551 fi
2552 if test "${CFLAGS+set}" = set; then
2553 LBL_CFLAGS="$CFLAGS"
2554 fi
2555 if test -z "$CC" ; then
JP Abgrall511eca32014-02-12 13:46:45 -08002556 case "$host_os" in
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002557
2558 bsdi*)
2559 # Extract the first word of "shlicc2", so it can be a program name with args.
2560set dummy shlicc2; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2562$as_echo_n "checking for $ac_word... " >&6; }
2563if ${ac_cv_prog_SHLICC2+:} false; then :
2564 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002565else
2566 if test -n "$SHLICC2"; then
2567 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2568else
2569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2570for as_dir in $PATH
2571do
2572 IFS=$as_save_IFS
2573 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002574 for ac_exec_ext in '' $ac_executable_extensions; do
2575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002576 ac_cv_prog_SHLICC2="yes"
JP Abgrall511eca32014-02-12 13:46:45 -08002577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002578 break 2
2579 fi
2580done
JP Abgrall511eca32014-02-12 13:46:45 -08002581 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002582IFS=$as_save_IFS
2583
2584 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2585fi
2586fi
2587SHLICC2=$ac_cv_prog_SHLICC2
2588if test -n "$SHLICC2"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2590$as_echo "$SHLICC2" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002591else
JP Abgrall511eca32014-02-12 13:46:45 -08002592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2593$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002594fi
2595
2596
2597 if test $SHLICC2 = yes ; then
2598 CC=shlicc2
2599 export CC
2600 fi
2601 ;;
2602 esac
2603 fi
2604 if test -z "$CC" -a "$with_gcc" = no ; then
2605 CC=cc
2606 export CC
2607 fi
JP Abgrall511eca32014-02-12 13:46:45 -08002608
Haibo Huang165065a2018-07-23 17:26:52 -07002609#
2610# Try to enable as many C99 features as we can.
2611# At minimum, we want C++/C99-style // comments.
2612#
JP Abgrall511eca32014-02-12 13:46:45 -08002613ac_ext=c
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002614ac_cpp='$CPP $CPPFLAGS'
2615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2617ac_compiler_gnu=$ac_cv_c_compiler_gnu
2618if test -n "$ac_tool_prefix"; then
2619 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2620set dummy ${ac_tool_prefix}gcc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2622$as_echo_n "checking for $ac_word... " >&6; }
2623if ${ac_cv_prog_CC+:} false; then :
2624 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002625else
2626 if test -n "$CC"; then
2627 ac_cv_prog_CC="$CC" # Let the user override the test.
2628else
2629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2630for as_dir in $PATH
2631do
2632 IFS=$as_save_IFS
2633 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002634 for ac_exec_ext in '' $ac_executable_extensions; do
2635 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002636 ac_cv_prog_CC="${ac_tool_prefix}gcc"
JP Abgrall511eca32014-02-12 13:46:45 -08002637 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002638 break 2
2639 fi
2640done
JP Abgrall511eca32014-02-12 13:46:45 -08002641 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002642IFS=$as_save_IFS
2643
2644fi
2645fi
2646CC=$ac_cv_prog_CC
2647if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2649$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002650else
JP Abgrall511eca32014-02-12 13:46:45 -08002651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2652$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002653fi
2654
2655
2656fi
2657if test -z "$ac_cv_prog_CC"; then
2658 ac_ct_CC=$CC
2659 # Extract the first word of "gcc", so it can be a program name with args.
2660set dummy gcc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2662$as_echo_n "checking for $ac_word... " >&6; }
2663if ${ac_cv_prog_ac_ct_CC+:} false; then :
2664 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002665else
2666 if test -n "$ac_ct_CC"; then
2667 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2668else
2669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2670for as_dir in $PATH
2671do
2672 IFS=$as_save_IFS
2673 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002674 for ac_exec_ext in '' $ac_executable_extensions; do
2675 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002676 ac_cv_prog_ac_ct_CC="gcc"
JP Abgrall511eca32014-02-12 13:46:45 -08002677 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002678 break 2
2679 fi
2680done
JP Abgrall511eca32014-02-12 13:46:45 -08002681 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002682IFS=$as_save_IFS
2683
2684fi
2685fi
2686ac_ct_CC=$ac_cv_prog_ac_ct_CC
2687if test -n "$ac_ct_CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2689$as_echo "$ac_ct_CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002690else
JP Abgrall511eca32014-02-12 13:46:45 -08002691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2692$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002693fi
2694
2695 if test "x$ac_ct_CC" = x; then
2696 CC=""
2697 else
2698 case $cross_compiling:$ac_tool_warned in
2699yes:)
JP Abgrall511eca32014-02-12 13:46:45 -08002700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002702ac_tool_warned=yes ;;
2703esac
2704 CC=$ac_ct_CC
2705 fi
2706else
2707 CC="$ac_cv_prog_CC"
2708fi
2709
2710if test -z "$CC"; then
2711 if test -n "$ac_tool_prefix"; then
2712 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2713set dummy ${ac_tool_prefix}cc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2715$as_echo_n "checking for $ac_word... " >&6; }
2716if ${ac_cv_prog_CC+:} false; then :
2717 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002718else
2719 if test -n "$CC"; then
2720 ac_cv_prog_CC="$CC" # Let the user override the test.
2721else
2722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2723for as_dir in $PATH
2724do
2725 IFS=$as_save_IFS
2726 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002727 for ac_exec_ext in '' $ac_executable_extensions; do
2728 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002729 ac_cv_prog_CC="${ac_tool_prefix}cc"
JP Abgrall511eca32014-02-12 13:46:45 -08002730 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002731 break 2
2732 fi
2733done
JP Abgrall511eca32014-02-12 13:46:45 -08002734 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002735IFS=$as_save_IFS
2736
2737fi
2738fi
2739CC=$ac_cv_prog_CC
2740if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2742$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002743else
JP Abgrall511eca32014-02-12 13:46:45 -08002744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2745$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002746fi
2747
2748
2749 fi
2750fi
2751if test -z "$CC"; then
2752 # Extract the first word of "cc", so it can be a program name with args.
2753set dummy cc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2755$as_echo_n "checking for $ac_word... " >&6; }
2756if ${ac_cv_prog_CC+:} false; then :
2757 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002758else
2759 if test -n "$CC"; then
2760 ac_cv_prog_CC="$CC" # Let the user override the test.
2761else
2762 ac_prog_rejected=no
2763as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2764for as_dir in $PATH
2765do
2766 IFS=$as_save_IFS
2767 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002768 for ac_exec_ext in '' $ac_executable_extensions; do
2769 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002770 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2771 ac_prog_rejected=yes
2772 continue
2773 fi
2774 ac_cv_prog_CC="cc"
JP Abgrall511eca32014-02-12 13:46:45 -08002775 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002776 break 2
2777 fi
2778done
JP Abgrall511eca32014-02-12 13:46:45 -08002779 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002780IFS=$as_save_IFS
2781
2782if test $ac_prog_rejected = yes; then
2783 # We found a bogon in the path, so make sure we never use it.
2784 set dummy $ac_cv_prog_CC
2785 shift
2786 if test $# != 0; then
2787 # We chose a different compiler from the bogus one.
2788 # However, it has the same basename, so the bogon will be chosen
2789 # first if we set CC to just the basename; use the full file name.
2790 shift
2791 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2792 fi
2793fi
2794fi
2795fi
2796CC=$ac_cv_prog_CC
2797if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2799$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002800else
JP Abgrall511eca32014-02-12 13:46:45 -08002801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2802$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002803fi
2804
2805
2806fi
2807if test -z "$CC"; then
2808 if test -n "$ac_tool_prefix"; then
2809 for ac_prog in cl.exe
2810 do
2811 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2812set dummy $ac_tool_prefix$ac_prog; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2814$as_echo_n "checking for $ac_word... " >&6; }
2815if ${ac_cv_prog_CC+:} false; then :
2816 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002817else
2818 if test -n "$CC"; then
2819 ac_cv_prog_CC="$CC" # Let the user override the test.
2820else
2821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2822for as_dir in $PATH
2823do
2824 IFS=$as_save_IFS
2825 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002826 for ac_exec_ext in '' $ac_executable_extensions; do
2827 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002828 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
JP Abgrall511eca32014-02-12 13:46:45 -08002829 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002830 break 2
2831 fi
2832done
JP Abgrall511eca32014-02-12 13:46:45 -08002833 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002834IFS=$as_save_IFS
2835
2836fi
2837fi
2838CC=$ac_cv_prog_CC
2839if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2841$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002842else
JP Abgrall511eca32014-02-12 13:46:45 -08002843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2844$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002845fi
2846
2847
2848 test -n "$CC" && break
2849 done
2850fi
2851if test -z "$CC"; then
2852 ac_ct_CC=$CC
2853 for ac_prog in cl.exe
2854do
2855 # Extract the first word of "$ac_prog", so it can be a program name with args.
2856set dummy $ac_prog; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2858$as_echo_n "checking for $ac_word... " >&6; }
2859if ${ac_cv_prog_ac_ct_CC+:} false; then :
2860 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002861else
2862 if test -n "$ac_ct_CC"; then
2863 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2864else
2865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2866for as_dir in $PATH
2867do
2868 IFS=$as_save_IFS
2869 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002870 for ac_exec_ext in '' $ac_executable_extensions; do
2871 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002872 ac_cv_prog_ac_ct_CC="$ac_prog"
JP Abgrall511eca32014-02-12 13:46:45 -08002873 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002874 break 2
2875 fi
2876done
JP Abgrall511eca32014-02-12 13:46:45 -08002877 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002878IFS=$as_save_IFS
2879
2880fi
2881fi
2882ac_ct_CC=$ac_cv_prog_ac_ct_CC
2883if test -n "$ac_ct_CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2885$as_echo "$ac_ct_CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002886else
JP Abgrall511eca32014-02-12 13:46:45 -08002887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2888$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002889fi
2890
2891
2892 test -n "$ac_ct_CC" && break
2893done
2894
2895 if test "x$ac_ct_CC" = x; then
2896 CC=""
2897 else
2898 case $cross_compiling:$ac_tool_warned in
2899yes:)
JP Abgrall511eca32014-02-12 13:46:45 -08002900{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2901$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002902ac_tool_warned=yes ;;
2903esac
2904 CC=$ac_ct_CC
2905 fi
2906fi
2907
2908fi
2909
2910
JP Abgrall511eca32014-02-12 13:46:45 -08002911test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2912$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2913as_fn_error $? "no acceptable C compiler found in \$PATH
2914See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002915
2916# Provide some information about the compiler.
JP Abgrall511eca32014-02-12 13:46:45 -08002917$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2918set X $ac_compile
2919ac_compiler=$2
2920for ac_option in --version -v -V -qversion; do
2921 { { ac_try="$ac_compiler $ac_option >&5"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002922case "(($ac_try" in
2923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2924 *) ac_try_echo=$ac_try;;
2925esac
JP Abgrall511eca32014-02-12 13:46:45 -08002926eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2927$as_echo "$ac_try_echo"; } >&5
2928 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002929 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08002930 if test -s conftest.err; then
2931 sed '10a\
2932... rest of stderr output deleted ...
2933 10q' conftest.err >conftest.er1
2934 cat conftest.er1 >&5
2935 fi
2936 rm -f conftest.er1 conftest.err
2937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2938 test $ac_status = 0; }
2939done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002940
JP Abgrall511eca32014-02-12 13:46:45 -08002941cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002942/* end confdefs.h. */
2943
2944int
2945main ()
2946{
2947
2948 ;
2949 return 0;
2950}
2951_ACEOF
2952ac_clean_files_save=$ac_clean_files
JP Abgrall511eca32014-02-12 13:46:45 -08002953ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002954# Try to create an executable without -o first, disregard a.out.
2955# It will help us diagnose broken compilers, and finding out an intuition
2956# of exeext.
JP Abgrall511eca32014-02-12 13:46:45 -08002957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2958$as_echo_n "checking whether the C compiler works... " >&6; }
2959ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2960
2961# The possible output files:
2962ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2963
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002964ac_rmfiles=
2965for ac_file in $ac_files
2966do
2967 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08002968 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002969 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2970 esac
2971done
2972rm -f $ac_rmfiles
2973
JP Abgrall511eca32014-02-12 13:46:45 -08002974if { { ac_try="$ac_link_default"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002975case "(($ac_try" in
2976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2977 *) ac_try_echo=$ac_try;;
2978esac
JP Abgrall511eca32014-02-12 13:46:45 -08002979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2980$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002981 (eval "$ac_link_default") 2>&5
2982 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08002983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2984 test $ac_status = 0; }; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002985 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2986# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2987# in a Makefile. We should not override ac_cv_exeext if it was cached,
2988# so that the user can short-circuit this test for compilers unknown to
2989# Autoconf.
2990for ac_file in $ac_files ''
2991do
2992 test -f "$ac_file" || continue
2993 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08002994 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002995 ;;
2996 [ab].out )
2997 # We found the default executable, but exeext='' is most
2998 # certainly right.
2999 break;;
3000 *.* )
JP Abgrall511eca32014-02-12 13:46:45 -08003001 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003002 then :; else
3003 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3004 fi
3005 # We set ac_cv_exeext here because the later test for it is not
3006 # safe: cross compilers may not add the suffix if given an `-o'
3007 # argument, so we may need to know it at that point already.
3008 # Even if this section looks crufty: it has the advantage of
3009 # actually working.
3010 break;;
3011 * )
3012 break;;
3013 esac
3014done
3015test "$ac_cv_exeext" = no && ac_cv_exeext=
3016
3017else
3018 ac_file=''
3019fi
JP Abgrall511eca32014-02-12 13:46:45 -08003020if test -z "$ac_file"; then :
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3022$as_echo "no" >&6; }
3023$as_echo "$as_me: failed program was:" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003024sed 's/^/| /' conftest.$ac_ext >&5
3025
JP Abgrall511eca32014-02-12 13:46:45 -08003026{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3027$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3028as_fn_error 77 "C compiler cannot create executables
3029See \`config.log' for more details" "$LINENO" 5; }
3030else
3031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3032$as_echo "yes" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003033fi
JP Abgrall511eca32014-02-12 13:46:45 -08003034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3035$as_echo_n "checking for C compiler default output file name... " >&6; }
3036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3037$as_echo "$ac_file" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003038ac_exeext=$ac_cv_exeext
3039
JP Abgrall511eca32014-02-12 13:46:45 -08003040rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003041ac_clean_files=$ac_clean_files_save
JP Abgrall511eca32014-02-12 13:46:45 -08003042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3043$as_echo_n "checking for suffix of executables... " >&6; }
3044if { { ac_try="$ac_link"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003045case "(($ac_try" in
3046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3047 *) ac_try_echo=$ac_try;;
3048esac
JP Abgrall511eca32014-02-12 13:46:45 -08003049eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3050$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003051 (eval "$ac_link") 2>&5
3052 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08003053 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3054 test $ac_status = 0; }; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003055 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3056# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3057# work properly (i.e., refer to `conftest.exe'), while it won't with
3058# `rm'.
3059for ac_file in conftest.exe conftest conftest.*; do
3060 test -f "$ac_file" || continue
3061 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08003062 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003063 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3064 break;;
3065 * ) break;;
3066 esac
3067done
3068else
JP Abgrall511eca32014-02-12 13:46:45 -08003069 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3071as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3072See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003073fi
JP Abgrall511eca32014-02-12 13:46:45 -08003074rm -f conftest conftest$ac_cv_exeext
3075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3076$as_echo "$ac_cv_exeext" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003077
3078rm -f conftest.$ac_ext
3079EXEEXT=$ac_cv_exeext
3080ac_exeext=$EXEEXT
JP Abgrall511eca32014-02-12 13:46:45 -08003081cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3082/* end confdefs.h. */
3083#include <stdio.h>
3084int
3085main ()
3086{
3087FILE *f = fopen ("conftest.out", "w");
3088 return ferror (f) || fclose (f) != 0;
3089
3090 ;
3091 return 0;
3092}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003093_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003094ac_clean_files="$ac_clean_files conftest.out"
3095# Check that the compiler produces executables we can run. If not, either
3096# the compiler is broken, or we cross compile.
3097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3098$as_echo_n "checking whether we are cross compiling... " >&6; }
3099if test "$cross_compiling" != yes; then
3100 { { ac_try="$ac_link"
3101case "(($ac_try" in
3102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3103 *) ac_try_echo=$ac_try;;
3104esac
3105eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3106$as_echo "$ac_try_echo"; } >&5
3107 (eval "$ac_link") 2>&5
3108 ac_status=$?
3109 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3110 test $ac_status = 0; }
3111 if { ac_try='./conftest$ac_cv_exeext'
3112 { { case "(($ac_try" in
3113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3114 *) ac_try_echo=$ac_try;;
3115esac
3116eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3117$as_echo "$ac_try_echo"; } >&5
3118 (eval "$ac_try") 2>&5
3119 ac_status=$?
3120 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3121 test $ac_status = 0; }; }; then
3122 cross_compiling=no
3123 else
3124 if test "$cross_compiling" = maybe; then
3125 cross_compiling=yes
3126 else
3127 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3128$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3129as_fn_error $? "cannot run C compiled programs.
3130If you meant to cross compile, use \`--host'.
3131See \`config.log' for more details" "$LINENO" 5; }
3132 fi
3133 fi
3134fi
3135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3136$as_echo "$cross_compiling" >&6; }
3137
3138rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3139ac_clean_files=$ac_clean_files_save
3140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3141$as_echo_n "checking for suffix of object files... " >&6; }
3142if ${ac_cv_objext+:} false; then :
3143 $as_echo_n "(cached) " >&6
3144else
3145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003146/* end confdefs.h. */
3147
3148int
3149main ()
3150{
3151
3152 ;
3153 return 0;
3154}
3155_ACEOF
3156rm -f conftest.o conftest.obj
JP Abgrall511eca32014-02-12 13:46:45 -08003157if { { ac_try="$ac_compile"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003158case "(($ac_try" in
3159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3160 *) ac_try_echo=$ac_try;;
3161esac
JP Abgrall511eca32014-02-12 13:46:45 -08003162eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3163$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003164 (eval "$ac_compile") 2>&5
3165 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08003166 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3167 test $ac_status = 0; }; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003168 for ac_file in conftest.o conftest.obj conftest.*; do
3169 test -f "$ac_file" || continue;
3170 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08003171 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003172 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3173 break;;
3174 esac
3175done
3176else
JP Abgrall511eca32014-02-12 13:46:45 -08003177 $as_echo "$as_me: failed program was:" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003178sed 's/^/| /' conftest.$ac_ext >&5
3179
JP Abgrall511eca32014-02-12 13:46:45 -08003180{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3182as_fn_error $? "cannot compute suffix of object files: cannot compile
3183See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003184fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003185rm -f conftest.$ac_cv_objext conftest.$ac_ext
3186fi
JP Abgrall511eca32014-02-12 13:46:45 -08003187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3188$as_echo "$ac_cv_objext" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003189OBJEXT=$ac_cv_objext
3190ac_objext=$OBJEXT
JP Abgrall511eca32014-02-12 13:46:45 -08003191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3192$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3193if ${ac_cv_c_compiler_gnu+:} false; then :
3194 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003195else
JP Abgrall511eca32014-02-12 13:46:45 -08003196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003197/* end confdefs.h. */
3198
3199int
3200main ()
3201{
3202#ifndef __GNUC__
3203 choke me
3204#endif
3205
3206 ;
3207 return 0;
3208}
3209_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003210if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003211 ac_compiler_gnu=yes
3212else
JP Abgrall511eca32014-02-12 13:46:45 -08003213 ac_compiler_gnu=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003214fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3216ac_cv_c_compiler_gnu=$ac_compiler_gnu
3217
3218fi
JP Abgrall511eca32014-02-12 13:46:45 -08003219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3220$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3221if test $ac_compiler_gnu = yes; then
3222 GCC=yes
3223else
3224 GCC=
3225fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003226ac_test_CFLAGS=${CFLAGS+set}
3227ac_save_CFLAGS=$CFLAGS
JP Abgrall511eca32014-02-12 13:46:45 -08003228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3229$as_echo_n "checking whether $CC accepts -g... " >&6; }
3230if ${ac_cv_prog_cc_g+:} false; then :
3231 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003232else
3233 ac_save_c_werror_flag=$ac_c_werror_flag
3234 ac_c_werror_flag=yes
3235 ac_cv_prog_cc_g=no
3236 CFLAGS="-g"
JP Abgrall511eca32014-02-12 13:46:45 -08003237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003238/* end confdefs.h. */
3239
3240int
3241main ()
3242{
3243
3244 ;
3245 return 0;
3246}
3247_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003248if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003249 ac_cv_prog_cc_g=yes
3250else
JP Abgrall511eca32014-02-12 13:46:45 -08003251 CFLAGS=""
3252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003253/* end confdefs.h. */
3254
3255int
3256main ()
3257{
3258
3259 ;
3260 return 0;
3261}
3262_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003263if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003264
JP Abgrall511eca32014-02-12 13:46:45 -08003265else
3266 ac_c_werror_flag=$ac_save_c_werror_flag
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003267 CFLAGS="-g"
JP Abgrall511eca32014-02-12 13:46:45 -08003268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003269/* end confdefs.h. */
3270
3271int
3272main ()
3273{
3274
3275 ;
3276 return 0;
3277}
3278_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003279if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003280 ac_cv_prog_cc_g=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003281fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3283fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3285fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3287 ac_c_werror_flag=$ac_save_c_werror_flag
3288fi
JP Abgrall511eca32014-02-12 13:46:45 -08003289{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3290$as_echo "$ac_cv_prog_cc_g" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003291if test "$ac_test_CFLAGS" = set; then
3292 CFLAGS=$ac_save_CFLAGS
3293elif test $ac_cv_prog_cc_g = yes; then
3294 if test "$GCC" = yes; then
3295 CFLAGS="-g -O2"
3296 else
3297 CFLAGS="-g"
3298 fi
3299else
3300 if test "$GCC" = yes; then
3301 CFLAGS="-O2"
3302 else
3303 CFLAGS=
3304 fi
3305fi
JP Abgrall511eca32014-02-12 13:46:45 -08003306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3307$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3308if ${ac_cv_prog_cc_c89+:} false; then :
3309 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003310else
3311 ac_cv_prog_cc_c89=no
3312ac_save_CC=$CC
JP Abgrall511eca32014-02-12 13:46:45 -08003313cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003314/* end confdefs.h. */
3315#include <stdarg.h>
3316#include <stdio.h>
JP Abgrall511eca32014-02-12 13:46:45 -08003317struct stat;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003318/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3319struct buf { int x; };
3320FILE * (*rcsopen) (struct buf *, struct stat *, int);
3321static char *e (p, i)
3322 char **p;
3323 int i;
3324{
3325 return p[i];
3326}
3327static char *f (char * (*g) (char **, int), char **p, ...)
3328{
3329 char *s;
3330 va_list v;
3331 va_start (v,p);
3332 s = g (p, va_arg (v,int));
3333 va_end (v);
3334 return s;
3335}
3336
3337/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3338 function prototypes and stuff, but not '\xHH' hex character constants.
3339 These don't provoke an error unfortunately, instead are silently treated
3340 as 'x'. The following induces an error, until -std is added to get
3341 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3342 array size at least. It's necessary to write '\x00'==0 to get something
3343 that's true only with -std. */
3344int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3345
3346/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3347 inside strings and character constants. */
3348#define FOO(x) 'x'
3349int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3350
3351int test (int i, double x);
3352struct s1 {int (*f) (int a);};
3353struct s2 {int (*f) (double a);};
3354int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3355int argc;
3356char **argv;
3357int
3358main ()
3359{
3360return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3361 ;
3362 return 0;
3363}
3364_ACEOF
3365for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3366 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3367do
3368 CC="$ac_save_CC $ac_arg"
JP Abgrall511eca32014-02-12 13:46:45 -08003369 if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003370 ac_cv_prog_cc_c89=$ac_arg
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003371fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003372rm -f core conftest.err conftest.$ac_objext
3373 test "x$ac_cv_prog_cc_c89" != "xno" && break
3374done
3375rm -f conftest.$ac_ext
3376CC=$ac_save_CC
3377
3378fi
3379# AC_CACHE_VAL
3380case "x$ac_cv_prog_cc_c89" in
3381 x)
JP Abgrall511eca32014-02-12 13:46:45 -08003382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3383$as_echo "none needed" >&6; } ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003384 xno)
JP Abgrall511eca32014-02-12 13:46:45 -08003385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3386$as_echo "unsupported" >&6; } ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003387 *)
3388 CC="$CC $ac_cv_prog_cc_c89"
JP Abgrall511eca32014-02-12 13:46:45 -08003389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3390$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003391esac
JP Abgrall511eca32014-02-12 13:46:45 -08003392if test "x$ac_cv_prog_cc_c89" != xno; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003393
JP Abgrall511eca32014-02-12 13:46:45 -08003394fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003395
3396ac_ext=c
3397ac_cpp='$CPP $CPPFLAGS'
3398ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3399ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3400ac_compiler_gnu=$ac_cv_c_compiler_gnu
3401
Haibo Huang165065a2018-07-23 17:26:52 -07003402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
3403$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
3404if ${ac_cv_prog_cc_c99+:} false; then :
3405 $as_echo_n "(cached) " >&6
3406else
3407 ac_cv_prog_cc_c99=no
3408ac_save_CC=$CC
3409cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3410/* end confdefs.h. */
3411#include <stdarg.h>
3412#include <stdbool.h>
3413#include <stdlib.h>
3414#include <wchar.h>
3415#include <stdio.h>
3416
3417// Check varargs macros. These examples are taken from C99 6.10.3.5.
3418#define debug(...) fprintf (stderr, __VA_ARGS__)
3419#define showlist(...) puts (#__VA_ARGS__)
3420#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
3421static void
3422test_varargs_macros (void)
3423{
3424 int x = 1234;
3425 int y = 5678;
3426 debug ("Flag");
3427 debug ("X = %d\n", x);
3428 showlist (The first, second, and third items.);
3429 report (x>y, "x is %d but y is %d", x, y);
3430}
3431
3432// Check long long types.
3433#define BIG64 18446744073709551615ull
3434#define BIG32 4294967295ul
3435#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
3436#if !BIG_OK
3437 your preprocessor is broken;
3438#endif
3439#if BIG_OK
3440#else
3441 your preprocessor is broken;
3442#endif
3443static long long int bignum = -9223372036854775807LL;
3444static unsigned long long int ubignum = BIG64;
3445
3446struct incomplete_array
3447{
3448 int datasize;
3449 double data[];
3450};
3451
3452struct named_init {
3453 int number;
3454 const wchar_t *name;
3455 double average;
3456};
3457
3458typedef const char *ccp;
3459
3460static inline int
3461test_restrict (ccp restrict text)
3462{
3463 // See if C++-style comments work.
3464 // Iterate through items via the restricted pointer.
3465 // Also check for declarations in for loops.
3466 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
3467 continue;
3468 return 0;
3469}
3470
3471// Check varargs and va_copy.
3472static void
3473test_varargs (const char *format, ...)
3474{
3475 va_list args;
3476 va_start (args, format);
3477 va_list args_copy;
3478 va_copy (args_copy, args);
3479
3480 const char *str;
3481 int number;
3482 float fnumber;
3483
3484 while (*format)
3485 {
3486 switch (*format++)
3487 {
3488 case 's': // string
3489 str = va_arg (args_copy, const char *);
3490 break;
3491 case 'd': // int
3492 number = va_arg (args_copy, int);
3493 break;
3494 case 'f': // float
3495 fnumber = va_arg (args_copy, double);
3496 break;
3497 default:
3498 break;
3499 }
3500 }
3501 va_end (args_copy);
3502 va_end (args);
3503}
3504
3505int
3506main ()
3507{
3508
3509 // Check bool.
3510 _Bool success = false;
3511
3512 // Check restrict.
3513 if (test_restrict ("String literal") == 0)
3514 success = true;
3515 char *restrict newvar = "Another string";
3516
3517 // Check varargs.
3518 test_varargs ("s, d' f .", "string", 65, 34.234);
3519 test_varargs_macros ();
3520
3521 // Check flexible array members.
3522 struct incomplete_array *ia =
3523 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
3524 ia->datasize = 10;
3525 for (int i = 0; i < ia->datasize; ++i)
3526 ia->data[i] = i * 1.234;
3527
3528 // Check named initializers.
3529 struct named_init ni = {
3530 .number = 34,
3531 .name = L"Test wide string",
3532 .average = 543.34343,
3533 };
3534
3535 ni.number = 58;
3536
3537 int dynamic_array[ni.number];
3538 dynamic_array[ni.number - 1] = 543;
3539
3540 // work around unused variable warnings
3541 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
3542 || dynamic_array[ni.number - 1] != 543);
3543
3544 ;
3545 return 0;
3546}
3547_ACEOF
3548for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
3549do
3550 CC="$ac_save_CC $ac_arg"
3551 if ac_fn_c_try_compile "$LINENO"; then :
3552 ac_cv_prog_cc_c99=$ac_arg
3553fi
3554rm -f core conftest.err conftest.$ac_objext
3555 test "x$ac_cv_prog_cc_c99" != "xno" && break
3556done
3557rm -f conftest.$ac_ext
3558CC=$ac_save_CC
3559
3560fi
3561# AC_CACHE_VAL
3562case "x$ac_cv_prog_cc_c99" in
3563 x)
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3565$as_echo "none needed" >&6; } ;;
3566 xno)
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3568$as_echo "unsupported" >&6; } ;;
3569 *)
3570 CC="$CC $ac_cv_prog_cc_c99"
3571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
3572$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
3573esac
3574if test "x$ac_cv_prog_cc_c99" != xno; then :
3575
3576fi
3577
3578
JP Abgrall511eca32014-02-12 13:46:45 -08003579
3580
3581
3582
Elliott Hughes965a4b52017-05-15 10:37:39 -07003583
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003584 if test "$GCC" = yes ; then
JP Abgrall511eca32014-02-12 13:46:45 -08003585 #
3586 # -Werror forces warnings to be errors.
3587 #
3588 ac_lbl_cc_force_warning_errors=-Werror
Elliott Hughes965a4b52017-05-15 10:37:39 -07003589
3590 #
3591 # Try to have the compiler default to hiding symbols,
3592 # so that only symbols explicitly exported with
3593 # PCAP_API will be visible outside (shared) libraries.
3594 #
3595
3596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3597$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3598 save_CFLAGS="$CFLAGS"
3599 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3600 then
3601 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3602 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3603 then
3604 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3605 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3606 then
3607 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3608 else
3609 CFLAGS="$CFLAGS -fvisibility=hidden"
3610 fi
3611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3612/* end confdefs.h. */
3613
3614int
3615main ()
3616{
3617return 0
3618 ;
3619 return 0;
3620}
3621_ACEOF
3622if ac_fn_c_try_compile "$LINENO"; then :
3623
3624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3625$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07003626 can_add_to_cflags=yes
3627 #
3628 # The compile supports this; do we have some C code for
3629 # which the warning should *not* appear?
3630 # We test the fourth argument because the third argument
3631 # could contain quotes, breaking the test.
3632 #
3633 if test "x" != "x"
3634 then
3635 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3637$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3639/* end confdefs.h. */
3640
3641_ACEOF
3642if ac_fn_c_try_compile "$LINENO"; then :
3643
3644 #
3645 # Not a problem.
3646 #
3647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3648$as_echo "no" >&6; }
3649
3650else
3651
3652 #
3653 # A problem.
3654 #
3655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3656$as_echo "yes" >&6; }
3657 can_add_to_cflags=no
3658
3659fi
3660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3661 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07003662 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07003663 if test x"$can_add_to_cflags" = "xyes"
3664 then
3665 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3666 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07003667
3668else
3669
3670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3671$as_echo "no" >&6; }
3672 CFLAGS="$save_CFLAGS"
3673
3674fi
3675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3676
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003677 else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003678 V_INCLS="$V_INCLS -I/usr/local/include"
3679 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3680
JP Abgrall511eca32014-02-12 13:46:45 -08003681 case "$host_os" in
3682
3683 darwin*)
3684 #
3685 # This is assumed either to be GCC or clang, both
3686 # of which use -Werror to force warnings to be errors.
3687 #
3688 ac_lbl_cc_force_warning_errors=-Werror
Elliott Hughes965a4b52017-05-15 10:37:39 -07003689
3690 #
3691 # Try to have the compiler default to hiding symbols,
3692 # so that only symbols explicitly exported with
3693 # PCAP_API will be visible outside (shared) libraries.
3694 #
3695
3696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3697$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3698 save_CFLAGS="$CFLAGS"
3699 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3700 then
3701 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3702 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3703 then
3704 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3705 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3706 then
3707 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3708 else
3709 CFLAGS="$CFLAGS -fvisibility=hidden"
3710 fi
3711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3712/* end confdefs.h. */
3713
3714int
3715main ()
3716{
3717return 0
3718 ;
3719 return 0;
3720}
3721_ACEOF
3722if ac_fn_c_try_compile "$LINENO"; then :
3723
3724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3725$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07003726 can_add_to_cflags=yes
3727 #
3728 # The compile supports this; do we have some C code for
3729 # which the warning should *not* appear?
3730 # We test the fourth argument because the third argument
3731 # could contain quotes, breaking the test.
3732 #
3733 if test "x" != "x"
3734 then
3735 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5
3737$as_echo_n "checking whether -fvisibility=hidden ... " >&6; }
3738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3739/* end confdefs.h. */
3740
3741_ACEOF
3742if ac_fn_c_try_compile "$LINENO"; then :
3743
3744 #
3745 # Not a problem.
3746 #
3747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3748$as_echo "no" >&6; }
3749
3750else
3751
3752 #
3753 # A problem.
3754 #
3755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3756$as_echo "yes" >&6; }
3757 can_add_to_cflags=no
3758
3759fi
3760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3761 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07003762 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07003763 if test x"$can_add_to_cflags" = "xyes"
3764 then
3765 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3766 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07003767
3768else
3769
3770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3771$as_echo "no" >&6; }
3772 CFLAGS="$save_CFLAGS"
3773
3774fi
3775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3776
JP Abgrall511eca32014-02-12 13:46:45 -08003777 ;;
3778
3779 hpux*)
3780 #
3781 # HP C, which is what we presume we're using, doesn't
3782 # exit with a non-zero exit status if we hand it an
3783 # invalid -W flag, can't be forced to do so even with
3784 # +We, and doesn't handle GCC-style -W flags, so we
3785 # don't want to try using GCC-style -W flags.
3786 #
3787 ac_lbl_cc_dont_try_gcc_dashW=yes
3788 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003789
3790 irix*)
JP Abgrall511eca32014-02-12 13:46:45 -08003791 #
3792 # MIPS C, which is what we presume we're using, doesn't
3793 # necessarily exit with a non-zero exit status if we
3794 # hand it an invalid -W flag, can't be forced to do
3795 # so, and doesn't handle GCC-style -W flags, so we
3796 # don't want to try using GCC-style -W flags.
3797 #
3798 ac_lbl_cc_dont_try_gcc_dashW=yes
3799 #
3800 # It also, apparently, defaults to "char" being
3801 # unsigned, unlike most other C implementations;
3802 # I suppose we could say "signed char" whenever
3803 # we want to guarantee a signed "char", but let's
3804 # just force signed chars.
3805 #
3806 # -xansi is normally the default, but the
3807 # configure script was setting it; perhaps -cckr
3808 # was the default in the Old Days. (Then again,
3809 # that would probably be for backwards compatibility
3810 # in the days when ANSI C was Shiny and New, i.e.
3811 # 1989 and the early '90's, so maybe we can just
3812 # drop support for those compilers.)
3813 #
3814 # -g is equivalent to -g2, which turns off
3815 # optimization; we choose -g3, which generates
3816 # debugging information but doesn't turn off
3817 # optimization (even if the optimization would
3818 # cause inaccuracies in debugging).
3819 #
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003820 V_CCOPT="$V_CCOPT -xansi -signed -g3"
3821 ;;
3822
3823 osf*)
JP Abgrall511eca32014-02-12 13:46:45 -08003824 #
3825 # Presumed to be DEC OSF/1, Digital UNIX, or
3826 # Tru64 UNIX.
3827 #
3828 # The DEC C compiler, which is what we presume we're
3829 # using, doesn't exit with a non-zero exit status if we
3830 # hand it an invalid -W flag, can't be forced to do
3831 # so, and doesn't handle GCC-style -W flags, so we
3832 # don't want to try using GCC-style -W flags.
3833 #
3834 ac_lbl_cc_dont_try_gcc_dashW=yes
3835 #
3836 # -g is equivalent to -g2, which turns off
3837 # optimization; we choose -g3, which generates
3838 # debugging information but doesn't turn off
3839 # optimization (even if the optimization would
3840 # cause inaccuracies in debugging).
3841 #
3842 V_CCOPT="$V_CCOPT -g3"
3843 ;;
3844
3845 solaris*)
3846 #
3847 # Assumed to be Sun C, which requires -errwarn to force
3848 # warnings to be treated as errors.
3849 #
3850 ac_lbl_cc_force_warning_errors=-errwarn
Elliott Hughes965a4b52017-05-15 10:37:39 -07003851
3852 #
3853 # Try to have the compiler default to hiding symbols,
3854 # so that only symbols explicitly exported with
3855 # PCAP_API will be visible outside (shared) libraries.
3856 #
3857
3858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
3859$as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
3860 save_CFLAGS="$CFLAGS"
3861 if expr "x-xldscope=hidden" : "x-W.*" >/dev/null
3862 then
3863 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden"
3864 elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null
3865 then
3866 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
3867 elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null
3868 then
3869 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
3870 else
3871 CFLAGS="$CFLAGS -xldscope=hidden"
3872 fi
3873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3874/* end confdefs.h. */
3875
3876int
3877main ()
3878{
3879return 0
3880 ;
3881 return 0;
3882}
3883_ACEOF
3884if ac_fn_c_try_compile "$LINENO"; then :
3885
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3887$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07003888 can_add_to_cflags=yes
3889 #
3890 # The compile supports this; do we have some C code for
3891 # which the warning should *not* appear?
3892 # We test the fourth argument because the third argument
3893 # could contain quotes, breaking the test.
3894 #
3895 if test "x" != "x"
3896 then
3897 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5
3899$as_echo_n "checking whether -xldscope=hidden ... " >&6; }
3900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3901/* end confdefs.h. */
3902
3903_ACEOF
3904if ac_fn_c_try_compile "$LINENO"; then :
3905
3906 #
3907 # Not a problem.
3908 #
3909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3910$as_echo "no" >&6; }
3911
3912else
3913
3914 #
3915 # A problem.
3916 #
3917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3918$as_echo "yes" >&6; }
3919 can_add_to_cflags=no
3920
3921fi
3922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07003924 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07003925 if test x"$can_add_to_cflags" = "xyes"
3926 then
3927 V_CCOPT="$V_CCOPT -xldscope=hidden"
3928 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07003929
3930else
3931
3932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3933$as_echo "no" >&6; }
3934 CFLAGS="$save_CFLAGS"
3935
3936fi
3937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3938
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003939 ;;
3940
3941 ultrix*)
JP Abgrall511eca32014-02-12 13:46:45 -08003942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
3943$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
3944 if ${ac_cv_lbl_cc_const_proto+:} false; then :
3945 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003946else
Elliott Hughes965a4b52017-05-15 10:37:39 -07003947 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003948/* end confdefs.h. */
3949#include <sys/types.h>
3950int
3951main ()
3952{
3953struct a { int b; };
3954 void c(const struct a *)
3955 ;
3956 return 0;
3957}
3958_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003959if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003960 ac_cv_lbl_cc_const_proto=yes
3961else
JP Abgrall511eca32014-02-12 13:46:45 -08003962 ac_cv_lbl_cc_const_proto=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003963fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3965fi
3966
JP Abgrall511eca32014-02-12 13:46:45 -08003967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
3968$as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003969 if test $ac_cv_lbl_cc_const_proto = no ; then
JP Abgrall511eca32014-02-12 13:46:45 -08003970
3971$as_echo "#define const /**/" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003972
3973 fi
3974 ;;
3975 esac
JP Abgrall511eca32014-02-12 13:46:45 -08003976 V_CCOPT="$V_CCOPT -O"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003977 fi
3978
JP Abgrall511eca32014-02-12 13:46:45 -08003979
3980 if test "$GCC" = yes ; then
3981 #
3982 # On platforms where we build a shared library:
3983 #
3984 # add options to generate position-independent code,
Haibo Huang165065a2018-07-23 17:26:52 -07003985 # if necessary (it's the default in AIX and Darwin/macOS);
JP Abgrall511eca32014-02-12 13:46:45 -08003986 #
3987 # define option to set the soname of the shared library,
3988 # if the OS supports that;
3989 #
3990 # add options to specify, at link time, a directory to
3991 # add to the run-time search path, if that's necessary.
3992 #
3993 V_SHLIB_CMD="\$(CC)"
3994 V_SHLIB_OPT="-shared"
3995 case "$host_os" in
3996
3997 aix*)
3998 ;;
3999
4000 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*)
4001 #
4002 # Platforms where the linker is the GNU linker
4003 # or accepts command-line arguments like
4004 # those the GNU linker accepts.
4005 #
4006 # Some instruction sets require -fPIC on some
4007 # operating systems. Check for them. If you
4008 # have a combination that requires it, add it
4009 # here.
4010 #
4011 PIC_OPT=-fpic
4012 case "$host_cpu" in
4013
4014 sparc64*)
4015 case "$host_os" in
4016
4017 freebsd*|openbsd*)
4018 PIC_OPT=-fPIC
4019 ;;
4020 esac
4021 ;;
4022 esac
Haibo Huang165065a2018-07-23 17:26:52 -07004023 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT"
JP Abgrall511eca32014-02-12 13:46:45 -08004024 V_SONAME_OPT="-Wl,-soname,"
4025 V_RPATH_OPT="-Wl,-rpath,"
4026 ;;
4027
4028 hpux*)
Haibo Huang165065a2018-07-23 17:26:52 -07004029 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
JP Abgrall511eca32014-02-12 13:46:45 -08004030 #
4031 # XXX - this assumes GCC is using the HP linker,
4032 # rather than the GNU linker, and that the "+h"
4033 # option is used on all HP-UX platforms, both .sl
4034 # and .so.
4035 #
4036 V_SONAME_OPT="-Wl,+h,"
4037 #
4038 # By default, directories specifed with -L
4039 # are added to the run-time search path, so
4040 # we don't add them in pcap-config.
4041 #
4042 ;;
4043
4044 solaris*)
Haibo Huang165065a2018-07-23 17:26:52 -07004045 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
JP Abgrall511eca32014-02-12 13:46:45 -08004046 #
4047 # XXX - this assumes GCC is using the Sun linker,
4048 # rather than the GNU linker.
4049 #
4050 V_SONAME_OPT="-Wl,-h,"
4051 V_RPATH_OPT="-Wl,-R,"
4052 ;;
4053 esac
4054 else
4055 #
4056 # Set the appropriate compiler flags and, on platforms
4057 # where we build a shared library:
4058 #
4059 # add options to generate position-independent code,
Haibo Huang165065a2018-07-23 17:26:52 -07004060 # if necessary (it's the default in Darwin/macOS);
JP Abgrall511eca32014-02-12 13:46:45 -08004061 #
4062 # if we generate ".so" shared libraries, define the
4063 # appropriate options for building the shared library;
4064 #
4065 # add options to specify, at link time, a directory to
4066 # add to the run-time search path, if that's necessary.
4067 #
4068 # Note: spaces after V_SONAME_OPT are significant; on
4069 # some platforms the soname is passed with a GCC-like
4070 # "-Wl,-soname,{soname}" option, with the soname part
4071 # of the option, while on other platforms the C compiler
4072 # driver takes it as a regular option with the soname
4073 # following the option. The same applies to V_RPATH_OPT.
4074 #
4075 case "$host_os" in
4076
4077 aix*)
4078 V_SHLIB_CMD="\$(CC)"
4079 V_SHLIB_OPT="-G -bnoentry -bexpall"
4080 ;;
4081
4082 freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
4083 #
4084 # "cc" is GCC.
4085 #
Haibo Huang165065a2018-07-23 17:26:52 -07004086 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic"
JP Abgrall511eca32014-02-12 13:46:45 -08004087 V_SHLIB_CMD="\$(CC)"
4088 V_SHLIB_OPT="-shared"
4089 V_SONAME_OPT="-Wl,-soname,"
4090 V_RPATH_OPT="-Wl,-rpath,"
4091 ;;
4092
4093 hpux*)
Haibo Huang165065a2018-07-23 17:26:52 -07004094 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z"
JP Abgrall511eca32014-02-12 13:46:45 -08004095 V_SHLIB_CMD="\$(LD)"
4096 V_SHLIB_OPT="-b"
4097 V_SONAME_OPT="+h "
4098 #
4099 # By default, directories specifed with -L
4100 # are added to the run-time search path, so
4101 # we don't add them in pcap-config.
4102 #
4103 ;;
4104
4105 osf*)
4106 #
4107 # Presumed to be DEC OSF/1, Digital UNIX, or
4108 # Tru64 UNIX.
4109 #
4110 V_SHLIB_CMD="\$(CC)"
4111 V_SHLIB_OPT="-shared"
4112 V_SONAME_OPT="-soname "
4113 V_RPATH_OPT="-rpath "
4114 ;;
4115
4116 solaris*)
Haibo Huang165065a2018-07-23 17:26:52 -07004117 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic"
JP Abgrall511eca32014-02-12 13:46:45 -08004118 V_SHLIB_CMD="\$(CC)"
4119 V_SHLIB_OPT="-G"
4120 V_SONAME_OPT="-h "
4121 V_RPATH_OPT="-R"
4122 ;;
4123 esac
4124 fi
4125
4126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
4127$as_echo_n "checking for inline... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004128 save_CFLAGS="$CFLAGS"
4129 CFLAGS="$V_CCOPT"
JP Abgrall511eca32014-02-12 13:46:45 -08004130 if ${ac_cv_lbl_inline+:} false; then :
4131 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004132else
4133
4134 ac_cv_lbl_inline=""
4135 ac_lbl_cc_inline=no
4136 for ac_lbl_inline in inline __inline__ __inline
4137 do
JP Abgrall511eca32014-02-12 13:46:45 -08004138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004139/* end confdefs.h. */
4140#define inline $ac_lbl_inline
4141 static inline struct iltest *foo(void);
4142 struct iltest {
4143 int iltest1;
4144 int iltest2;
4145 };
4146
4147 static inline struct iltest *
4148 foo()
4149 {
4150 static struct iltest xxx;
4151
4152 return &xxx;
4153 }
4154int
4155main ()
4156{
4157
4158 ;
4159 return 0;
4160}
4161_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004162if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004163 ac_lbl_cc_inline=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004164fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4166 if test "$ac_lbl_cc_inline" = yes ; then
4167 break;
4168 fi
4169 done
4170 if test "$ac_lbl_cc_inline" = yes ; then
4171 ac_cv_lbl_inline=$ac_lbl_inline
4172 fi
4173fi
4174
4175 CFLAGS="$save_CFLAGS"
4176 if test ! -z "$ac_cv_lbl_inline" ; then
JP Abgrall511eca32014-02-12 13:46:45 -08004177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
4178$as_echo "$ac_cv_lbl_inline" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004179 else
JP Abgrall511eca32014-02-12 13:46:45 -08004180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4181$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004182 fi
4183
4184cat >>confdefs.h <<_ACEOF
4185#define inline $ac_cv_lbl_inline
4186_ACEOF
4187
4188
Haibo Huang165065a2018-07-23 17:26:52 -07004189#
4190# Try to arrange for large file support.
4191#
4192# Check whether --enable-largefile was given.
4193if test "${enable_largefile+set}" = set; then :
4194 enableval=$enable_largefile;
4195fi
4196
4197if test "$enable_largefile" != no; then
4198
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4200$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4201if ${ac_cv_sys_largefile_CC+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08004202 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004203else
Haibo Huang165065a2018-07-23 17:26:52 -07004204 ac_cv_sys_largefile_CC=no
4205 if test "$GCC" != yes; then
4206 ac_save_CC=$CC
4207 while :; do
4208 # IRIX 6.2 and later do not support large files by default,
4209 # so use the C compiler's -n32 option if that helps.
4210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004211/* end confdefs.h. */
Haibo Huang165065a2018-07-23 17:26:52 -07004212#include <sys/types.h>
4213 /* Check that off_t can represent 2**63 - 1 correctly.
4214 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4215 since some C++ compilers masquerading as C compilers
4216 incorrectly reject 9223372036854775807. */
4217#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4218 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4219 && LARGE_OFF_T % 2147483647 == 1)
4220 ? 1 : -1];
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004221int
Haibo Huang165065a2018-07-23 17:26:52 -07004222main ()
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004223{
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004224
Haibo Huang165065a2018-07-23 17:26:52 -07004225 ;
JP Abgrall511eca32014-02-12 13:46:45 -08004226 return 0;
4227}
JP Abgrall511eca32014-02-12 13:46:45 -08004228_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07004229 if ac_fn_c_try_compile "$LINENO"; then :
4230 break
JP Abgrall511eca32014-02-12 13:46:45 -08004231fi
Haibo Huang165065a2018-07-23 17:26:52 -07004232rm -f core conftest.err conftest.$ac_objext
4233 CC="$CC -n32"
4234 if ac_fn_c_try_compile "$LINENO"; then :
4235 ac_cv_sys_largefile_CC=' -n32'; break
JP Abgrall511eca32014-02-12 13:46:45 -08004236fi
Haibo Huang165065a2018-07-23 17:26:52 -07004237rm -f core conftest.err conftest.$ac_objext
4238 break
4239 done
4240 CC=$ac_save_CC
4241 rm -f conftest.$ac_ext
4242 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004243fi
Haibo Huang165065a2018-07-23 17:26:52 -07004244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4245$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4246 if test "$ac_cv_sys_largefile_CC" != no; then
4247 CC=$CC$ac_cv_sys_largefile_CC
4248 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004249
Haibo Huang165065a2018-07-23 17:26:52 -07004250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4251$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4252if ${ac_cv_sys_file_offset_bits+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08004253 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004254else
Haibo Huang165065a2018-07-23 17:26:52 -07004255 while :; do
4256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004257/* end confdefs.h. */
Haibo Huang165065a2018-07-23 17:26:52 -07004258#include <sys/types.h>
4259 /* Check that off_t can represent 2**63 - 1 correctly.
4260 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4261 since some C++ compilers masquerading as C compilers
4262 incorrectly reject 9223372036854775807. */
4263#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4264 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4265 && LARGE_OFF_T % 2147483647 == 1)
4266 ? 1 : -1];
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004267int
Haibo Huang165065a2018-07-23 17:26:52 -07004268main ()
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004269{
JP Abgrall511eca32014-02-12 13:46:45 -08004270
Haibo Huang165065a2018-07-23 17:26:52 -07004271 ;
4272 return 0;
4273}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004274_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004275if ac_fn_c_try_compile "$LINENO"; then :
Haibo Huang165065a2018-07-23 17:26:52 -07004276 ac_cv_sys_file_offset_bits=no; break
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004277fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Haibo Huang165065a2018-07-23 17:26:52 -07004279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4280/* end confdefs.h. */
4281#define _FILE_OFFSET_BITS 64
4282#include <sys/types.h>
4283 /* Check that off_t can represent 2**63 - 1 correctly.
4284 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4285 since some C++ compilers masquerading as C compilers
4286 incorrectly reject 9223372036854775807. */
4287#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4288 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4289 && LARGE_OFF_T % 2147483647 == 1)
4290 ? 1 : -1];
4291int
4292main ()
4293{
4294
4295 ;
4296 return 0;
4297}
4298_ACEOF
4299if ac_fn_c_try_compile "$LINENO"; then :
4300 ac_cv_sys_file_offset_bits=64; break
4301fi
4302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4303 ac_cv_sys_file_offset_bits=unknown
4304 break
4305done
4306fi
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4308$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4309case $ac_cv_sys_file_offset_bits in #(
4310 no | unknown) ;;
4311 *)
4312cat >>confdefs.h <<_ACEOF
4313#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4314_ACEOF
4315;;
4316esac
4317rm -rf conftest*
4318 if test $ac_cv_sys_file_offset_bits = unknown; then
4319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4320$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4321if ${ac_cv_sys_large_files+:} false; then :
4322 $as_echo_n "(cached) " >&6
4323else
4324 while :; do
4325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4326/* end confdefs.h. */
4327#include <sys/types.h>
4328 /* Check that off_t can represent 2**63 - 1 correctly.
4329 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4330 since some C++ compilers masquerading as C compilers
4331 incorrectly reject 9223372036854775807. */
4332#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4333 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4334 && LARGE_OFF_T % 2147483647 == 1)
4335 ? 1 : -1];
4336int
4337main ()
4338{
4339
4340 ;
4341 return 0;
4342}
4343_ACEOF
4344if ac_fn_c_try_compile "$LINENO"; then :
4345 ac_cv_sys_large_files=no; break
4346fi
4347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4349/* end confdefs.h. */
4350#define _LARGE_FILES 1
4351#include <sys/types.h>
4352 /* Check that off_t can represent 2**63 - 1 correctly.
4353 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4354 since some C++ compilers masquerading as C compilers
4355 incorrectly reject 9223372036854775807. */
4356#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4357 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4358 && LARGE_OFF_T % 2147483647 == 1)
4359 ? 1 : -1];
4360int
4361main ()
4362{
4363
4364 ;
4365 return 0;
4366}
4367_ACEOF
4368if ac_fn_c_try_compile "$LINENO"; then :
4369 ac_cv_sys_large_files=1; break
4370fi
4371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4372 ac_cv_sys_large_files=unknown
4373 break
4374done
4375fi
4376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4377$as_echo "$ac_cv_sys_large_files" >&6; }
4378case $ac_cv_sys_large_files in #(
4379 no | unknown) ;;
4380 *)
4381cat >>confdefs.h <<_ACEOF
4382#define _LARGE_FILES $ac_cv_sys_large_files
4383_ACEOF
4384;;
4385esac
4386rm -rf conftest*
4387 fi
4388
4389
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004390fi
4391
Haibo Huang165065a2018-07-23 17:26:52 -07004392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4393$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4394if ${ac_cv_sys_largefile_source+:} false; then :
4395 $as_echo_n "(cached) " >&6
4396else
4397 while :; do
4398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4399/* end confdefs.h. */
4400#include <sys/types.h> /* for off_t */
4401 #include <stdio.h>
4402int
4403main ()
4404{
4405int (*fp) (FILE *, off_t, int) = fseeko;
4406 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4407 ;
4408 return 0;
4409}
4410_ACEOF
4411if ac_fn_c_try_link "$LINENO"; then :
4412 ac_cv_sys_largefile_source=no; break
4413fi
4414rm -f core conftest.err conftest.$ac_objext \
4415 conftest$ac_exeext conftest.$ac_ext
4416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4417/* end confdefs.h. */
4418#define _LARGEFILE_SOURCE 1
4419#include <sys/types.h> /* for off_t */
4420 #include <stdio.h>
4421int
4422main ()
4423{
4424int (*fp) (FILE *, off_t, int) = fseeko;
4425 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4426 ;
4427 return 0;
4428}
4429_ACEOF
4430if ac_fn_c_try_link "$LINENO"; then :
4431 ac_cv_sys_largefile_source=1; break
4432fi
4433rm -f core conftest.err conftest.$ac_objext \
4434 conftest$ac_exeext conftest.$ac_ext
4435 ac_cv_sys_largefile_source=unknown
4436 break
4437done
4438fi
4439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4440$as_echo "$ac_cv_sys_largefile_source" >&6; }
4441case $ac_cv_sys_largefile_source in #(
4442 no | unknown) ;;
4443 *)
4444cat >>confdefs.h <<_ACEOF
4445#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4446_ACEOF
4447;;
4448esac
4449rm -rf conftest*
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004450
Haibo Huang165065a2018-07-23 17:26:52 -07004451# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4452# in glibc 2.1.3, but that breaks too many other things.
4453# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4454if test $ac_cv_sys_largefile_source != unknown; then
4455
4456$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004457
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004458fi
4459
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004460
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004461ac_ext=c
4462ac_cpp='$CPP $CPPFLAGS'
4463ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4464ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4465ac_compiler_gnu=$ac_cv_c_compiler_gnu
JP Abgrall511eca32014-02-12 13:46:45 -08004466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4467$as_echo_n "checking how to run the C preprocessor... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004468# On Suns, sometimes $CPP names a directory.
4469if test -n "$CPP" && test -d "$CPP"; then
4470 CPP=
4471fi
4472if test -z "$CPP"; then
JP Abgrall511eca32014-02-12 13:46:45 -08004473 if ${ac_cv_prog_CPP+:} false; then :
4474 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004475else
4476 # Double quotes because CPP needs to be expanded
4477 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4478 do
4479 ac_preproc_ok=false
4480for ac_c_preproc_warn_flag in '' yes
4481do
4482 # Use a header file that comes with gcc, so configuring glibc
4483 # with a fresh cross-compiler works.
4484 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4485 # <limits.h> exists even on freestanding compilers.
4486 # On the NeXT, cc -E runs the code through the compiler's parser,
4487 # not just through cpp. "Syntax error" is here to catch this case.
JP Abgrall511eca32014-02-12 13:46:45 -08004488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004489/* end confdefs.h. */
4490#ifdef __STDC__
4491# include <limits.h>
4492#else
4493# include <assert.h>
4494#endif
4495 Syntax error
4496_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004497if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004498
JP Abgrall511eca32014-02-12 13:46:45 -08004499else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004500 # Broken: fails on valid input.
4501continue
4502fi
JP Abgrall511eca32014-02-12 13:46:45 -08004503rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004504
4505 # OK, works on sane cases. Now check whether nonexistent headers
4506 # can be detected and how.
JP Abgrall511eca32014-02-12 13:46:45 -08004507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004508/* end confdefs.h. */
4509#include <ac_nonexistent.h>
4510_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004511if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004512 # Broken: success on invalid input.
4513continue
4514else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004515 # Passes both tests.
4516ac_preproc_ok=:
4517break
4518fi
JP Abgrall511eca32014-02-12 13:46:45 -08004519rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004520
4521done
4522# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
JP Abgrall511eca32014-02-12 13:46:45 -08004523rm -f conftest.i conftest.err conftest.$ac_ext
4524if $ac_preproc_ok; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004525 break
4526fi
4527
4528 done
4529 ac_cv_prog_CPP=$CPP
4530
4531fi
4532 CPP=$ac_cv_prog_CPP
4533else
4534 ac_cv_prog_CPP=$CPP
4535fi
JP Abgrall511eca32014-02-12 13:46:45 -08004536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4537$as_echo "$CPP" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004538ac_preproc_ok=false
4539for ac_c_preproc_warn_flag in '' yes
4540do
4541 # Use a header file that comes with gcc, so configuring glibc
4542 # with a fresh cross-compiler works.
4543 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4544 # <limits.h> exists even on freestanding compilers.
4545 # On the NeXT, cc -E runs the code through the compiler's parser,
4546 # not just through cpp. "Syntax error" is here to catch this case.
JP Abgrall511eca32014-02-12 13:46:45 -08004547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004548/* end confdefs.h. */
4549#ifdef __STDC__
4550# include <limits.h>
4551#else
4552# include <assert.h>
4553#endif
4554 Syntax error
4555_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004556if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004557
JP Abgrall511eca32014-02-12 13:46:45 -08004558else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004559 # Broken: fails on valid input.
4560continue
4561fi
JP Abgrall511eca32014-02-12 13:46:45 -08004562rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004563
4564 # OK, works on sane cases. Now check whether nonexistent headers
4565 # can be detected and how.
JP Abgrall511eca32014-02-12 13:46:45 -08004566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004567/* end confdefs.h. */
4568#include <ac_nonexistent.h>
4569_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004570if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004571 # Broken: success on invalid input.
4572continue
4573else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004574 # Passes both tests.
4575ac_preproc_ok=:
4576break
4577fi
JP Abgrall511eca32014-02-12 13:46:45 -08004578rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004579
4580done
4581# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
JP Abgrall511eca32014-02-12 13:46:45 -08004582rm -f conftest.i conftest.err conftest.$ac_ext
4583if $ac_preproc_ok; then :
4584
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004585else
JP Abgrall511eca32014-02-12 13:46:45 -08004586 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4587$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4588as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4589See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004590fi
4591
4592ac_ext=c
4593ac_cpp='$CPP $CPPFLAGS'
4594ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4595ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4596ac_compiler_gnu=$ac_cv_c_compiler_gnu
4597
4598
JP Abgrall511eca32014-02-12 13:46:45 -08004599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4600$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4601if ${ac_cv_path_GREP+:} false; then :
4602 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004603else
JP Abgrall511eca32014-02-12 13:46:45 -08004604 if test -z "$GREP"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004605 ac_path_GREP_found=false
JP Abgrall511eca32014-02-12 13:46:45 -08004606 # Loop through the user's path and test for each of PROGNAME-LIST
4607 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004608for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4609do
4610 IFS=$as_save_IFS
4611 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08004612 for ac_prog in grep ggrep; do
4613 for ac_exec_ext in '' $ac_executable_extensions; do
4614 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4615 as_fn_executable_p "$ac_path_GREP" || continue
4616# Check for GNU ac_path_GREP and select it if it is found.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004617 # Check for GNU $ac_path_GREP
4618case `"$ac_path_GREP" --version 2>&1` in
4619*GNU*)
4620 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4621*)
4622 ac_count=0
JP Abgrall511eca32014-02-12 13:46:45 -08004623 $as_echo_n 0123456789 >"conftest.in"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004624 while :
4625 do
4626 cat "conftest.in" "conftest.in" >"conftest.tmp"
4627 mv "conftest.tmp" "conftest.in"
4628 cp "conftest.in" "conftest.nl"
JP Abgrall511eca32014-02-12 13:46:45 -08004629 $as_echo 'GREP' >> "conftest.nl"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004630 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4631 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
JP Abgrall511eca32014-02-12 13:46:45 -08004632 as_fn_arith $ac_count + 1 && ac_count=$as_val
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004633 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4634 # Best one so far, save it but keep looking for a better one
4635 ac_cv_path_GREP="$ac_path_GREP"
4636 ac_path_GREP_max=$ac_count
4637 fi
4638 # 10*(2^10) chars as input seems more than enough
4639 test $ac_count -gt 10 && break
4640 done
4641 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4642esac
4643
JP Abgrall511eca32014-02-12 13:46:45 -08004644 $ac_path_GREP_found && break 3
4645 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004646 done
JP Abgrall511eca32014-02-12 13:46:45 -08004647 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004648IFS=$as_save_IFS
JP Abgrall511eca32014-02-12 13:46:45 -08004649 if test -z "$ac_cv_path_GREP"; then
4650 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4651 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004652else
4653 ac_cv_path_GREP=$GREP
4654fi
4655
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004656fi
JP Abgrall511eca32014-02-12 13:46:45 -08004657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4658$as_echo "$ac_cv_path_GREP" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004659 GREP="$ac_cv_path_GREP"
4660
4661
JP Abgrall511eca32014-02-12 13:46:45 -08004662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4663$as_echo_n "checking for egrep... " >&6; }
4664if ${ac_cv_path_EGREP+:} false; then :
4665 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004666else
4667 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4668 then ac_cv_path_EGREP="$GREP -E"
4669 else
JP Abgrall511eca32014-02-12 13:46:45 -08004670 if test -z "$EGREP"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004671 ac_path_EGREP_found=false
JP Abgrall511eca32014-02-12 13:46:45 -08004672 # Loop through the user's path and test for each of PROGNAME-LIST
4673 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004674for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4675do
4676 IFS=$as_save_IFS
4677 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08004678 for ac_prog in egrep; do
4679 for ac_exec_ext in '' $ac_executable_extensions; do
4680 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4681 as_fn_executable_p "$ac_path_EGREP" || continue
4682# Check for GNU ac_path_EGREP and select it if it is found.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004683 # Check for GNU $ac_path_EGREP
4684case `"$ac_path_EGREP" --version 2>&1` in
4685*GNU*)
4686 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4687*)
4688 ac_count=0
JP Abgrall511eca32014-02-12 13:46:45 -08004689 $as_echo_n 0123456789 >"conftest.in"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004690 while :
4691 do
4692 cat "conftest.in" "conftest.in" >"conftest.tmp"
4693 mv "conftest.tmp" "conftest.in"
4694 cp "conftest.in" "conftest.nl"
JP Abgrall511eca32014-02-12 13:46:45 -08004695 $as_echo 'EGREP' >> "conftest.nl"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004696 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4697 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
JP Abgrall511eca32014-02-12 13:46:45 -08004698 as_fn_arith $ac_count + 1 && ac_count=$as_val
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004699 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4700 # Best one so far, save it but keep looking for a better one
4701 ac_cv_path_EGREP="$ac_path_EGREP"
4702 ac_path_EGREP_max=$ac_count
4703 fi
4704 # 10*(2^10) chars as input seems more than enough
4705 test $ac_count -gt 10 && break
4706 done
4707 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4708esac
4709
JP Abgrall511eca32014-02-12 13:46:45 -08004710 $ac_path_EGREP_found && break 3
4711 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004712 done
JP Abgrall511eca32014-02-12 13:46:45 -08004713 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004714IFS=$as_save_IFS
JP Abgrall511eca32014-02-12 13:46:45 -08004715 if test -z "$ac_cv_path_EGREP"; then
4716 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4717 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004718else
4719 ac_cv_path_EGREP=$EGREP
4720fi
4721
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004722 fi
4723fi
JP Abgrall511eca32014-02-12 13:46:45 -08004724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4725$as_echo "$ac_cv_path_EGREP" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004726 EGREP="$ac_cv_path_EGREP"
4727
4728
JP Abgrall511eca32014-02-12 13:46:45 -08004729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4730$as_echo_n "checking for ANSI C header files... " >&6; }
4731if ${ac_cv_header_stdc+:} false; then :
4732 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004733else
JP Abgrall511eca32014-02-12 13:46:45 -08004734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004735/* end confdefs.h. */
4736#include <stdlib.h>
4737#include <stdarg.h>
4738#include <string.h>
4739#include <float.h>
4740
4741int
4742main ()
4743{
4744
4745 ;
4746 return 0;
4747}
4748_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004749if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004750 ac_cv_header_stdc=yes
4751else
JP Abgrall511eca32014-02-12 13:46:45 -08004752 ac_cv_header_stdc=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004753fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4755
4756if test $ac_cv_header_stdc = yes; then
4757 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
JP Abgrall511eca32014-02-12 13:46:45 -08004758 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004759/* end confdefs.h. */
4760#include <string.h>
4761
4762_ACEOF
4763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall511eca32014-02-12 13:46:45 -08004764 $EGREP "memchr" >/dev/null 2>&1; then :
4765
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004766else
4767 ac_cv_header_stdc=no
4768fi
4769rm -f conftest*
4770
4771fi
4772
4773if test $ac_cv_header_stdc = yes; then
4774 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
JP Abgrall511eca32014-02-12 13:46:45 -08004775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004776/* end confdefs.h. */
4777#include <stdlib.h>
4778
4779_ACEOF
4780if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall511eca32014-02-12 13:46:45 -08004781 $EGREP "free" >/dev/null 2>&1; then :
4782
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004783else
4784 ac_cv_header_stdc=no
4785fi
4786rm -f conftest*
4787
4788fi
4789
4790if test $ac_cv_header_stdc = yes; then
4791 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
JP Abgrall511eca32014-02-12 13:46:45 -08004792 if test "$cross_compiling" = yes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004793 :
4794else
JP Abgrall511eca32014-02-12 13:46:45 -08004795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004796/* end confdefs.h. */
4797#include <ctype.h>
4798#include <stdlib.h>
4799#if ((' ' & 0x0FF) == 0x020)
4800# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4801# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4802#else
4803# define ISLOWER(c) \
4804 (('a' <= (c) && (c) <= 'i') \
4805 || ('j' <= (c) && (c) <= 'r') \
4806 || ('s' <= (c) && (c) <= 'z'))
4807# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4808#endif
4809
4810#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4811int
4812main ()
4813{
4814 int i;
4815 for (i = 0; i < 256; i++)
4816 if (XOR (islower (i), ISLOWER (i))
4817 || toupper (i) != TOUPPER (i))
4818 return 2;
4819 return 0;
4820}
4821_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004822if ac_fn_c_try_run "$LINENO"; then :
4823
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004824else
JP Abgrall511eca32014-02-12 13:46:45 -08004825 ac_cv_header_stdc=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004826fi
JP Abgrall511eca32014-02-12 13:46:45 -08004827rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4828 conftest.$ac_objext conftest.beam conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004829fi
4830
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004831fi
4832fi
JP Abgrall511eca32014-02-12 13:46:45 -08004833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4834$as_echo "$ac_cv_header_stdc" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004835if test $ac_cv_header_stdc = yes; then
4836
JP Abgrall511eca32014-02-12 13:46:45 -08004837$as_echo "#define STDC_HEADERS 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004838
4839fi
4840
4841# On IRIX 5.3, sys/types and inttypes.h are conflicting.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004842for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4843 inttypes.h stdint.h unistd.h
JP Abgrall511eca32014-02-12 13:46:45 -08004844do :
4845 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4846ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4847"
4848if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004849 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004850#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004851_ACEOF
4852
4853fi
4854
4855done
4856
4857
Haibo Huang165065a2018-07-23 17:26:52 -07004858for ac_header in sys/ioccom.h sys/sockio.h limits.h
JP Abgrall511eca32014-02-12 13:46:45 -08004859do :
4860 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4861ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4862if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004863 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004864#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004865_ACEOF
4866
4867fi
4868
4869done
4870
Haibo Huang165065a2018-07-23 17:26:52 -07004871for ac_header in netpacket/packet.h
JP Abgrall511eca32014-02-12 13:46:45 -08004872do :
Haibo Huang165065a2018-07-23 17:26:52 -07004873 ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default"
4874if test "x$ac_cv_header_netpacket_packet_h" = xyes; then :
JP Abgrall511eca32014-02-12 13:46:45 -08004875 cat >>confdefs.h <<_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07004876#define HAVE_NETPACKET_PACKET_H 1
JP Abgrall511eca32014-02-12 13:46:45 -08004877_ACEOF
4878
4879fi
4880
4881done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004882
4883for ac_header in net/pfvar.h
JP Abgrall511eca32014-02-12 13:46:45 -08004884do :
4885 ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004886#include <sys/socket.h>
4887#include <net/if.h>
JP Abgrall511eca32014-02-12 13:46:45 -08004888"
4889if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004890 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004891#define HAVE_NET_PFVAR_H 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004892_ACEOF
4893
4894fi
4895
4896done
4897
JP Abgrall511eca32014-02-12 13:46:45 -08004898if test "$ac_cv_header_net_pfvar_h" = yes; then
4899 #
4900 # Check for various PF actions.
4901 #
4902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
4903$as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
4904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004905/* end confdefs.h. */
4906#include <sys/types.h>
JP Abgrall511eca32014-02-12 13:46:45 -08004907 #include <sys/socket.h>
4908 #include <net/if.h>
4909 #include <net/pfvar.h>
4910int
4911main ()
4912{
4913return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
4914 ;
4915 return 0;
4916}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004917_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004918if ac_fn_c_try_compile "$LINENO"; then :
4919
4920 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4921$as_echo "yes" >&6; }
4922
4923$as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
4924
4925
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004926else
JP Abgrall511eca32014-02-12 13:46:45 -08004927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004929fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4931fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004932
Elliott Hughesd8845d72015-10-19 18:07:04 -07004933case "$host_os" in
Elliott Hughes965a4b52017-05-15 10:37:39 -07004934linux*|uclinux*)
Elliott Hughesd8845d72015-10-19 18:07:04 -07004935 for ac_header in linux/sockios.h linux/if_bonding.h
4936do :
4937 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4938ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4939#include <sys/socket.h>
4940#include <linux/if.h>
4941
4942"
4943if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4944 cat >>confdefs.h <<_ACEOF
4945#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4946_ACEOF
4947
4948fi
4949
4950done
4951
4952 ;;
4953esac
4954
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004955if test "$GCC" = yes ; then
JP Abgrall511eca32014-02-12 13:46:45 -08004956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
4957$as_echo_n "checking for ANSI ioctl definitions... " >&6; }
4958 if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
4959 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004960else
JP Abgrall511eca32014-02-12 13:46:45 -08004961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004962/* end confdefs.h. */
4963/*
4964 * This generates a "duplicate case value" when fixincludes
4965 * has not be run.
4966 */
4967# include <sys/types.h>
4968# include <sys/time.h>
4969# include <sys/ioctl.h>
4970# ifdef HAVE_SYS_IOCCOM_H
4971# include <sys/ioccom.h>
4972# endif
4973int
4974main ()
4975{
4976switch (0) {
4977 case _IO('A', 1):;
4978 case _IO('B', 1):;
4979 }
4980 ;
4981 return 0;
4982}
4983_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004984if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004985 ac_cv_lbl_gcc_fixincludes=yes
4986else
JP Abgrall511eca32014-02-12 13:46:45 -08004987 ac_cv_lbl_gcc_fixincludes=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004988fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4990fi
4991
JP Abgrall511eca32014-02-12 13:46:45 -08004992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
4993$as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004994 if test $ac_cv_lbl_gcc_fixincludes = no ; then
4995 # Don't cache failure
4996 unset ac_cv_lbl_gcc_fixincludes
JP Abgrall511eca32014-02-12 13:46:45 -08004997 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004998 fi
4999 fi
5000
Haibo Huang165065a2018-07-23 17:26:52 -07005001for ac_func in strerror strerror_r strerror_s strlcpy strlcat
JP Abgrall511eca32014-02-12 13:46:45 -08005002do :
5003 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5004ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5005if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005006 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005007#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005008_ACEOF
5009
5010fi
5011done
5012
5013
5014needsnprintf=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005015for ac_func in vsnprintf snprintf
JP Abgrall511eca32014-02-12 13:46:45 -08005016do :
5017 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
5018ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
5019if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005020 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005021#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005022_ACEOF
5023
5024else
5025 needsnprintf=yes
5026fi
5027done
5028
5029if test $needsnprintf = yes; then
5030 case " $LIBOBJS " in
5031 *" snprintf.$ac_objext "* ) ;;
5032 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
5033 ;;
5034esac
5035
5036fi
5037
Elliott Hughes965a4b52017-05-15 10:37:39 -07005038needstrtok_r=no
5039for ac_func in strtok_r
5040do :
5041 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
5042if test "x$ac_cv_func_strtok_r" = xyes; then :
5043 cat >>confdefs.h <<_ACEOF
5044#define HAVE_STRTOK_R 1
5045_ACEOF
5046
5047else
5048 needstrtok_r=yes
5049fi
5050done
5051
5052if test $needstrtok_r = yes; then
5053 case " $LIBOBJS " in
5054 *" strtok_r.$ac_objext "* ) ;;
5055 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
5056 ;;
5057esac
5058
5059fi
5060
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005061#
Haibo Huang165065a2018-07-23 17:26:52 -07005062# Do we have ffs(), and is it declared in <strings.h>?
5063#
5064for ac_func in ffs
5065do :
5066 ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs"
5067if test "x$ac_cv_func_ffs" = xyes; then :
5068 cat >>confdefs.h <<_ACEOF
5069#define HAVE_FFS 1
5070_ACEOF
5071
5072fi
5073done
5074
5075if test "$ac_cv_func_ffs" = yes; then
5076 #
5077 # We have ffs(); is it declared in <strings.h>?
5078 #
5079 # This test fails if we don't have <strings.h> or if we do
5080 # but it doesn't declare ffs().
5081 #
5082 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "
5083#include <strings.h>
5084
5085"
5086if test "x$ac_cv_have_decl_ffs" = xyes; then :
5087
5088
5089$as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h
5090
5091
5092fi
5093
5094fi
5095
5096#
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005097# Do this before checking for ether_hostton(), as it's a
Haibo Huang165065a2018-07-23 17:26:52 -07005098# "getaddrinfo()-ish function".
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005099#
5100
Haibo Huang165065a2018-07-23 17:26:52 -07005101 #
5102 # Most operating systems have getaddrinfo() in the default searched
5103 # libraries (i.e. libc). Check there first.
5104 #
5105 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
5106if test "x$ac_cv_func_getaddrinfo" = xyes; then :
JP Abgrall511eca32014-02-12 13:46:45 -08005107
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005108else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005109
Haibo Huang165065a2018-07-23 17:26:52 -07005110 #
5111 # Not found in the standard system libraries.
5112 # Try libsocket, which requires libnsl.
5113 #
5114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5
5115$as_echo_n "checking for getaddrinfo in -lsocket... " >&6; }
5116if ${ac_cv_lib_socket_getaddrinfo+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08005117 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005118else
5119 ac_check_lib_save_LIBS=$LIBS
5120LIBS="-lsocket -lnsl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005122/* end confdefs.h. */
5123
5124/* Override any GCC internal prototype to avoid an error.
5125 Use char because int might match the return type of a GCC
5126 builtin and then its argument prototype would still apply. */
5127#ifdef __cplusplus
5128extern "C"
5129#endif
Haibo Huang165065a2018-07-23 17:26:52 -07005130char getaddrinfo ();
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005131int
5132main ()
5133{
Haibo Huang165065a2018-07-23 17:26:52 -07005134return getaddrinfo ();
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005135 ;
5136 return 0;
5137}
5138_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005139if ac_fn_c_try_link "$LINENO"; then :
Haibo Huang165065a2018-07-23 17:26:52 -07005140 ac_cv_lib_socket_getaddrinfo=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005141else
Haibo Huang165065a2018-07-23 17:26:52 -07005142 ac_cv_lib_socket_getaddrinfo=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005143fi
JP Abgrall511eca32014-02-12 13:46:45 -08005144rm -f core conftest.err conftest.$ac_objext \
5145 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005146LIBS=$ac_check_lib_save_LIBS
5147fi
Haibo Huang165065a2018-07-23 17:26:52 -07005148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5
5149$as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; }
5150if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005151
Haibo Huang165065a2018-07-23 17:26:52 -07005152 #
5153 # OK, we found it in libsocket.
5154 #
5155 LIBS="-lsocket -lnsl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005156
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005157else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005158
Haibo Huang165065a2018-07-23 17:26:52 -07005159 #
5160 # We didn't find it.
5161 #
5162 as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5
5163
5164fi
5165
5166
5167 #
5168 # OK, do we have recvmsg() in libxnet?
5169 # We also link with libsocket and libnsl.
5170 #
5171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5
5172$as_echo_n "checking for recvmsg in -lxnet... " >&6; }
5173if ${ac_cv_lib_xnet_recvmsg+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08005174 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005175else
5176 ac_check_lib_save_LIBS=$LIBS
Haibo Huang165065a2018-07-23 17:26:52 -07005177LIBS="-lxnet -lsocket -lnsl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005179/* end confdefs.h. */
5180
5181/* Override any GCC internal prototype to avoid an error.
5182 Use char because int might match the return type of a GCC
5183 builtin and then its argument prototype would still apply. */
5184#ifdef __cplusplus
5185extern "C"
5186#endif
Haibo Huang165065a2018-07-23 17:26:52 -07005187char recvmsg ();
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005188int
5189main ()
5190{
Haibo Huang165065a2018-07-23 17:26:52 -07005191return recvmsg ();
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005192 ;
5193 return 0;
5194}
5195_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005196if ac_fn_c_try_link "$LINENO"; then :
Haibo Huang165065a2018-07-23 17:26:52 -07005197 ac_cv_lib_xnet_recvmsg=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005198else
Haibo Huang165065a2018-07-23 17:26:52 -07005199 ac_cv_lib_xnet_recvmsg=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005200fi
JP Abgrall511eca32014-02-12 13:46:45 -08005201rm -f core conftest.err conftest.$ac_objext \
5202 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005203LIBS=$ac_check_lib_save_LIBS
5204fi
Haibo Huang165065a2018-07-23 17:26:52 -07005205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5
5206$as_echo "$ac_cv_lib_xnet_recvmsg" >&6; }
5207if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then :
5208
5209 #
5210 # Yes - link with it as well.
5211 #
5212 LIBS="-lxnet $LIBS"
5213
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005214fi
5215
Haibo Huang165065a2018-07-23 17:26:52 -07005216
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005217fi
5218
5219 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
JP Abgrall511eca32014-02-12 13:46:45 -08005220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
5221$as_echo_n "checking for library containing putmsg... " >&6; }
5222if ${ac_cv_search_putmsg+:} false; then :
5223 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005224else
5225 ac_func_search_save_LIBS=$LIBS
JP Abgrall511eca32014-02-12 13:46:45 -08005226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005227/* end confdefs.h. */
5228
5229/* Override any GCC internal prototype to avoid an error.
5230 Use char because int might match the return type of a GCC
5231 builtin and then its argument prototype would still apply. */
5232#ifdef __cplusplus
5233extern "C"
5234#endif
5235char putmsg ();
5236int
5237main ()
5238{
5239return putmsg ();
5240 ;
5241 return 0;
5242}
5243_ACEOF
5244for ac_lib in '' str; do
5245 if test -z "$ac_lib"; then
5246 ac_res="none required"
5247 else
5248 ac_res=-l$ac_lib
5249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5250 fi
JP Abgrall511eca32014-02-12 13:46:45 -08005251 if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005252 ac_cv_search_putmsg=$ac_res
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005253fi
JP Abgrall511eca32014-02-12 13:46:45 -08005254rm -f core conftest.err conftest.$ac_objext \
5255 conftest$ac_exeext
5256 if ${ac_cv_search_putmsg+:} false; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005257 break
5258fi
5259done
JP Abgrall511eca32014-02-12 13:46:45 -08005260if ${ac_cv_search_putmsg+:} false; then :
5261
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005262else
5263 ac_cv_search_putmsg=no
5264fi
5265rm conftest.$ac_ext
5266LIBS=$ac_func_search_save_LIBS
5267fi
JP Abgrall511eca32014-02-12 13:46:45 -08005268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
5269$as_echo "$ac_cv_search_putmsg" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005270ac_res=$ac_cv_search_putmsg
JP Abgrall511eca32014-02-12 13:46:45 -08005271if test "$ac_res" != no; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5273
5274fi
5275
5276
5277
5278#
Haibo Huang165065a2018-07-23 17:26:52 -07005279# Check for reentrant versions of getnetbyname_r(), as provided by
5280# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5281# If we don't find one, we just use getnetbyname(), which uses
5282# thread-specific data on many platforms, but doesn't use it on
5283# NetBSD or OpenBSD, and may not use it on older versions of other
5284# platforms.
5285#
5286# Only do the check if we have a declaration of getnetbyname_r();
5287# without it, we can't check which API it has. (We assume that
5288# if there's a declaration, it has a prototype, so that the API
5289# can be checked.)
5290#
5291ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h>
5292"
5293if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then :
5294
5295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5
5296$as_echo_n "checking for the Linux getnetbyname_r()... " >&6; }
5297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5298/* end confdefs.h. */
5299#include <netdb.h>
5300int
5301main ()
5302{
5303
5304 struct netent netent_buf;
5305 char buf[1024];
5306 struct netent *resultp;
5307 int h_errnoval;
5308
5309 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval);
5310
5311 ;
5312 return 0;
5313}
5314_ACEOF
5315if ac_fn_c_try_link "$LINENO"; then :
5316
5317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5318$as_echo "yes" >&6; }
5319
5320$as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h
5321
5322
5323else
5324
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327
5328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5
5329$as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; }
5330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5331/* end confdefs.h. */
5332#include <netdb.h>
5333int
5334main ()
5335{
5336
5337 struct netent netent_buf;
5338 char buf[1024];
5339
5340 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL;
5341
5342 ;
5343 return 0;
5344}
5345_ACEOF
5346if ac_fn_c_try_link "$LINENO"; then :
5347
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5349$as_echo "yes" >&6; }
5350
5351$as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h
5352
5353
5354else
5355
5356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358
5359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5
5360$as_echo_n "checking for AIX getnetbyname_r()... " >&6; }
5361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5362/* end confdefs.h. */
5363#include <netdb.h>
5364int
5365main ()
5366{
5367
5368 struct netent netent_buf;
5369 struct netent_data net_data;
5370
5371 return getnetbyname_r((const char *)0, &netent_buf, &net_data);
5372
5373 ;
5374 return 0;
5375}
5376_ACEOF
5377if ac_fn_c_try_link "$LINENO"; then :
5378
5379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5380$as_echo "yes" >&6; }
5381
5382$as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h
5383
5384
5385else
5386
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5388$as_echo "no" >&6; }
5389
5390fi
5391rm -f core conftest.err conftest.$ac_objext \
5392 conftest$ac_exeext conftest.$ac_ext
5393
5394fi
5395rm -f core conftest.err conftest.$ac_objext \
5396 conftest$ac_exeext conftest.$ac_ext
5397
5398fi
5399rm -f core conftest.err conftest.$ac_objext \
5400 conftest$ac_exeext conftest.$ac_ext
5401
5402fi
5403
5404
5405#
5406# Check for reentrant versions of getprotobyname_r(), as provided by
5407# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!).
5408# If we don't find one, we just use getprotobyname(), which uses
5409# thread-specific data on many platforms, but doesn't use it on
5410# NetBSD or OpenBSD, and may not use it on older versions of other
5411# platforms.
5412#
5413# Only do the check if we have a declaration of getprotobyname_r();
5414# without it, we can't check which API it has. (We assume that
5415# if there's a declaration, it has a prototype, so that the API
5416# can be checked.)
5417#
5418ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h>
5419"
5420if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then :
5421
5422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5
5423$as_echo_n "checking for the Linux getprotobyname_r()... " >&6; }
5424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5425/* end confdefs.h. */
5426#include <netdb.h>
5427int
5428main ()
5429{
5430
5431 struct protoent protoent_buf;
5432 char buf[1024];
5433 struct protoent *resultp;
5434
5435 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp);
5436
5437 ;
5438 return 0;
5439}
5440_ACEOF
5441if ac_fn_c_try_link "$LINENO"; then :
5442
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5444$as_echo "yes" >&6; }
5445
5446$as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h
5447
5448
5449else
5450
5451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5452$as_echo "no" >&6; }
5453
5454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5
5455$as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; }
5456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5457/* end confdefs.h. */
5458#include <netdb.h>
5459int
5460main ()
5461{
5462
5463 struct protoent protoent_buf;
5464 char buf[1024];
5465
5466 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL;
5467
5468 ;
5469 return 0;
5470}
5471_ACEOF
5472if ac_fn_c_try_link "$LINENO"; then :
5473
5474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5475$as_echo "yes" >&6; }
5476
5477$as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h
5478
5479
5480else
5481
5482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5483$as_echo "no" >&6; }
5484
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5
5486$as_echo_n "checking for AIX getprotobyname_r()... " >&6; }
5487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5488/* end confdefs.h. */
5489#include <netdb.h>
5490int
5491main ()
5492{
5493
5494 struct protoent protoent_buf;
5495 struct protoent_data proto_data;
5496
5497 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data);
5498
5499 ;
5500 return 0;
5501}
5502_ACEOF
5503if ac_fn_c_try_link "$LINENO"; then :
5504
5505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5506$as_echo "yes" >&6; }
5507
5508$as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h
5509
5510
5511else
5512
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5514$as_echo "no" >&6; }
5515
5516fi
5517rm -f core conftest.err conftest.$ac_objext \
5518 conftest$ac_exeext conftest.$ac_ext
5519
5520fi
5521rm -f core conftest.err conftest.$ac_objext \
5522 conftest$ac_exeext conftest.$ac_ext
5523
5524fi
5525rm -f core conftest.err conftest.$ac_objext \
5526 conftest$ac_exeext conftest.$ac_ext
5527
5528fi
5529
5530
5531#
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005532# You are in a twisty little maze of UN*Xes, all different.
5533# Some might not have ether_hostton().
Haibo Huang165065a2018-07-23 17:26:52 -07005534# Some might have it and declare it in <net/ethernet.h>.
5535# Some might have it and declare it in <netinet/ether.h>
5536# Some might have it and declare it in <sys/ethernet.h>.
5537# Some might have it and declare it in <arpa/inet.h>.
5538# Some might have it and declare it in <netinet/if_ether.h>.
5539# Some might have it and not declare it in any header file.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005540#
5541# Before you is a C compiler.
5542#
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005543for ac_func in ether_hostton
JP Abgrall511eca32014-02-12 13:46:45 -08005544do :
5545 ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
5546if test "x$ac_cv_func_ether_hostton" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005547 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005548#define HAVE_ETHER_HOSTTON 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005549_ACEOF
5550
5551fi
5552done
5553
5554if test "$ac_cv_func_ether_hostton" = yes; then
5555 #
Haibo Huang165065a2018-07-23 17:26:52 -07005556 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>?
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005557 #
Haibo Huang165065a2018-07-23 17:26:52 -07005558 # This test fails if we don't have <net/ethernet.h> or if we do
5559 # but it doesn't declare ether_hostton().
5560 #
5561 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5562#include <net/ethernet.h>
5563
5564"
5565if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5566
5567
5568$as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5569
5570
5571fi
5572
5573 #
5574 # Did that succeed?
5575 #
5576 if test "$ac_cv_have_decl_ether_hostton" != yes; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005577 #
Haibo Huang165065a2018-07-23 17:26:52 -07005578 # No, how about <netinet/ether.h>, as on Linux?
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005579 #
Haibo Huang165065a2018-07-23 17:26:52 -07005580 # This test fails if we don't have <netinet/ether.h>
5581 # or if we do but it doesn't declare ether_hostton().
5582 #
5583 # Unset ac_cv_have_decl_ether_hostton so we don't
5584 # treat the previous failure as a cached value and
5585 # suppress the next test.
5586 #
5587 unset ac_cv_have_decl_ether_hostton
5588 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5589#include <netinet/ether.h>
5590
5591"
5592if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5593
5594
5595$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5596
5597
5598fi
5599
5600 fi
5601 #
5602 # Did that succeed?
5603 #
5604 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5605 #
5606 # No, how about <sys/ethernet.h>, as on Solaris 10
5607 # and later?
5608 #
5609 # This test fails if we don't have <sys/ethernet.h>
5610 # or if we do but it doesn't declare ether_hostton().
5611 #
5612 # Unset ac_cv_have_decl_ether_hostton so we don't
5613 # treat the previous failure as a cached value and
5614 # suppress the next test.
5615 #
5616 unset ac_cv_have_decl_ether_hostton
5617 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5618#include <sys/ethernet.h>
5619
5620"
5621if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5622
5623
5624$as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5625
5626
5627fi
5628
5629 fi
5630 #
5631 # Did that succeed?
5632 #
5633 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5634 #
5635 # No, how about <arpa/inet.h>, as in AIX?
5636 #
5637 # This test fails if we don't have <arpa/inet.h>
5638 # (if we have ether_hostton(), we should have
5639 # networking, and if we have networking, we should
5640 # have <arapa/inet.h>) or if we do but it doesn't
5641 # declare ether_hostton().
5642 #
5643 # Unset ac_cv_have_decl_ether_hostton so we don't
5644 # treat the previous failure as a cached value and
5645 # suppress the next test.
5646 #
5647 unset ac_cv_have_decl_ether_hostton
5648 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
5649#include <arpa/inet.h>
5650
5651"
5652if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
5653
5654
5655$as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
5656
5657
5658fi
5659
5660 fi
5661 #
5662 # Did that succeed?
5663 #
5664 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5665 #
5666 # No, how about <netinet/if_ether.h>?
5667 # On some platforms, it requires <net/if.h> and
5668 # <netinet/in.h>, and we always include it with
5669 # both of them, so test it with both of them.
5670 #
5671 # This test fails if we don't have <netinet/if_ether.h>
5672 # and the headers we include before it, or if we do but
5673 # <netinet/if_ether.h> doesn't declare ether_hostton().
5674 #
5675 # Unset ac_cv_have_decl_ether_hostton so we don't
5676 # treat the previous failure as a cached value and
5677 # suppress the next test.
5678 #
5679 unset ac_cv_have_decl_ether_hostton
JP Abgrall511eca32014-02-12 13:46:45 -08005680 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005681#include <sys/types.h>
5682#include <sys/socket.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005683#include <net/if.h>
Haibo Huang165065a2018-07-23 17:26:52 -07005684#include <netinet/in.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005685#include <netinet/if_ether.h>
5686
JP Abgrall511eca32014-02-12 13:46:45 -08005687"
5688if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005689
5690
JP Abgrall511eca32014-02-12 13:46:45 -08005691$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005692
5693
5694fi
5695
5696 fi
5697 #
Haibo Huang165065a2018-07-23 17:26:52 -07005698 # After all that, is ether_hostton() declared?
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005699 #
Haibo Huang165065a2018-07-23 17:26:52 -07005700 if test "$ac_cv_have_decl_ether_hostton" = yes; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005701 #
Haibo Huang165065a2018-07-23 17:26:52 -07005702 # Yes.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005703 #
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005704
Haibo Huang165065a2018-07-23 17:26:52 -07005705$as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005706
Haibo Huang165065a2018-07-23 17:26:52 -07005707 else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005708 #
5709 # No, we'll have to declare it ourselves.
Haibo Huang165065a2018-07-23 17:26:52 -07005710 # Do we have "struct ether_addr" if we include
5711 # <netinet/if_ether.h>?
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005712 #
JP Abgrall511eca32014-02-12 13:46:45 -08005713 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
Haibo Huang165065a2018-07-23 17:26:52 -07005714 #include <sys/types.h>
5715 #include <sys/socket.h>
5716 #include <net/if.h>
5717 #include <netinet/in.h>
5718 #include <netinet/if_ether.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005719
JP Abgrall511eca32014-02-12 13:46:45 -08005720"
5721if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005722
5723cat >>confdefs.h <<_ACEOF
5724#define HAVE_STRUCT_ETHER_ADDR 1
5725_ACEOF
5726
5727
5728fi
5729
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005730 fi
5731fi
5732
Haibo Huang165065a2018-07-23 17:26:52 -07005733#
5734# For various things that might use pthreads.
5735#
5736ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
5737if test "x$ac_cv_header_pthread_h" = xyes; then :
5738
5739 #
5740 # OK, we have pthread.h. Do we have pthread_create in the
5741 # system libraries?
5742 #
5743 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create"
5744if test "x$ac_cv_func_pthread_create" = xyes; then :
5745
5746 #
5747 # Yes.
5748 #
5749 ac_lbl_have_pthreads="found"
5750
5751else
5752
5753 #
5754 # No - do we have it in -lpthreads?
5755 #
5756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5
5757$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
5758if ${ac_cv_lib_pthreads_pthread_create+:} false; then :
5759 $as_echo_n "(cached) " >&6
5760else
5761 ac_check_lib_save_LIBS=$LIBS
5762LIBS="-lpthreads $LIBS"
5763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5764/* end confdefs.h. */
5765
5766/* Override any GCC internal prototype to avoid an error.
5767 Use char because int might match the return type of a GCC
5768 builtin and then its argument prototype would still apply. */
5769#ifdef __cplusplus
5770extern "C"
5771#endif
5772char pthread_create ();
5773int
5774main ()
5775{
5776return pthread_create ();
5777 ;
5778 return 0;
5779}
5780_ACEOF
5781if ac_fn_c_try_link "$LINENO"; then :
5782 ac_cv_lib_pthreads_pthread_create=yes
5783else
5784 ac_cv_lib_pthreads_pthread_create=no
5785fi
5786rm -f core conftest.err conftest.$ac_objext \
5787 conftest$ac_exeext conftest.$ac_ext
5788LIBS=$ac_check_lib_save_LIBS
5789fi
5790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5
5791$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
5792if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then :
5793
5794 #
5795 # Yes - add -lpthreads.
5796 #
5797 ac_lbl_have_pthreads="found"
5798 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads"
5799
5800else
5801
5802 #
5803 # No - do we have it in -lpthread?
5804 #
5805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
5806$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
5807if ${ac_cv_lib_pthread_pthread_create+:} false; then :
5808 $as_echo_n "(cached) " >&6
5809else
5810 ac_check_lib_save_LIBS=$LIBS
5811LIBS="-lpthread $LIBS"
5812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5813/* end confdefs.h. */
5814
5815/* Override any GCC internal prototype to avoid an error.
5816 Use char because int might match the return type of a GCC
5817 builtin and then its argument prototype would still apply. */
5818#ifdef __cplusplus
5819extern "C"
5820#endif
5821char pthread_create ();
5822int
5823main ()
5824{
5825return pthread_create ();
5826 ;
5827 return 0;
5828}
5829_ACEOF
5830if ac_fn_c_try_link "$LINENO"; then :
5831 ac_cv_lib_pthread_pthread_create=yes
5832else
5833 ac_cv_lib_pthread_pthread_create=no
5834fi
5835rm -f core conftest.err conftest.$ac_objext \
5836 conftest$ac_exeext conftest.$ac_ext
5837LIBS=$ac_check_lib_save_LIBS
5838fi
5839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5
5840$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
5841if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
5842
5843 #
5844 # Yes - add -lpthread.
5845 #
5846 ac_lbl_have_pthreads="found"
5847 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
5848
5849else
5850
5851 #
5852 # No.
5853 #
5854 ac_lbl_have_pthreads="not found"
5855
5856fi
5857
5858
5859fi
5860
5861
5862fi
5863
5864
5865else
5866
5867 #
5868 # We didn't find pthread.h.
5869 #
5870 ac_lbl_have_pthreads="not found"
5871
5872
5873fi
5874
5875
5876
JP Abgrall511eca32014-02-12 13:46:45 -08005877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
5878$as_echo_n "checking if --disable-protochain option is specified... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005879# Check whether --enable-protochain was given.
JP Abgrall511eca32014-02-12 13:46:45 -08005880if test "${enable_protochain+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005881 enableval=$enable_protochain;
5882fi
5883
5884case "x$enable_protochain" in
5885xyes) enable_protochain=enabled ;;
5886xno) enable_protochain=disabled ;;
5887x) enable_protochain=enabled ;;
5888esac
5889
5890if test "$enable_protochain" = "disabled"; then
5891
JP Abgrall511eca32014-02-12 13:46:45 -08005892$as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005893
5894fi
JP Abgrall511eca32014-02-12 13:46:45 -08005895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
5896$as_echo "${enable_protochain}" >&6; }
5897
5898#
Elliott Hughes965a4b52017-05-15 10:37:39 -07005899# valgrindtest directly uses the native capture mechanism, but
5900# only tests with BPF and PF_PACKET sockets; only enable it if
5901# we have BPF or PF_PACKET sockets.
5902#
Haibo Huang165065a2018-07-23 17:26:52 -07005903VALGRINDTEST_SRC=
Elliott Hughes965a4b52017-05-15 10:37:39 -07005904
5905#
JP Abgrall511eca32014-02-12 13:46:45 -08005906# SITA support is mutually exclusive with native capture support;
5907# "--with-sita" selects SITA support.
5908#
5909
5910# Check whether --with-sita was given.
5911if test "${with_sita+set}" = set; then :
5912 withval=$with_sita;
5913 if test ! "x$withval" = "xno" ; then
5914
5915$as_echo "#define SITA 1" >>confdefs.h
5916
5917 { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling SITA ACN support" >&5
5918$as_echo "$as_me: Enabling SITA ACN support" >&6;}
5919 V_PCAP=sita
JP Abgrall511eca32014-02-12 13:46:45 -08005920 fi
5921
5922else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005923
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005924
5925# Check whether --with-pcap was given.
JP Abgrall511eca32014-02-12 13:46:45 -08005926if test "${with_pcap+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005927 withval=$with_pcap;
5928fi
5929
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005930if test ! -z "$with_pcap" ; then
5931 V_PCAP="$withval"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005932else
Haibo Huang165065a2018-07-23 17:26:52 -07005933 #
5934 # Check for a bunch of headers for various packet
5935 # capture mechanisms.
5936 #
5937 for ac_header in net/bpf.h
5938do :
5939 ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default"
5940if test "x$ac_cv_header_net_bpf_h" = xyes; then :
5941 cat >>confdefs.h <<_ACEOF
5942#define HAVE_NET_BPF_H 1
5943_ACEOF
5944
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005945fi
Haibo Huang165065a2018-07-23 17:26:52 -07005946
5947done
5948
5949 if test "$ac_cv_header_net_bpf_h" = yes; then
5950 #
5951 # Does it define BIOCSETIF?
5952 # I.e., is it a header for an LBL/BSD-style capture
5953 # mechanism, or is it just a header for a BPF filter
5954 # engine? Some versions of Arch Linux, for example,
5955 # have a net/bpf.h that doesn't define BIOCSETIF;
5956 # as it's a Linux, it should use packet sockets,
5957 # instead.
5958 #
5959 # We need:
5960 #
5961 # sys/types.h, because FreeBSD 10's net/bpf.h
5962 # requires that various BSD-style integer types
5963 # be defined;
5964 #
5965 # sys/ioctl.h and, if we have it, sys/ioccom.h,
5966 # because net/bpf.h defines ioctls;
5967 #
5968 # net/if.h, because it defines some structures
5969 # used in ioctls defined by net/bpf.h;
5970 #
5971 # sys/socket.h, because OpenBSD 5.9's net/bpf.h
5972 # defines some structure fields as being
5973 # struct sockaddrs;
5974 #
5975 # and net/bpf.h doesn't necessarily include all
5976 # of those headers itself.
5977 #
5978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5
5979$as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; }
5980 if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then :
5981 $as_echo_n "(cached) " >&6
5982else
5983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5984/* end confdefs.h. */
5985
5986#include <sys/types.h>
5987#include <sys/ioctl.h>
5988#include <sys/socket.h>
5989#ifdef HAVE_SYS_IOCCOM_H
5990#include <sys/ioccom.h>
5991#endif
5992#include <net/bpf.h>
5993#include <net/if.h>
5994
5995int
5996main ()
5997{
5998u_int i = BIOCSETIF;
5999 ;
6000 return 0;
6001}
6002_ACEOF
6003if ac_fn_c_try_compile "$LINENO"; then :
6004 ac_cv_lbl_bpf_h_defines_biocsetif=yes
6005else
6006 ac_cv_lbl_bpf_h_defines_biocsetif=no
6007fi
6008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6009fi
6010
6011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5
6012$as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; }
6013 fi
6014 for ac_header in net/pfilt.h net/enet.h
6015do :
6016 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6017ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6018if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6019 cat >>confdefs.h <<_ACEOF
6020#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6021_ACEOF
6022
6023fi
6024
6025done
6026
6027 for ac_header in net/nit.h sys/net/nit.h
6028do :
6029 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6030ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6031if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6032 cat >>confdefs.h <<_ACEOF
6033#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6034_ACEOF
6035
6036fi
6037
6038done
6039
6040 for ac_header in linux/socket.h net/raw.h sys/dlpi.h
6041do :
6042 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6043ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6044if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6045 cat >>confdefs.h <<_ACEOF
6046#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6047_ACEOF
6048
6049fi
6050
6051done
6052
6053
6054 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then
6055 #
6056 # BPF.
6057 # Check this before DLPI, so that we pick BPF on
6058 # Solaris 11 and later.
6059 #
6060 V_PCAP=bpf
6061
6062 #
6063 # We have BPF, so build valgrindtest with "make test"
6064 # on macOS and FreeBSD (add your OS once there's a
6065 # valgrind for it).
6066 #
6067 case "$host_os" in
6068
6069 freebsd*|darwin*|linux*)
6070 VALGRINDTEST_SRC=valgrindtest.c
6071 ;;
6072 esac
6073 elif test "$ac_cv_header_linux_socket_h" = yes; then
6074 #
6075 # No prizes for guessing this one.
6076 #
6077 V_PCAP=linux
6078
6079 #
6080 # XXX - this won't work with older kernels that have
6081 # SOCK_PACKET sockets but not PF_PACKET sockets.
6082 #
6083 VALGRINDTEST_SRC=valgrindtest.c
6084 elif test "$ac_cv_header_net_pfilt_h" = yes; then
6085 #
6086 # DEC OSF/1, Digital UNIX, Tru64 UNIX
6087 #
6088 V_PCAP=pf
6089 elif test "$ac_cv_header_net_enet_h" = yes; then
6090 #
6091 # Stanford Enetfilter.
6092 #
6093 V_PCAP=enet
6094 elif test "$ac_cv_header_net_nit_h" = yes; then
6095 #
6096 # SunOS 4.x STREAMS NIT.
6097 #
6098 V_PCAP=snit
6099 elif test "$ac_cv_header_sys_net_nit_h" = yes; then
6100 #
6101 # Pre-SunOS 4.x non-STREAMS NIT.
6102 #
6103 V_PCAP=nit
6104 elif test "$ac_cv_header_net_raw_h" = yes; then
6105 #
6106 # IRIX snoop.
6107 #
6108 V_PCAP=snoop
6109 elif test "$ac_cv_header_sys_dlpi_h" = yes; then
6110 #
6111 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others.
6112 #
6113 V_PCAP=dlpi
6114 else
6115 #
6116 # Nothing we support.
6117 #
6118 V_PCAP=null
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
6120$as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
6121 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
6122$as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
6123 fi
6124fi
6125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
6126$as_echo_n "checking packet capture type... " >&6; }
JP Abgrall511eca32014-02-12 13:46:45 -08006127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
6128$as_echo "$V_PCAP" >&6; }
6129
Elliott Hughes965a4b52017-05-15 10:37:39 -07006130
JP Abgrall511eca32014-02-12 13:46:45 -08006131#
6132# Do capture-mechanism-dependent tests.
6133#
6134case "$V_PCAP" in
6135dlpi)
6136 #
6137 # Needed for common functions used by pcap-[dlpi,libdlpi].c
6138 #
6139 SSRC="dlpisubs.c"
6140
6141 #
6142 # Checks for some header files.
6143 #
6144 for ac_header in sys/bufmod.h sys/dlpi_ext.h
6145do :
6146 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6147ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6148if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6149 cat >>confdefs.h <<_ACEOF
6150#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6151_ACEOF
6152
6153fi
6154
6155done
6156
6157
6158 #
6159 # Checks to see if Solaris has the public libdlpi(3LIB) library.
6160 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
6161 # public libdlpi(3LIB) version. Before libdlpi was made public, a
6162 # private version also existed, which did not have the same APIs.
6163 # Due to a gcc bug, the default search path for 32-bit libraries does
6164 # not include /lib, we add it explicitly here.
6165 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
6166 # Also, due to the bug above applications that link to libpcap with
6167 # libdlpi will have to add "-L/lib" option to "configure".
6168 #
6169 saved_ldflags=$LDFLAGS
6170 LDFLAGS="$LIBS -L/lib"
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
6172$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
6173if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
6174 $as_echo_n "(cached) " >&6
6175else
6176 ac_check_lib_save_LIBS=$LIBS
6177LIBS="-ldlpi $LIBS"
6178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6179/* end confdefs.h. */
6180
6181/* Override any GCC internal prototype to avoid an error.
6182 Use char because int might match the return type of a GCC
6183 builtin and then its argument prototype would still apply. */
6184#ifdef __cplusplus
6185extern "C"
6186#endif
6187char dlpi_walk ();
6188int
6189main ()
6190{
6191return dlpi_walk ();
6192 ;
6193 return 0;
6194}
6195_ACEOF
6196if ac_fn_c_try_link "$LINENO"; then :
6197 ac_cv_lib_dlpi_dlpi_walk=yes
6198else
6199 ac_cv_lib_dlpi_dlpi_walk=no
6200fi
6201rm -f core conftest.err conftest.$ac_objext \
6202 conftest$ac_exeext conftest.$ac_ext
6203LIBS=$ac_check_lib_save_LIBS
6204fi
6205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
6206$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
6207if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
6208
6209 LIBS="-ldlpi $LIBS"
6210 V_PCAP=libdlpi
6211
6212$as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
6213
6214
6215else
6216 V_PCAP=dlpi
6217fi
6218
6219 LDFLAGS=$saved_ldflags
6220
6221 #
6222 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
6223 # versions of DLPI.
6224 #
6225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
6226$as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
6227 if ${ac_cv_sys_dlpi_usable+:} false; then :
6228 $as_echo_n "(cached) " >&6
6229else
6230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6231/* end confdefs.h. */
6232
6233 #include <sys/types.h>
6234 #include <sys/time.h>
6235 #include <sys/dlpi.h>
6236
6237int
6238main ()
6239{
6240int i = DL_PROMISC_PHYS;
6241 ;
6242 return 0;
6243}
6244_ACEOF
6245if ac_fn_c_try_compile "$LINENO"; then :
6246 ac_cv_sys_dlpi_usable=yes
6247else
6248 ac_cv_sys_dlpi_usable=no
6249fi
6250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6251fi
6252
6253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
6254$as_echo "$ac_cv_sys_dlpi_usable" >&6; }
6255 if test $ac_cv_sys_dlpi_usable = no ; then
6256 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
6257 fi
6258
6259 #
Haibo Huang165065a2018-07-23 17:26:52 -07006260 # Check to see if Solaris has the dl_passive_req_t struct defined
6261 # in <sys/dlpi.h>.
6262 # This check is for DLPI support for passive modes.
JP Abgrall511eca32014-02-12 13:46:45 -08006263 # See dlpi(7P) for more details.
6264 #
Haibo Huang165065a2018-07-23 17:26:52 -07006265 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" "
6266 #include <sys/types.h>
6267 #include <sys/dlpi.h>
JP Abgrall511eca32014-02-12 13:46:45 -08006268
Haibo Huang165065a2018-07-23 17:26:52 -07006269"
6270if test "x$ac_cv_type_dl_passive_req_t" = xyes; then :
6271
6272cat >>confdefs.h <<_ACEOF
6273#define HAVE_DL_PASSIVE_REQ_T 1
JP Abgrall511eca32014-02-12 13:46:45 -08006274_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07006275
6276
JP Abgrall511eca32014-02-12 13:46:45 -08006277fi
6278
JP Abgrall511eca32014-02-12 13:46:45 -08006279 ;;
6280
6281linux)
6282 #
6283 # Do we have the wireless extensions?
6284 #
6285 for ac_header in linux/wireless.h
6286do :
6287 ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
6288#include <sys/socket.h>
6289#include <linux/if.h>
6290#include <linux/types.h>
6291
6292"
6293if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
6294 cat >>confdefs.h <<_ACEOF
6295#define HAVE_LINUX_WIRELESS_H 1
6296_ACEOF
6297
6298fi
6299
6300done
6301
6302
6303 #
6304 # Do we have libnl?
6305 #
6306
6307# Check whether --with-libnl was given.
6308if test "${with_libnl+set}" = set; then :
6309 withval=$with_libnl; with_libnl=$withval
Haibo Huang165065a2018-07-23 17:26:52 -07006310else
6311 with_libnl=if_available
JP Abgrall511eca32014-02-12 13:46:45 -08006312fi
6313
6314
6315 if test x$with_libnl != xno ; then
6316 have_any_nl="no"
6317
Elliott Hughesd8845d72015-10-19 18:07:04 -07006318 incdir=-I/usr/include/libnl3
6319 libnldir=
Haibo Huang165065a2018-07-23 17:26:52 -07006320 case "$with_libnl" in
6321
6322 yes|if_available)
6323 ;;
6324
6325 *)
6326 if test -d $withval; then
6327 libnldir=-L${withval}/lib/.libs
6328 incdir=-I${withval}/include
6329 fi
6330 ;;
6331 esac
Elliott Hughesd8845d72015-10-19 18:07:04 -07006332
JP Abgrall511eca32014-02-12 13:46:45 -08006333 #
6334 # Try libnl 3.x first.
6335 #
6336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
6337$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
6338if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
6339 $as_echo_n "(cached) " >&6
6340else
6341 ac_check_lib_save_LIBS=$LIBS
Elliott Hughesd8845d72015-10-19 18:07:04 -07006342LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08006343cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6344/* end confdefs.h. */
6345
6346/* Override any GCC internal prototype to avoid an error.
6347 Use char because int might match the return type of a GCC
6348 builtin and then its argument prototype would still apply. */
6349#ifdef __cplusplus
6350extern "C"
6351#endif
6352char nl_socket_alloc ();
6353int
6354main ()
6355{
6356return nl_socket_alloc ();
6357 ;
6358 return 0;
6359}
6360_ACEOF
6361if ac_fn_c_try_link "$LINENO"; then :
6362 ac_cv_lib_nl_3_nl_socket_alloc=yes
6363else
6364 ac_cv_lib_nl_3_nl_socket_alloc=no
6365fi
6366rm -f core conftest.err conftest.$ac_objext \
6367 conftest$ac_exeext conftest.$ac_ext
6368LIBS=$ac_check_lib_save_LIBS
6369fi
6370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
6371$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
6372if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
6373
6374 #
6375 # Yes, we have libnl 3.x.
6376 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07006377 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08006378
6379$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6380
6381
6382$as_echo "#define HAVE_LIBNL_3_x 1" >>confdefs.h
6383
6384
6385$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
6386
6387
6388$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
6389
Elliott Hughesd8845d72015-10-19 18:07:04 -07006390 V_INCLS="$V_INCLS ${incdir}"
JP Abgrall511eca32014-02-12 13:46:45 -08006391 have_any_nl="yes"
6392
6393fi
6394
6395
6396 if test x$have_any_nl = xno ; then
6397 #
6398 # Try libnl 2.x
6399 #
6400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5
6401$as_echo_n "checking for nl_socket_alloc in -lnl... " >&6; }
6402if ${ac_cv_lib_nl_nl_socket_alloc+:} false; then :
6403 $as_echo_n "(cached) " >&6
6404else
6405 ac_check_lib_save_LIBS=$LIBS
6406LIBS="-lnl $LIBS"
6407cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408/* end confdefs.h. */
6409
6410/* Override any GCC internal prototype to avoid an error.
6411 Use char because int might match the return type of a GCC
6412 builtin and then its argument prototype would still apply. */
6413#ifdef __cplusplus
6414extern "C"
6415#endif
6416char nl_socket_alloc ();
6417int
6418main ()
6419{
6420return nl_socket_alloc ();
6421 ;
6422 return 0;
6423}
6424_ACEOF
6425if ac_fn_c_try_link "$LINENO"; then :
6426 ac_cv_lib_nl_nl_socket_alloc=yes
6427else
6428 ac_cv_lib_nl_nl_socket_alloc=no
6429fi
6430rm -f core conftest.err conftest.$ac_objext \
6431 conftest$ac_exeext conftest.$ac_ext
6432LIBS=$ac_check_lib_save_LIBS
6433fi
6434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_socket_alloc" >&5
6435$as_echo "$ac_cv_lib_nl_nl_socket_alloc" >&6; }
6436if test "x$ac_cv_lib_nl_nl_socket_alloc" = xyes; then :
6437
6438 #
6439 # Yes, we have libnl 2.x.
6440 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07006441 LIBS="${libnldir} -lnl-genl -lnl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08006442
6443$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6444
6445
6446$as_echo "#define HAVE_LIBNL_2_x 1" >>confdefs.h
6447
6448
6449$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
6450
6451
6452$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
6453
6454 have_any_nl="yes"
6455
6456fi
6457
6458 fi
6459
6460 if test x$have_any_nl = xno ; then
6461 #
6462 # No, we don't; do we have libnl 1.x?
6463 #
6464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_handle_alloc in -lnl" >&5
6465$as_echo_n "checking for nl_handle_alloc in -lnl... " >&6; }
6466if ${ac_cv_lib_nl_nl_handle_alloc+:} false; then :
6467 $as_echo_n "(cached) " >&6
6468else
6469 ac_check_lib_save_LIBS=$LIBS
6470LIBS="-lnl $LIBS"
6471cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6472/* end confdefs.h. */
6473
6474/* Override any GCC internal prototype to avoid an error.
6475 Use char because int might match the return type of a GCC
6476 builtin and then its argument prototype would still apply. */
6477#ifdef __cplusplus
6478extern "C"
6479#endif
6480char nl_handle_alloc ();
6481int
6482main ()
6483{
6484return nl_handle_alloc ();
6485 ;
6486 return 0;
6487}
6488_ACEOF
6489if ac_fn_c_try_link "$LINENO"; then :
6490 ac_cv_lib_nl_nl_handle_alloc=yes
6491else
6492 ac_cv_lib_nl_nl_handle_alloc=no
6493fi
6494rm -f core conftest.err conftest.$ac_objext \
6495 conftest$ac_exeext conftest.$ac_ext
6496LIBS=$ac_check_lib_save_LIBS
6497fi
6498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_handle_alloc" >&5
6499$as_echo "$ac_cv_lib_nl_nl_handle_alloc" >&6; }
6500if test "x$ac_cv_lib_nl_nl_handle_alloc" = xyes; then :
6501
6502 #
6503 # Yes.
6504 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07006505 LIBS="${libnldir} -lnl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08006506
6507$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
6508
6509 have_any_nl="yes"
6510
6511fi
6512
6513 fi
6514
6515 if test x$have_any_nl = xno ; then
6516 #
6517 # No, we don't have libnl at all.
6518 #
6519 if test x$with_libnl = xyes ; then
6520 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
6521 fi
6522 fi
6523 fi
6524
6525 for ac_header in linux/ethtool.h
6526do :
6527 ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" "
6528$ac_includes_default
6529#include <linux/types.h>
6530
6531"
6532if test "x$ac_cv_header_linux_ethtool_h" = xyes; then :
6533 cat >>confdefs.h <<_ACEOF
6534#define HAVE_LINUX_ETHTOOL_H 1
6535_ACEOF
6536
6537fi
6538
6539done
6540
JP Abgrall511eca32014-02-12 13:46:45 -08006541
Haibo Huang165065a2018-07-23 17:26:52 -07006542 #
6543 # Check to see if struct tpacket_stats is defined in
6544 # <linux/if_packet.h>. If so, then pcap-linux.c can use this
6545 # to report proper statistics.
6546 #
6547 # -Scott Barron
6548 #
6549 ac_fn_c_check_type "$LINENO" "struct tpacket_stats" "ac_cv_type_struct_tpacket_stats" "
6550 #include <linux/if_packet.h>
6551
6552"
6553if test "x$ac_cv_type_struct_tpacket_stats" = xyes; then :
6554
6555cat >>confdefs.h <<_ACEOF
6556#define HAVE_STRUCT_TPACKET_STATS 1
JP Abgrall511eca32014-02-12 13:46:45 -08006557_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07006558
6559
JP Abgrall511eca32014-02-12 13:46:45 -08006560fi
6561
JP Abgrall511eca32014-02-12 13:46:45 -08006562
Haibo Huang165065a2018-07-23 17:26:52 -07006563 #
6564 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member.
6565 #
6566 # NOTE: any failure means we conclude that it doesn't have that
6567 # member, so if we don't have tpacket_auxdata, we conclude it
6568 # doesn't have that member (which is OK, as either we won't be
6569 # using code that would use that member, or we wouldn't compile
6570 # in any case).
6571 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" "
6572 #include <sys/types.h>
6573 #include <linux/if_packet.h>
JP Abgrall511eca32014-02-12 13:46:45 -08006574
Haibo Huang165065a2018-07-23 17:26:52 -07006575"
6576if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then :
JP Abgrall511eca32014-02-12 13:46:45 -08006577
Haibo Huang165065a2018-07-23 17:26:52 -07006578cat >>confdefs.h <<_ACEOF
6579#define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1
JP Abgrall511eca32014-02-12 13:46:45 -08006580_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07006581
6582
JP Abgrall511eca32014-02-12 13:46:45 -08006583fi
6584
JP Abgrall511eca32014-02-12 13:46:45 -08006585 ;;
6586
6587bpf)
6588 #
6589 # Check whether we have the *BSD-style ioctls.
6590 #
6591 for ac_header in net/if_media.h
6592do :
6593 ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
6594if test "x$ac_cv_header_net_if_media_h" = xyes; then :
6595 cat >>confdefs.h <<_ACEOF
6596#define HAVE_NET_IF_MEDIA_H 1
6597_ACEOF
6598
6599fi
6600
6601done
6602
6603
Haibo Huang165065a2018-07-23 17:26:52 -07006604 #
6605 # Check whether we have struct BPF_TIMEVAL.
6606 #
6607 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
6608 #include <sys/types.h>
6609 #include <sys/ioctl.h>
6610 #ifdef HAVE_SYS_IOCCOM_H
6611 #include <sys/ioccom.h>
6612 #endif
6613 #include <net/bpf.h>
JP Abgrall511eca32014-02-12 13:46:45 -08006614
6615"
6616if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
6617
6618cat >>confdefs.h <<_ACEOF
6619#define HAVE_STRUCT_BPF_TIMEVAL 1
6620_ACEOF
6621
6622
6623fi
6624
6625 ;;
6626
6627dag)
Elliott Hughes965a4b52017-05-15 10:37:39 -07006628 #
6629 # --with-pcap=dag is the only way to get here, and it means
6630 # "DAG support but nothing else"
6631 #
JP Abgrall511eca32014-02-12 13:46:45 -08006632 V_DEFS="$V_DEFS -DDAG_ONLY"
Elliott Hughes965a4b52017-05-15 10:37:39 -07006633 xxx_only=yes
JP Abgrall511eca32014-02-12 13:46:45 -08006634 ;;
6635
6636septel)
Elliott Hughes965a4b52017-05-15 10:37:39 -07006637 #
6638 # --with-pcap=septel is the only way to get here, and it means
6639 # "Septel support but nothing else"
6640 #
JP Abgrall511eca32014-02-12 13:46:45 -08006641 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
Elliott Hughes965a4b52017-05-15 10:37:39 -07006642 xxx_only=yes
JP Abgrall511eca32014-02-12 13:46:45 -08006643 ;;
6644
6645snf)
Elliott Hughes965a4b52017-05-15 10:37:39 -07006646 #
6647 # --with-pcap=snf is the only way to get here, and it means
6648 # "SNF support but nothing else"
6649 #
JP Abgrall511eca32014-02-12 13:46:45 -08006650 V_DEFS="$V_DEFS -DSNF_ONLY"
Elliott Hughes965a4b52017-05-15 10:37:39 -07006651 xxx_only=yes
JP Abgrall511eca32014-02-12 13:46:45 -08006652 ;;
6653
6654null)
Haibo Huang165065a2018-07-23 17:26:52 -07006655 ;;
6656
6657*)
6658 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5
JP Abgrall511eca32014-02-12 13:46:45 -08006659 ;;
6660esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006661
Elliott Hughes965a4b52017-05-15 10:37:39 -07006662if test "$V_PCAP" != null
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006663then
JP Abgrall511eca32014-02-12 13:46:45 -08006664 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
6665if test "x$ac_cv_func_getifaddrs" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006666
6667 #
6668 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
6669 # as well, just in case some platform is really weird.
6670 #
JP Abgrall511eca32014-02-12 13:46:45 -08006671 ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
6672if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006673
6674 #
6675 # We have the header, so we use "getifaddrs()" to
6676 # get the list of interfaces.
6677 #
Elliott Hughes965a4b52017-05-15 10:37:39 -07006678 V_FINDALLDEVS=fad-getad.c
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006679
6680else
6681
6682 #
6683 # We don't have the header - give up.
6684 # XXX - we could also fall back on some other
6685 # mechanism, but, for now, this'll catch this
6686 # problem so that we can at least try to figure
6687 # out something to do on systems with "getifaddrs()"
6688 # but without "ifaddrs.h", if there is something
6689 # we can do on those systems.
6690 #
JP Abgrall511eca32014-02-12 13:46:45 -08006691 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006692
6693fi
6694
6695
6696
6697else
6698
6699 #
Haibo Huang165065a2018-07-23 17:26:52 -07006700 # Well, we don't have "getifaddrs()", at least not with the
6701 # libraries with which we've decided we need to link
6702 # libpcap with, so we have to use some other mechanism.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006703 #
Haibo Huang165065a2018-07-23 17:26:52 -07006704 # Note that this may happen on Solaris, which has
6705 # getifaddrs(), but in -lsocket, not in -lxnet, so we
6706 # won't find it if we link with -lxnet, which we want
6707 # to do for other reasons.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006708 #
Haibo Huang165065a2018-07-23 17:26:52 -07006709 # For now, we use either the SIOCGIFCONF ioctl or the
6710 # SIOCGLIFCONF ioctl, preferring the latter if we have
6711 # it; the latter is a Solarisism that first appeared
6712 # in Solaris 8. (Solaris's getifaddrs() appears to
6713 # be built atop SIOCGLIFCONF; using it directly
6714 # avoids a not-all-that-useful middleman.)
6715 #
6716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006717$as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07006718 if ${ac_cv_lbl_have_siocglifconf+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08006719 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006720else
JP Abgrall511eca32014-02-12 13:46:45 -08006721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006722/* end confdefs.h. */
6723#include <sys/param.h>
Haibo Huang165065a2018-07-23 17:26:52 -07006724 #include <sys/file.h>
6725 #include <sys/ioctl.h>
6726 #include <sys/socket.h>
6727 #include <sys/sockio.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006728int
6729main ()
6730{
6731ioctl(0, SIOCGLIFCONF, (char *)0);
6732 ;
6733 return 0;
6734}
6735_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08006736if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006737 ac_cv_lbl_have_siocglifconf=yes
6738else
JP Abgrall511eca32014-02-12 13:46:45 -08006739 ac_cv_lbl_have_siocglifconf=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006740fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6742fi
6743
Haibo Huang165065a2018-07-23 17:26:52 -07006744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006745$as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07006746 if test $ac_cv_lbl_have_siocglifconf = yes ; then
6747 V_FINDALLDEVS=fad-glifc.c
6748 else
Elliott Hughes965a4b52017-05-15 10:37:39 -07006749 V_FINDALLDEVS=fad-gifc.c
JP Abgrall511eca32014-02-12 13:46:45 -08006750 fi
6751
6752fi
6753
6754fi
6755
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006756fi
6757
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006758
Haibo Huang165065a2018-07-23 17:26:52 -07006759case "$host_os" in
6760linux*)
6761 for ac_header in linux/net_tstamp.h
6762do :
6763 ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
6764if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
6765 cat >>confdefs.h <<_ACEOF
6766#define HAVE_LINUX_NET_TSTAMP_H 1
6767_ACEOF
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006768
6769fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006770
Haibo Huang165065a2018-07-23 17:26:52 -07006771done
6772
6773 ;;
6774*)
6775 { $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
6776$as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
6777 ;;
6778esac
6779
6780# Check whether --enable-packet-ring was given.
6781if test "${enable_packet_ring+set}" = set; then :
6782 enableval=$enable_packet_ring;
6783else
6784 enable_packet_ring=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006785fi
6786
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006787
Haibo Huang165065a2018-07-23 17:26:52 -07006788if test "x$enable_packet_ring" != "xno" ; then
6789
6790$as_echo "#define PCAP_SUPPORT_PACKET_RING 1" >>confdefs.h
6791
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006792
6793fi
Haibo Huang165065a2018-07-23 17:26:52 -07006794
6795#
6796# Check for socklen_t.
6797#
6798ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
6799 #include <sys/types.h>
6800 #include <sys/socket.h>
6801
6802"
6803if test "x$ac_cv_type_socklen_t" = xyes; then :
6804
6805cat >>confdefs.h <<_ACEOF
6806#define HAVE_SOCKLEN_T 1
6807_ACEOF
6808
6809
6810fi
6811
6812
6813# Check whether --enable-ipv6 was given.
6814if test "${enable_ipv6+set}" = set; then :
6815 enableval=$enable_ipv6;
6816else
6817 enable_ipv6=yes
6818fi
6819
6820if test "$enable_ipv6" != "no"; then
6821 #
6822 # We've already made sure we have getaddrinfo above in
6823 # AC_LBL_LIBRARY_NET.
6824 #
6825
6826$as_echo "#define INET6 1" >>confdefs.h
6827
6828fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006829
6830# Check for Endace DAG card support.
6831
6832# Check whether --with-dag was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006833if test "${with_dag+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006834 withval=$with_dag;
6835 if test "$withval" = no
6836 then
6837 # User doesn't want DAG support.
6838 want_dag=no
6839 elif test "$withval" = yes
6840 then
6841 # User wants DAG support but hasn't specified a directory.
6842 want_dag=yes
6843 else
6844 # User wants DAG support and has specified a directory, so use the provided value.
6845 want_dag=yes
6846 dag_root=$withval
6847 fi
6848
6849else
6850
Elliott Hughes965a4b52017-05-15 10:37:39 -07006851 if test "$V_PCAP" = dag; then
6852 # User requested DAG-only libpcap, so we'd better have
6853 # the DAG API.
6854 want_dag=yes
6855 elif test "xxx_only" = yes; then
6856 # User requested something-else-only pcap, so they don't
6857 # want DAG support.
6858 want_dag=no
6859 else
6860 #
6861 # Use DAG API if present, otherwise don't
6862 #
6863 want_dag=ifpresent
6864 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006865
6866fi
6867
6868
6869
6870# Check whether --with-dag-includes was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006871if test "${with_dag_includes+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006872 withval=$with_dag_includes;
6873 # User wants DAG support and has specified a header directory, so use the provided value.
6874 want_dag=yes
6875 dag_include_dir=$withval
6876
6877fi
6878
6879
6880
6881# Check whether --with-dag-libraries was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006882if test "${with_dag_libraries+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006883 withval=$with_dag_libraries;
6884 # User wants DAG support and has specified a library directory, so use the provided value.
6885 want_dag=yes
6886 dag_lib_dir=$withval
6887
6888fi
6889
6890
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006891if test "$want_dag" != no; then
6892
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006893 # If necessary, set default paths for DAG API headers and libraries.
6894 if test -z "$dag_root"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006895 dag_root=/usr/local
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006896 fi
6897
6898 if test -z "$dag_include_dir"; then
6899 dag_include_dir="$dag_root/include"
6900 fi
6901
6902 if test -z "$dag_lib_dir"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006903 dag_lib_dir="$dag_root/lib"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006904 fi
6905
Haibo Huang165065a2018-07-23 17:26:52 -07006906 V_INCLS="$V_INCLS -I$dag_include_dir"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006907
Haibo Huang165065a2018-07-23 17:26:52 -07006908 for ac_header in dagapi.h
6909do :
6910 ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default"
6911if test "x$ac_cv_header_dagapi_h" = xyes; then :
6912 cat >>confdefs.h <<_ACEOF
6913#define HAVE_DAGAPI_H 1
6914_ACEOF
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006915
Haibo Huang165065a2018-07-23 17:26:52 -07006916fi
JP Abgrall511eca32014-02-12 13:46:45 -08006917
Haibo Huang165065a2018-07-23 17:26:52 -07006918done
6919
6920
6921 if test "$ac_cv_header_dagapi_h" = yes; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006922
Elliott Hughes965a4b52017-05-15 10:37:39 -07006923 if test $V_PCAP != dag ; then
6924 SSRC="$SSRC pcap-dag.c"
6925 fi
6926
Haibo Huang165065a2018-07-23 17:26:52 -07006927 # Check for various DAG API functions.
Elliott Hughes965a4b52017-05-15 10:37:39 -07006928 # Don't need to save and restore LIBS to prevent -ldag being
6929 # included if there's a found-action (arg 3).
6930 saved_ldflags=$LDFLAGS
6931 LDFLAGS="-L$dag_lib_dir"
6932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006933$as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
6934if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
6935 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006936else
6937 ac_check_lib_save_LIBS=$LIBS
6938LIBS="-ldag $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08006939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006940/* end confdefs.h. */
6941
6942/* Override any GCC internal prototype to avoid an error.
6943 Use char because int might match the return type of a GCC
6944 builtin and then its argument prototype would still apply. */
6945#ifdef __cplusplus
6946extern "C"
6947#endif
6948char dag_attach_stream ();
6949int
6950main ()
6951{
6952return dag_attach_stream ();
6953 ;
6954 return 0;
6955}
6956_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08006957if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006958 ac_cv_lib_dag_dag_attach_stream=yes
6959else
JP Abgrall511eca32014-02-12 13:46:45 -08006960 ac_cv_lib_dag_dag_attach_stream=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006961fi
JP Abgrall511eca32014-02-12 13:46:45 -08006962rm -f core conftest.err conftest.$ac_objext \
6963 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006964LIBS=$ac_check_lib_save_LIBS
6965fi
JP Abgrall511eca32014-02-12 13:46:45 -08006966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
6967$as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
6968if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
Haibo Huang165065a2018-07-23 17:26:52 -07006969 cat >>confdefs.h <<_ACEOF
6970#define HAVE_LIBDAG 1
6971_ACEOF
6972
6973 LIBS="-ldag $LIBS"
6974
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006975else
Haibo Huang165065a2018-07-23 17:26:52 -07006976 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5
6977fi
6978
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5
6980$as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; }
6981if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then :
6982 $as_echo_n "(cached) " >&6
6983else
6984 ac_check_lib_save_LIBS=$LIBS
6985LIBS="-ldag $LIBS"
6986cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6987/* end confdefs.h. */
6988
6989/* Override any GCC internal prototype to avoid an error.
6990 Use char because int might match the return type of a GCC
6991 builtin and then its argument prototype would still apply. */
6992#ifdef __cplusplus
6993extern "C"
6994#endif
6995char dag_attach_stream64 ();
6996int
6997main ()
6998{
6999return dag_attach_stream64 ();
7000 ;
7001 return 0;
7002}
7003_ACEOF
7004if ac_fn_c_try_link "$LINENO"; then :
7005 ac_cv_lib_dag_dag_attach_stream64=yes
7006else
7007 ac_cv_lib_dag_dag_attach_stream64=no
7008fi
7009rm -f core conftest.err conftest.$ac_objext \
7010 conftest$ac_exeext conftest.$ac_ext
7011LIBS=$ac_check_lib_save_LIBS
7012fi
7013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5
7014$as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; }
7015if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then :
7016 dag_large_streams="1"
7017else
7018 dag_large_streams="0"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007019fi
7020
Elliott Hughes965a4b52017-05-15 10:37:39 -07007021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08007022$as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
7023if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
7024 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007025else
7026 ac_check_lib_save_LIBS=$LIBS
7027LIBS="-ldag $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08007028cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007029/* end confdefs.h. */
7030
7031/* Override any GCC internal prototype to avoid an error.
7032 Use char because int might match the return type of a GCC
7033 builtin and then its argument prototype would still apply. */
7034#ifdef __cplusplus
7035extern "C"
7036#endif
7037char dag_get_erf_types ();
7038int
7039main ()
7040{
7041return dag_get_erf_types ();
7042 ;
7043 return 0;
7044}
7045_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08007046if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007047 ac_cv_lib_dag_dag_get_erf_types=yes
7048else
JP Abgrall511eca32014-02-12 13:46:45 -08007049 ac_cv_lib_dag_dag_get_erf_types=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007050fi
JP Abgrall511eca32014-02-12 13:46:45 -08007051rm -f core conftest.err conftest.$ac_objext \
7052 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007053LIBS=$ac_check_lib_save_LIBS
7054fi
JP Abgrall511eca32014-02-12 13:46:45 -08007055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
7056$as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
7057if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007058
7059
JP Abgrall511eca32014-02-12 13:46:45 -08007060$as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007061
7062fi
7063
Elliott Hughes965a4b52017-05-15 10:37:39 -07007064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08007065$as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
7066if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
7067 $as_echo_n "(cached) " >&6
7068else
7069 ac_check_lib_save_LIBS=$LIBS
7070LIBS="-ldag $LIBS"
7071cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7072/* end confdefs.h. */
7073
7074/* Override any GCC internal prototype to avoid an error.
7075 Use char because int might match the return type of a GCC
7076 builtin and then its argument prototype would still apply. */
7077#ifdef __cplusplus
7078extern "C"
7079#endif
7080char dag_get_stream_erf_types ();
7081int
7082main ()
7083{
7084return dag_get_stream_erf_types ();
7085 ;
7086 return 0;
7087}
7088_ACEOF
7089if ac_fn_c_try_link "$LINENO"; then :
7090 ac_cv_lib_dag_dag_get_stream_erf_types=yes
7091else
7092 ac_cv_lib_dag_dag_get_stream_erf_types=no
7093fi
7094rm -f core conftest.err conftest.$ac_objext \
7095 conftest$ac_exeext conftest.$ac_ext
7096LIBS=$ac_check_lib_save_LIBS
7097fi
7098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
7099$as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
7100if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
7101
7102
7103$as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
7104
7105fi
7106
7107
Elliott Hughes965a4b52017-05-15 10:37:39 -07007108 LDFLAGS=$saved_ldflags
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007109
Haibo Huang165065a2018-07-23 17:26:52 -07007110 #
7111 # We assume that if we have libdag we have libdagconf,
7112 # as they're installed at the same time from the same
7113 # package.
7114 #
7115 LIBS="$LIBS -ldag -ldagconf"
7116 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007117
Haibo Huang165065a2018-07-23 17:26:52 -07007118 if test "$dag_large_streams" = 1; then
JP Abgrall511eca32014-02-12 13:46:45 -08007119
Haibo Huang165065a2018-07-23 17:26:52 -07007120$as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h
JP Abgrall511eca32014-02-12 13:46:45 -08007121
Elliott Hughes965a4b52017-05-15 10:37:39 -07007122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08007123$as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
7124if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
7125 $as_echo_n "(cached) " >&6
7126else
7127 ac_check_lib_save_LIBS=$LIBS
7128LIBS="-lvdag $LIBS"
7129cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7130/* end confdefs.h. */
7131
7132/* Override any GCC internal prototype to avoid an error.
7133 Use char because int might match the return type of a GCC
7134 builtin and then its argument prototype would still apply. */
7135#ifdef __cplusplus
7136extern "C"
7137#endif
7138char vdag_set_device_info ();
7139int
7140main ()
7141{
7142return vdag_set_device_info ();
7143 ;
7144 return 0;
7145}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007146_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08007147if ac_fn_c_try_link "$LINENO"; then :
7148 ac_cv_lib_vdag_vdag_set_device_info=yes
7149else
7150 ac_cv_lib_vdag_vdag_set_device_info=no
7151fi
7152rm -f core conftest.err conftest.$ac_objext \
7153 conftest$ac_exeext conftest.$ac_ext
7154LIBS=$ac_check_lib_save_LIBS
7155fi
7156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
7157$as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
7158if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
7159 ac_dag_have_vdag="1"
7160else
7161 ac_dag_have_vdag="0"
7162fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007163
Elliott Hughes965a4b52017-05-15 10:37:39 -07007164 if test "$ac_dag_have_vdag" = 1; then
JP Abgrall511eca32014-02-12 13:46:45 -08007165
7166$as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
7167
Haibo Huang165065a2018-07-23 17:26:52 -07007168 if test "$ac_lbl_have_pthreads" != "found"; then
7169 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5
7170 fi
7171 LIBS="$LIBS $PTHREAD_LIBS"
Elliott Hughes965a4b52017-05-15 10:37:39 -07007172 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007173 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007174
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007175
JP Abgrall511eca32014-02-12 13:46:45 -08007176$as_echo "#define HAVE_DAG_API 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007177
Elliott Hughes965a4b52017-05-15 10:37:39 -07007178 else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007179
Elliott Hughes965a4b52017-05-15 10:37:39 -07007180 if test "$V_PCAP" = dag; then
7181 # User requested "dag" capture type but we couldn't
7182 # find the DAG API support.
7183 as_fn_error $? "DAG support requested with --with-pcap=dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
7184 fi
7185
7186 if test "$want_dag" = yes; then
7187 # User wanted DAG support but we couldn't find it.
7188 as_fn_error $? "DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5
7189 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007190 fi
7191fi
7192
7193
7194# Check whether --with-septel was given.
JP Abgrall511eca32014-02-12 13:46:45 -08007195if test "${with_septel+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007196 withval=$with_septel;
7197 if test "$withval" = no
7198 then
7199 want_septel=no
7200 elif test "$withval" = yes
7201 then
7202 want_septel=yes
7203 septel_root=
7204 else
7205 want_septel=yes
7206 septel_root=$withval
7207 fi
7208
7209else
7210
Elliott Hughes965a4b52017-05-15 10:37:39 -07007211 if test "$V_PCAP" = septel; then
7212 # User requested Septel-only libpcap, so we'd better have
7213 # the Septel API.
7214 want_septel=yes
7215 elif test "xxx_only" = yes; then
7216 # User requested something-else-only pcap, so they don't
7217 # want Septel support.
7218 want_septel=no
7219 else
7220 #
7221 # Use Septel API if present, otherwise don't
7222 #
7223 want_septel=ifpresent
7224 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007225
7226fi
7227
Elliott Hughes965a4b52017-05-15 10:37:39 -07007228
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007229ac_cv_lbl_septel_api=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007230if test "$with_septel" != no; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007231
Elliott Hughes965a4b52017-05-15 10:37:39 -07007232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
7233$as_echo_n "checking whether we have Septel API headers... " >&6; }
7234
7235 # If necessary, set default paths for Septel API headers and libraries.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007236 if test -z "$septel_root"; then
7237 septel_root=$srcdir/../septel
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007238 fi
7239
7240 septel_tools_dir="$septel_root"
7241 septel_include_dir="$septel_root/INC"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007242
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007243 if test -r "$septel_include_dir/msg.h"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07007244 ac_cv_lbl_septel_api=yes
7245 fi
7246
7247 if test "$ac_cv_lbl_septel_api" = yes; then
7248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
7249$as_echo "yes ($septel_include_dir)" >&6; }
7250
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007251 V_INCLS="$V_INCLS -I$septel_include_dir"
JP Abgrall511eca32014-02-12 13:46:45 -08007252 ADDLOBJS="$ADDLOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
7253 ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007254
7255 if test "$V_PCAP" != septel ; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07007256 SSRC="$SSRC pcap-septel.c"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007257 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007258
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007259
JP Abgrall511eca32014-02-12 13:46:45 -08007260$as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007261
Elliott Hughes965a4b52017-05-15 10:37:39 -07007262 else
7263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7264$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007265
Elliott Hughes965a4b52017-05-15 10:37:39 -07007266 if test "$V_PCAP" = septel; then
7267 # User requested "septel" capture type but
7268 # we couldn't find the Septel API support.
7269 as_fn_error $? "Septel support requested with --with-pcap=septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
7270 fi
7271
7272 if test "$want_septel" = yes; then
7273 # User wanted Septel support but we couldn't find it.
7274 as_fn_error $? "Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5
7275 fi
7276 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007277fi
7278
7279# Check for Myricom SNF support.
7280
7281# Check whether --with-snf was given.
7282if test "${with_snf+set}" = set; then :
7283 withval=$with_snf;
7284 if test "$withval" = no
7285 then
7286 # User explicitly doesn't want SNF
7287 want_snf=no
7288 elif test "$withval" = yes
7289 then
Elliott Hughes965a4b52017-05-15 10:37:39 -07007290 # User wants SNF support but hasn't specified a directory.
JP Abgrall511eca32014-02-12 13:46:45 -08007291 want_snf=yes
7292 else
7293 # User wants SNF support with a specified directory.
7294 want_snf=yes
7295 snf_root=$withval
7296 fi
7297
7298else
7299
Elliott Hughes965a4b52017-05-15 10:37:39 -07007300 if test "$V_PCAP" = snf; then
7301 # User requested Sniffer-only libpcap, so we'd better have
7302 # the Sniffer API.
7303 want_snf=yes
7304 elif test "xxx_only" = yes; then
7305 # User requested something-else-only pcap, so they don't
7306 # want SNF support.
7307 want_snf=no
7308 else
7309 #
7310 # Use Sniffer API if present, otherwise don't
7311 #
7312 want_snf=ifpresent
7313 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007314
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007315fi
7316
7317
7318
JP Abgrall511eca32014-02-12 13:46:45 -08007319# Check whether --with-snf-includes was given.
7320if test "${with_snf_includes+set}" = set; then :
7321 withval=$with_snf_includes;
7322 # User wants SNF with specific header directory
7323 want_snf=yes
7324 snf_include_dir=$withval
7325
7326fi
7327
7328
7329
7330# Check whether --with-snf-libraries was given.
7331if test "${with_snf_libraries+set}" = set; then :
7332 withval=$with_snf_libraries;
7333 # User wants SNF with specific lib directory
7334 want_snf=yes
7335 snf_lib_dir=$withval
7336
7337fi
7338
7339
JP Abgrall511eca32014-02-12 13:46:45 -08007340ac_cv_lbl_snf_api=no
7341if test "$with_snf" != no; then
7342
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
7344$as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
7345
Elliott Hughes965a4b52017-05-15 10:37:39 -07007346 # If necessary, set default paths for Sniffer headers and libraries.
JP Abgrall511eca32014-02-12 13:46:45 -08007347 if test -z "$snf_root"; then
7348 snf_root=/opt/snf
7349 fi
7350
7351 if test -z "$snf_include_dir"; then
7352 snf_include_dir="$snf_root/include"
7353 fi
7354
7355 if test -z "$snf_lib_dir"; then
7356 snf_lib_dir="$snf_root/lib"
7357 fi
7358
7359 if test -f "$snf_include_dir/snf.h"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07007360 # We found a header; make sure we can link with the library
JP Abgrall511eca32014-02-12 13:46:45 -08007361 saved_ldflags=$LDFLAGS
7362 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
7364$as_echo_n "checking for snf_init in -lsnf... " >&6; }
7365if ${ac_cv_lib_snf_snf_init+:} false; then :
7366 $as_echo_n "(cached) " >&6
7367else
7368 ac_check_lib_save_LIBS=$LIBS
7369LIBS="-lsnf $LIBS"
7370cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7371/* end confdefs.h. */
7372
7373/* Override any GCC internal prototype to avoid an error.
7374 Use char because int might match the return type of a GCC
7375 builtin and then its argument prototype would still apply. */
7376#ifdef __cplusplus
7377extern "C"
7378#endif
7379char snf_init ();
7380int
7381main ()
7382{
7383return snf_init ();
7384 ;
7385 return 0;
7386}
7387_ACEOF
7388if ac_fn_c_try_link "$LINENO"; then :
7389 ac_cv_lib_snf_snf_init=yes
7390else
7391 ac_cv_lib_snf_snf_init=no
7392fi
7393rm -f core conftest.err conftest.$ac_objext \
7394 conftest$ac_exeext conftest.$ac_ext
7395LIBS=$ac_check_lib_save_LIBS
7396fi
7397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
7398$as_echo "$ac_cv_lib_snf_snf_init" >&6; }
7399if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
7400 ac_cv_lbl_snf_api="yes"
JP Abgrall511eca32014-02-12 13:46:45 -08007401fi
7402
7403 LDFLAGS="$saved_ldflags"
Elliott Hughes965a4b52017-05-15 10:37:39 -07007404 if test "$ac_cv_lbl_snf_api" = no; then
7405 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
7406 fi
7407 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007408
Elliott Hughes965a4b52017-05-15 10:37:39 -07007409 if test "$ac_cv_lbl_snf_api" = yes; then
7410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
7411$as_echo "yes ($snf_root)" >&6; }
7412
7413 V_INCLS="$V_INCLS -I$snf_include_dir"
7414 LIBS="$LIBS -lsnf"
7415 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
7416
7417 if test "$V_PCAP" != snf ; then
7418 SSRC="$SSRC pcap-snf.c"
7419 fi
7420
JP Abgrall511eca32014-02-12 13:46:45 -08007421
7422$as_echo "#define HAVE_SNF_API 1" >>confdefs.h
7423
Elliott Hughes965a4b52017-05-15 10:37:39 -07007424 else
7425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7426$as_echo "no" >&6; }
7427
7428 if test "$want_snf" = yes; then
7429 # User requested "snf" capture type but
7430 # we couldn't find the Sniffer API support.
7431 as_fn_error $? "Myricom Sniffer support requested with --with-pcap=snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
7432 fi
7433
7434 if test "$want_snf" = yes; then
7435 as_fn_error $? "Myricom Sniffer support requested with --with-snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5
JP Abgrall511eca32014-02-12 13:46:45 -08007436 fi
7437 fi
7438fi
7439
Elliott Hughes965a4b52017-05-15 10:37:39 -07007440# Check for Riverbed TurboCap support.
JP Abgrall511eca32014-02-12 13:46:45 -08007441
Elliott Hughes965a4b52017-05-15 10:37:39 -07007442# Check whether --with-turbocap was given.
7443if test "${with_turbocap+set}" = set; then :
7444 withval=$with_turbocap;
7445 if test "$withval" = no
7446 then
7447 # User explicitly doesn't want TurboCap
7448 want_turbocap=no
7449 elif test "$withval" = yes
7450 then
7451 # User wants TurboCap support but hasn't specified a directory.
7452 want_turbocap=yes
7453 else
7454 # User wants TurboCap support with a specified directory.
7455 want_turbocap=yes
7456 turbocap_root=$withval
7457 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007458
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007459else
Elliott Hughes965a4b52017-05-15 10:37:39 -07007460
7461 if test "xxx_only" = yes; then
7462 # User requested something-else-only pcap, so they don't
7463 # want TurboCap support.
7464 want_turbocap=no
7465 else
7466 #
7467 # Use TurboCap API if present, otherwise don't
7468 #
7469 want_turbocap=ifpresent
7470 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007471
7472fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07007473
7474
7475ac_cv_lbl_turbocap_api=no
7476if test "$want_turbocap" != no; then
7477
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
7479$as_echo_n "checking whether TurboCap is supported... " >&6; }
7480
7481 save_CFLAGS="$CFLAGS"
7482 save_LIBS="$LIBS"
7483 if test ! -z "$turbocap_root"; then
7484 TURBOCAP_CFLAGS="-I$turbocap_root/include"
7485 TURBOCAP_LIBS="-L$turbocap_root/lib"
7486 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
7487 fi
7488
7489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7490/* end confdefs.h. */
7491
7492 #include <TcApi.h>
7493
7494int
7495main ()
7496{
7497
7498 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
7499 TC_INSTANCE i;
7500 (void)TcInstanceCreateByName("foo", &i);
7501
7502 ;
7503 return 0;
7504}
7505_ACEOF
7506if ac_fn_c_try_compile "$LINENO"; then :
7507 ac_cv_lbl_turbocap_api=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007508fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07007509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7510
7511 CFLAGS="$save_CFLAGS"
7512 if test $ac_cv_lbl_turbocap_api = yes; then
7513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7514$as_echo "yes" >&6; }
7515
7516 SSRC="$SSRC pcap-tc.c"
7517 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
7518 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
7519
7520
7521$as_echo "#define HAVE_TC_API 1" >>confdefs.h
7522
7523 else
7524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08007525$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007526
Elliott Hughes965a4b52017-05-15 10:37:39 -07007527 if test "$want_turbocap" = yes; then
7528 # User wanted Turbo support but we couldn't find it.
7529 as_fn_error $? "TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007530 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07007531 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007532fi
7533
Haibo Huang165065a2018-07-23 17:26:52 -07007534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5
7535$as_echo_n "checking whether to enable remote packet capture... " >&6; }
7536# Check whether --enable-remote was given.
7537if test "${enable_remote+set}" = set; then :
7538 enableval=$enable_remote;
7539else
7540 enableval=no
7541fi
7542
7543case "$enableval" in
7544yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7545$as_echo "yes" >&6; }
7546 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5
7547$as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;}
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5
7549$as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;}
7550 #
7551 # rpcapd requires pthreads on UN*X.
7552 #
7553 if test "$ac_lbl_have_pthreads" != "found"; then
7554 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5
7555 fi
7556 #
7557 # It also requires crypt().
7558 # Do we have it in the system libraries?
7559 #
7560 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
7561if test "x$ac_cv_func_crypt" = xyes; then :
7562
7563else
7564
7565 #
7566 # No. Do we have it in -lcrypt?
7567 #
7568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
7569$as_echo_n "checking for crypt in -lcrypt... " >&6; }
7570if ${ac_cv_lib_crypt_crypt+:} false; then :
7571 $as_echo_n "(cached) " >&6
7572else
7573 ac_check_lib_save_LIBS=$LIBS
7574LIBS="-lcrypt $LIBS"
7575cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7576/* end confdefs.h. */
7577
7578/* Override any GCC internal prototype to avoid an error.
7579 Use char because int might match the return type of a GCC
7580 builtin and then its argument prototype would still apply. */
7581#ifdef __cplusplus
7582extern "C"
7583#endif
7584char crypt ();
7585int
7586main ()
7587{
7588return crypt ();
7589 ;
7590 return 0;
7591}
7592_ACEOF
7593if ac_fn_c_try_link "$LINENO"; then :
7594 ac_cv_lib_crypt_crypt=yes
7595else
7596 ac_cv_lib_crypt_crypt=no
7597fi
7598rm -f core conftest.err conftest.$ac_objext \
7599 conftest$ac_exeext conftest.$ac_ext
7600LIBS=$ac_check_lib_save_LIBS
7601fi
7602{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
7603$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
7604if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
7605
7606 #
7607 # Yes; add -lcrypt to the libraries for rpcapd.
7608 #
7609 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt"
7610
7611else
7612
7613 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5
7614
7615fi
7616
7617
7618fi
7619
7620
7621 #
7622 # OK, we have crypt(). Do we have getspnam()?
7623 #
7624 for ac_func in getspnam
7625do :
7626 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
7627if test "x$ac_cv_func_getspnam" = xyes; then :
7628 cat >>confdefs.h <<_ACEOF
7629#define HAVE_GETSPNAM 1
7630_ACEOF
7631
7632fi
7633done
7634
7635
7636 #
7637 # Check for various members of struct msghdr.
7638 #
7639 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" "
7640 #include \"ftmacros.h\"
7641 #include <sys/socket.h>
7642
7643"
7644if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then :
7645
7646cat >>confdefs.h <<_ACEOF
7647#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1
7648_ACEOF
7649
7650
7651fi
7652
7653 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" "
7654 #include \"ftmacros.h\"
7655 #include <sys/socket.h>
7656
7657"
7658if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then :
7659
7660cat >>confdefs.h <<_ACEOF
7661#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1
7662_ACEOF
7663
7664
7665fi
7666
7667
7668
7669$as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h
7670
7671 SSRC="$SSRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c"
7672 BUILD_RPCAPD=build-rpcapd
7673 INSTALL_RPCAPD=install-rpcapd
7674 ;;
7675*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7676$as_echo "no" >&6; }
7677 ;;
7678esac
7679
7680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
7681$as_echo_n "checking whether to build optimizer debugging code... " >&6; }
7682# Check whether --enable-optimizer-dbg was given.
7683if test "${enable_optimizer_dbg+set}" = set; then :
7684 enableval=$enable_optimizer_dbg;
7685fi
7686
7687if test "$enable_optimizer_dbg" = "yes"; then
7688
7689$as_echo "#define BDEBUG 1" >>confdefs.h
7690
7691fi
7692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
7693$as_echo "${enable_optimizer_dbg-no}" >&6; }
7694
7695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
7696$as_echo_n "checking whether to build parser debugging code... " >&6; }
7697# Check whether --enable-yydebug was given.
7698if test "${enable_yydebug+set}" = set; then :
7699 enableval=$enable_yydebug;
7700fi
7701
7702if test "$enable_yydebug" = "yes"; then
7703
7704$as_echo "#define YYDEBUG 1" >>confdefs.h
7705
7706fi
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
7708$as_echo "${enable_yydebug-no}" >&6; }
7709
Elliott Hughes965a4b52017-05-15 10:37:39 -07007710#
7711# Look for {f}lex.
7712#
7713for ac_prog in flex lex
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007714do
7715 # Extract the first word of "$ac_prog", so it can be a program name with args.
7716set dummy $ac_prog; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08007717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7718$as_echo_n "checking for $ac_word... " >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07007719if ${ac_cv_prog_LEX+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08007720 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007721else
Elliott Hughes965a4b52017-05-15 10:37:39 -07007722 if test -n "$LEX"; then
7723 ac_cv_prog_LEX="$LEX" # Let the user override the test.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007724else
7725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726for as_dir in $PATH
7727do
7728 IFS=$as_save_IFS
7729 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08007730 for ac_exec_ext in '' $ac_executable_extensions; do
7731 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07007732 ac_cv_prog_LEX="$ac_prog"
JP Abgrall511eca32014-02-12 13:46:45 -08007733 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007734 break 2
7735 fi
7736done
JP Abgrall511eca32014-02-12 13:46:45 -08007737 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007738IFS=$as_save_IFS
7739
7740fi
7741fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07007742LEX=$ac_cv_prog_LEX
7743if test -n "$LEX"; then
7744 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7745$as_echo "$LEX" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007746else
JP Abgrall511eca32014-02-12 13:46:45 -08007747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7748$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007749fi
7750
7751
Elliott Hughes965a4b52017-05-15 10:37:39 -07007752 test -n "$LEX" && break
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007753done
Elliott Hughes965a4b52017-05-15 10:37:39 -07007754test -n "$LEX" || LEX=":"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007755
Elliott Hughes965a4b52017-05-15 10:37:39 -07007756if test "x$LEX" != "x:"; then
7757 cat >conftest.l <<_ACEOF
7758%%
7759a { ECHO; }
7760b { REJECT; }
7761c { yymore (); }
7762d { yyless (1); }
7763e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
7764 yyless ((input () != 0)); }
7765f { unput (yytext[0]); }
7766. { BEGIN INITIAL; }
7767%%
7768#ifdef YYTEXT_POINTER
7769extern char *yytext;
7770#endif
7771int
7772main (void)
7773{
7774 return ! yylex () + ! yywrap ();
7775}
7776_ACEOF
7777{ { ac_try="$LEX conftest.l"
7778case "(($ac_try" in
7779 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7780 *) ac_try_echo=$ac_try;;
7781esac
7782eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7783$as_echo "$ac_try_echo"; } >&5
7784 (eval "$LEX conftest.l") 2>&5
7785 ac_status=$?
7786 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7787 test $ac_status = 0; }
7788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
7789$as_echo_n "checking lex output file root... " >&6; }
7790if ${ac_cv_prog_lex_root+:} false; then :
7791 $as_echo_n "(cached) " >&6
7792else
JP Abgrall511eca32014-02-12 13:46:45 -08007793
Elliott Hughes965a4b52017-05-15 10:37:39 -07007794if test -f lex.yy.c; then
7795 ac_cv_prog_lex_root=lex.yy
7796elif test -f lexyy.c; then
7797 ac_cv_prog_lex_root=lexyy
7798else
7799 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
7800fi
7801fi
7802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7803$as_echo "$ac_cv_prog_lex_root" >&6; }
7804LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
JP Abgrall511eca32014-02-12 13:46:45 -08007805
Elliott Hughes965a4b52017-05-15 10:37:39 -07007806if test -z "${LEXLIB+set}"; then
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
7808$as_echo_n "checking lex library... " >&6; }
7809if ${ac_cv_lib_lex+:} false; then :
7810 $as_echo_n "(cached) " >&6
7811else
7812
7813 ac_save_LIBS=$LIBS
7814 ac_cv_lib_lex='none needed'
7815 for ac_lib in '' -lfl -ll; do
7816 LIBS="$ac_lib $ac_save_LIBS"
7817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7818/* end confdefs.h. */
7819`cat $LEX_OUTPUT_ROOT.c`
7820_ACEOF
7821if ac_fn_c_try_link "$LINENO"; then :
7822 ac_cv_lib_lex=$ac_lib
7823fi
7824rm -f core conftest.err conftest.$ac_objext \
7825 conftest$ac_exeext conftest.$ac_ext
7826 test "$ac_cv_lib_lex" != 'none needed' && break
7827 done
7828 LIBS=$ac_save_LIBS
7829
7830fi
7831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7832$as_echo "$ac_cv_lib_lex" >&6; }
7833 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
7834fi
7835
7836
7837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7838$as_echo_n "checking whether yytext is a pointer... " >&6; }
7839if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
7840 $as_echo_n "(cached) " >&6
7841else
7842 # POSIX says lex can declare yytext either as a pointer or an array; the
7843# default is implementation-dependent. Figure out which it is, since
7844# not all implementations provide the %pointer and %array declarations.
7845ac_cv_prog_lex_yytext_pointer=no
7846ac_save_LIBS=$LIBS
7847LIBS="$LEXLIB $ac_save_LIBS"
7848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7849/* end confdefs.h. */
7850
7851 #define YYTEXT_POINTER 1
7852`cat $LEX_OUTPUT_ROOT.c`
7853_ACEOF
7854if ac_fn_c_try_link "$LINENO"; then :
7855 ac_cv_prog_lex_yytext_pointer=yes
7856fi
7857rm -f core conftest.err conftest.$ac_objext \
7858 conftest$ac_exeext conftest.$ac_ext
7859LIBS=$ac_save_LIBS
7860
7861fi
7862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7863$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
7864if test $ac_cv_prog_lex_yytext_pointer = yes; then
7865
7866$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
7867
7868fi
7869rm -f conftest.l $LEX_OUTPUT_ROOT.c
7870
7871fi
7872if test "$LEX" = ":"; then
7873 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
7874fi
7875
7876#
7877# Make sure {f}lex supports the -P, --header-file, and --nounput flags
7878# and supports processing our scanner.l.
7879#
7880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08007881$as_echo_n "checking for capable lex... " >&6; }
7882if ${tcpdump_cv_capable_lex+:} false; then :
7883 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007884else
Elliott Hughes965a4b52017-05-15 10:37:39 -07007885 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
7886 tcpdump_cv_capable_lex=yes
7887 else
7888 tcpdump_cv_capable_lex=insufficient
7889 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007890fi
JP Abgrall511eca32014-02-12 13:46:45 -08007891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
7892$as_echo "$tcpdump_cv_capable_lex" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07007893if test $tcpdump_cv_capable_lex = insufficient ; then
7894 as_fn_error $? "$LEX is insufficient to compile libpcap.
7895 libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5
7896fi
7897
7898#
7899# Look for yacc/bison/byacc.
7900#
7901for ac_prog in 'bison -y' byacc
7902do
7903 # Extract the first word of "$ac_prog", so it can be a program name with args.
7904set dummy $ac_prog; ac_word=$2
7905{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7906$as_echo_n "checking for $ac_word... " >&6; }
7907if ${ac_cv_prog_YACC+:} false; then :
7908 $as_echo_n "(cached) " >&6
7909else
7910 if test -n "$YACC"; then
7911 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7912else
7913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7914for as_dir in $PATH
7915do
7916 IFS=$as_save_IFS
7917 test -z "$as_dir" && as_dir=.
7918 for ac_exec_ext in '' $ac_executable_extensions; do
7919 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7920 ac_cv_prog_YACC="$ac_prog"
7921 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7922 break 2
7923 fi
7924done
7925 done
7926IFS=$as_save_IFS
7927
7928fi
7929fi
7930YACC=$ac_cv_prog_YACC
7931if test -n "$YACC"; then
7932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7933$as_echo "$YACC" >&6; }
7934else
7935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7936$as_echo "no" >&6; }
7937fi
7938
7939
7940 test -n "$YACC" && break
7941done
7942test -n "$YACC" || YACC="yacc"
7943
7944
7945#
7946# Make sure it supports the -p flag and supports processing our
7947# grammar.y.
7948#
7949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc/bison" >&5
7950$as_echo_n "checking for capable yacc/bison... " >&6; }
7951if ${tcpdump_cv_capable_yacc+:} false; then :
7952 $as_echo_n "(cached) " >&6
7953else
7954 if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
7955 tcpdump_cv_capable_yacc=yes
7956 else
7957 tcpdump_cv_capable_yacc=insufficient
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007958 fi
7959fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07007960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
7961$as_echo "$tcpdump_cv_capable_yacc" >&6; }
7962if test $tcpdump_cv_capable_yacc = insufficient ; then
7963 as_fn_error $? "$YACC is insufficient to compile libpcap.
Haibo Huang165065a2018-07-23 17:26:52 -07007964 libpcap requires Bison, a newer version of Berkeley YACC with support
7965 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5
Elliott Hughes965a4b52017-05-15 10:37:39 -07007966fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007967
JP Abgrall511eca32014-02-12 13:46:45 -08007968#
Haibo Huang165065a2018-07-23 17:26:52 -07007969# Do various checks for various OSes and versions of those OSes.
7970#
7971# Assume, by default, no support for shared libraries and V7/BSD
7972# convention for man pages (file formats in section 5, miscellaneous
7973# info in section 7, administrative commands and daemons in section 8).
JP Abgrall511eca32014-02-12 13:46:45 -08007974# Individual cases can override this.
7975#
7976DYEXT="none"
7977MAN_FILE_FORMATS=5
7978MAN_MISC_INFO=7
Haibo Huang165065a2018-07-23 17:26:52 -07007979MAN_ADMIN_COMMANDS=8
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007980case "$host_os" in
7981
7982aix*)
7983
JP Abgrall511eca32014-02-12 13:46:45 -08007984$as_echo "#define _SUN 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007985
JP Abgrall511eca32014-02-12 13:46:45 -08007986
7987 #
7988 # AIX makes it fun to build shared and static libraries,
7989 # because they're *both* ".a" archive libraries. We
7990 # build the static library for the benefit of the traditional
7991 # scheme of building libpcap and tcpdump in subdirectories of
7992 # the same directory, with tcpdump statically linked with the
7993 # libpcap in question, but we also build a shared library as
7994 # "libpcap.shareda" and install *it*, rather than the static
7995 # library, as "libpcap.a".
7996 #
7997 DYEXT="shareda"
7998
7999 case "$V_PCAP" in
8000
8001 dlpi)
8002 #
8003 # If we're using DLPI, applications will need to
8004 # use /lib/pse.exp if present, as we use the
8005 # STREAMS routines.
8006 #
8007 pseexe="/lib/pse.exp"
8008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
8009$as_echo_n "checking for $pseexe... " >&6; }
8010 if test -f $pseexe ; then
8011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8012$as_echo "yes" >&6; }
8013 LIBS="-I:$pseexe"
8014 fi
8015 ;;
8016
8017 bpf)
8018 #
8019 # If we're using BPF, we need "-lodm" and "-lcfg", as
8020 # we use them to load the BPF module.
8021 #
8022 LIBS="-lodm -lcfg"
8023 ;;
8024 esac
8025 ;;
8026
8027darwin*)
8028 DYEXT="dylib"
8029 V_CCOPT="$V_CCOPT -fno-common"
8030 # Check whether --enable-universal was given.
8031if test "${enable_universal+set}" = set; then :
8032 enableval=$enable_universal;
8033fi
8034
8035 if test "$enable_universal" != "no"; then
8036 case "$host_os" in
8037
8038 darwin0-7.*)
8039 #
8040 # Pre-Tiger. Build only for 32-bit PowerPC; no
8041 # need for any special compiler or linker flags.
8042 #
8043 ;;
8044
8045 darwin8.0123*)
8046 #
8047 # Tiger, prior to Intel support. Build for 32-bit
8048 # PowerPC and 64-bit PowerPC, with 32-bit PowerPC
8049 # first. (I'm guessing that's what Apple does.)
8050 #
8051 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64"
8052 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64"
8053 ;;
8054
8055 darwin8.456*)
8056 #
8057 # Tiger, subsequent to Intel support but prior to
8058 # x86-64 support. Build for 32-bit PowerPC, 64-bit
8059 # PowerPC, and x86, with 32-bit PowerPC first.
8060 # (I'm guessing that's what Apple does.)
8061 #
8062 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386"
8063 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386"
8064 ;;
8065
8066 darwin8.*)
8067 #
8068 # All other Tiger, so subsequent to x86-64
8069 # support. Build for 32-bit PowerPC, 64-bit
8070 # PowerPC, x86, and x86-64, and with 32-bit PowerPC
8071 # first. (I'm guessing that's what Apple does.)
8072 #
8073 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
8074 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
8075 ;;
8076
8077 darwin9.*)
8078 #
8079 # Leopard. Build for 32-bit PowerPC, 64-bit
8080 # PowerPC, x86, and x86-64, with 32-bit PowerPC
8081 # first. (That's what Apple does.)
8082 #
8083 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
8084 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
8085 ;;
8086
8087 darwin10.*)
8088 #
8089 # Snow Leopard. Build for x86-64, x86, and
8090 # 32-bit PowerPC, with x86-64 first. (That's
8091 # what Apple does, even though Snow Leopard
8092 # doesn't run on PPC, so PPC libpcap runs under
8093 # Rosetta, and Rosetta doesn't support BPF
8094 # ioctls, so PPC programs can't do live
8095 # captures.)
8096 #
8097 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386 -arch ppc"
8098 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386 -arch ppc"
8099 ;;
8100
8101 darwin*)
8102 #
8103 # Post-Snow Leopard. Build for x86-64 and
8104 # x86, with x86-64 first. (That's probably what
8105 # Apple does, given that Rosetta is gone.)
8106 # XXX - update if and when Apple drops support
8107 # for 32-bit x86 code.
8108 #
8109 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
8110 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
8111 ;;
8112 esac
8113 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008114 ;;
8115
8116hpux9*)
8117
JP Abgrall511eca32014-02-12 13:46:45 -08008118$as_echo "#define HAVE_HPUX9 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008119
JP Abgrall511eca32014-02-12 13:46:45 -08008120
8121 #
8122 # Use System V conventions for man pages.
8123 #
Haibo Huang165065a2018-07-23 17:26:52 -07008124 MAN_ADMIN_COMMANDS=1m
JP Abgrall511eca32014-02-12 13:46:45 -08008125 MAN_FILE_FORMATS=4
8126 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008127 ;;
8128
8129hpux10.0*)
JP Abgrall511eca32014-02-12 13:46:45 -08008130
8131 #
8132 # Use System V conventions for man pages.
8133 #
Haibo Huang165065a2018-07-23 17:26:52 -07008134 MAN_ADMIN_COMMANDS=1m
JP Abgrall511eca32014-02-12 13:46:45 -08008135 MAN_FILE_FORMATS=4
8136 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008137 ;;
8138
8139hpux10.1*)
JP Abgrall511eca32014-02-12 13:46:45 -08008140
8141 #
8142 # Use System V conventions for man pages.
8143 #
Haibo Huang165065a2018-07-23 17:26:52 -07008144 MAN_ADMIN_COMMANDS=1m
JP Abgrall511eca32014-02-12 13:46:45 -08008145 MAN_FILE_FORMATS=4
8146 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008147 ;;
8148
8149hpux*)
8150
JP Abgrall511eca32014-02-12 13:46:45 -08008151$as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008152
JP Abgrall511eca32014-02-12 13:46:45 -08008153 if test "`uname -m`" = "ia64"; then
8154 DYEXT="so"
8155 else
8156 DYEXT="sl"
8157 fi
8158
8159 #
8160 # "-b" builds a shared library; "+h" sets the soname.
8161 #
8162 SHLIB_OPT="-b"
8163 SONAME_OPT="+h"
8164
8165 #
8166 # Use System V conventions for man pages.
8167 #
8168 MAN_FILE_FORMATS=4
8169 MAN_MISC_INFO=5
8170 ;;
8171
8172irix*)
8173 #
Haibo Huang165065a2018-07-23 17:26:52 -07008174 # Use IRIX conventions for man pages; they're the same as the
8175 # System V conventions, except that they use section 8 for
8176 # administrative commands and daemons.
JP Abgrall511eca32014-02-12 13:46:45 -08008177 #
8178 MAN_FILE_FORMATS=4
8179 MAN_MISC_INFO=5
8180 ;;
8181
8182linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*)
8183 DYEXT="so"
8184
8185 #
8186 # Compiler assumed to be GCC; run-time linker may require a -R
8187 # flag.
8188 #
8189 if test "$libdir" != "/usr/lib"; then
8190 V_RFLAGS=-Wl,-R$libdir
8191 fi
8192 ;;
8193
8194osf*)
8195 DYEXT="so"
8196
8197 #
Haibo Huang165065a2018-07-23 17:26:52 -07008198 # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX.
8199 # Use Tru64 UNIX conventions for man pages; they're the same as
8200 # the System V conventions except that they use section 8 for
8201 # administrative commands and daemons.
JP Abgrall511eca32014-02-12 13:46:45 -08008202 #
8203 MAN_FILE_FORMATS=4
8204 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008205 ;;
8206
8207sinix*)
JP Abgrall511eca32014-02-12 13:46:45 -08008208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
8209$as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
8210 if ${ac_cv_cc_sinix_defined+:} false; then :
8211 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008212else
JP Abgrall511eca32014-02-12 13:46:45 -08008213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008214/* end confdefs.h. */
8215
8216int
8217main ()
8218{
8219int i = sinix;
8220 ;
8221 return 0;
8222}
8223_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08008224if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008225 ac_cv_cc_sinix_defined=yes
8226else
JP Abgrall511eca32014-02-12 13:46:45 -08008227 ac_cv_cc_sinix_defined=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008228fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8230fi
8231
JP Abgrall511eca32014-02-12 13:46:45 -08008232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
8233$as_echo "$ac_cv_cc_sinix_defined" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008234 if test $ac_cv_cc_sinix_defined = no ; then
8235
JP Abgrall511eca32014-02-12 13:46:45 -08008236$as_echo "#define sinix 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008237
8238 fi
8239 ;;
8240
8241solaris*)
8242
JP Abgrall511eca32014-02-12 13:46:45 -08008243$as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008244
JP Abgrall511eca32014-02-12 13:46:45 -08008245
8246 DYEXT="so"
Haibo Huang165065a2018-07-23 17:26:52 -07008247
JP Abgrall511eca32014-02-12 13:46:45 -08008248 #
Haibo Huang165065a2018-07-23 17:26:52 -07008249 # Make sure errno is thread-safe, in case we're called in
8250 # a multithreaded program. We don't guarantee that two
8251 # threads can use the *same* pcap_t safely, but the
8252 # current version does guarantee that you can use different
8253 # pcap_t's in different threads, and even that pcap_compile()
8254 # is thread-safe (it wasn't thread-safe in some older versions).
JP Abgrall511eca32014-02-12 13:46:45 -08008255 #
Haibo Huang165065a2018-07-23 17:26:52 -07008256 V_CCOPT="$V_CCOPT -D_TS_ERRNO"
8257
8258 case "`uname -r`" in
8259
8260 5.12)
8261 ;;
8262
8263 *)
8264 #
8265 # Use System V conventions for man pages.
8266 #
8267 MAN_ADMIN_COMMANDS=1m
8268 MAN_FILE_FORMATS=4
8269 MAN_MISC_INFO=5
8270 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008271 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008272esac
8273
JP Abgrall511eca32014-02-12 13:46:45 -08008274# Check whether --enable-shared was given.
8275if test "${enable_shared+set}" = set; then :
8276 enableval=$enable_shared;
8277fi
8278
8279test "x$enable_shared" = "xno" && DYEXT="none"
8280
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008281if test -n "$ac_tool_prefix"; then
8282 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
8283set dummy ${ac_tool_prefix}ranlib; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08008284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8285$as_echo_n "checking for $ac_word... " >&6; }
8286if ${ac_cv_prog_RANLIB+:} false; then :
8287 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008288else
8289 if test -n "$RANLIB"; then
8290 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
8291else
8292as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8293for as_dir in $PATH
8294do
8295 IFS=$as_save_IFS
8296 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08008297 for ac_exec_ext in '' $ac_executable_extensions; do
8298 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008299 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
JP Abgrall511eca32014-02-12 13:46:45 -08008300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008301 break 2
8302 fi
8303done
JP Abgrall511eca32014-02-12 13:46:45 -08008304 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008305IFS=$as_save_IFS
8306
8307fi
8308fi
8309RANLIB=$ac_cv_prog_RANLIB
8310if test -n "$RANLIB"; then
JP Abgrall511eca32014-02-12 13:46:45 -08008311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
8312$as_echo "$RANLIB" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008313else
JP Abgrall511eca32014-02-12 13:46:45 -08008314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8315$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008316fi
8317
8318
8319fi
8320if test -z "$ac_cv_prog_RANLIB"; then
8321 ac_ct_RANLIB=$RANLIB
8322 # Extract the first word of "ranlib", so it can be a program name with args.
8323set dummy ranlib; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08008324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8325$as_echo_n "checking for $ac_word... " >&6; }
8326if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
8327 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008328else
8329 if test -n "$ac_ct_RANLIB"; then
8330 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
8331else
8332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8333for as_dir in $PATH
8334do
8335 IFS=$as_save_IFS
8336 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08008337 for ac_exec_ext in '' $ac_executable_extensions; do
8338 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008339 ac_cv_prog_ac_ct_RANLIB="ranlib"
JP Abgrall511eca32014-02-12 13:46:45 -08008340 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008341 break 2
8342 fi
8343done
JP Abgrall511eca32014-02-12 13:46:45 -08008344 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008345IFS=$as_save_IFS
8346
8347fi
8348fi
8349ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
8350if test -n "$ac_ct_RANLIB"; then
JP Abgrall511eca32014-02-12 13:46:45 -08008351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
8352$as_echo "$ac_ct_RANLIB" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008353else
JP Abgrall511eca32014-02-12 13:46:45 -08008354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8355$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008356fi
8357
8358 if test "x$ac_ct_RANLIB" = x; then
8359 RANLIB=":"
8360 else
8361 case $cross_compiling:$ac_tool_warned in
8362yes:)
JP Abgrall511eca32014-02-12 13:46:45 -08008363{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8364$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008365ac_tool_warned=yes ;;
8366esac
8367 RANLIB=$ac_ct_RANLIB
8368 fi
8369else
8370 RANLIB="$ac_cv_prog_RANLIB"
8371fi
8372
JP Abgrall511eca32014-02-12 13:46:45 -08008373if test -n "$ac_tool_prefix"; then
8374 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
8375set dummy ${ac_tool_prefix}ar; ac_word=$2
8376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8377$as_echo_n "checking for $ac_word... " >&6; }
8378if ${ac_cv_prog_AR+:} false; then :
8379 $as_echo_n "(cached) " >&6
8380else
8381 if test -n "$AR"; then
8382 ac_cv_prog_AR="$AR" # Let the user override the test.
8383else
8384as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8385for as_dir in $PATH
8386do
8387 IFS=$as_save_IFS
8388 test -z "$as_dir" && as_dir=.
8389 for ac_exec_ext in '' $ac_executable_extensions; do
8390 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8391 ac_cv_prog_AR="${ac_tool_prefix}ar"
8392 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8393 break 2
8394 fi
8395done
8396 done
8397IFS=$as_save_IFS
8398
8399fi
8400fi
8401AR=$ac_cv_prog_AR
8402if test -n "$AR"; then
8403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
8404$as_echo "$AR" >&6; }
8405else
8406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8407$as_echo "no" >&6; }
8408fi
8409
8410
8411fi
8412if test -z "$ac_cv_prog_AR"; then
8413 ac_ct_AR=$AR
8414 # Extract the first word of "ar", so it can be a program name with args.
8415set dummy ar; ac_word=$2
8416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8417$as_echo_n "checking for $ac_word... " >&6; }
8418if ${ac_cv_prog_ac_ct_AR+:} false; then :
8419 $as_echo_n "(cached) " >&6
8420else
8421 if test -n "$ac_ct_AR"; then
8422 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
8423else
8424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8425for as_dir in $PATH
8426do
8427 IFS=$as_save_IFS
8428 test -z "$as_dir" && as_dir=.
8429 for ac_exec_ext in '' $ac_executable_extensions; do
8430 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8431 ac_cv_prog_ac_ct_AR="ar"
8432 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8433 break 2
8434 fi
8435done
8436 done
8437IFS=$as_save_IFS
8438
8439fi
8440fi
8441ac_ct_AR=$ac_cv_prog_ac_ct_AR
8442if test -n "$ac_ct_AR"; then
8443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
8444$as_echo "$ac_ct_AR" >&6; }
8445else
8446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8447$as_echo "no" >&6; }
8448fi
8449
8450 if test "x$ac_ct_AR" = x; then
8451 AR=""
8452 else
8453 case $cross_compiling:$ac_tool_warned in
8454yes:)
8455{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
8456$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
8457ac_tool_warned=yes ;;
8458esac
8459 AR=$ac_ct_AR
8460 fi
8461else
8462 AR="$ac_cv_prog_AR"
8463fi
8464
8465
8466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
8467$as_echo_n "checking whether ln -s works... " >&6; }
8468LN_S=$as_ln_s
8469if test "$LN_S" = "ln -s"; then
8470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8471$as_echo "yes" >&6; }
8472else
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
8474$as_echo "no, using $LN_S" >&6; }
8475fi
8476
8477
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008478
8479rm -f os-proto.h
8480 if test "${LBL_CFLAGS+set}" = set; then
8481 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
8482 fi
8483 if test -f .devel ; then
JP Abgrall511eca32014-02-12 13:46:45 -08008484 #
8485 # Skip all the warning option stuff on some compilers.
8486 #
8487 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008488
JP Abgrall511eca32014-02-12 13:46:45 -08008489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
8490$as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
8491 save_CFLAGS="$CFLAGS"
8492 CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
8493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8494/* end confdefs.h. */
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008495
JP Abgrall511eca32014-02-12 13:46:45 -08008496int
8497main ()
8498{
8499return 0
8500 ;
8501 return 0;
8502}
8503_ACEOF
8504if ac_fn_c_try_compile "$LINENO"; then :
8505
8506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507$as_echo "no" >&6; }
8508 #
8509 # We're assuming this is clang, where
8510 # -Werror=unknown-warning-option is the appropriate
8511 # option to force the compiler to fail.
8512 #
8513 ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
8514
8515else
8516
8517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8518$as_echo "yes" >&6; }
8519
8520fi
8521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8522 CFLAGS="$save_CFLAGS"
8523
8524
8525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
8526$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
8527 save_CFLAGS="$CFLAGS"
Elliott Hughes965a4b52017-05-15 10:37:39 -07008528 if expr "x-Wall" : "x-W.*" >/dev/null
8529 then
8530 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
8531 elif expr "x-Wall" : "x-f.*" >/dev/null
8532 then
8533 CFLAGS="$CFLAGS -Werror -Wall"
8534 elif expr "x-Wall" : "x-m.*" >/dev/null
8535 then
8536 CFLAGS="$CFLAGS -Werror -Wall"
8537 else
8538 CFLAGS="$CFLAGS -Wall"
8539 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8541/* end confdefs.h. */
8542
8543int
8544main ()
8545{
8546return 0
8547 ;
8548 return 0;
8549}
8550_ACEOF
8551if ac_fn_c_try_compile "$LINENO"; then :
8552
8553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8554$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07008555 can_add_to_cflags=yes
8556 #
8557 # The compile supports this; do we have some C code for
8558 # which the warning should *not* appear?
8559 # We test the fourth argument because the third argument
8560 # could contain quotes, breaking the test.
8561 #
8562 if test "x" != "x"
8563 then
8564 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5
8566$as_echo_n "checking whether -Wall ... " >&6; }
8567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8568/* end confdefs.h. */
8569
8570_ACEOF
8571if ac_fn_c_try_compile "$LINENO"; then :
8572
8573 #
8574 # Not a problem.
8575 #
8576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578
8579else
8580
8581 #
8582 # A problem.
8583 #
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8585$as_echo "yes" >&6; }
8586 can_add_to_cflags=no
8587
8588fi
8589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8590 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008591 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07008592 if test x"$can_add_to_cflags" = "xyes"
8593 then
8594 V_CCOPT="$V_CCOPT -Wall"
8595 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008596
8597else
8598
8599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8600$as_echo "no" >&6; }
8601 CFLAGS="$save_CFLAGS"
8602
8603fi
8604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8605
8606
Elliott Hughes965a4b52017-05-15 10:37:39 -07008607 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
8608$as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
8609 save_CFLAGS="$CFLAGS"
8610 if expr "x-Wsign-compare" : "x-W.*" >/dev/null
8611 then
8612 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
8613 elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
8614 then
8615 CFLAGS="$CFLAGS -Werror -Wsign-compare"
8616 elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
8617 then
8618 CFLAGS="$CFLAGS -Werror -Wsign-compare"
8619 else
8620 CFLAGS="$CFLAGS -Wsign-compare"
8621 fi
8622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8623/* end confdefs.h. */
8624
8625int
8626main ()
8627{
8628return 0
8629 ;
8630 return 0;
8631}
8632_ACEOF
8633if ac_fn_c_try_compile "$LINENO"; then :
8634
8635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8636$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07008637 can_add_to_cflags=yes
8638 #
8639 # The compile supports this; do we have some C code for
8640 # which the warning should *not* appear?
8641 # We test the fourth argument because the third argument
8642 # could contain quotes, breaking the test.
8643 #
8644 if test "x" != "x"
8645 then
8646 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5
8648$as_echo_n "checking whether -Wsign-compare ... " >&6; }
8649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8650/* end confdefs.h. */
8651
8652_ACEOF
8653if ac_fn_c_try_compile "$LINENO"; then :
8654
8655 #
8656 # Not a problem.
8657 #
8658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8659$as_echo "no" >&6; }
8660
8661else
8662
8663 #
8664 # A problem.
8665 #
8666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8667$as_echo "yes" >&6; }
8668 can_add_to_cflags=no
8669
8670fi
8671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8672 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07008673 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07008674 if test x"$can_add_to_cflags" = "xyes"
8675 then
8676 V_CCOPT="$V_CCOPT -Wsign-compare"
8677 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07008678
8679else
8680
8681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8682$as_echo "no" >&6; }
8683 CFLAGS="$save_CFLAGS"
8684
8685fi
8686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8687
8688
JP Abgrall511eca32014-02-12 13:46:45 -08008689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
8690$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
8691 save_CFLAGS="$CFLAGS"
Elliott Hughes965a4b52017-05-15 10:37:39 -07008692 if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
8693 then
8694 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
8695 elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
8696 then
8697 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
8698 elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
8699 then
8700 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
8701 else
8702 CFLAGS="$CFLAGS -Wmissing-prototypes"
8703 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8705/* end confdefs.h. */
8706
8707int
8708main ()
8709{
8710return 0
8711 ;
8712 return 0;
8713}
8714_ACEOF
8715if ac_fn_c_try_compile "$LINENO"; then :
8716
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8718$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07008719 can_add_to_cflags=yes
8720 #
8721 # The compile supports this; do we have some C code for
8722 # which the warning should *not* appear?
8723 # We test the fourth argument because the third argument
8724 # could contain quotes, breaking the test.
8725 #
8726 if test "x" != "x"
8727 then
8728 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5
8730$as_echo_n "checking whether -Wmissing-prototypes ... " >&6; }
8731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8732/* end confdefs.h. */
8733
8734_ACEOF
8735if ac_fn_c_try_compile "$LINENO"; then :
8736
8737 #
8738 # Not a problem.
8739 #
8740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8741$as_echo "no" >&6; }
8742
8743else
8744
8745 #
8746 # A problem.
8747 #
8748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8749$as_echo "yes" >&6; }
8750 can_add_to_cflags=no
8751
8752fi
8753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8754 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008755 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07008756 if test x"$can_add_to_cflags" = "xyes"
8757 then
8758 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
8759 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008760
8761else
8762
8763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764$as_echo "no" >&6; }
8765 CFLAGS="$save_CFLAGS"
8766
8767fi
8768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8769
8770
8771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
8772$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
8773 save_CFLAGS="$CFLAGS"
Elliott Hughes965a4b52017-05-15 10:37:39 -07008774 if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
8775 then
8776 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
8777 elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
8778 then
8779 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
8780 elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
8781 then
8782 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
8783 else
8784 CFLAGS="$CFLAGS -Wstrict-prototypes"
8785 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8787/* end confdefs.h. */
8788
8789int
8790main ()
8791{
8792return 0
8793 ;
8794 return 0;
8795}
8796_ACEOF
8797if ac_fn_c_try_compile "$LINENO"; then :
8798
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8800$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07008801 can_add_to_cflags=yes
8802 #
8803 # The compile supports this; do we have some C code for
8804 # which the warning should *not* appear?
8805 # We test the fourth argument because the third argument
8806 # could contain quotes, breaking the test.
8807 #
8808 if test "x" != "x"
8809 then
8810 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5
8812$as_echo_n "checking whether -Wstrict-prototypes ... " >&6; }
8813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8814/* end confdefs.h. */
8815
8816_ACEOF
8817if ac_fn_c_try_compile "$LINENO"; then :
8818
8819 #
8820 # Not a problem.
8821 #
8822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8823$as_echo "no" >&6; }
8824
8825else
8826
8827 #
8828 # A problem.
8829 #
8830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8831$as_echo "yes" >&6; }
8832 can_add_to_cflags=no
8833
8834fi
8835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8836 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008837 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07008838 if test x"$can_add_to_cflags" = "xyes"
8839 then
8840 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
8841 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008842
8843else
8844
8845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8846$as_echo "no" >&6; }
8847 CFLAGS="$save_CFLAGS"
8848
8849fi
8850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8851
Elliott Hughes965a4b52017-05-15 10:37:39 -07008852
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
8854$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
8855 save_CFLAGS="$CFLAGS"
8856 if expr "x-Wshadow" : "x-W.*" >/dev/null
8857 then
8858 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
8859 elif expr "x-Wshadow" : "x-f.*" >/dev/null
8860 then
8861 CFLAGS="$CFLAGS -Werror -Wshadow"
8862 elif expr "x-Wshadow" : "x-m.*" >/dev/null
8863 then
8864 CFLAGS="$CFLAGS -Werror -Wshadow"
8865 else
8866 CFLAGS="$CFLAGS -Wshadow"
8867 fi
8868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8869/* end confdefs.h. */
8870
8871int
8872main ()
8873{
8874return 0
8875 ;
8876 return 0;
8877}
8878_ACEOF
8879if ac_fn_c_try_compile "$LINENO"; then :
8880
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8882$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07008883 can_add_to_cflags=yes
8884 #
8885 # The compile supports this; do we have some C code for
8886 # which the warning should *not* appear?
8887 # We test the fourth argument because the third argument
8888 # could contain quotes, breaking the test.
8889 #
8890 if test "x" != "x"
8891 then
8892 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5
8894$as_echo_n "checking whether -Wshadow ... " >&6; }
8895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8896/* end confdefs.h. */
8897
8898_ACEOF
8899if ac_fn_c_try_compile "$LINENO"; then :
8900
8901 #
8902 # Not a problem.
8903 #
8904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905$as_echo "no" >&6; }
8906
8907else
8908
8909 #
8910 # A problem.
8911 #
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8913$as_echo "yes" >&6; }
8914 can_add_to_cflags=no
8915
8916fi
8917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8918 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07008919 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07008920 if test x"$can_add_to_cflags" = "xyes"
8921 then
8922 V_CCOPT="$V_CCOPT -Wshadow"
8923 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07008924
8925else
8926
8927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8928$as_echo "no" >&6; }
8929 CFLAGS="$save_CFLAGS"
8930
8931fi
8932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8933
8934
8935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdeclaration-after-statement option" >&5
8936$as_echo_n "checking whether the compiler supports the -Wdeclaration-after-statement option... " >&6; }
8937 save_CFLAGS="$CFLAGS"
8938 if expr "x-Wdeclaration-after-statement" : "x-W.*" >/dev/null
8939 then
8940 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdeclaration-after-statement"
8941 elif expr "x-Wdeclaration-after-statement" : "x-f.*" >/dev/null
8942 then
8943 CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
8944 elif expr "x-Wdeclaration-after-statement" : "x-m.*" >/dev/null
8945 then
8946 CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
8947 else
8948 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
8949 fi
8950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8951/* end confdefs.h. */
8952
8953int
8954main ()
8955{
8956return 0
8957 ;
8958 return 0;
8959}
8960_ACEOF
8961if ac_fn_c_try_compile "$LINENO"; then :
8962
8963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8964$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07008965 can_add_to_cflags=yes
8966 #
8967 # The compile supports this; do we have some C code for
8968 # which the warning should *not* appear?
8969 # We test the fourth argument because the third argument
8970 # could contain quotes, breaking the test.
8971 #
8972 if test "x" != "x"
8973 then
8974 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
8975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdeclaration-after-statement " >&5
8976$as_echo_n "checking whether -Wdeclaration-after-statement ... " >&6; }
8977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978/* end confdefs.h. */
8979
8980_ACEOF
8981if ac_fn_c_try_compile "$LINENO"; then :
8982
8983 #
8984 # Not a problem.
8985 #
8986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8987$as_echo "no" >&6; }
8988
8989else
8990
8991 #
8992 # A problem.
8993 #
8994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8995$as_echo "yes" >&6; }
8996 can_add_to_cflags=no
8997
8998fi
8999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9000 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07009001 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07009002 if test x"$can_add_to_cflags" = "xyes"
9003 then
9004 V_CCOPT="$V_CCOPT -Wdeclaration-after-statement"
9005 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07009006
9007else
9008
9009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9010$as_echo "no" >&6; }
9011 CFLAGS="$save_CFLAGS"
9012
9013fi
9014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9015
9016
9017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
9018$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
9019 save_CFLAGS="$CFLAGS"
9020 if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
9021 then
9022 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
9023 elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
9024 then
9025 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
9026 elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
9027 then
9028 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
9029 else
9030 CFLAGS="$CFLAGS -Wused-but-marked-unused"
9031 fi
9032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9033/* end confdefs.h. */
9034
9035int
9036main ()
9037{
9038return 0
9039 ;
9040 return 0;
9041}
9042_ACEOF
9043if ac_fn_c_try_compile "$LINENO"; then :
9044
9045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9046$as_echo "yes" >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -07009047 can_add_to_cflags=yes
9048 #
9049 # The compile supports this; do we have some C code for
9050 # which the warning should *not* appear?
9051 # We test the fourth argument because the third argument
9052 # could contain quotes, breaking the test.
9053 #
9054 if test "x" != "x"
9055 then
9056 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5
9058$as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; }
9059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9060/* end confdefs.h. */
9061
9062_ACEOF
9063if ac_fn_c_try_compile "$LINENO"; then :
9064
9065 #
9066 # Not a problem.
9067 #
9068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9069$as_echo "no" >&6; }
9070
9071else
9072
9073 #
9074 # A problem.
9075 #
9076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9077$as_echo "yes" >&6; }
9078 can_add_to_cflags=no
9079
9080fi
9081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9082 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07009083 CFLAGS="$save_CFLAGS"
Haibo Huang165065a2018-07-23 17:26:52 -07009084 if test x"$can_add_to_cflags" = "xyes"
9085 then
9086 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
9087 fi
9088
9089else
9090
9091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9092$as_echo "no" >&6; }
9093 CFLAGS="$save_CFLAGS"
9094
9095fi
9096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9097
9098
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5
9100$as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; }
9101 save_CFLAGS="$CFLAGS"
9102 if expr "x-Wdocumentation" : "x-W.*" >/dev/null
9103 then
9104 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdocumentation"
9105 elif expr "x-Wdocumentation" : "x-f.*" >/dev/null
9106 then
9107 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9108 elif expr "x-Wdocumentation" : "x-m.*" >/dev/null
9109 then
9110 CFLAGS="$CFLAGS -Werror -Wdocumentation"
9111 else
9112 CFLAGS="$CFLAGS -Wdocumentation"
9113 fi
9114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9115/* end confdefs.h. */
9116
9117int
9118main ()
9119{
9120return 0
9121 ;
9122 return 0;
9123}
9124_ACEOF
9125if ac_fn_c_try_compile "$LINENO"; then :
9126
9127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9128$as_echo "yes" >&6; }
9129 can_add_to_cflags=yes
9130 #
9131 # The compile supports this; do we have some C code for
9132 # which the warning should *not* appear?
9133 # We test the fourth argument because the third argument
9134 # could contain quotes, breaking the test.
9135 #
9136 if test "x" != "x"
9137 then
9138 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5
9140$as_echo_n "checking whether -Wdocumentation ... " >&6; }
9141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9142/* end confdefs.h. */
9143
9144_ACEOF
9145if ac_fn_c_try_compile "$LINENO"; then :
9146
9147 #
9148 # Not a problem.
9149 #
9150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9151$as_echo "no" >&6; }
9152
9153else
9154
9155 #
9156 # A problem.
9157 #
9158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9159$as_echo "yes" >&6; }
9160 can_add_to_cflags=no
9161
9162fi
9163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9164 fi
9165 CFLAGS="$save_CFLAGS"
9166 if test x"$can_add_to_cflags" = "xyes"
9167 then
9168 V_CCOPT="$V_CCOPT -Wdocumentation"
9169 fi
9170
9171else
9172
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174$as_echo "no" >&6; }
9175 CFLAGS="$save_CFLAGS"
9176
9177fi
9178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9179
9180
9181 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5
9182$as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; }
9183 save_CFLAGS="$CFLAGS"
9184 if expr "x-Wcomma" : "x-W.*" >/dev/null
9185 then
9186 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma"
9187 elif expr "x-Wcomma" : "x-f.*" >/dev/null
9188 then
9189 CFLAGS="$CFLAGS -Werror -Wcomma"
9190 elif expr "x-Wcomma" : "x-m.*" >/dev/null
9191 then
9192 CFLAGS="$CFLAGS -Werror -Wcomma"
9193 else
9194 CFLAGS="$CFLAGS -Wcomma"
9195 fi
9196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9197/* end confdefs.h. */
9198
9199int
9200main ()
9201{
9202return 0
9203 ;
9204 return 0;
9205}
9206_ACEOF
9207if ac_fn_c_try_compile "$LINENO"; then :
9208
9209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9210$as_echo "yes" >&6; }
9211 can_add_to_cflags=yes
9212 #
9213 # The compile supports this; do we have some C code for
9214 # which the warning should *not* appear?
9215 # We test the fourth argument because the third argument
9216 # could contain quotes, breaking the test.
9217 #
9218 if test "x" != "x"
9219 then
9220 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5
9222$as_echo_n "checking whether -Wcomma ... " >&6; }
9223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9224/* end confdefs.h. */
9225
9226_ACEOF
9227if ac_fn_c_try_compile "$LINENO"; then :
9228
9229 #
9230 # Not a problem.
9231 #
9232 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233$as_echo "no" >&6; }
9234
9235else
9236
9237 #
9238 # A problem.
9239 #
9240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9241$as_echo "yes" >&6; }
9242 can_add_to_cflags=no
9243
9244fi
9245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9246 fi
9247 CFLAGS="$save_CFLAGS"
9248 if test x"$can_add_to_cflags" = "xyes"
9249 then
9250 V_CCOPT="$V_CCOPT -Wcomma"
9251 fi
9252
9253else
9254
9255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9256$as_echo "no" >&6; }
9257 CFLAGS="$save_CFLAGS"
9258
9259fi
9260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9261
9262
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5
9264$as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; }
9265 save_CFLAGS="$CFLAGS"
9266 if expr "x-Wmissing-noreturn" : "x-W.*" >/dev/null
9267 then
9268 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-noreturn"
9269 elif expr "x-Wmissing-noreturn" : "x-f.*" >/dev/null
9270 then
9271 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9272 elif expr "x-Wmissing-noreturn" : "x-m.*" >/dev/null
9273 then
9274 CFLAGS="$CFLAGS -Werror -Wmissing-noreturn"
9275 else
9276 CFLAGS="$CFLAGS -Wmissing-noreturn"
9277 fi
9278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9279/* end confdefs.h. */
9280
9281int
9282main ()
9283{
9284return 0
9285 ;
9286 return 0;
9287}
9288_ACEOF
9289if ac_fn_c_try_compile "$LINENO"; then :
9290
9291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9292$as_echo "yes" >&6; }
9293 can_add_to_cflags=yes
9294 #
9295 # The compile supports this; do we have some C code for
9296 # which the warning should *not* appear?
9297 # We test the fourth argument because the third argument
9298 # could contain quotes, breaking the test.
9299 #
9300 if test "x" != "x"
9301 then
9302 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5
9304$as_echo_n "checking whether -Wmissing-noreturn ... " >&6; }
9305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9306/* end confdefs.h. */
9307
9308_ACEOF
9309if ac_fn_c_try_compile "$LINENO"; then :
9310
9311 #
9312 # Not a problem.
9313 #
9314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315$as_echo "no" >&6; }
9316
9317else
9318
9319 #
9320 # A problem.
9321 #
9322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9323$as_echo "yes" >&6; }
9324 can_add_to_cflags=no
9325
9326fi
9327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9328 fi
9329 CFLAGS="$save_CFLAGS"
9330 if test x"$can_add_to_cflags" = "xyes"
9331 then
9332 V_CCOPT="$V_CCOPT -Wmissing-noreturn"
9333 fi
9334
9335else
9336
9337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9338$as_echo "no" >&6; }
9339 CFLAGS="$save_CFLAGS"
9340
9341fi
9342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9343
9344 # Warns about safeguards added in case the enums are
9345 # extended
9346 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default)
9347
9348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5
9349$as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; }
9350 save_CFLAGS="$CFLAGS"
9351 if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null
9352 then
9353 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations"
9354 elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null
9355 then
9356 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9357 elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null
9358 then
9359 CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations"
9360 else
9361 CFLAGS="$CFLAGS -Wmissing-variable-declarations"
9362 fi
9363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9364/* end confdefs.h. */
9365
9366int
9367main ()
9368{
9369return 0
9370 ;
9371 return 0;
9372}
9373_ACEOF
9374if ac_fn_c_try_compile "$LINENO"; then :
9375
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9377$as_echo "yes" >&6; }
9378 can_add_to_cflags=yes
9379 #
9380 # The compile supports this; do we have some C code for
9381 # which the warning should *not* appear?
9382 # We test the fourth argument because the third argument
9383 # could contain quotes, breaking the test.
9384 #
9385 if test "x" != "x"
9386 then
9387 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5
9389$as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; }
9390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9391/* end confdefs.h. */
9392
9393_ACEOF
9394if ac_fn_c_try_compile "$LINENO"; then :
9395
9396 #
9397 # Not a problem.
9398 #
9399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9400$as_echo "no" >&6; }
9401
9402else
9403
9404 #
9405 # A problem.
9406 #
9407 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9408$as_echo "yes" >&6; }
9409 can_add_to_cflags=no
9410
9411fi
9412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9413 fi
9414 CFLAGS="$save_CFLAGS"
9415 if test x"$can_add_to_cflags" = "xyes"
9416 then
9417 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations"
9418 fi
9419
9420else
9421
9422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9423$as_echo "no" >&6; }
9424 CFLAGS="$save_CFLAGS"
9425
9426fi
9427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9428
9429
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5
9431$as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; }
9432 save_CFLAGS="$CFLAGS"
9433 if expr "x-Wunused-parameter" : "x-W.*" >/dev/null
9434 then
9435 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunused-parameter"
9436 elif expr "x-Wunused-parameter" : "x-f.*" >/dev/null
9437 then
9438 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
9439 elif expr "x-Wunused-parameter" : "x-m.*" >/dev/null
9440 then
9441 CFLAGS="$CFLAGS -Werror -Wunused-parameter"
9442 else
9443 CFLAGS="$CFLAGS -Wunused-parameter"
9444 fi
9445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9446/* end confdefs.h. */
9447
9448int
9449main ()
9450{
9451return 0
9452 ;
9453 return 0;
9454}
9455_ACEOF
9456if ac_fn_c_try_compile "$LINENO"; then :
9457
9458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9459$as_echo "yes" >&6; }
9460 can_add_to_cflags=yes
9461 #
9462 # The compile supports this; do we have some C code for
9463 # which the warning should *not* appear?
9464 # We test the fourth argument because the third argument
9465 # could contain quotes, breaking the test.
9466 #
9467 if test "x" != "x"
9468 then
9469 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5
9471$as_echo_n "checking whether -Wunused-parameter ... " >&6; }
9472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9473/* end confdefs.h. */
9474
9475_ACEOF
9476if ac_fn_c_try_compile "$LINENO"; then :
9477
9478 #
9479 # Not a problem.
9480 #
9481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9482$as_echo "no" >&6; }
9483
9484else
9485
9486 #
9487 # A problem.
9488 #
9489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9490$as_echo "yes" >&6; }
9491 can_add_to_cflags=no
9492
9493fi
9494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9495 fi
9496 CFLAGS="$save_CFLAGS"
9497 if test x"$can_add_to_cflags" = "xyes"
9498 then
9499 V_CCOPT="$V_CCOPT -Wunused-parameter"
9500 fi
9501
9502else
9503
9504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9505$as_echo "no" >&6; }
9506 CFLAGS="$save_CFLAGS"
9507
9508fi
9509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9510
9511
9512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5
9513$as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; }
9514 save_CFLAGS="$CFLAGS"
9515 if expr "x-Wformat-nonliteral" : "x-W.*" >/dev/null
9516 then
9517 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wformat-nonliteral"
9518 elif expr "x-Wformat-nonliteral" : "x-f.*" >/dev/null
9519 then
9520 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9521 elif expr "x-Wformat-nonliteral" : "x-m.*" >/dev/null
9522 then
9523 CFLAGS="$CFLAGS -Werror -Wformat-nonliteral"
9524 else
9525 CFLAGS="$CFLAGS -Wformat-nonliteral"
9526 fi
9527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9528/* end confdefs.h. */
9529
9530int
9531main ()
9532{
9533return 0
9534 ;
9535 return 0;
9536}
9537_ACEOF
9538if ac_fn_c_try_compile "$LINENO"; then :
9539
9540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9541$as_echo "yes" >&6; }
9542 can_add_to_cflags=yes
9543 #
9544 # The compile supports this; do we have some C code for
9545 # which the warning should *not* appear?
9546 # We test the fourth argument because the third argument
9547 # could contain quotes, breaking the test.
9548 #
9549 if test "x" != "x"
9550 then
9551 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5
9553$as_echo_n "checking whether -Wformat-nonliteral ... " >&6; }
9554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9555/* end confdefs.h. */
9556
9557_ACEOF
9558if ac_fn_c_try_compile "$LINENO"; then :
9559
9560 #
9561 # Not a problem.
9562 #
9563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9564$as_echo "no" >&6; }
9565
9566else
9567
9568 #
9569 # A problem.
9570 #
9571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9572$as_echo "yes" >&6; }
9573 can_add_to_cflags=no
9574
9575fi
9576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9577 fi
9578 CFLAGS="$save_CFLAGS"
9579 if test x"$can_add_to_cflags" = "xyes"
9580 then
9581 V_CCOPT="$V_CCOPT -Wformat-nonliteral"
9582 fi
9583
9584else
9585
9586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587$as_echo "no" >&6; }
9588 CFLAGS="$save_CFLAGS"
9589
9590fi
9591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9592
9593 #
9594 # This can cause problems with ntohs(), ntohl(),
9595 # htons(), and htonl() on some platforms, such
9596 # as OpenBSD 6.3 with Clang 5.0.1. I guess the
9597 # problem is that the macro that ultimately does
9598 # the byte-swapping involves a conditional
9599 # expression that tests whether the value being
9600 # swapped is a compile-time constant or not,
9601 # using __builtin_constant_p(), and, depending
9602 # on whether it is, does a compile-time swap or
9603 # a run-time swap; perhaps the compiler always
9604 # considers one of the two results of the
9605 # conditional expressin is never evaluated,
9606 # because the conditional check is done at
9607 # compile time, and thus always says "that
9608 # expression is never executed".
9609 #
9610 # (Perhaps there should be a way of flagging
9611 # an expression that you *want* evaluated at
9612 # compile time, so that the compiler 1) warns
9613 # if it *can't* be evaluated at compile time
9614 # and 2) *doesn't* warn that the true or false
9615 # branch will never be reached.)
9616 #
9617
9618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5
9619$as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; }
9620 save_CFLAGS="$CFLAGS"
9621 if expr "x-Wunreachable-code" : "x-W.*" >/dev/null
9622 then
9623 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code"
9624 elif expr "x-Wunreachable-code" : "x-f.*" >/dev/null
9625 then
9626 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
9627 elif expr "x-Wunreachable-code" : "x-m.*" >/dev/null
9628 then
9629 CFLAGS="$CFLAGS -Werror -Wunreachable-code"
9630 else
9631 CFLAGS="$CFLAGS -Wunreachable-code"
9632 fi
9633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9634/* end confdefs.h. */
9635
9636int
9637main ()
9638{
9639return 0
9640 ;
9641 return 0;
9642}
9643_ACEOF
9644if ac_fn_c_try_compile "$LINENO"; then :
9645
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9647$as_echo "yes" >&6; }
9648 can_add_to_cflags=yes
9649 #
9650 # The compile supports this; do we have some C code for
9651 # which the warning should *not* appear?
9652 # We test the fourth argument because the third argument
9653 # could contain quotes, breaking the test.
9654 #
9655 if test "xgenerates warnings from ntohs()" != "x"
9656 then
9657 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5
9659$as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; }
9660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9661/* end confdefs.h. */
9662#include <arpa/inet.h>
9663
9664unsigned short
9665testme(unsigned short a)
9666{
9667 return ntohs(a);
9668}
9669
9670_ACEOF
9671if ac_fn_c_try_compile "$LINENO"; then :
9672
9673 #
9674 # Not a problem.
9675 #
9676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678
9679else
9680
9681 #
9682 # A problem.
9683 #
9684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9685$as_echo "yes" >&6; }
9686 can_add_to_cflags=no
9687
9688fi
9689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9690 fi
9691 CFLAGS="$save_CFLAGS"
9692 if test x"$can_add_to_cflags" = "xyes"
9693 then
9694 V_CCOPT="$V_CCOPT -Wunreachable-code"
9695 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07009696
9697else
9698
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9700$as_echo "no" >&6; }
9701 CFLAGS="$save_CFLAGS"
9702
9703fi
9704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9705
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009706 fi
JP Abgrall511eca32014-02-12 13:46:45 -08009707
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
9709$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
9710 if test "$GCC" = yes ; then
9711 #
9712 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
9713 # though it's not); we assume that, in this case, the flag
9714 # would be -M.
9715 #
9716 ac_lbl_dependency_flag="-M"
9717 else
9718 #
9719 # Not GCC or a compiler deemed to be GCC; what platform is
9720 # this? (We're assuming that if the compiler isn't GCC
9721 # it's the compiler from the vendor of the OS; that won't
9722 # necessarily be true for x86 platforms, where it might be
9723 # the Intel C compiler.)
9724 #
9725 case "$host_os" in
9726
9727 irix*|osf*|darwin*)
9728 #
9729 # MIPS C for IRIX, DEC C, and clang all use -M.
9730 #
9731 ac_lbl_dependency_flag="-M"
9732 ;;
9733
9734 solaris*)
9735 #
9736 # Sun C uses -xM.
9737 #
9738 ac_lbl_dependency_flag="-xM"
9739 ;;
9740
9741 hpux*)
9742 #
9743 # HP's older C compilers don't support this.
9744 # HP's newer C compilers support this with
9745 # either +M or +Make; the older compilers
9746 # interpret +M as something completely
9747 # different, so we use +Make so we don't
9748 # think it works with the older compilers.
9749 #
9750 ac_lbl_dependency_flag="+Make"
9751 ;;
9752
9753 *)
9754 #
9755 # Not one of the above; assume no support for
9756 # generating dependencies.
9757 #
9758 ac_lbl_dependency_flag=""
9759 ;;
9760 esac
9761 fi
9762
9763 #
9764 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
9765 # complain about it?
9766 #
9767 # Note: clang doesn't seem to exit with an error status when handed
9768 # an unknown non-warning error, even if you pass it
9769 # -Werror=unknown-warning-option. However, it always supports
9770 # -M, so the fact that this test always succeeds with clang
9771 # isn't an issue.
9772 #
9773 if test ! -z "$ac_lbl_dependency_flag"; then
9774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9775/* end confdefs.h. */
9776int main(void) { return 0; }
9777_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07009778 if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5
9779 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5
9780 ac_status=$?
9781 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9782 test $ac_status = 0; }; then
JP Abgrall511eca32014-02-12 13:46:45 -08009783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
9784$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
9785 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
9786 MKDEP='${srcdir}/mkdep'
9787 else
9788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790 #
9791 # We can't run mkdep, so have "make depend" do
9792 # nothing.
9793 #
Haibo Huang165065a2018-07-23 17:26:52 -07009794 MKDEP='${srcdir}/nomkdep'
JP Abgrall511eca32014-02-12 13:46:45 -08009795 fi
9796 rm -rf conftest*
9797 else
9798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9799$as_echo "no" >&6; }
9800 #
9801 # We can't run mkdep, so have "make depend" do
9802 # nothing.
9803 #
Haibo Huang165065a2018-07-23 17:26:52 -07009804 MKDEP='${srcdir}/nomkdep'
JP Abgrall511eca32014-02-12 13:46:45 -08009805 fi
9806
9807
9808
9809 #
9810 # We used to set -n32 for IRIX 6 when not using GCC (presumed
9811 # to mean that we're using MIPS C or MIPSpro C); it specified
9812 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
9813 # not sure why that would be something to do *only* with a
9814 # .devel file; why should the ABI for which we produce code
9815 # depend on .devel?
9816 #
9817 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009818 name="lbl/os-$os.h"
9819 if test -f $name ; then
9820 ln -s $name os-proto.h
9821
JP Abgrall511eca32014-02-12 13:46:45 -08009822$as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009823
9824 else
JP Abgrall511eca32014-02-12 13:46:45 -08009825 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
9826$as_echo "$as_me: WARNING: can't find $name" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009827 fi
9828 fi
9829
Haibo Huang165065a2018-07-23 17:26:52 -07009830#
9831# Check to see if the sockaddr struct has the 4.4 BSD sa_len member.
9832#
9833ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "
9834 #include <sys/types.h>
9835 #include <sys/socket.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009836
Haibo Huang165065a2018-07-23 17:26:52 -07009837"
9838if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then :
9839
9840cat >>confdefs.h <<_ACEOF
9841#define HAVE_STRUCT_SOCKADDR_SA_LEN 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009842_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07009843
9844
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009845fi
9846
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009847
Haibo Huang165065a2018-07-23 17:26:52 -07009848#
9849# Check to see if there's a sockaddr_storage structure.
9850#
9851ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
9852 #include <sys/types.h>
9853 #include <sys/socket.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009854
Haibo Huang165065a2018-07-23 17:26:52 -07009855"
9856if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009857
Haibo Huang165065a2018-07-23 17:26:52 -07009858cat >>confdefs.h <<_ACEOF
9859#define HAVE_STRUCT_SOCKADDR_STORAGE 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009860_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07009861
9862
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009863fi
9864
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009865
Haibo Huang165065a2018-07-23 17:26:52 -07009866#
9867# Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00
9868# dl_module_id_1 member.
9869#
9870# NOTE: any failure means we conclude that it doesn't have that member,
9871# so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or
9872# have one that doesn't declare a dl_hp_ppa_info_t type, we conclude
9873# it doesn't have that member (which is OK, as either we won't be
9874# using code that would use that member, or we wouldn't compile in
9875# any case).
9876#
9877ac_fn_c_check_member "$LINENO" "dl_hp_ppa_info_t" "dl_module_id_1" "ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" "
9878 #include <sys/types.h>
9879 #include <sys/dlpi.h>
9880 #include <sys/dlpi_ext.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009881
Haibo Huang165065a2018-07-23 17:26:52 -07009882"
9883if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009884
Haibo Huang165065a2018-07-23 17:26:52 -07009885cat >>confdefs.h <<_ACEOF
9886#define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009887_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -07009888
9889
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009890fi
9891
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009892
JP Abgrall511eca32014-02-12 13:46:45 -08009893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned accesses fail" >&5
9894$as_echo_n "checking if unaligned accesses fail... " >&6; }
9895 if ${ac_cv_lbl_unaligned_fail+:} false; then :
9896 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009897else
9898 case "$host_cpu" in
9899
9900 #
9901 # These are CPU types where:
9902 #
9903 # the CPU faults on an unaligned access, but at least some
9904 # OSes that support that CPU catch the fault and simulate
9905 # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
9906 # the simulation is slow, so we don't want to use it;
9907 #
9908 # the CPU, I infer (from the old
9909 #
9910 # XXX: should also check that they don't do weird things (like on arm)
9911 #
9912 # comment) doesn't fault on unaligned accesses, but doesn't
9913 # do a normal unaligned fetch, either (e.g., presumably, ARM);
9914 #
9915 # for whatever reason, the test program doesn't work
9916 # (this has been claimed to be the case for several of those
9917 # CPUs - I don't know what the problem is; the problem
9918 # was reported as "the test program dumps core" for SuperH,
9919 # but that's what the test program is *supposed* to do -
9920 # it dumps core before it writes anything, so the test
9921 # for an empty output file should find an empty output
9922 # file and conclude that unaligned accesses don't work).
9923 #
9924 # This run-time test won't work if you're cross-compiling, so
9925 # in order to support cross-compiling for a particular CPU,
9926 # we have to wire in the list of CPU types anyway, as far as
9927 # I know, so perhaps we should just have a set of CPUs on
9928 # which we know it doesn't work, a set of CPUs on which we
9929 # know it does work, and have the script just fail on other
9930 # cpu types and update it when such a failure occurs.
9931 #
JP Abgrall511eca32014-02-12 13:46:45 -08009932 alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1)
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009933 ac_cv_lbl_unaligned_fail=yes
9934 ;;
9935
9936 *)
9937 cat >conftest.c <<EOF
9938# include <sys/types.h>
9939# include <sys/wait.h>
9940# include <stdio.h>
9941 unsigned char a[5] = { 1, 2, 3, 4, 5 };
9942 main() {
9943 unsigned int i;
9944 pid_t pid;
9945 int status;
9946 /* avoid "core dumped" message */
9947 pid = fork();
9948 if (pid < 0)
9949 exit(2);
9950 if (pid > 0) {
9951 /* parent */
9952 pid = waitpid(pid, &status, 0);
9953 if (pid < 0)
9954 exit(3);
9955 exit(!WIFEXITED(status));
9956 }
9957 /* child */
9958 i = *(unsigned int *)&a[1];
9959 printf("%d\n", i);
9960 exit(0);
9961 }
9962EOF
9963 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
9964 conftest.c $LIBS >/dev/null 2>&1
9965 if test ! -x conftest ; then
9966 ac_cv_lbl_unaligned_fail=yes
9967 else
9968 ./conftest >conftest.out
9969 if test ! -s conftest.out ; then
9970 ac_cv_lbl_unaligned_fail=yes
9971 else
9972 ac_cv_lbl_unaligned_fail=no
9973 fi
9974 fi
JP Abgrall511eca32014-02-12 13:46:45 -08009975 rm -f -r conftest* core core.conftest
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009976 ;;
9977 esac
9978fi
9979
JP Abgrall511eca32014-02-12 13:46:45 -08009980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_unaligned_fail" >&5
9981$as_echo "$ac_cv_lbl_unaligned_fail" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009982 if test $ac_cv_lbl_unaligned_fail = yes ; then
9983
JP Abgrall511eca32014-02-12 13:46:45 -08009984$as_echo "#define LBL_ALIGN 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009985
9986 fi
9987
Haibo Huang165065a2018-07-23 17:26:52 -07009988
9989
9990
9991
9992
9993
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
JP Abgrall511eca32014-02-12 13:46:45 -080010008
10009
10010
10011
10012
Elliott Hughesd8845d72015-10-19 18:07:04 -070010013# Check whether --enable-usb was given.
10014if test "${enable_usb+set}" = set; then :
10015 enableval=$enable_usb;
10016else
10017 enable_usb=yes
10018fi
10019
10020
Elliott Hughes965a4b52017-05-15 10:37:39 -070010021if test "xxx_only" = yes; then
10022 # User requested something-else-only pcap, so they don't
10023 # want USB support.
10024 enable_usb=no
10025fi
10026
Elliott Hughesd8845d72015-10-19 18:07:04 -070010027if test "x$enable_usb" != "xno" ; then
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USB sniffing support" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010029$as_echo_n "checking for USB sniffing support... " >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -070010030 case "$host_os" in
10031 linux*)
JP Abgrall511eca32014-02-12 13:46:45 -080010032
10033$as_echo "#define PCAP_SUPPORT_USB 1" >>confdefs.h
10034
10035 USB_SRC=pcap-usb-linux.c
10036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10037$as_echo "yes" >&6; }
10038 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
10039 if test $? -ne 0 ; then
10040 ac_usb_dev_name="usbmon"
10041 fi
10042
10043cat >>confdefs.h <<_ACEOF
10044#define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
10045_ACEOF
10046
10047 { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
10048$as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
10049 #
10050 # Do we have a version of <linux/compiler.h> available?
10051 # If so, we might need it for <linux/usbdevice_fs.h>.
10052 #
10053 for ac_header in linux/compiler.h
10054do :
10055 ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
10056if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
10057 cat >>confdefs.h <<_ACEOF
10058#define HAVE_LINUX_COMPILER_H 1
10059_ACEOF
10060
10061fi
10062
10063done
10064
10065 if test "$ac_cv_header_linux_compiler_h" = yes; then
10066 #
10067 # Yes - include it when testing for <linux/usbdevice_fs.h>.
10068 #
10069 for ac_header in linux/usbdevice_fs.h
10070do :
10071 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
10072"
10073if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
10074 cat >>confdefs.h <<_ACEOF
10075#define HAVE_LINUX_USBDEVICE_FS_H 1
10076_ACEOF
10077
10078fi
10079
10080done
10081
10082 else
10083 for ac_header in linux/usbdevice_fs.h
10084do :
10085 ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
10086if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
10087 cat >>confdefs.h <<_ACEOF
10088#define HAVE_LINUX_USBDEVICE_FS_H 1
10089_ACEOF
10090
10091fi
10092
10093done
10094
10095 fi
10096 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
10097 #
10098 # OK, does it define bRequestType? Older versions of the kernel
10099 # define fields with names like "requesttype, "request", and
10100 # "value", rather than "bRequestType", "bRequest", and
10101 # "wValue".
10102 #
Haibo Huang165065a2018-07-23 17:26:52 -070010103 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" "
10104 $ac_includes_default
10105 #ifdef HAVE_LINUX_COMPILER_H
10106 #include <linux/compiler.h>
10107 #endif
10108 #include <linux/usbdevice_fs.h>
JP Abgrall511eca32014-02-12 13:46:45 -080010109
Haibo Huang165065a2018-07-23 17:26:52 -070010110"
10111if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then :
10112
10113cat >>confdefs.h <<_ACEOF
10114#define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1
JP Abgrall511eca32014-02-12 13:46:45 -080010115_ACEOF
Haibo Huang165065a2018-07-23 17:26:52 -070010116
10117
JP Abgrall511eca32014-02-12 13:46:45 -080010118fi
10119
JP Abgrall511eca32014-02-12 13:46:45 -080010120 fi
10121 ;;
Elliott Hughes965a4b52017-05-15 10:37:39 -070010122 freebsd*)
10123 #
10124 # This just uses BPF in FreeBSD 8.4 and later; we don't need
10125 # to check for anything special for capturing.
10126 #
10127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in FreeBSD 8.4 and later" >&5
10128$as_echo "yes, in FreeBSD 8.4 and later" >&6; }
10129 ;;
10130
Elliott Hughesd8845d72015-10-19 18:07:04 -070010131 *)
JP Abgrall511eca32014-02-12 13:46:45 -080010132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10133$as_echo "no" >&6; }
10134 ;;
10135esac
Elliott Hughesd8845d72015-10-19 18:07:04 -070010136fi
JP Abgrall511eca32014-02-12 13:46:45 -080010137
10138
10139
Elliott Hughes965a4b52017-05-15 10:37:39 -070010140if test "xxx_only" != yes; then
10141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the platform could support netfilter sniffing" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010142$as_echo_n "checking whether the platform could support netfilter sniffing... " >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -070010143 case "$host_os" in
10144 linux*)
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010146$as_echo "yes" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -070010147 #
10148 # Life's too short to deal with trying to get this to compile
10149 # if you don't get the right types defined with
10150 # __KERNEL_STRICT_NAMES getting defined by some other include.
10151 #
10152 # Check whether the includes Just Work. If not, don't turn on
10153 # netfilter support.
10154 #
10155 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010156$as_echo_n "checking whether we can compile the netfilter support... " >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -070010157 if ${ac_cv_netfilter_can_compile+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -080010158 $as_echo_n "(cached) " >&6
10159else
10160 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10161/* end confdefs.h. */
10162
10163$ac_includes_default
10164#include <sys/socket.h>
10165#include <netinet/in.h>
10166#include <linux/types.h>
10167
10168#include <linux/netlink.h>
10169#include <linux/netfilter.h>
10170#include <linux/netfilter/nfnetlink.h>
10171#include <linux/netfilter/nfnetlink_log.h>
10172#include <linux/netfilter/nfnetlink_queue.h>
10173int
10174main ()
10175{
10176
10177 ;
10178 return 0;
10179}
10180_ACEOF
10181if ac_fn_c_try_compile "$LINENO"; then :
10182 ac_cv_netfilter_can_compile=yes
10183else
10184 ac_cv_netfilter_can_compile=no
10185fi
10186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10187fi
10188
Elliott Hughes965a4b52017-05-15 10:37:39 -070010189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010190$as_echo "$ac_cv_netfilter_can_compile" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -070010191 if test $ac_cv_netfilter_can_compile = yes ; then
JP Abgrall511eca32014-02-12 13:46:45 -080010192
10193$as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
10194
Elliott Hughes965a4b52017-05-15 10:37:39 -070010195 NETFILTER_SRC=pcap-netfilter-linux.c
10196 fi
10197 ;;
10198 *)
10199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010200$as_echo "no" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -070010201 ;;
10202 esac
10203fi
JP Abgrall511eca32014-02-12 13:46:45 -080010204
10205
10206
Haibo Huang165065a2018-07-23 17:26:52 -070010207# Check whether --enable-netmap was given.
10208if test "${enable_netmap+set}" = set; then :
10209 enableval=$enable_netmap;
10210else
10211 enable_netmap=yes
10212fi
10213
10214
10215if test "x$enable_netmap" != "xno" ; then
10216 #
10217 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is
10218 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS
10219 # is defined, for example, as it includes a non-existent malloc.h
10220 # header.
10221 #
10222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5
10223$as_echo_n "checking whether we can compile the netmap support... " >&6; }
10224 if ${ac_cv_net_netmap_user_can_compile+:} false; then :
10225 $as_echo_n "(cached) " >&6
10226else
10227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10228/* end confdefs.h. */
10229
10230$ac_includes_default
10231#define NETMAP_WITH_LIBS
10232#include <net/netmap_user.h>
10233int
10234main ()
10235{
10236
10237 ;
10238 return 0;
10239}
10240_ACEOF
10241if ac_fn_c_try_compile "$LINENO"; then :
10242 ac_cv_net_netmap_user_can_compile=yes
10243else
10244 ac_cv_net_netmap_user_can_compile=no
10245fi
10246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10247fi
10248
10249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5
10250$as_echo "$ac_cv_net_netmap_user_can_compile" >&6; }
10251 if test $ac_cv_net_netmap_user_can_compile = yes ; then
10252
10253$as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h
10254
10255 NETMAP_SRC=pcap-netmap.c
10256 fi
10257
10258
10259fi
10260
10261
JP Abgrall511eca32014-02-12 13:46:45 -080010262# Check whether --enable-bluetooth was given.
10263if test "${enable_bluetooth+set}" = set; then :
10264 enableval=$enable_bluetooth;
10265else
Elliott Hughesd8845d72015-10-19 18:07:04 -070010266 enable_bluetooth=ifsupportavailable
JP Abgrall511eca32014-02-12 13:46:45 -080010267fi
10268
10269
Elliott Hughes965a4b52017-05-15 10:37:39 -070010270if test "xxx_only" = yes; then
10271 # User requested something-else-only pcap, so they don't
10272 # want Bluetooth support.
10273 enable_bluetooth=no
10274fi
10275
JP Abgrall511eca32014-02-12 13:46:45 -080010276if test "x$enable_bluetooth" != "xno" ; then
10277 case "$host_os" in
10278 linux*)
10279 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
10280if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
10281
Haibo Huang165065a2018-07-23 17:26:52 -070010282 #
10283 # We have bluetooth.h, so we support Bluetooth
10284 # sniffing.
10285 #
JP Abgrall511eca32014-02-12 13:46:45 -080010286
10287$as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
10288
Haibo Huang165065a2018-07-23 17:26:52 -070010289 BT_SRC=pcap-bt-linux.c
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010291$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
Haibo Huang165065a2018-07-23 17:26:52 -070010292 ac_lbl_bluetooth_available=yes
JP Abgrall511eca32014-02-12 13:46:45 -080010293
Haibo Huang165065a2018-07-23 17:26:52 -070010294 #
10295 # OK, does struct sockaddr_hci have an hci_channel
10296 # member?
10297 #
10298 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" "
10299 #include <bluetooth/bluetooth.h>
10300 #include <bluetooth/hci.h>
JP Abgrall511eca32014-02-12 13:46:45 -080010301
Haibo Huang165065a2018-07-23 17:26:52 -070010302"
10303if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then :
JP Abgrall511eca32014-02-12 13:46:45 -080010304
Haibo Huang165065a2018-07-23 17:26:52 -070010305cat >>confdefs.h <<_ACEOF
10306#define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1
JP Abgrall511eca32014-02-12 13:46:45 -080010307_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -080010308
Elliott Hughesd8845d72015-10-19 18:07:04 -070010309
Haibo Huang165065a2018-07-23 17:26:52 -070010310 #
10311 # Yes; is HCI_CHANNEL_MONITOR defined?
10312 #
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
Elliott Hughesd8845d72015-10-19 18:07:04 -070010314$as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
Haibo Huang165065a2018-07-23 17:26:52 -070010315 if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
Elliott Hughesd8845d72015-10-19 18:07:04 -070010316 $as_echo_n "(cached) " >&6
10317else
10318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10319/* end confdefs.h. */
10320
Haibo Huang165065a2018-07-23 17:26:52 -070010321 #include <bluetooth/bluetooth.h>
10322 #include <bluetooth/hci.h>
Elliott Hughesd8845d72015-10-19 18:07:04 -070010323
10324int
10325main ()
10326{
Haibo Huang165065a2018-07-23 17:26:52 -070010327
10328 u_int i = HCI_CHANNEL_MONITOR;
10329
Elliott Hughesd8845d72015-10-19 18:07:04 -070010330 ;
10331 return 0;
10332}
10333_ACEOF
10334if ac_fn_c_try_compile "$LINENO"; then :
Elliott Hughesd8845d72015-10-19 18:07:04 -070010335
Haibo Huang165065a2018-07-23 17:26:52 -070010336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10337$as_echo "yes" >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -070010338
10339$as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
10340
Haibo Huang165065a2018-07-23 17:26:52 -070010341 BT_MONITOR_SRC=pcap-bt-monitor-linux.c
JP Abgrall511eca32014-02-12 13:46:45 -080010342
10343else
Haibo Huang165065a2018-07-23 17:26:52 -070010344
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10346$as_echo "no" >&6; }
10347
10348fi
10349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10350fi
10351
JP Abgrall511eca32014-02-12 13:46:45 -080010352
10353fi
10354
10355
Haibo Huang165065a2018-07-23 17:26:52 -070010356else
10357
10358 #
10359 # We don't have bluetooth.h, so we don't support
10360 # Bluetooth sniffing.
10361 #
10362 if test "x$enable_bluetooth" = "xyes" ; then
10363 as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
10364 else
10365 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
Elliott Hughesd8845d72015-10-19 18:07:04 -070010366$as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
Haibo Huang165065a2018-07-23 17:26:52 -070010367 fi
10368
10369fi
10370
10371
JP Abgrall511eca32014-02-12 13:46:45 -080010372 ;;
10373 *)
Elliott Hughesd8845d72015-10-19 18:07:04 -070010374 if test "x$enable_bluetooth" = "xyes" ; then
Haibo Huang165065a2018-07-23 17:26:52 -070010375 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
Elliott Hughesd8845d72015-10-19 18:07:04 -070010376 else
Haibo Huang165065a2018-07-23 17:26:52 -070010377 { $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010378$as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
Elliott Hughesd8845d72015-10-19 18:07:04 -070010379 fi
JP Abgrall511eca32014-02-12 13:46:45 -080010380 ;;
10381 esac
10382
10383
Elliott Hughesd8845d72015-10-19 18:07:04 -070010384
JP Abgrall511eca32014-02-12 13:46:45 -080010385fi
10386
JP Abgrall511eca32014-02-12 13:46:45 -080010387# Check whether --enable-dbus was given.
10388if test "${enable_dbus+set}" = set; then :
10389 enableval=$enable_dbus;
10390else
10391 enable_dbus=ifavailable
10392fi
10393
10394
Elliott Hughes965a4b52017-05-15 10:37:39 -070010395if test "xxx_only" = yes; then
10396 # User requested something-else-only pcap, so they don't
10397 # want D-Bus support.
10398 enable_dbus=no
10399fi
10400
JP Abgrall511eca32014-02-12 13:46:45 -080010401if test "x$enable_dbus" != "xno"; then
10402 if test "x$enable_dbus" = "xyes"; then
10403 case "$host_os" in
10404
10405 darwin*)
10406 #
Haibo Huang165065a2018-07-23 17:26:52 -070010407 # We don't support D-Bus sniffing on macOS; see
Elliott Hughesd8845d72015-10-19 18:07:04 -070010408 #
JP Abgrall511eca32014-02-12 13:46:45 -080010409 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
10410 #
Elliott Hughesd8845d72015-10-19 18:07:04 -070010411 # The user requested it, so fail.
10412 #
Haibo Huang165065a2018-07-23 17:26:52 -070010413 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5
JP Abgrall511eca32014-02-12 13:46:45 -080010414 esac
10415 else
10416 case "$host_os" in
10417
10418 darwin*)
10419 #
Haibo Huang165065a2018-07-23 17:26:52 -070010420 # We don't support D-Bus sniffing on macOS; see
Elliott Hughesd8845d72015-10-19 18:07:04 -070010421 #
JP Abgrall511eca32014-02-12 13:46:45 -080010422 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
10423 #
Elliott Hughesd8845d72015-10-19 18:07:04 -070010424 # The user dind't explicitly request it, so just
10425 # silently refuse to enable it.
10426 #
10427 enable_dbus="no"
JP Abgrall511eca32014-02-12 13:46:45 -080010428 ;;
Elliott Hughesd8845d72015-10-19 18:07:04 -070010429 esac
10430 fi
10431fi
JP Abgrall511eca32014-02-12 13:46:45 -080010432
Elliott Hughesd8845d72015-10-19 18:07:04 -070010433if test "x$enable_dbus" != "xno"; then
10434 # Extract the first word of "pkg-config", so it can be a program name with args.
JP Abgrall511eca32014-02-12 13:46:45 -080010435set dummy pkg-config; ac_word=$2
10436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10437$as_echo_n "checking for $ac_word... " >&6; }
10438if ${ac_cv_prog_PKGCONFIG+:} false; then :
10439 $as_echo_n "(cached) " >&6
10440else
10441 if test -n "$PKGCONFIG"; then
10442 ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
10443else
10444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10445for as_dir in $PATH
10446do
10447 IFS=$as_save_IFS
10448 test -z "$as_dir" && as_dir=.
10449 for ac_exec_ext in '' $ac_executable_extensions; do
10450 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10451 ac_cv_prog_PKGCONFIG="pkg-config"
10452 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10453 break 2
10454 fi
10455done
10456 done
10457IFS=$as_save_IFS
10458
10459 test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
10460fi
10461fi
10462PKGCONFIG=$ac_cv_prog_PKGCONFIG
10463if test -n "$PKGCONFIG"; then
10464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
10465$as_echo "$PKGCONFIG" >&6; }
10466else
10467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468$as_echo "no" >&6; }
10469fi
10470
10471
Elliott Hughesd8845d72015-10-19 18:07:04 -070010472 if test "x$PKGCONFIG" != "xno"; then
10473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010474$as_echo_n "checking for D-Bus... " >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -070010475 if "$PKGCONFIG" dbus-1; then
10476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010477$as_echo "yes" >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -070010478 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
10479 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
10480 save_CFLAGS="$CFLAGS"
10481 save_LIBS="$LIBS"
10482 CFLAGS="$CFLAGS $DBUS_CFLAGS"
10483 LIBS="$LIBS $DBUS_LIBS"
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010485$as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -070010486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
JP Abgrall511eca32014-02-12 13:46:45 -080010487/* end confdefs.h. */
10488#include <string.h>
10489
Elliott Hughesd8845d72015-10-19 18:07:04 -070010490 #include <time.h>
10491 #include <sys/time.h>
JP Abgrall511eca32014-02-12 13:46:45 -080010492
Elliott Hughesd8845d72015-10-19 18:07:04 -070010493 #include <dbus/dbus.h>
JP Abgrall511eca32014-02-12 13:46:45 -080010494int
10495main ()
10496{
10497return dbus_connection_read_write(NULL, 0);
10498 ;
10499 return 0;
10500}
10501_ACEOF
10502if ac_fn_c_try_link "$LINENO"; then :
10503
Elliott Hughesd8845d72015-10-19 18:07:04 -070010504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010505$as_echo "yes" >&6; }
10506
10507$as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
10508
Elliott Hughesd8845d72015-10-19 18:07:04 -070010509 DBUS_SRC=pcap-dbus.c
10510 V_INCLS="$V_INCLS $DBUS_CFLAGS"
JP Abgrall511eca32014-02-12 13:46:45 -080010511
10512else
10513
Elliott Hughesd8845d72015-10-19 18:07:04 -070010514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010515$as_echo "no" >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -070010516 if test "x$enable_dbus" = "xyes"; then
10517 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
10518 fi
10519 LIBS="$save_LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -080010520
10521fi
10522rm -f core conftest.err conftest.$ac_objext \
10523 conftest$ac_exeext conftest.$ac_ext
Elliott Hughesd8845d72015-10-19 18:07:04 -070010524 CFLAGS="$save_CFLAGS"
10525 else
10526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -080010527$as_echo "no" >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -070010528 if test "x$enable_dbus" = "xyes"; then
10529 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
JP Abgrall511eca32014-02-12 13:46:45 -080010530 fi
Elliott Hughesd8845d72015-10-19 18:07:04 -070010531 fi
JP Abgrall511eca32014-02-12 13:46:45 -080010532 fi
10533
10534
10535fi
10536
Haibo Huang165065a2018-07-23 17:26:52 -070010537# Check whether --enable-rdma was given.
10538if test "${enable_rdma+set}" = set; then :
10539 enableval=$enable_rdma;
Elliott Hughesd8845d72015-10-19 18:07:04 -070010540else
Haibo Huang165065a2018-07-23 17:26:52 -070010541 enable_rdmasniff=ifavailable
Elliott Hughesd8845d72015-10-19 18:07:04 -070010542fi
10543
10544
Haibo Huang165065a2018-07-23 17:26:52 -070010545if test "xxx_only" = yes; then
10546 # User requested something-else-only pcap, so they don't
10547 # want RDMA support.
10548 enable_rdmasniff=no
10549fi
Elliott Hughesd8845d72015-10-19 18:07:04 -070010550
Haibo Huang165065a2018-07-23 17:26:52 -070010551if test "x$enable_rdmasniff" != "xno"; then
10552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5
10553$as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; }
10554if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then :
10555 $as_echo_n "(cached) " >&6
10556else
10557 ac_check_lib_save_LIBS=$LIBS
10558LIBS="-libverbs $LIBS"
10559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10560/* end confdefs.h. */
10561
10562/* Override any GCC internal prototype to avoid an error.
10563 Use char because int might match the return type of a GCC
10564 builtin and then its argument prototype would still apply. */
10565#ifdef __cplusplus
10566extern "C"
10567#endif
10568char ibv_get_device_list ();
10569int
10570main ()
10571{
10572return ibv_get_device_list ();
10573 ;
10574 return 0;
10575}
10576_ACEOF
10577if ac_fn_c_try_link "$LINENO"; then :
10578 ac_cv_lib_ibverbs_ibv_get_device_list=yes
10579else
10580 ac_cv_lib_ibverbs_ibv_get_device_list=no
10581fi
10582rm -f core conftest.err conftest.$ac_objext \
10583 conftest$ac_exeext conftest.$ac_ext
10584LIBS=$ac_check_lib_save_LIBS
10585fi
10586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5
10587$as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; }
10588if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then :
10589
10590 ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default"
10591if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then :
10592
10593 #
10594 # ibv_create_flow may be defined as a static inline
10595 # function in infiniband/verbs.h, so we can't
10596 # use AC_CHECK_LIB.
10597 #
10598 # Too bad autoconf has no AC_SYMBOL_EXISTS()
10599 # macro that works like CMake's check_symbol_exists()
10600 # function, to check do a compile check like
10601 # this (they do a clever trick to avoid having
10602 # to know the function's signature).
10603 #
10604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5
10605$as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; }
10606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10607/* end confdefs.h. */
10608
10609 #include <infiniband/verbs.h>
10610
10611int
10612main ()
10613{
10614
10615 (void) ibv_create_flow((struct ibv_qp *) NULL,
10616 (struct ibv_flow_attr *) NULL);
10617
10618 ;
10619 return 0;
10620}
10621_ACEOF
10622if ac_fn_c_try_link "$LINENO"; then :
10623
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10625$as_echo "yes" >&6; }
10626
10627$as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h
10628
10629 RDMA_SRC=pcap-rdmasniff.c
10630 LIBS="-libverbs $LIBS"
10631
10632else
10633
10634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10635$as_echo "no" >&6; }
10636
10637
10638fi
10639rm -f core conftest.err conftest.$ac_objext \
10640 conftest$ac_exeext conftest.$ac_ext
10641
10642fi
10643
10644
10645
10646fi
10647
Elliott Hughesd8845d72015-10-19 18:07:04 -070010648
10649
10650fi
10651
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010652# Find a good install program. We prefer a C program (faster),
10653# so one script is as good as another. But avoid the broken or
10654# incompatible versions:
10655# SysV /etc/install, /usr/sbin/install
10656# SunOS /usr/etc/install
10657# IRIX /sbin/install
10658# AIX /bin/install
10659# AmigaOS /C/install, which installs bootblocks on floppy discs
10660# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
10661# AFS /usr/afsws/bin/install, which mishandles nonexistent args
10662# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
10663# OS/2's system install, which has a completely different semantic
10664# ./install, which can be erroneously created by make from ./install.sh.
JP Abgrall511eca32014-02-12 13:46:45 -080010665# Reject install programs that cannot install multiple files.
10666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
10667$as_echo_n "checking for a BSD-compatible install... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010668if test -z "$INSTALL"; then
JP Abgrall511eca32014-02-12 13:46:45 -080010669if ${ac_cv_path_install+:} false; then :
10670 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010671else
10672 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10673for as_dir in $PATH
10674do
10675 IFS=$as_save_IFS
10676 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -080010677 # Account for people who put trailing slashes in PATH elements.
10678case $as_dir/ in #((
10679 ./ | .// | /[cC]/* | \
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010680 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
JP Abgrall511eca32014-02-12 13:46:45 -080010681 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010682 /usr/ucb/* ) ;;
10683 *)
10684 # OSF1 and SCO ODT 3.0 have their own names for install.
10685 # Don't use installbsd from OSF since it installs stuff as root
10686 # by default.
10687 for ac_prog in ginstall scoinst install; do
10688 for ac_exec_ext in '' $ac_executable_extensions; do
JP Abgrall511eca32014-02-12 13:46:45 -080010689 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010690 if test $ac_prog = install &&
10691 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
10692 # AIX install. It has an incompatible calling convention.
10693 :
10694 elif test $ac_prog = install &&
10695 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
10696 # program-specific install script used by HP pwplus--don't use.
10697 :
10698 else
JP Abgrall511eca32014-02-12 13:46:45 -080010699 rm -rf conftest.one conftest.two conftest.dir
10700 echo one > conftest.one
10701 echo two > conftest.two
10702 mkdir conftest.dir
10703 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
10704 test -s conftest.one && test -s conftest.two &&
10705 test -s conftest.dir/conftest.one &&
10706 test -s conftest.dir/conftest.two
10707 then
10708 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
10709 break 3
10710 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010711 fi
10712 fi
10713 done
10714 done
10715 ;;
10716esac
JP Abgrall511eca32014-02-12 13:46:45 -080010717
10718 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010719IFS=$as_save_IFS
10720
JP Abgrall511eca32014-02-12 13:46:45 -080010721rm -rf conftest.one conftest.two conftest.dir
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010722
10723fi
10724 if test "${ac_cv_path_install+set}" = set; then
10725 INSTALL=$ac_cv_path_install
10726 else
10727 # As a last resort, use the slow shell script. Don't cache a
10728 # value for INSTALL within a source directory, because that will
10729 # break other packages using the cache if that directory is
10730 # removed, or if the value is a relative name.
10731 INSTALL=$ac_install_sh
10732 fi
10733fi
JP Abgrall511eca32014-02-12 13:46:45 -080010734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
10735$as_echo "$INSTALL" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010736
10737# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
10738# It thinks the first close brace ends the variable substitution.
10739test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
10740
10741test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
10742
10743test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
10744
10745
10746ac_config_headers="$ac_config_headers config.h"
10747
10748
JP Abgrall511eca32014-02-12 13:46:45 -080010749ac_config_commands="$ac_config_commands default-1"
10750
Haibo Huang165065a2018-07-23 17:26:52 -070010751ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin testprogs/Makefile"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010752
10753cat >confcache <<\_ACEOF
10754# This file is a shell script that caches the results of configure
10755# tests run on this system so they can be shared between configure
10756# scripts and configure runs, see configure's option --config-cache.
10757# It is not useful on other systems. If it contains results you don't
10758# want to keep, you may remove or edit it.
10759#
10760# config.status only pays attention to the cache file if you give it
10761# the --recheck option to rerun configure.
10762#
10763# `ac_cv_env_foo' variables (set or unset) will be overridden when
10764# loading this file, other *unset* `ac_cv_foo' will be assigned the
10765# following values.
10766
10767_ACEOF
10768
10769# The following way of writing the cache mishandles newlines in values,
10770# but we know of no workaround that is simple, portable, and efficient.
10771# So, we kill variables containing newlines.
10772# Ultrix sh set writes to stderr and can't be redirected directly,
10773# and sets the high bit in the cache file unless we assign to the vars.
10774(
10775 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
10776 eval ac_val=\$$ac_var
10777 case $ac_val in #(
10778 *${as_nl}*)
10779 case $ac_var in #(
JP Abgrall511eca32014-02-12 13:46:45 -080010780 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
10781$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010782 esac
10783 case $ac_var in #(
10784 _ | IFS | as_nl) ;; #(
JP Abgrall511eca32014-02-12 13:46:45 -080010785 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
10786 *) { eval $ac_var=; unset $ac_var;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010787 esac ;;
10788 esac
10789 done
10790
10791 (set) 2>&1 |
10792 case $as_nl`(ac_space=' '; set) 2>&1` in #(
10793 *${as_nl}ac_space=\ *)
JP Abgrall511eca32014-02-12 13:46:45 -080010794 # `set' does not quote correctly, so add quotes: double-quote
10795 # substitution turns \\\\ into \\, and sed turns \\ into \.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010796 sed -n \
10797 "s/'/'\\\\''/g;
10798 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
10799 ;; #(
10800 *)
10801 # `set' quotes correctly as required by POSIX, so do not add quotes.
10802 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
10803 ;;
10804 esac |
10805 sort
10806) |
10807 sed '
10808 /^ac_cv_env_/b end
10809 t clear
10810 :clear
10811 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
10812 t end
10813 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
10814 :end' >>confcache
10815if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
10816 if test -w "$cache_file"; then
JP Abgrall511eca32014-02-12 13:46:45 -080010817 if test "x$cache_file" != "x/dev/null"; then
10818 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
10819$as_echo "$as_me: updating cache $cache_file" >&6;}
10820 if test ! -f "$cache_file" || test -h "$cache_file"; then
10821 cat confcache >"$cache_file"
10822 else
10823 case $cache_file in #(
10824 */* | ?:*)
10825 mv -f confcache "$cache_file"$$ &&
10826 mv -f "$cache_file"$$ "$cache_file" ;; #(
10827 *)
10828 mv -f confcache "$cache_file" ;;
10829 esac
10830 fi
10831 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010832 else
JP Abgrall511eca32014-02-12 13:46:45 -080010833 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
10834$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010835 fi
10836fi
10837rm -f confcache
10838
10839test "x$prefix" = xNONE && prefix=$ac_default_prefix
10840# Let make expand exec_prefix.
10841test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
10842
10843DEFS=-DHAVE_CONFIG_H
10844
10845ac_libobjs=
10846ac_ltlibobjs=
JP Abgrall511eca32014-02-12 13:46:45 -080010847U=
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010848for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
10849 # 1. Remove the extension, and $U if already installed.
10850 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
JP Abgrall511eca32014-02-12 13:46:45 -080010851 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010852 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
10853 # will be set to the directory where LIBOBJS objects are built.
JP Abgrall511eca32014-02-12 13:46:45 -080010854 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
10855 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010856done
10857LIBOBJS=$ac_libobjs
10858
10859LTLIBOBJS=$ac_ltlibobjs
10860
10861
10862
JP Abgrall511eca32014-02-12 13:46:45 -080010863: "${CONFIG_STATUS=./config.status}"
10864ac_write_fail=0
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010865ac_clean_files_save=$ac_clean_files
10866ac_clean_files="$ac_clean_files $CONFIG_STATUS"
JP Abgrall511eca32014-02-12 13:46:45 -080010867{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
10868$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
10869as_write_fail=0
10870cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010871#! $SHELL
10872# Generated by $as_me.
10873# Run this file to recreate the current configuration.
10874# Compiler output produced by configure, useful for debugging
10875# configure, is in config.log if it exists.
10876
10877debug=false
10878ac_cs_recheck=false
10879ac_cs_silent=false
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010880
JP Abgrall511eca32014-02-12 13:46:45 -080010881SHELL=\${CONFIG_SHELL-$SHELL}
10882export SHELL
10883_ASEOF
10884cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
10885## -------------------- ##
10886## M4sh Initialization. ##
10887## -------------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010888
10889# Be more Bourne compatible
10890DUALCASE=1; export DUALCASE # for MKS sh
JP Abgrall511eca32014-02-12 13:46:45 -080010891if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010892 emulate sh
10893 NULLCMD=:
JP Abgrall511eca32014-02-12 13:46:45 -080010894 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010895 # is contrary to our usage. Disable this feature.
10896 alias -g '${1+"$@"}'='"$@"'
10897 setopt NO_GLOB_SUBST
10898else
JP Abgrall511eca32014-02-12 13:46:45 -080010899 case `(set -o) 2>/dev/null` in #(
10900 *posix*) :
10901 set -o posix ;; #(
10902 *) :
10903 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010904esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010905fi
10906
10907
JP Abgrall511eca32014-02-12 13:46:45 -080010908as_nl='
10909'
10910export as_nl
10911# Printing a long string crashes Solaris 7 /usr/bin/printf.
10912as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
10913as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
10914as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
10915# Prefer a ksh shell builtin over an external printf program on Solaris,
10916# but without wasting forks for bash or zsh.
10917if test -z "$BASH_VERSION$ZSH_VERSION" \
10918 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
10919 as_echo='print -r --'
10920 as_echo_n='print -rn --'
10921elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
10922 as_echo='printf %s\n'
10923 as_echo_n='printf %s'
10924else
10925 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
10926 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
10927 as_echo_n='/usr/ucb/echo -n'
10928 else
10929 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
10930 as_echo_n_body='eval
10931 arg=$1;
10932 case $arg in #(
10933 *"$as_nl"*)
10934 expr "X$arg" : "X\\(.*\\)$as_nl";
10935 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
10936 esac;
10937 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
10938 '
10939 export as_echo_n_body
10940 as_echo_n='sh -c $as_echo_n_body as_echo'
10941 fi
10942 export as_echo_body
10943 as_echo='sh -c $as_echo_body as_echo'
10944fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010945
10946# The user is always right.
10947if test "${PATH_SEPARATOR+set}" != set; then
JP Abgrall511eca32014-02-12 13:46:45 -080010948 PATH_SEPARATOR=:
10949 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
10950 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
10951 PATH_SEPARATOR=';'
10952 }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010953fi
10954
10955
10956# IFS
10957# We need space, tab and new line, in precisely that order. Quoting is
10958# there to prevent editors from complaining about space-tab.
10959# (If _AS_PATH_WALK were called with IFS unset, it would disable word
10960# splitting by setting IFS to empty value.)
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010961IFS=" "" $as_nl"
10962
10963# Find who we are. Look in the path if we contain no directory separator.
JP Abgrall511eca32014-02-12 13:46:45 -080010964as_myself=
10965case $0 in #((
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010966 *[\\/]* ) as_myself=$0 ;;
10967 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10968for as_dir in $PATH
10969do
10970 IFS=$as_save_IFS
10971 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -080010972 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10973 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010974IFS=$as_save_IFS
10975
10976 ;;
10977esac
10978# We did not find ourselves, most probably we were run as `sh COMMAND'
10979# in which case we are not to be found in the path.
10980if test "x$as_myself" = x; then
10981 as_myself=$0
10982fi
10983if test ! -f "$as_myself"; then
JP Abgrall511eca32014-02-12 13:46:45 -080010984 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
10985 exit 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010986fi
10987
JP Abgrall511eca32014-02-12 13:46:45 -080010988# Unset variables that we do not need and which cause bugs (e.g. in
10989# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
10990# suppresses any "Segmentation fault" message there. '((' could
10991# trigger a bug in pdksh 5.2.14.
10992for as_var in BASH_ENV ENV MAIL MAILPATH
10993do eval test x\${$as_var+set} = xset \
10994 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010995done
10996PS1='$ '
10997PS2='> '
10998PS4='+ '
10999
11000# NLS nuisances.
JP Abgrall511eca32014-02-12 13:46:45 -080011001LC_ALL=C
11002export LC_ALL
11003LANGUAGE=C
11004export LANGUAGE
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011005
JP Abgrall511eca32014-02-12 13:46:45 -080011006# CDPATH.
11007(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
11008
11009
11010# as_fn_error STATUS ERROR [LINENO LOG_FD]
11011# ----------------------------------------
11012# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
11013# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
11014# script with STATUS, using 1 if that was 0.
11015as_fn_error ()
11016{
11017 as_status=$1; test $as_status -eq 0 && as_status=1
11018 if test "$4"; then
11019 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
11020 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
11021 fi
11022 $as_echo "$as_me: error: $2" >&2
11023 as_fn_exit $as_status
11024} # as_fn_error
11025
11026
11027# as_fn_set_status STATUS
11028# -----------------------
11029# Set $? to STATUS, without forking.
11030as_fn_set_status ()
11031{
11032 return $1
11033} # as_fn_set_status
11034
11035# as_fn_exit STATUS
11036# -----------------
11037# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
11038as_fn_exit ()
11039{
11040 set +e
11041 as_fn_set_status $1
11042 exit $1
11043} # as_fn_exit
11044
11045# as_fn_unset VAR
11046# ---------------
11047# Portably unset VAR.
11048as_fn_unset ()
11049{
11050 { eval $1=; unset $1;}
11051}
11052as_unset=as_fn_unset
11053# as_fn_append VAR VALUE
11054# ----------------------
11055# Append the text in VALUE to the end of the definition contained in VAR. Take
11056# advantage of any shell optimizations that allow amortized linear growth over
11057# repeated appends, instead of the typical quadratic growth present in naive
11058# implementations.
11059if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
11060 eval 'as_fn_append ()
11061 {
11062 eval $1+=\$2
11063 }'
11064else
11065 as_fn_append ()
11066 {
11067 eval $1=\$$1\$2
11068 }
11069fi # as_fn_append
11070
11071# as_fn_arith ARG...
11072# ------------------
11073# Perform arithmetic evaluation on the ARGs, and store the result in the
11074# global $as_val. Take advantage of shells that can avoid forks. The arguments
11075# must be portable across $(()) and expr.
11076if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
11077 eval 'as_fn_arith ()
11078 {
11079 as_val=$(( $* ))
11080 }'
11081else
11082 as_fn_arith ()
11083 {
11084 as_val=`expr "$@" || test $? -eq 1`
11085 }
11086fi # as_fn_arith
11087
11088
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011089if expr a : '\(a\)' >/dev/null 2>&1 &&
11090 test "X`expr 00001 : '.*\(...\)'`" = X001; then
11091 as_expr=expr
11092else
11093 as_expr=false
11094fi
11095
11096if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
11097 as_basename=basename
11098else
11099 as_basename=false
11100fi
11101
JP Abgrall511eca32014-02-12 13:46:45 -080011102if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
11103 as_dirname=dirname
11104else
11105 as_dirname=false
11106fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011107
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011108as_me=`$as_basename -- "$0" ||
11109$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
11110 X"$0" : 'X\(//\)$' \| \
11111 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall511eca32014-02-12 13:46:45 -080011112$as_echo X/"$0" |
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011113 sed '/^.*\/\([^/][^/]*\)\/*$/{
11114 s//\1/
11115 q
11116 }
11117 /^X\/\(\/\/\)$/{
11118 s//\1/
11119 q
11120 }
11121 /^X\/\(\/\).*/{
11122 s//\1/
11123 q
11124 }
11125 s/.*/./; q'`
11126
JP Abgrall511eca32014-02-12 13:46:45 -080011127# Avoid depending upon Character Ranges.
11128as_cr_letters='abcdefghijklmnopqrstuvwxyz'
11129as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
11130as_cr_Letters=$as_cr_letters$as_cr_LETTERS
11131as_cr_digits='0123456789'
11132as_cr_alnum=$as_cr_Letters$as_cr_digits
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011133
11134ECHO_C= ECHO_N= ECHO_T=
JP Abgrall511eca32014-02-12 13:46:45 -080011135case `echo -n x` in #(((((
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011136-n*)
JP Abgrall511eca32014-02-12 13:46:45 -080011137 case `echo 'xy\c'` in
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011138 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
JP Abgrall511eca32014-02-12 13:46:45 -080011139 xy) ECHO_C='\c';;
11140 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
11141 ECHO_T=' ';;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011142 esac;;
11143*)
11144 ECHO_N='-n';;
11145esac
11146
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011147rm -f conf$$ conf$$.exe conf$$.file
11148if test -d conf$$.dir; then
11149 rm -f conf$$.dir/conf$$.file
11150else
11151 rm -f conf$$.dir
JP Abgrall511eca32014-02-12 13:46:45 -080011152 mkdir conf$$.dir 2>/dev/null
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011153fi
JP Abgrall511eca32014-02-12 13:46:45 -080011154if (echo >conf$$.file) 2>/dev/null; then
11155 if ln -s conf$$.file conf$$ 2>/dev/null; then
11156 as_ln_s='ln -s'
11157 # ... but there are two gotchas:
11158 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
11159 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
11160 # In both cases, we have to default to `cp -pR'.
11161 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
11162 as_ln_s='cp -pR'
11163 elif ln conf$$.file conf$$ 2>/dev/null; then
11164 as_ln_s=ln
11165 else
11166 as_ln_s='cp -pR'
11167 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011168else
JP Abgrall511eca32014-02-12 13:46:45 -080011169 as_ln_s='cp -pR'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011170fi
11171rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
11172rmdir conf$$.dir 2>/dev/null
11173
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011174
JP Abgrall511eca32014-02-12 13:46:45 -080011175# as_fn_mkdir_p
11176# -------------
11177# Create "$as_dir" as a directory, including parents if necessary.
11178as_fn_mkdir_p ()
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011179{
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011180
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011181 case $as_dir in #(
11182 -*) as_dir=./$as_dir;;
11183 esac
JP Abgrall511eca32014-02-12 13:46:45 -080011184 test -d "$as_dir" || eval $as_mkdir_p || {
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011185 as_dirs=
11186 while :; do
11187 case $as_dir in #(
JP Abgrall511eca32014-02-12 13:46:45 -080011188 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011189 *) as_qdir=$as_dir;;
11190 esac
11191 as_dirs="'$as_qdir' $as_dirs"
11192 as_dir=`$as_dirname -- "$as_dir" ||
11193$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11194 X"$as_dir" : 'X\(//\)[^/]' \| \
11195 X"$as_dir" : 'X\(//\)$' \| \
11196 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall511eca32014-02-12 13:46:45 -080011197$as_echo X"$as_dir" |
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011198 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11199 s//\1/
11200 q
11201 }
11202 /^X\(\/\/\)[^/].*/{
11203 s//\1/
11204 q
11205 }
11206 /^X\(\/\/\)$/{
11207 s//\1/
11208 q
11209 }
11210 /^X\(\/\).*/{
11211 s//\1/
11212 q
11213 }
11214 s/.*/./; q'`
11215 test -d "$as_dir" && break
11216 done
11217 test -z "$as_dirs" || eval "mkdir $as_dirs"
JP Abgrall511eca32014-02-12 13:46:45 -080011218 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
11219
11220
11221} # as_fn_mkdir_p
11222if mkdir -p . 2>/dev/null; then
11223 as_mkdir_p='mkdir -p "$as_dir"'
11224else
11225 test -d ./-p && rmdir ./-p
11226 as_mkdir_p=false
11227fi
11228
11229
11230# as_fn_executable_p FILE
11231# -----------------------
11232# Test if FILE is an executable regular file.
11233as_fn_executable_p ()
11234{
11235 test -f "$1" && test -x "$1"
11236} # as_fn_executable_p
11237as_test_x='test -x'
11238as_executable_p=as_fn_executable_p
11239
11240# Sed expression to map a string onto a valid CPP name.
11241as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
11242
11243# Sed expression to map a string onto a valid variable name.
11244as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
11245
11246
11247exec 6>&1
11248## ----------------------------------- ##
11249## Main body of $CONFIG_STATUS script. ##
11250## ----------------------------------- ##
11251_ASEOF
11252test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
11253
11254cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11255# Save the log message, to keep $0 and so on meaningful, and to
11256# report actual input values of CONFIG_FILES etc. instead of their
11257# values after options handling.
11258ac_log="
Haibo Huang165065a2018-07-23 17:26:52 -070011259This file was extended by pcap $as_me 1.9.0-PRE-GIT, which was
JP Abgrall511eca32014-02-12 13:46:45 -080011260generated by GNU Autoconf 2.69. Invocation command line was
11261
11262 CONFIG_FILES = $CONFIG_FILES
11263 CONFIG_HEADERS = $CONFIG_HEADERS
11264 CONFIG_LINKS = $CONFIG_LINKS
11265 CONFIG_COMMANDS = $CONFIG_COMMANDS
11266 $ $0 $@
11267
11268on `(hostname || uname -n) 2>/dev/null | sed 1q`
11269"
11270
11271_ACEOF
11272
11273case $ac_config_files in *"
11274"*) set x $ac_config_files; shift; ac_config_files=$*;;
11275esac
11276
11277case $ac_config_headers in *"
11278"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
11279esac
11280
11281
11282cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11283# Files that config.status was made for.
11284config_files="$ac_config_files"
11285config_headers="$ac_config_headers"
11286config_commands="$ac_config_commands"
11287
11288_ACEOF
11289
11290cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11291ac_cs_usage="\
11292\`$as_me' instantiates files and other configuration actions
11293from templates according to the current configuration. Unless the files
11294and actions are specified as TAGs, all are instantiated by default.
11295
11296Usage: $0 [OPTION]... [TAG]...
11297
11298 -h, --help print this help, then exit
11299 -V, --version print version number and configuration settings, then exit
11300 --config print configuration, then exit
11301 -q, --quiet, --silent
11302 do not print progress messages
11303 -d, --debug don't remove temporary files
11304 --recheck update $as_me by reconfiguring in the same conditions
11305 --file=FILE[:TEMPLATE]
11306 instantiate the configuration file FILE
11307 --header=FILE[:TEMPLATE]
11308 instantiate the configuration header FILE
11309
11310Configuration files:
11311$config_files
11312
11313Configuration headers:
11314$config_headers
11315
11316Configuration commands:
11317$config_commands
11318
11319Report bugs to the package provider."
11320
11321_ACEOF
11322cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11323ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
11324ac_cs_version="\\
Haibo Huang165065a2018-07-23 17:26:52 -070011325pcap config.status 1.9.0-PRE-GIT
JP Abgrall511eca32014-02-12 13:46:45 -080011326configured by $0, generated by GNU Autoconf 2.69,
11327 with options \\"\$ac_cs_config\\"
11328
11329Copyright (C) 2012 Free Software Foundation, Inc.
11330This config.status script is free software; the Free Software Foundation
11331gives unlimited permission to copy, distribute and modify it."
11332
11333ac_pwd='$ac_pwd'
11334srcdir='$srcdir'
11335INSTALL='$INSTALL'
11336test -n "\$AWK" || AWK=awk
11337_ACEOF
11338
11339cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11340# The default lists apply if the user does not specify any file.
11341ac_need_defaults=:
11342while test $# != 0
11343do
11344 case $1 in
11345 --*=?*)
11346 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11347 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
11348 ac_shift=:
11349 ;;
11350 --*=)
11351 ac_option=`expr "X$1" : 'X\([^=]*\)='`
11352 ac_optarg=
11353 ac_shift=:
11354 ;;
11355 *)
11356 ac_option=$1
11357 ac_optarg=$2
11358 ac_shift=shift
11359 ;;
11360 esac
11361
11362 case $ac_option in
11363 # Handling of the options.
11364 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
11365 ac_cs_recheck=: ;;
11366 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
11367 $as_echo "$ac_cs_version"; exit ;;
11368 --config | --confi | --conf | --con | --co | --c )
11369 $as_echo "$ac_cs_config"; exit ;;
11370 --debug | --debu | --deb | --de | --d | -d )
11371 debug=: ;;
11372 --file | --fil | --fi | --f )
11373 $ac_shift
11374 case $ac_optarg in
11375 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11376 '') as_fn_error $? "missing file argument" ;;
11377 esac
11378 as_fn_append CONFIG_FILES " '$ac_optarg'"
11379 ac_need_defaults=false;;
11380 --header | --heade | --head | --hea )
11381 $ac_shift
11382 case $ac_optarg in
11383 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
11384 esac
11385 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
11386 ac_need_defaults=false;;
11387 --he | --h)
11388 # Conflict between --help and --header
11389 as_fn_error $? "ambiguous option: \`$1'
11390Try \`$0 --help' for more information.";;
11391 --help | --hel | -h )
11392 $as_echo "$ac_cs_usage"; exit ;;
11393 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
11394 | -silent | --silent | --silen | --sile | --sil | --si | --s)
11395 ac_cs_silent=: ;;
11396
11397 # This is an error.
11398 -*) as_fn_error $? "unrecognized option: \`$1'
11399Try \`$0 --help' for more information." ;;
11400
11401 *) as_fn_append ac_config_targets " $1"
11402 ac_need_defaults=false ;;
11403
11404 esac
11405 shift
11406done
11407
11408ac_configure_extra_args=
11409
11410if $ac_cs_silent; then
11411 exec 6>/dev/null
11412 ac_configure_extra_args="$ac_configure_extra_args --silent"
11413fi
11414
11415_ACEOF
11416cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11417if \$ac_cs_recheck; then
11418 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
11419 shift
11420 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
11421 CONFIG_SHELL='$SHELL'
11422 export CONFIG_SHELL
11423 exec "\$@"
11424fi
11425
11426_ACEOF
11427cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11428exec 5>>config.log
11429{
11430 echo
11431 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
11432## Running $as_me. ##
11433_ASBOX
11434 $as_echo "$ac_log"
11435} >&5
11436
11437_ACEOF
11438cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11439#
11440# INIT-COMMANDS
11441#
11442
11443
11444_ACEOF
11445
11446cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11447
11448# Handling of arguments.
11449for ac_config_target in $ac_config_targets
11450do
11451 case $ac_config_target in
11452 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
11453 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
11454 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
11455 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
11456 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
11457 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
11458 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
11459 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
11460 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
11461 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
11462 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
11463 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
11464 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
11465 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
11466 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
11467 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
11468 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
11469 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
Haibo Huang165065a2018-07-23 17:26:52 -070011470 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;;
11471 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;;
11472 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;;
JP Abgrall511eca32014-02-12 13:46:45 -080011473
11474 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
11475 esac
11476done
11477
11478
11479# If the user did not use the arguments to specify the items to instantiate,
11480# then the envvar interface is used. Set only those that are not.
11481# We use the long form for the default assignment because of an extremely
11482# bizarre bug on SunOS 4.1.3.
11483if $ac_need_defaults; then
11484 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
11485 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
11486 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
11487fi
11488
11489# Have a temporary directory for convenience. Make it in the build tree
11490# simply because there is no reason against having it here, and in addition,
11491# creating and moving files from /tmp can sometimes cause problems.
11492# Hook for its removal unless debugging.
11493# Note that there is a small window in which the directory will not be cleaned:
11494# after its creation but before its name has been assigned to `$tmp'.
11495$debug ||
11496{
11497 tmp= ac_tmp=
11498 trap 'exit_status=$?
11499 : "${ac_tmp:=$tmp}"
11500 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
11501' 0
11502 trap 'as_fn_exit 1' 1 2 13 15
11503}
11504# Create a (secure) tmp directory for tmp files.
11505
11506{
11507 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
11508 test -d "$tmp"
11509} ||
11510{
11511 tmp=./conf$$-$RANDOM
11512 (umask 077 && mkdir "$tmp")
11513} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
11514ac_tmp=$tmp
11515
11516# Set up the scripts for CONFIG_FILES section.
11517# No need to generate them if there are no CONFIG_FILES.
11518# This happens for instance with `./config.status config.h'.
11519if test -n "$CONFIG_FILES"; then
11520
11521
11522ac_cr=`echo X | tr X '\015'`
11523# On cygwin, bash can eat \r inside `` if the user requested igncr.
11524# But we know of no other shell where ac_cr would be empty at this
11525# point, so we can use a bashism as a fallback.
11526if test "x$ac_cr" = x; then
11527 eval ac_cr=\$\'\\r\'
11528fi
11529ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
11530if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
11531 ac_cs_awk_cr='\\r'
11532else
11533 ac_cs_awk_cr=$ac_cr
11534fi
11535
11536echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
11537_ACEOF
11538
11539
11540{
11541 echo "cat >conf$$subs.awk <<_ACEOF" &&
11542 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
11543 echo "_ACEOF"
11544} >conf$$subs.sh ||
11545 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11546ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
11547ac_delim='%!_!# '
11548for ac_last_try in false false false false false :; do
11549 . ./conf$$subs.sh ||
11550 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11551
11552 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
11553 if test $ac_delim_n = $ac_delim_num; then
11554 break
11555 elif $ac_last_try; then
11556 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
11557 else
11558 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11559 fi
11560done
11561rm -f conf$$subs.sh
11562
11563cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11564cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
11565_ACEOF
11566sed -n '
11567h
11568s/^/S["/; s/!.*/"]=/
11569p
11570g
11571s/^[^!]*!//
11572:repl
11573t repl
11574s/'"$ac_delim"'$//
11575t delim
11576:nl
11577h
11578s/\(.\{148\}\)..*/\1/
11579t more1
11580s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
11581p
11582n
11583b repl
11584:more1
11585s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11586p
11587g
11588s/.\{148\}//
11589t nl
11590:delim
11591h
11592s/\(.\{148\}\)..*/\1/
11593t more2
11594s/["\\]/\\&/g; s/^/"/; s/$/"/
11595p
11596b
11597:more2
11598s/["\\]/\\&/g; s/^/"/; s/$/"\\/
11599p
11600g
11601s/.\{148\}//
11602t delim
11603' <conf$$subs.awk | sed '
11604/^[^""]/{
11605 N
11606 s/\n//
11607}
11608' >>$CONFIG_STATUS || ac_write_fail=1
11609rm -f conf$$subs.awk
11610cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11611_ACAWK
11612cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
11613 for (key in S) S_is_set[key] = 1
11614 FS = ""
11615
11616}
11617{
11618 line = $ 0
11619 nfields = split(line, field, "@")
11620 substed = 0
11621 len = length(field[1])
11622 for (i = 2; i < nfields; i++) {
11623 key = field[i]
11624 keylen = length(key)
11625 if (S_is_set[key]) {
11626 value = S[key]
11627 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
11628 len += length(value) + length(field[++i])
11629 substed = 1
11630 } else
11631 len += 1 + keylen
11632 }
11633
11634 print line
11635}
11636
11637_ACAWK
11638_ACEOF
11639cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11640if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
11641 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
11642else
11643 cat
11644fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
11645 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
11646_ACEOF
11647
11648# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
11649# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
11650# trailing colons and then remove the whole line if VPATH becomes empty
11651# (actually we leave an empty line to preserve line numbers).
11652if test "x$srcdir" = x.; then
11653 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
11654h
11655s///
11656s/^/:/
11657s/[ ]*$/:/
11658s/:\$(srcdir):/:/g
11659s/:\${srcdir}:/:/g
11660s/:@srcdir@:/:/g
11661s/^:*//
11662s/:*$//
11663x
11664s/\(=[ ]*\).*/\1/
11665G
11666s/\n//
11667s/^[^=]*=[ ]*$//
11668}'
11669fi
11670
11671cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11672fi # test -n "$CONFIG_FILES"
11673
11674# Set up the scripts for CONFIG_HEADERS section.
11675# No need to generate them if there are no CONFIG_HEADERS.
11676# This happens for instance with `./config.status Makefile'.
11677if test -n "$CONFIG_HEADERS"; then
11678cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
11679BEGIN {
11680_ACEOF
11681
11682# Transform confdefs.h into an awk script `defines.awk', embedded as
11683# here-document in config.status, that substitutes the proper values into
11684# config.h.in to produce config.h.
11685
11686# Create a delimiter string that does not exist in confdefs.h, to ease
11687# handling of long lines.
11688ac_delim='%!_!# '
11689for ac_last_try in false false :; do
11690 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
11691 if test -z "$ac_tt"; then
11692 break
11693 elif $ac_last_try; then
11694 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
11695 else
11696 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
11697 fi
11698done
11699
11700# For the awk script, D is an array of macro values keyed by name,
11701# likewise P contains macro parameters if any. Preserve backslash
11702# newline sequences.
11703
11704ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
11705sed -n '
11706s/.\{148\}/&'"$ac_delim"'/g
11707t rset
11708:rset
11709s/^[ ]*#[ ]*define[ ][ ]*/ /
11710t def
11711d
11712:def
11713s/\\$//
11714t bsnl
11715s/["\\]/\\&/g
11716s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11717D["\1"]=" \3"/p
11718s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
11719d
11720:bsnl
11721s/["\\]/\\&/g
11722s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
11723D["\1"]=" \3\\\\\\n"\\/p
11724t cont
11725s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
11726t cont
11727d
11728:cont
11729n
11730s/.\{148\}/&'"$ac_delim"'/g
11731t clear
11732:clear
11733s/\\$//
11734t bsnlc
11735s/["\\]/\\&/g; s/^/"/; s/$/"/p
11736d
11737:bsnlc
11738s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
11739b cont
11740' <confdefs.h | sed '
11741s/'"$ac_delim"'/"\\\
11742"/g' >>$CONFIG_STATUS || ac_write_fail=1
11743
11744cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11745 for (key in D) D_is_set[key] = 1
11746 FS = ""
11747}
11748/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
11749 line = \$ 0
11750 split(line, arg, " ")
11751 if (arg[1] == "#") {
11752 defundef = arg[2]
11753 mac1 = arg[3]
11754 } else {
11755 defundef = substr(arg[1], 2)
11756 mac1 = arg[2]
11757 }
11758 split(mac1, mac2, "(") #)
11759 macro = mac2[1]
11760 prefix = substr(line, 1, index(line, defundef) - 1)
11761 if (D_is_set[macro]) {
11762 # Preserve the white space surrounding the "#".
11763 print prefix "define", macro P[macro] D[macro]
11764 next
11765 } else {
11766 # Replace #undef with comments. This is necessary, for example,
11767 # in the case of _POSIX_SOURCE, which is predefined and required
11768 # on some systems where configure will not decide to define it.
11769 if (defundef == "undef") {
11770 print "/*", prefix defundef, macro, "*/"
11771 next
11772 }
11773 }
11774}
11775{ print }
11776_ACAWK
11777_ACEOF
11778cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
11779 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
11780fi # test -n "$CONFIG_HEADERS"
11781
11782
11783eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
11784shift
11785for ac_tag
11786do
11787 case $ac_tag in
11788 :[FHLC]) ac_mode=$ac_tag; continue;;
11789 esac
11790 case $ac_mode$ac_tag in
11791 :[FHL]*:*);;
11792 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
11793 :[FH]-) ac_tag=-:-;;
11794 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
11795 esac
11796 ac_save_IFS=$IFS
11797 IFS=:
11798 set x $ac_tag
11799 IFS=$ac_save_IFS
11800 shift
11801 ac_file=$1
11802 shift
11803
11804 case $ac_mode in
11805 :L) ac_source=$1;;
11806 :[FH])
11807 ac_file_inputs=
11808 for ac_f
11809 do
11810 case $ac_f in
11811 -) ac_f="$ac_tmp/stdin";;
11812 *) # Look for the file first in the build tree, then in the source tree
11813 # (if the path is not absolute). The absolute path cannot be DOS-style,
11814 # because $ac_f cannot contain `:'.
11815 test -f "$ac_f" ||
11816 case $ac_f in
11817 [\\/$]*) false;;
11818 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
11819 esac ||
11820 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
11821 esac
11822 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
11823 as_fn_append ac_file_inputs " '$ac_f'"
11824 done
11825
11826 # Let's still pretend it is `configure' which instantiates (i.e., don't
11827 # use $as_me), people would be surprised to read:
11828 # /* config.h. Generated by config.status. */
11829 configure_input='Generated from '`
11830 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
11831 `' by configure.'
11832 if test x"$ac_file" != x-; then
11833 configure_input="$ac_file. $configure_input"
11834 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
11835$as_echo "$as_me: creating $ac_file" >&6;}
11836 fi
11837 # Neutralize special characters interpreted by sed in replacement strings.
11838 case $configure_input in #(
11839 *\&* | *\|* | *\\* )
11840 ac_sed_conf_input=`$as_echo "$configure_input" |
11841 sed 's/[\\\\&|]/\\\\&/g'`;; #(
11842 *) ac_sed_conf_input=$configure_input;;
11843 esac
11844
11845 case $ac_tag in
11846 *:-:* | *:-) cat >"$ac_tmp/stdin" \
11847 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
11848 esac
11849 ;;
11850 esac
11851
11852 ac_dir=`$as_dirname -- "$ac_file" ||
11853$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
11854 X"$ac_file" : 'X\(//\)[^/]' \| \
11855 X"$ac_file" : 'X\(//\)$' \| \
11856 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
11857$as_echo X"$ac_file" |
11858 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
11859 s//\1/
11860 q
11861 }
11862 /^X\(\/\/\)[^/].*/{
11863 s//\1/
11864 q
11865 }
11866 /^X\(\/\/\)$/{
11867 s//\1/
11868 q
11869 }
11870 /^X\(\/\).*/{
11871 s//\1/
11872 q
11873 }
11874 s/.*/./; q'`
11875 as_dir="$ac_dir"; as_fn_mkdir_p
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011876 ac_builddir=.
11877
11878case "$ac_dir" in
11879.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
11880*)
JP Abgrall511eca32014-02-12 13:46:45 -080011881 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011882 # A ".." for each directory in $ac_dir_suffix.
JP Abgrall511eca32014-02-12 13:46:45 -080011883 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011884 case $ac_top_builddir_sub in
11885 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
11886 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
11887 esac ;;
11888esac
11889ac_abs_top_builddir=$ac_pwd
11890ac_abs_builddir=$ac_pwd$ac_dir_suffix
11891# for backward compatibility:
11892ac_top_builddir=$ac_top_build_prefix
11893
11894case $srcdir in
11895 .) # We are building in place.
11896 ac_srcdir=.
11897 ac_top_srcdir=$ac_top_builddir_sub
11898 ac_abs_top_srcdir=$ac_pwd ;;
11899 [\\/]* | ?:[\\/]* ) # Absolute name.
11900 ac_srcdir=$srcdir$ac_dir_suffix;
11901 ac_top_srcdir=$srcdir
11902 ac_abs_top_srcdir=$srcdir ;;
11903 *) # Relative name.
11904 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
11905 ac_top_srcdir=$ac_top_build_prefix$srcdir
11906 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
11907esac
11908ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
11909
11910
11911 case $ac_mode in
11912 :F)
11913 #
11914 # CONFIG_FILE
11915 #
11916
11917 case $INSTALL in
11918 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
11919 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
11920 esac
11921_ACEOF
11922
JP Abgrall511eca32014-02-12 13:46:45 -080011923cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011924# If the template does not know about datarootdir, expand it.
11925# FIXME: This hack should be removed a few years after 2.60.
11926ac_datarootdir_hack=; ac_datarootdir_seen=
JP Abgrall511eca32014-02-12 13:46:45 -080011927ac_sed_dataroot='
11928/datarootdir/ {
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011929 p
11930 q
11931}
11932/@datadir@/p
11933/@docdir@/p
11934/@infodir@/p
11935/@localedir@/p
JP Abgrall511eca32014-02-12 13:46:45 -080011936/@mandir@/p'
11937case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011938*datarootdir*) ac_datarootdir_seen=yes;;
11939*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
JP Abgrall511eca32014-02-12 13:46:45 -080011940 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
11941$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011942_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -080011943cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011944 ac_datarootdir_hack='
11945 s&@datadir@&$datadir&g
11946 s&@docdir@&$docdir&g
11947 s&@infodir@&$infodir&g
11948 s&@localedir@&$localedir&g
11949 s&@mandir@&$mandir&g
JP Abgrall511eca32014-02-12 13:46:45 -080011950 s&\\\${datarootdir}&$datarootdir&g' ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011951esac
11952_ACEOF
11953
11954# Neutralize VPATH when `$srcdir' = `.'.
11955# Shell code in configure.ac might set extrasub.
11956# FIXME: do we really want to maintain this feature?
JP Abgrall511eca32014-02-12 13:46:45 -080011957cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
11958ac_sed_extra="$ac_vpsub
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011959$extrasub
11960_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -080011961cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011962:t
11963/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
JP Abgrall511eca32014-02-12 13:46:45 -080011964s|@configure_input@|$ac_sed_conf_input|;t t
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011965s&@top_builddir@&$ac_top_builddir_sub&;t t
JP Abgrall511eca32014-02-12 13:46:45 -080011966s&@top_build_prefix@&$ac_top_build_prefix&;t t
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011967s&@srcdir@&$ac_srcdir&;t t
11968s&@abs_srcdir@&$ac_abs_srcdir&;t t
11969s&@top_srcdir@&$ac_top_srcdir&;t t
11970s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
11971s&@builddir@&$ac_builddir&;t t
11972s&@abs_builddir@&$ac_abs_builddir&;t t
11973s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
11974s&@INSTALL@&$ac_INSTALL&;t t
11975$ac_datarootdir_hack
JP Abgrall511eca32014-02-12 13:46:45 -080011976"
11977eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
11978 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011979
11980test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
JP Abgrall511eca32014-02-12 13:46:45 -080011981 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
11982 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
11983 "$ac_tmp/out"`; test -z "$ac_out"; } &&
11984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11985which seems to be undefined. Please make sure it is defined" >&5
11986$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
11987which seems to be undefined. Please make sure it is defined" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011988
JP Abgrall511eca32014-02-12 13:46:45 -080011989 rm -f "$ac_tmp/stdin"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011990 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -080011991 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
11992 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
11993 esac \
11994 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080011995 ;;
11996 :H)
11997 #
11998 # CONFIG_HEADER
11999 #
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012000 if test x"$ac_file" != x-; then
JP Abgrall511eca32014-02-12 13:46:45 -080012001 {
12002 $as_echo "/* $configure_input */" \
12003 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
12004 } >"$ac_tmp/config.h" \
12005 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
12006 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
12007 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
12008$as_echo "$as_me: $ac_file is unchanged" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012009 else
JP Abgrall511eca32014-02-12 13:46:45 -080012010 rm -f "$ac_file"
12011 mv "$ac_tmp/config.h" "$ac_file" \
12012 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012013 fi
12014 else
JP Abgrall511eca32014-02-12 13:46:45 -080012015 $as_echo "/* $configure_input */" \
12016 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
12017 || as_fn_error $? "could not create -" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012018 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012019 ;;
12020
JP Abgrall511eca32014-02-12 13:46:45 -080012021 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
12022$as_echo "$as_me: executing $ac_file commands" >&6;}
12023 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012024 esac
12025
JP Abgrall511eca32014-02-12 13:46:45 -080012026
12027 case $ac_file$ac_mode in
12028 "default-1":C) if test -f .devel; then
12029 echo timestamp > stamp-h
Haibo Huang165065a2018-07-23 17:26:52 -070012030 cat $srcdir/Makefile-devel-adds >> Makefile
JP Abgrall511eca32014-02-12 13:46:45 -080012031 make depend
12032fi ;;
12033
12034 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012035done # for ac_tag
12036
12037
JP Abgrall511eca32014-02-12 13:46:45 -080012038as_fn_exit 0
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012039_ACEOF
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012040ac_clean_files=$ac_clean_files_save
12041
JP Abgrall511eca32014-02-12 13:46:45 -080012042test $ac_write_fail = 0 ||
12043 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
12044
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012045
12046# configure is writing to config.log, and then calls config.status.
12047# config.status does its own redirection, appending to config.log.
12048# Unfortunately, on DOS this fails, as config.log is still kept open
12049# by configure, so config.status won't be able to write to it; its
12050# output is simply discarded. So we exec the FD to /dev/null,
12051# effectively closing config.log, so it can be properly (re)opened and
12052# appended to by config.status. When coming back to configure, we
12053# need to make the FD available again.
12054if test "$no_create" != yes; then
12055 ac_cs_success=:
12056 ac_config_status_args=
12057 test "$silent" = yes &&
12058 ac_config_status_args="$ac_config_status_args --quiet"
12059 exec 5>/dev/null
12060 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
12061 exec 5>>config.log
12062 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
12063 # would make configure fail if this is the last instruction.
JP Abgrall511eca32014-02-12 13:46:45 -080012064 $ac_cs_success || as_fn_exit 1
12065fi
12066if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
12067 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
12068$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012069fi
12070
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080012071exit 0