blob: 4c64875e3e69ff44bb483d5a77be2fd9fa1c423f [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.
JP Abgrall511eca32014-02-12 13:46:45 -08003# Generated by GNU Autoconf 2.69.
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.
578PACKAGE_NAME=
579PACKAGE_TARNAME=
580PACKAGE_VERSION=
581PACKAGE_STRING=
582PACKAGE_BUGREPORT=
JP Abgrall511eca32014-02-12 13:46:45 -0800583PACKAGE_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
Elliott Hughesd8845d72015-10-19 18:07:04 -0700626PCAP_SUPPORT_PACKET_RING
JP Abgrall511eca32014-02-12 13:46:45 -0800627DBUS_SRC
628PCAP_SUPPORT_DBUS
629PKGCONFIG
Elliott Hughesd8845d72015-10-19 18:07:04 -0700630BT_MONITOR_SRC
JP Abgrall511eca32014-02-12 13:46:45 -0800631BT_SRC
632PCAP_SUPPORT_BT
633NETFILTER_SRC
634PCAP_SUPPORT_NETFILTER
635USB_SRC
636PCAP_SUPPORT_USB
637MAN_MISC_INFO
638MAN_FILE_FORMATS
639DYEXT
640SSRC
641ADDLARCHIVEOBJS
642ADDLOBJS
Elliott Hughes965a4b52017-05-15 10:37:39 -0700643V_YACC
JP Abgrall511eca32014-02-12 13:46:45 -0800644V_RPATH_OPT
645V_SONAME_OPT
646V_SHLIB_OPT
647V_SHLIB_CMD
648V_PCAP
Elliott Hughes965a4b52017-05-15 10:37:39 -0700649V_LEX
JP Abgrall511eca32014-02-12 13:46:45 -0800650V_INCLS
651V_FINDALLDEVS
652V_DEFS
653V_CCOPT
654MKDEP
655DEPENDENCY_CFLAG
656LN_S
657AR
658RANLIB
Elliott Hughes965a4b52017-05-15 10:37:39 -0700659YFLAGS
660YACC
661LEXLIB
662LEX_OUTPUT_ROOT
663LEX
JP Abgrall511eca32014-02-12 13:46:45 -0800664HAVE_LINUX_TPACKET_AUXDATA
Elliott Hughes965a4b52017-05-15 10:37:39 -0700665VALGRINDTEST
JP Abgrall511eca32014-02-12 13:46:45 -0800666LIBOBJS
667EGREP
668GREP
669CPP
670OBJEXT
671EXEEXT
672ac_ct_CC
673CPPFLAGS
674LDFLAGS
675CFLAGS
676CC
677SHLICC2
678target_os
679target_vendor
680target_cpu
681target
682host_os
683host_vendor
684host_cpu
685host
686build_os
687build_vendor
688build_cpu
689build
690target_alias
691host_alias
692build_alias
693LIBS
694ECHO_T
695ECHO_N
696ECHO_C
697DEFS
698mandir
699localedir
700libdir
701psdir
702pdfdir
703dvidir
704htmldir
705infodir
706docdir
707oldincludedir
708includedir
709localstatedir
710sharedstatedir
711sysconfdir
712datadir
713datarootdir
714libexecdir
715sbindir
716bindir
717program_transform_name
718prefix
719exec_prefix
720PACKAGE_URL
721PACKAGE_BUGREPORT
722PACKAGE_STRING
723PACKAGE_VERSION
724PACKAGE_TARNAME
725PACKAGE_NAME
726PATH_SEPARATOR
727SHELL'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800728ac_subst_files=''
JP Abgrall511eca32014-02-12 13:46:45 -0800729ac_user_opts='
730enable_option_checking
731with_gcc
732enable_largefile
733enable_protochain
734with_sita
735with_pcap
736with_libnl
737enable_ipv6
738enable_optimizer_dbg
739enable_yydebug
740with_dag
741with_dag_includes
742with_dag_libraries
743with_septel
744with_snf
745with_snf_includes
746with_snf_libraries
Elliott Hughes965a4b52017-05-15 10:37:39 -0700747with_turbocap
JP Abgrall511eca32014-02-12 13:46:45 -0800748enable_universal
749enable_shared
Elliott Hughesd8845d72015-10-19 18:07:04 -0700750enable_usb
JP Abgrall511eca32014-02-12 13:46:45 -0800751enable_bluetooth
JP Abgrall511eca32014-02-12 13:46:45 -0800752enable_dbus
Elliott Hughesd8845d72015-10-19 18:07:04 -0700753enable_packet_ring
JP Abgrall511eca32014-02-12 13:46:45 -0800754'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800755 ac_precious_vars='build_alias
756host_alias
757target_alias
758CC
759CFLAGS
760LDFLAGS
761LIBS
762CPPFLAGS
Elliott Hughes965a4b52017-05-15 10:37:39 -0700763CPP
764YACC
765YFLAGS'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800766
767
768# Initialize some variables set by options.
769ac_init_help=
770ac_init_version=false
JP Abgrall511eca32014-02-12 13:46:45 -0800771ac_unrecognized_opts=
772ac_unrecognized_sep=
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800773# The variables have the same names as the options, with
774# dashes changed to underlines.
775cache_file=/dev/null
776exec_prefix=NONE
777no_create=
778no_recursion=
779prefix=NONE
780program_prefix=NONE
781program_suffix=NONE
782program_transform_name=s,x,x,
783silent=
784site=
785srcdir=
786verbose=
787x_includes=NONE
788x_libraries=NONE
789
790# Installation directory options.
791# These are left unexpanded so users can "make install exec_prefix=/foo"
792# and all the variables that are supposed to be based on exec_prefix
793# by default will actually change.
794# Use braces instead of parens because sh, perl, etc. also accept them.
795# (The list follows the same order as the GNU Coding Standards.)
796bindir='${exec_prefix}/bin'
797sbindir='${exec_prefix}/sbin'
798libexecdir='${exec_prefix}/libexec'
799datarootdir='${prefix}/share'
800datadir='${datarootdir}'
801sysconfdir='${prefix}/etc'
802sharedstatedir='${prefix}/com'
803localstatedir='${prefix}/var'
804includedir='${prefix}/include'
805oldincludedir='/usr/include'
806docdir='${datarootdir}/doc/${PACKAGE}'
807infodir='${datarootdir}/info'
808htmldir='${docdir}'
809dvidir='${docdir}'
810pdfdir='${docdir}'
811psdir='${docdir}'
812libdir='${exec_prefix}/lib'
813localedir='${datarootdir}/locale'
814mandir='${datarootdir}/man'
815
816ac_prev=
817ac_dashdash=
818for ac_option
819do
820 # If the previous option needs an argument, assign it.
821 if test -n "$ac_prev"; then
822 eval $ac_prev=\$ac_option
823 ac_prev=
824 continue
825 fi
826
827 case $ac_option in
JP Abgrall511eca32014-02-12 13:46:45 -0800828 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
829 *=) ac_optarg= ;;
830 *) ac_optarg=yes ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800831 esac
832
833 # Accept the important Cygnus configure options, so we can diagnose typos.
834
835 case $ac_dashdash$ac_option in
836 --)
837 ac_dashdash=yes ;;
838
839 -bindir | --bindir | --bindi | --bind | --bin | --bi)
840 ac_prev=bindir ;;
841 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
842 bindir=$ac_optarg ;;
843
844 -build | --build | --buil | --bui | --bu)
845 ac_prev=build_alias ;;
846 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
847 build_alias=$ac_optarg ;;
848
849 -cache-file | --cache-file | --cache-fil | --cache-fi \
850 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
851 ac_prev=cache_file ;;
852 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
853 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
854 cache_file=$ac_optarg ;;
855
856 --config-cache | -C)
857 cache_file=config.cache ;;
858
859 -datadir | --datadir | --datadi | --datad)
860 ac_prev=datadir ;;
861 -datadir=* | --datadir=* | --datadi=* | --datad=*)
862 datadir=$ac_optarg ;;
863
864 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
865 | --dataroo | --dataro | --datar)
866 ac_prev=datarootdir ;;
867 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
868 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
869 datarootdir=$ac_optarg ;;
870
871 -disable-* | --disable-*)
JP Abgrall511eca32014-02-12 13:46:45 -0800872 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800873 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -0800874 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
875 as_fn_error $? "invalid feature name: $ac_useropt"
876 ac_useropt_orig=$ac_useropt
877 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
878 case $ac_user_opts in
879 *"
880"enable_$ac_useropt"
881"*) ;;
882 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
883 ac_unrecognized_sep=', ';;
884 esac
885 eval enable_$ac_useropt=no ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800886
887 -docdir | --docdir | --docdi | --doc | --do)
888 ac_prev=docdir ;;
889 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
890 docdir=$ac_optarg ;;
891
892 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
893 ac_prev=dvidir ;;
894 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
895 dvidir=$ac_optarg ;;
896
897 -enable-* | --enable-*)
JP Abgrall511eca32014-02-12 13:46:45 -0800898 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800899 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -0800900 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
901 as_fn_error $? "invalid feature name: $ac_useropt"
902 ac_useropt_orig=$ac_useropt
903 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
904 case $ac_user_opts in
905 *"
906"enable_$ac_useropt"
907"*) ;;
908 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
909 ac_unrecognized_sep=', ';;
910 esac
911 eval enable_$ac_useropt=\$ac_optarg ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -0800912
913 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
914 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
915 | --exec | --exe | --ex)
916 ac_prev=exec_prefix ;;
917 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
918 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
919 | --exec=* | --exe=* | --ex=*)
920 exec_prefix=$ac_optarg ;;
921
922 -gas | --gas | --ga | --g)
923 # Obsolete; use --with-gas.
924 with_gas=yes ;;
925
926 -help | --help | --hel | --he | -h)
927 ac_init_help=long ;;
928 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
929 ac_init_help=recursive ;;
930 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
931 ac_init_help=short ;;
932
933 -host | --host | --hos | --ho)
934 ac_prev=host_alias ;;
935 -host=* | --host=* | --hos=* | --ho=*)
936 host_alias=$ac_optarg ;;
937
938 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
939 ac_prev=htmldir ;;
940 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
941 | --ht=*)
942 htmldir=$ac_optarg ;;
943
944 -includedir | --includedir | --includedi | --included | --include \
945 | --includ | --inclu | --incl | --inc)
946 ac_prev=includedir ;;
947 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
948 | --includ=* | --inclu=* | --incl=* | --inc=*)
949 includedir=$ac_optarg ;;
950
951 -infodir | --infodir | --infodi | --infod | --info | --inf)
952 ac_prev=infodir ;;
953 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
954 infodir=$ac_optarg ;;
955
956 -libdir | --libdir | --libdi | --libd)
957 ac_prev=libdir ;;
958 -libdir=* | --libdir=* | --libdi=* | --libd=*)
959 libdir=$ac_optarg ;;
960
961 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
962 | --libexe | --libex | --libe)
963 ac_prev=libexecdir ;;
964 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
965 | --libexe=* | --libex=* | --libe=*)
966 libexecdir=$ac_optarg ;;
967
968 -localedir | --localedir | --localedi | --localed | --locale)
969 ac_prev=localedir ;;
970 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
971 localedir=$ac_optarg ;;
972
973 -localstatedir | --localstatedir | --localstatedi | --localstated \
974 | --localstate | --localstat | --localsta | --localst | --locals)
975 ac_prev=localstatedir ;;
976 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
977 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
978 localstatedir=$ac_optarg ;;
979
980 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
981 ac_prev=mandir ;;
982 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
983 mandir=$ac_optarg ;;
984
985 -nfp | --nfp | --nf)
986 # Obsolete; use --without-fp.
987 with_fp=no ;;
988
989 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
990 | --no-cr | --no-c | -n)
991 no_create=yes ;;
992
993 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
994 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
995 no_recursion=yes ;;
996
997 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
998 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
999 | --oldin | --oldi | --old | --ol | --o)
1000 ac_prev=oldincludedir ;;
1001 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1002 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1003 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1004 oldincludedir=$ac_optarg ;;
1005
1006 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1007 ac_prev=prefix ;;
1008 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1009 prefix=$ac_optarg ;;
1010
1011 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1012 | --program-pre | --program-pr | --program-p)
1013 ac_prev=program_prefix ;;
1014 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1015 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1016 program_prefix=$ac_optarg ;;
1017
1018 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1019 | --program-suf | --program-su | --program-s)
1020 ac_prev=program_suffix ;;
1021 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1022 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1023 program_suffix=$ac_optarg ;;
1024
1025 -program-transform-name | --program-transform-name \
1026 | --program-transform-nam | --program-transform-na \
1027 | --program-transform-n | --program-transform- \
1028 | --program-transform | --program-transfor \
1029 | --program-transfo | --program-transf \
1030 | --program-trans | --program-tran \
1031 | --progr-tra | --program-tr | --program-t)
1032 ac_prev=program_transform_name ;;
1033 -program-transform-name=* | --program-transform-name=* \
1034 | --program-transform-nam=* | --program-transform-na=* \
1035 | --program-transform-n=* | --program-transform-=* \
1036 | --program-transform=* | --program-transfor=* \
1037 | --program-transfo=* | --program-transf=* \
1038 | --program-trans=* | --program-tran=* \
1039 | --progr-tra=* | --program-tr=* | --program-t=*)
1040 program_transform_name=$ac_optarg ;;
1041
1042 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1043 ac_prev=pdfdir ;;
1044 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1045 pdfdir=$ac_optarg ;;
1046
1047 -psdir | --psdir | --psdi | --psd | --ps)
1048 ac_prev=psdir ;;
1049 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1050 psdir=$ac_optarg ;;
1051
1052 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1053 | -silent | --silent | --silen | --sile | --sil)
1054 silent=yes ;;
1055
1056 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1057 ac_prev=sbindir ;;
1058 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1059 | --sbi=* | --sb=*)
1060 sbindir=$ac_optarg ;;
1061
1062 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1063 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1064 | --sharedst | --shareds | --shared | --share | --shar \
1065 | --sha | --sh)
1066 ac_prev=sharedstatedir ;;
1067 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1068 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1069 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1070 | --sha=* | --sh=*)
1071 sharedstatedir=$ac_optarg ;;
1072
1073 -site | --site | --sit)
1074 ac_prev=site ;;
1075 -site=* | --site=* | --sit=*)
1076 site=$ac_optarg ;;
1077
1078 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1079 ac_prev=srcdir ;;
1080 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1081 srcdir=$ac_optarg ;;
1082
1083 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1084 | --syscon | --sysco | --sysc | --sys | --sy)
1085 ac_prev=sysconfdir ;;
1086 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1087 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1088 sysconfdir=$ac_optarg ;;
1089
1090 -target | --target | --targe | --targ | --tar | --ta | --t)
1091 ac_prev=target_alias ;;
1092 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1093 target_alias=$ac_optarg ;;
1094
1095 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1096 verbose=yes ;;
1097
1098 -version | --version | --versio | --versi | --vers | -V)
1099 ac_init_version=: ;;
1100
1101 -with-* | --with-*)
JP Abgrall511eca32014-02-12 13:46:45 -08001102 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001103 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -08001104 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1105 as_fn_error $? "invalid package name: $ac_useropt"
1106 ac_useropt_orig=$ac_useropt
1107 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1108 case $ac_user_opts in
1109 *"
1110"with_$ac_useropt"
1111"*) ;;
1112 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1113 ac_unrecognized_sep=', ';;
1114 esac
1115 eval with_$ac_useropt=\$ac_optarg ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001116
1117 -without-* | --without-*)
JP Abgrall511eca32014-02-12 13:46:45 -08001118 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001119 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -08001120 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1121 as_fn_error $? "invalid package name: $ac_useropt"
1122 ac_useropt_orig=$ac_useropt
1123 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1124 case $ac_user_opts in
1125 *"
1126"with_$ac_useropt"
1127"*) ;;
1128 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1129 ac_unrecognized_sep=', ';;
1130 esac
1131 eval with_$ac_useropt=no ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001132
1133 --x)
1134 # Obsolete; use --with-x.
1135 with_x=yes ;;
1136
1137 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1138 | --x-incl | --x-inc | --x-in | --x-i)
1139 ac_prev=x_includes ;;
1140 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1141 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1142 x_includes=$ac_optarg ;;
1143
1144 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1145 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1146 ac_prev=x_libraries ;;
1147 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1148 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1149 x_libraries=$ac_optarg ;;
1150
JP Abgrall511eca32014-02-12 13:46:45 -08001151 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1152Try \`$0 --help' for more information"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001153 ;;
1154
1155 *=*)
1156 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1157 # Reject names that are not valid shell variable names.
JP Abgrall511eca32014-02-12 13:46:45 -08001158 case $ac_envvar in #(
1159 '' | [0-9]* | *[!_$as_cr_alnum]* )
1160 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1161 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001162 eval $ac_envvar=\$ac_optarg
1163 export $ac_envvar ;;
1164
1165 *)
1166 # FIXME: should be removed in autoconf 3.0.
JP Abgrall511eca32014-02-12 13:46:45 -08001167 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001168 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
JP Abgrall511eca32014-02-12 13:46:45 -08001169 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1170 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001171 ;;
1172
1173 esac
1174done
1175
1176if test -n "$ac_prev"; then
1177 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
JP Abgrall511eca32014-02-12 13:46:45 -08001178 as_fn_error $? "missing argument to $ac_option"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001179fi
1180
JP Abgrall511eca32014-02-12 13:46:45 -08001181if test -n "$ac_unrecognized_opts"; then
1182 case $enable_option_checking in
1183 no) ;;
1184 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1185 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1186 esac
1187fi
1188
1189# Check all directory arguments for consistency.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001190for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1191 datadir sysconfdir sharedstatedir localstatedir includedir \
1192 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1193 libdir localedir mandir
1194do
1195 eval ac_val=\$$ac_var
JP Abgrall511eca32014-02-12 13:46:45 -08001196 # Remove trailing slashes.
1197 case $ac_val in
1198 */ )
1199 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1200 eval $ac_var=\$ac_val;;
1201 esac
1202 # Be sure to have absolute directory names.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001203 case $ac_val in
1204 [\\/$]* | ?:[\\/]* ) continue;;
1205 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1206 esac
JP Abgrall511eca32014-02-12 13:46:45 -08001207 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001208done
1209
1210# There might be people who depend on the old broken behavior: `$host'
1211# used to hold the argument of --host etc.
1212# FIXME: To remove some day.
1213build=$build_alias
1214host=$host_alias
1215target=$target_alias
1216
1217# FIXME: To remove some day.
1218if test "x$host_alias" != x; then
1219 if test "x$build_alias" = x; then
1220 cross_compiling=maybe
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001221 elif test "x$build_alias" != "x$host_alias"; then
1222 cross_compiling=yes
1223 fi
1224fi
1225
1226ac_tool_prefix=
1227test -n "$host_alias" && ac_tool_prefix=$host_alias-
1228
1229test "$silent" = yes && exec 6>/dev/null
1230
1231
1232ac_pwd=`pwd` && test -n "$ac_pwd" &&
1233ac_ls_di=`ls -di .` &&
1234ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
JP Abgrall511eca32014-02-12 13:46:45 -08001235 as_fn_error $? "working directory cannot be determined"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001236test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
JP Abgrall511eca32014-02-12 13:46:45 -08001237 as_fn_error $? "pwd does not report name of working directory"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001238
1239
1240# Find the source files, if location was not specified.
1241if test -z "$srcdir"; then
1242 ac_srcdir_defaulted=yes
1243 # Try the directory containing this script, then the parent directory.
JP Abgrall511eca32014-02-12 13:46:45 -08001244 ac_confdir=`$as_dirname -- "$as_myself" ||
1245$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1246 X"$as_myself" : 'X\(//\)[^/]' \| \
1247 X"$as_myself" : 'X\(//\)$' \| \
1248 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1249$as_echo X"$as_myself" |
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001250 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1251 s//\1/
1252 q
1253 }
1254 /^X\(\/\/\)[^/].*/{
1255 s//\1/
1256 q
1257 }
1258 /^X\(\/\/\)$/{
1259 s//\1/
1260 q
1261 }
1262 /^X\(\/\).*/{
1263 s//\1/
1264 q
1265 }
1266 s/.*/./; q'`
1267 srcdir=$ac_confdir
1268 if test ! -r "$srcdir/$ac_unique_file"; then
1269 srcdir=..
1270 fi
1271else
1272 ac_srcdir_defaulted=no
1273fi
1274if test ! -r "$srcdir/$ac_unique_file"; then
1275 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
JP Abgrall511eca32014-02-12 13:46:45 -08001276 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001277fi
1278ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1279ac_abs_confdir=`(
JP Abgrall511eca32014-02-12 13:46:45 -08001280 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001281 pwd)`
1282# When building in place, set srcdir=.
1283if test "$ac_abs_confdir" = "$ac_pwd"; then
1284 srcdir=.
1285fi
1286# Remove unnecessary trailing slashes from srcdir.
1287# Double slashes in file names in object file debugging info
1288# mess up M-x gdb in Emacs.
1289case $srcdir in
1290*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1291esac
1292for ac_var in $ac_precious_vars; do
1293 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1294 eval ac_env_${ac_var}_value=\$${ac_var}
1295 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1296 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1297done
1298
1299#
1300# Report the --help message.
1301#
1302if test "$ac_init_help" = "long"; then
1303 # Omit some internal or obsolete options to make the list less imposing.
1304 # This message is too long to be a string in the A/UX 3.1 sh.
1305 cat <<_ACEOF
1306\`configure' configures this package to adapt to many kinds of systems.
1307
1308Usage: $0 [OPTION]... [VAR=VALUE]...
1309
1310To assign environment variables (e.g., CC, CFLAGS...), specify them as
1311VAR=VALUE. See below for descriptions of some of the useful variables.
1312
1313Defaults for the options are specified in brackets.
1314
1315Configuration:
1316 -h, --help display this help and exit
1317 --help=short display options specific to this package
1318 --help=recursive display the short help of all the included packages
1319 -V, --version display version information and exit
JP Abgrall511eca32014-02-12 13:46:45 -08001320 -q, --quiet, --silent do not print \`checking ...' messages
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001321 --cache-file=FILE cache test results in FILE [disabled]
1322 -C, --config-cache alias for \`--cache-file=config.cache'
1323 -n, --no-create do not create output files
1324 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1325
1326Installation directories:
1327 --prefix=PREFIX install architecture-independent files in PREFIX
JP Abgrall511eca32014-02-12 13:46:45 -08001328 [$ac_default_prefix]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001329 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
JP Abgrall511eca32014-02-12 13:46:45 -08001330 [PREFIX]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001331
1332By default, \`make install' will install all the files in
1333\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1334an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1335for instance \`--prefix=\$HOME'.
1336
1337For better control, use the options below.
1338
1339Fine tuning of the installation directories:
JP Abgrall511eca32014-02-12 13:46:45 -08001340 --bindir=DIR user executables [EPREFIX/bin]
1341 --sbindir=DIR system admin executables [EPREFIX/sbin]
1342 --libexecdir=DIR program executables [EPREFIX/libexec]
1343 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1344 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1345 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1346 --libdir=DIR object code libraries [EPREFIX/lib]
1347 --includedir=DIR C header files [PREFIX/include]
1348 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1349 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1350 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1351 --infodir=DIR info documentation [DATAROOTDIR/info]
1352 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1353 --mandir=DIR man documentation [DATAROOTDIR/man]
1354 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1355 --htmldir=DIR html documentation [DOCDIR]
1356 --dvidir=DIR dvi documentation [DOCDIR]
1357 --pdfdir=DIR pdf documentation [DOCDIR]
1358 --psdir=DIR ps documentation [DOCDIR]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001359_ACEOF
1360
1361 cat <<\_ACEOF
1362
1363System types:
1364 --build=BUILD configure for building on BUILD [guessed]
1365 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1366 --target=TARGET configure for building compilers for TARGET [HOST]
1367_ACEOF
1368fi
1369
1370if test -n "$ac_init_help"; then
1371
1372 cat <<\_ACEOF
1373
1374Optional Features:
JP Abgrall511eca32014-02-12 13:46:45 -08001375 --disable-option-checking ignore unrecognized --enable/--with options
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001376 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1377 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
JP Abgrall511eca32014-02-12 13:46:45 -08001378 --disable-largefile omit support for large files
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001379 --disable-protochain disable \"protochain\" insn
JP Abgrall511eca32014-02-12 13:46:45 -08001380 --enable-ipv6 build IPv6-capable version [default=yes, if
1381 getaddrinfo available]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001382 --enable-optimizer-dbg build optimizer debugging code
1383 --enable-yydebug build parser debugging code
JP Abgrall511eca32014-02-12 13:46:45 -08001384 --disable-universal don't build universal on OS X
1385 --enable-shared build shared libraries [default=yes, if support
1386 available]
Elliott Hughesd8845d72015-10-19 18:07:04 -07001387 --enable-usb enable nusb support [default=yes, if support
1388 available]
JP Abgrall511eca32014-02-12 13:46:45 -08001389 --enable-bluetooth enable Bluetooth support [default=yes, if support
1390 available]
JP Abgrall511eca32014-02-12 13:46:45 -08001391 --enable-dbus enable D-Bus capture support [default=yes, if
1392 support available]
Elliott Hughesd8845d72015-10-19 18:07:04 -07001393 --enable-packet-ring enable Linux packet ring support [default=yes]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001394
1395Optional Packages:
1396 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1397 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1398 --without-gcc don't use gcc
JP Abgrall511eca32014-02-12 13:46:45 -08001399 --with-sita include SITA support
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001400 --with-pcap=TYPE use packet capture TYPE
JP Abgrall511eca32014-02-12 13:46:45 -08001401 --without-libnl disable libnl support [default=yes, on Linux, if
1402 present]
Elliott Hughes965a4b52017-05-15 10:37:39 -07001403 --with-dag[=DIR] include Endace DAG support (located in directory
1404 DIR, if supplied). [default=yes, if present]
1405 --with-dag-includes=IDIR
1406 Endace DAG include directory, if not DIR/include
1407 --with-dag-libraries=LDIR
1408 Endace DAG library directory, if not DIR/lib
JP Abgrall511eca32014-02-12 13:46:45 -08001409 --with-septel[=DIR] include Septel support (located in directory DIR, if
Elliott Hughes965a4b52017-05-15 10:37:39 -07001410 supplied). [default=yes, if present]
1411 --with-snf[=DIR] include Myricom SNF support (located in directory
1412 DIR, if supplied). [default=yes, if present]
1413 --with-snf-includes=IDIR
1414 Myricom SNF include directory, if not DIR/include
1415 --with-snf-libraries=LDIR
1416 Myricom SNF library directory, if not DIR/lib
1417 --with-turbocap[=DIR] include Riverbed TurboCap support (located in
1418 directory DIR, if supplied). [default=yes, if
1419 present]
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001420
1421Some influential environment variables:
1422 CC C compiler command
1423 CFLAGS C compiler flags
1424 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1425 nonstandard directory <lib dir>
1426 LIBS libraries to pass to the linker, e.g. -l<library>
JP Abgrall511eca32014-02-12 13:46:45 -08001427 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001428 you have headers in a nonstandard directory <include dir>
1429 CPP C preprocessor
Elliott Hughes965a4b52017-05-15 10:37:39 -07001430 YACC The `Yet Another Compiler Compiler' implementation to use.
1431 Defaults to the first program found out of: `bison -y', `byacc',
1432 `yacc'.
1433 YFLAGS The list of arguments that will be passed by default to $YACC.
1434 This script will default YFLAGS to the empty string to avoid a
1435 default value of `-d' given by some make applications.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001436
1437Use these variables to override the choices made by `configure' or to help
1438it to find libraries and programs with nonstandard names/locations.
1439
JP Abgrall511eca32014-02-12 13:46:45 -08001440Report bugs to the package provider.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001441_ACEOF
1442ac_status=$?
1443fi
1444
1445if test "$ac_init_help" = "recursive"; then
1446 # If there are subdirs, report their specific --help.
1447 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
JP Abgrall511eca32014-02-12 13:46:45 -08001448 test -d "$ac_dir" ||
1449 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1450 continue
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001451 ac_builddir=.
1452
1453case "$ac_dir" in
1454.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1455*)
JP Abgrall511eca32014-02-12 13:46:45 -08001456 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001457 # A ".." for each directory in $ac_dir_suffix.
JP Abgrall511eca32014-02-12 13:46:45 -08001458 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001459 case $ac_top_builddir_sub in
1460 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1461 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1462 esac ;;
1463esac
1464ac_abs_top_builddir=$ac_pwd
1465ac_abs_builddir=$ac_pwd$ac_dir_suffix
1466# for backward compatibility:
1467ac_top_builddir=$ac_top_build_prefix
1468
1469case $srcdir in
1470 .) # We are building in place.
1471 ac_srcdir=.
1472 ac_top_srcdir=$ac_top_builddir_sub
1473 ac_abs_top_srcdir=$ac_pwd ;;
1474 [\\/]* | ?:[\\/]* ) # Absolute name.
1475 ac_srcdir=$srcdir$ac_dir_suffix;
1476 ac_top_srcdir=$srcdir
1477 ac_abs_top_srcdir=$srcdir ;;
1478 *) # Relative name.
1479 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1480 ac_top_srcdir=$ac_top_build_prefix$srcdir
1481 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1482esac
1483ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1484
1485 cd "$ac_dir" || { ac_status=$?; continue; }
1486 # Check for guested configure.
1487 if test -f "$ac_srcdir/configure.gnu"; then
1488 echo &&
1489 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1490 elif test -f "$ac_srcdir/configure"; then
1491 echo &&
1492 $SHELL "$ac_srcdir/configure" --help=recursive
1493 else
JP Abgrall511eca32014-02-12 13:46:45 -08001494 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001495 fi || ac_status=$?
1496 cd "$ac_pwd" || { ac_status=$?; break; }
1497 done
1498fi
1499
1500test -n "$ac_init_help" && exit $ac_status
1501if $ac_init_version; then
1502 cat <<\_ACEOF
1503configure
JP Abgrall511eca32014-02-12 13:46:45 -08001504generated by GNU Autoconf 2.69
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001505
JP Abgrall511eca32014-02-12 13:46:45 -08001506Copyright (C) 2012 Free Software Foundation, Inc.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001507This configure script is free software; the Free Software Foundation
1508gives unlimited permission to copy, distribute and modify it.
1509_ACEOF
1510 exit
1511fi
JP Abgrall511eca32014-02-12 13:46:45 -08001512
1513## ------------------------ ##
1514## Autoconf initialization. ##
1515## ------------------------ ##
1516
1517# ac_fn_c_try_compile LINENO
1518# --------------------------
1519# Try to compile conftest.$ac_ext, and return whether this succeeded.
1520ac_fn_c_try_compile ()
1521{
1522 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1523 rm -f conftest.$ac_objext
1524 if { { ac_try="$ac_compile"
1525case "(($ac_try" in
1526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1527 *) ac_try_echo=$ac_try;;
1528esac
1529eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1530$as_echo "$ac_try_echo"; } >&5
1531 (eval "$ac_compile") 2>conftest.err
1532 ac_status=$?
1533 if test -s conftest.err; then
1534 grep -v '^ *+' conftest.err >conftest.er1
1535 cat conftest.er1 >&5
1536 mv -f conftest.er1 conftest.err
1537 fi
1538 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1539 test $ac_status = 0; } && {
1540 test -z "$ac_c_werror_flag" ||
1541 test ! -s conftest.err
1542 } && test -s conftest.$ac_objext; then :
1543 ac_retval=0
1544else
1545 $as_echo "$as_me: failed program was:" >&5
1546sed 's/^/| /' conftest.$ac_ext >&5
1547
1548 ac_retval=1
1549fi
1550 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1551 as_fn_set_status $ac_retval
1552
1553} # ac_fn_c_try_compile
1554
1555# ac_fn_c_try_cpp LINENO
1556# ----------------------
1557# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1558ac_fn_c_try_cpp ()
1559{
1560 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1561 if { { ac_try="$ac_cpp conftest.$ac_ext"
1562case "(($ac_try" in
1563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1564 *) ac_try_echo=$ac_try;;
1565esac
1566eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1567$as_echo "$ac_try_echo"; } >&5
1568 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1569 ac_status=$?
1570 if test -s conftest.err; then
1571 grep -v '^ *+' conftest.err >conftest.er1
1572 cat conftest.er1 >&5
1573 mv -f conftest.er1 conftest.err
1574 fi
1575 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1576 test $ac_status = 0; } > conftest.i && {
1577 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1578 test ! -s conftest.err
1579 }; then :
1580 ac_retval=0
1581else
1582 $as_echo "$as_me: failed program was:" >&5
1583sed 's/^/| /' conftest.$ac_ext >&5
1584
1585 ac_retval=1
1586fi
1587 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1588 as_fn_set_status $ac_retval
1589
1590} # ac_fn_c_try_cpp
1591
1592# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1593# -------------------------------------------------------
1594# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1595# the include files in INCLUDES and setting the cache variable VAR
1596# accordingly.
1597ac_fn_c_check_header_mongrel ()
1598{
1599 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1600 if eval \${$3+:} false; then :
1601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1602$as_echo_n "checking for $2... " >&6; }
1603if eval \${$3+:} false; then :
1604 $as_echo_n "(cached) " >&6
1605fi
1606eval ac_res=\$$3
1607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1608$as_echo "$ac_res" >&6; }
1609else
1610 # Is the header compilable?
1611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1612$as_echo_n "checking $2 usability... " >&6; }
1613cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1614/* end confdefs.h. */
1615$4
1616#include <$2>
1617_ACEOF
1618if ac_fn_c_try_compile "$LINENO"; then :
1619 ac_header_compiler=yes
1620else
1621 ac_header_compiler=no
1622fi
1623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1625$as_echo "$ac_header_compiler" >&6; }
1626
1627# Is the header present?
1628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1629$as_echo_n "checking $2 presence... " >&6; }
1630cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1631/* end confdefs.h. */
1632#include <$2>
1633_ACEOF
1634if ac_fn_c_try_cpp "$LINENO"; then :
1635 ac_header_preproc=yes
1636else
1637 ac_header_preproc=no
1638fi
1639rm -f conftest.err conftest.i conftest.$ac_ext
1640{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1641$as_echo "$ac_header_preproc" >&6; }
1642
1643# So? What about this header?
1644case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1645 yes:no: )
1646 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1647$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1648 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1649$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1650 ;;
1651 no:yes:* )
1652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1653$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1655$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1657$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1658 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1659$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1661$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1662 ;;
1663esac
1664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1665$as_echo_n "checking for $2... " >&6; }
1666if eval \${$3+:} false; then :
1667 $as_echo_n "(cached) " >&6
1668else
1669 eval "$3=\$ac_header_compiler"
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674fi
1675 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1676
1677} # ac_fn_c_check_header_mongrel
1678
1679# ac_fn_c_try_run LINENO
1680# ----------------------
1681# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1682# that executables *can* be run.
1683ac_fn_c_try_run ()
1684{
1685 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1686 if { { ac_try="$ac_link"
1687case "(($ac_try" in
1688 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1689 *) ac_try_echo=$ac_try;;
1690esac
1691eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1692$as_echo "$ac_try_echo"; } >&5
1693 (eval "$ac_link") 2>&5
1694 ac_status=$?
1695 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1696 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1697 { { case "(($ac_try" in
1698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1699 *) ac_try_echo=$ac_try;;
1700esac
1701eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1702$as_echo "$ac_try_echo"; } >&5
1703 (eval "$ac_try") 2>&5
1704 ac_status=$?
1705 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1706 test $ac_status = 0; }; }; then :
1707 ac_retval=0
1708else
1709 $as_echo "$as_me: program exited with status $ac_status" >&5
1710 $as_echo "$as_me: failed program was:" >&5
1711sed 's/^/| /' conftest.$ac_ext >&5
1712
1713 ac_retval=$ac_status
1714fi
1715 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1716 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1717 as_fn_set_status $ac_retval
1718
1719} # ac_fn_c_try_run
1720
1721# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1722# -------------------------------------------------------
1723# Tests whether HEADER exists and can be compiled using the include files in
1724# INCLUDES, setting the cache variable VAR accordingly.
1725ac_fn_c_check_header_compile ()
1726{
1727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1729$as_echo_n "checking for $2... " >&6; }
1730if eval \${$3+:} false; then :
1731 $as_echo_n "(cached) " >&6
1732else
1733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1734/* end confdefs.h. */
1735$4
1736#include <$2>
1737_ACEOF
1738if ac_fn_c_try_compile "$LINENO"; then :
1739 eval "$3=yes"
1740else
1741 eval "$3=no"
1742fi
1743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1744fi
1745eval ac_res=\$$3
1746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1747$as_echo "$ac_res" >&6; }
1748 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1749
1750} # ac_fn_c_check_header_compile
1751
1752# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1753# -------------------------------------------
1754# Tests whether TYPE exists after having included INCLUDES, setting cache
1755# variable VAR accordingly.
1756ac_fn_c_check_type ()
1757{
1758 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1760$as_echo_n "checking for $2... " >&6; }
1761if eval \${$3+:} false; then :
1762 $as_echo_n "(cached) " >&6
1763else
1764 eval "$3=no"
1765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1766/* end confdefs.h. */
1767$4
1768int
1769main ()
1770{
1771if (sizeof ($2))
1772 return 0;
1773 ;
1774 return 0;
1775}
1776_ACEOF
1777if ac_fn_c_try_compile "$LINENO"; then :
1778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1779/* end confdefs.h. */
1780$4
1781int
1782main ()
1783{
1784if (sizeof (($2)))
1785 return 0;
1786 ;
1787 return 0;
1788}
1789_ACEOF
1790if ac_fn_c_try_compile "$LINENO"; then :
1791
1792else
1793 eval "$3=yes"
1794fi
1795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1796fi
1797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1798fi
1799eval ac_res=\$$3
1800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1801$as_echo "$ac_res" >&6; }
1802 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1803
1804} # ac_fn_c_check_type
1805
1806# ac_fn_c_try_link LINENO
1807# -----------------------
1808# Try to link conftest.$ac_ext, and return whether this succeeded.
1809ac_fn_c_try_link ()
1810{
1811 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1812 rm -f conftest.$ac_objext conftest$ac_exeext
1813 if { { ac_try="$ac_link"
1814case "(($ac_try" in
1815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1816 *) ac_try_echo=$ac_try;;
1817esac
1818eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1819$as_echo "$ac_try_echo"; } >&5
1820 (eval "$ac_link") 2>conftest.err
1821 ac_status=$?
1822 if test -s conftest.err; then
1823 grep -v '^ *+' conftest.err >conftest.er1
1824 cat conftest.er1 >&5
1825 mv -f conftest.er1 conftest.err
1826 fi
1827 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1828 test $ac_status = 0; } && {
1829 test -z "$ac_c_werror_flag" ||
1830 test ! -s conftest.err
1831 } && test -s conftest$ac_exeext && {
1832 test "$cross_compiling" = yes ||
1833 test -x conftest$ac_exeext
1834 }; then :
1835 ac_retval=0
1836else
1837 $as_echo "$as_me: failed program was:" >&5
1838sed 's/^/| /' conftest.$ac_ext >&5
1839
1840 ac_retval=1
1841fi
1842 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1843 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1844 # interfere with the next link command; also delete a directory that is
1845 # left behind by Apple's compiler. We do this before executing the actions.
1846 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1847 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1848 as_fn_set_status $ac_retval
1849
1850} # ac_fn_c_try_link
1851
1852# ac_fn_c_check_func LINENO FUNC VAR
1853# ----------------------------------
1854# Tests whether FUNC exists, setting the cache variable VAR accordingly
1855ac_fn_c_check_func ()
1856{
1857 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1859$as_echo_n "checking for $2... " >&6; }
1860if eval \${$3+:} false; then :
1861 $as_echo_n "(cached) " >&6
1862else
1863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1864/* end confdefs.h. */
1865/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1866 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1867#define $2 innocuous_$2
1868
1869/* System header to define __stub macros and hopefully few prototypes,
1870 which can conflict with char $2 (); below.
1871 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1872 <limits.h> exists even on freestanding compilers. */
1873
1874#ifdef __STDC__
1875# include <limits.h>
1876#else
1877# include <assert.h>
1878#endif
1879
1880#undef $2
1881
1882/* Override any GCC internal prototype to avoid an error.
1883 Use char because int might match the return type of a GCC
1884 builtin and then its argument prototype would still apply. */
1885#ifdef __cplusplus
1886extern "C"
1887#endif
1888char $2 ();
1889/* The GNU C library defines this for functions which it implements
1890 to always fail with ENOSYS. Some functions are actually named
1891 something starting with __ and the normal name is an alias. */
1892#if defined __stub_$2 || defined __stub___$2
1893choke me
1894#endif
1895
1896int
1897main ()
1898{
1899return $2 ();
1900 ;
1901 return 0;
1902}
1903_ACEOF
1904if ac_fn_c_try_link "$LINENO"; then :
1905 eval "$3=yes"
1906else
1907 eval "$3=no"
1908fi
1909rm -f core conftest.err conftest.$ac_objext \
1910 conftest$ac_exeext conftest.$ac_ext
1911fi
1912eval ac_res=\$$3
1913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1914$as_echo "$ac_res" >&6; }
1915 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1916
1917} # ac_fn_c_check_func
1918
1919# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1920# ---------------------------------------------
1921# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1922# accordingly.
1923ac_fn_c_check_decl ()
1924{
1925 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1926 as_decl_name=`echo $2|sed 's/ *(.*//'`
1927 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1929$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1930if eval \${$3+:} false; then :
1931 $as_echo_n "(cached) " >&6
1932else
1933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1934/* end confdefs.h. */
1935$4
1936int
1937main ()
1938{
1939#ifndef $as_decl_name
1940#ifdef __cplusplus
1941 (void) $as_decl_use;
1942#else
1943 (void) $as_decl_name;
1944#endif
1945#endif
1946
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_compile "$LINENO"; then :
1952 eval "$3=yes"
1953else
1954 eval "$3=no"
1955fi
1956rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1957fi
1958eval ac_res=\$$3
1959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1960$as_echo "$ac_res" >&6; }
1961 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1962
1963} # ac_fn_c_check_decl
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001964cat >config.log <<_ACEOF
1965This file contains any messages produced by compilers while
1966running configure, to aid debugging if configure makes a mistake.
1967
1968It was created by $as_me, which was
JP Abgrall511eca32014-02-12 13:46:45 -08001969generated by GNU Autoconf 2.69. Invocation command line was
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08001970
1971 $ $0 $@
1972
1973_ACEOF
1974exec 5>>config.log
1975{
1976cat <<_ASUNAME
1977## --------- ##
1978## Platform. ##
1979## --------- ##
1980
1981hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1982uname -m = `(uname -m) 2>/dev/null || echo unknown`
1983uname -r = `(uname -r) 2>/dev/null || echo unknown`
1984uname -s = `(uname -s) 2>/dev/null || echo unknown`
1985uname -v = `(uname -v) 2>/dev/null || echo unknown`
1986
1987/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1988/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1989
1990/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1991/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1992/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1993/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1994/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1995/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1996/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1997
1998_ASUNAME
1999
2000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2001for as_dir in $PATH
2002do
2003 IFS=$as_save_IFS
2004 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002005 $as_echo "PATH: $as_dir"
2006 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002007IFS=$as_save_IFS
2008
2009} >&5
2010
2011cat >&5 <<_ACEOF
2012
2013
2014## ----------- ##
2015## Core tests. ##
2016## ----------- ##
2017
2018_ACEOF
2019
2020
2021# Keep a trace of the command line.
2022# Strip out --no-create and --no-recursion so they do not pile up.
2023# Strip out --silent because we don't want to record it for future runs.
2024# Also quote any args containing shell meta-characters.
2025# Make two passes to allow for proper duplicate-argument suppression.
2026ac_configure_args=
2027ac_configure_args0=
2028ac_configure_args1=
2029ac_must_keep_next=false
2030for ac_pass in 1 2
2031do
2032 for ac_arg
2033 do
2034 case $ac_arg in
2035 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2036 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2037 | -silent | --silent | --silen | --sile | --sil)
2038 continue ;;
2039 *\'*)
JP Abgrall511eca32014-02-12 13:46:45 -08002040 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002041 esac
2042 case $ac_pass in
JP Abgrall511eca32014-02-12 13:46:45 -08002043 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002044 2)
JP Abgrall511eca32014-02-12 13:46:45 -08002045 as_fn_append ac_configure_args1 " '$ac_arg'"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002046 if test $ac_must_keep_next = true; then
2047 ac_must_keep_next=false # Got value, back to normal.
2048 else
2049 case $ac_arg in
2050 *=* | --config-cache | -C | -disable-* | --disable-* \
2051 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2052 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2053 | -with-* | --with-* | -without-* | --without-* | --x)
2054 case "$ac_configure_args0 " in
2055 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2056 esac
2057 ;;
2058 -* ) ac_must_keep_next=true ;;
2059 esac
2060 fi
JP Abgrall511eca32014-02-12 13:46:45 -08002061 as_fn_append ac_configure_args " '$ac_arg'"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002062 ;;
2063 esac
2064 done
2065done
JP Abgrall511eca32014-02-12 13:46:45 -08002066{ ac_configure_args0=; unset ac_configure_args0;}
2067{ ac_configure_args1=; unset ac_configure_args1;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002068
2069# When interrupted or exit'd, cleanup temporary files, and complete
2070# config.log. We remove comments because anyway the quotes in there
2071# would cause problems or look ugly.
2072# WARNING: Use '\'' to represent an apostrophe within the trap.
2073# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2074trap 'exit_status=$?
2075 # Save into config.log some information that might help in debugging.
2076 {
2077 echo
2078
JP Abgrall511eca32014-02-12 13:46:45 -08002079 $as_echo "## ---------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002080## Cache variables. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002081## ---------------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002082 echo
2083 # The following way of writing the cache mishandles newlines in values,
2084(
2085 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2086 eval ac_val=\$$ac_var
2087 case $ac_val in #(
2088 *${as_nl}*)
2089 case $ac_var in #(
JP Abgrall511eca32014-02-12 13:46:45 -08002090 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2091$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002092 esac
2093 case $ac_var in #(
2094 _ | IFS | as_nl) ;; #(
JP Abgrall511eca32014-02-12 13:46:45 -08002095 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2096 *) { eval $ac_var=; unset $ac_var;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002097 esac ;;
2098 esac
2099 done
2100 (set) 2>&1 |
2101 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2102 *${as_nl}ac_space=\ *)
2103 sed -n \
2104 "s/'\''/'\''\\\\'\'''\''/g;
2105 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2106 ;; #(
2107 *)
2108 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2109 ;;
2110 esac |
2111 sort
2112)
2113 echo
2114
JP Abgrall511eca32014-02-12 13:46:45 -08002115 $as_echo "## ----------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002116## Output variables. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002117## ----------------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002118 echo
2119 for ac_var in $ac_subst_vars
2120 do
2121 eval ac_val=\$$ac_var
2122 case $ac_val in
JP Abgrall511eca32014-02-12 13:46:45 -08002123 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002124 esac
JP Abgrall511eca32014-02-12 13:46:45 -08002125 $as_echo "$ac_var='\''$ac_val'\''"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002126 done | sort
2127 echo
2128
2129 if test -n "$ac_subst_files"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002130 $as_echo "## ------------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002131## File substitutions. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002132## ------------------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002133 echo
2134 for ac_var in $ac_subst_files
2135 do
2136 eval ac_val=\$$ac_var
2137 case $ac_val in
JP Abgrall511eca32014-02-12 13:46:45 -08002138 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002139 esac
JP Abgrall511eca32014-02-12 13:46:45 -08002140 $as_echo "$ac_var='\''$ac_val'\''"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002141 done | sort
2142 echo
2143 fi
2144
2145 if test -s confdefs.h; then
JP Abgrall511eca32014-02-12 13:46:45 -08002146 $as_echo "## ----------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002147## confdefs.h. ##
JP Abgrall511eca32014-02-12 13:46:45 -08002148## ----------- ##"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002149 echo
2150 cat confdefs.h
2151 echo
2152 fi
2153 test "$ac_signal" != 0 &&
JP Abgrall511eca32014-02-12 13:46:45 -08002154 $as_echo "$as_me: caught signal $ac_signal"
2155 $as_echo "$as_me: exit $exit_status"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002156 } >&5
2157 rm -f core *.core core.conftest.* &&
2158 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2159 exit $exit_status
2160' 0
2161for ac_signal in 1 2 13 15; do
JP Abgrall511eca32014-02-12 13:46:45 -08002162 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002163done
2164ac_signal=0
2165
2166# confdefs.h avoids OS command line length limits that DEFS can exceed.
2167rm -f -r conftest* confdefs.h
2168
JP Abgrall511eca32014-02-12 13:46:45 -08002169$as_echo "/* confdefs.h */" > confdefs.h
2170
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002171# Predefined preprocessor variables.
2172
2173cat >>confdefs.h <<_ACEOF
2174#define PACKAGE_NAME "$PACKAGE_NAME"
2175_ACEOF
2176
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002177cat >>confdefs.h <<_ACEOF
2178#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2179_ACEOF
2180
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002181cat >>confdefs.h <<_ACEOF
2182#define PACKAGE_VERSION "$PACKAGE_VERSION"
2183_ACEOF
2184
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002185cat >>confdefs.h <<_ACEOF
2186#define PACKAGE_STRING "$PACKAGE_STRING"
2187_ACEOF
2188
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002189cat >>confdefs.h <<_ACEOF
2190#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2191_ACEOF
2192
JP Abgrall511eca32014-02-12 13:46:45 -08002193cat >>confdefs.h <<_ACEOF
2194#define PACKAGE_URL "$PACKAGE_URL"
2195_ACEOF
2196
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002197
2198# Let the site file select an alternate cache file if it wants to.
JP Abgrall511eca32014-02-12 13:46:45 -08002199# Prefer an explicitly selected file to automatically selected ones.
2200ac_site_file1=NONE
2201ac_site_file2=NONE
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002202if test -n "$CONFIG_SITE"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002203 # We do not want a PATH search for config.site.
2204 case $CONFIG_SITE in #((
2205 -*) ac_site_file1=./$CONFIG_SITE;;
2206 */*) ac_site_file1=$CONFIG_SITE;;
2207 *) ac_site_file1=./$CONFIG_SITE;;
2208 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002209elif test "x$prefix" != xNONE; then
JP Abgrall511eca32014-02-12 13:46:45 -08002210 ac_site_file1=$prefix/share/config.site
2211 ac_site_file2=$prefix/etc/config.site
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002212else
JP Abgrall511eca32014-02-12 13:46:45 -08002213 ac_site_file1=$ac_default_prefix/share/config.site
2214 ac_site_file2=$ac_default_prefix/etc/config.site
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002215fi
JP Abgrall511eca32014-02-12 13:46:45 -08002216for ac_site_file in "$ac_site_file1" "$ac_site_file2"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002217do
JP Abgrall511eca32014-02-12 13:46:45 -08002218 test "x$ac_site_file" = xNONE && continue
2219 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2220 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2221$as_echo "$as_me: loading site script $ac_site_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002222 sed 's/^/| /' "$ac_site_file" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08002223 . "$ac_site_file" \
2224 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2226as_fn_error $? "failed to load site script $ac_site_file
2227See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002228 fi
2229done
2230
2231if test -r "$cache_file"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002232 # Some versions of bash will fail to source /dev/null (special files
2233 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2234 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2235 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2236$as_echo "$as_me: loading cache $cache_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002237 case $cache_file in
2238 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2239 *) . "./$cache_file";;
2240 esac
2241 fi
2242else
JP Abgrall511eca32014-02-12 13:46:45 -08002243 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2244$as_echo "$as_me: creating cache $cache_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002245 >$cache_file
2246fi
2247
2248# Check that the precious variables saved in the cache have kept the same
2249# value.
2250ac_cache_corrupted=false
2251for ac_var in $ac_precious_vars; do
2252 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2253 eval ac_new_set=\$ac_env_${ac_var}_set
2254 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2255 eval ac_new_val=\$ac_env_${ac_var}_value
2256 case $ac_old_set,$ac_new_set in
2257 set,)
JP Abgrall511eca32014-02-12 13:46:45 -08002258 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2259$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 -08002260 ac_cache_corrupted=: ;;
2261 ,set)
JP Abgrall511eca32014-02-12 13:46:45 -08002262 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2263$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 -08002264 ac_cache_corrupted=: ;;
2265 ,);;
2266 *)
2267 if test "x$ac_old_val" != "x$ac_new_val"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002268 # differences in whitespace do not lead to failure.
2269 ac_old_val_w=`echo x $ac_old_val`
2270 ac_new_val_w=`echo x $ac_new_val`
2271 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2273$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2274 ac_cache_corrupted=:
2275 else
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2277$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2278 eval $ac_var=\$ac_old_val
2279 fi
2280 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2281$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2282 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2283$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002284 fi;;
2285 esac
2286 # Pass precious variables to config.status.
2287 if test "$ac_new_set" = set; then
2288 case $ac_new_val in
JP Abgrall511eca32014-02-12 13:46:45 -08002289 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002290 *) ac_arg=$ac_var=$ac_new_val ;;
2291 esac
2292 case " $ac_configure_args " in
2293 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
JP Abgrall511eca32014-02-12 13:46:45 -08002294 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002295 esac
2296 fi
2297done
2298if $ac_cache_corrupted; then
JP Abgrall511eca32014-02-12 13:46:45 -08002299 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2301 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2302$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2303 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 -08002304fi
JP Abgrall511eca32014-02-12 13:46:45 -08002305## -------------------- ##
2306## Main body of script. ##
2307## -------------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002308
2309ac_ext=c
2310ac_cpp='$CPP $CPPFLAGS'
2311ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314
2315
2316
2317ac_aux_dir=
2318for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2319 if test -f "$ac_dir/install-sh"; then
2320 ac_aux_dir=$ac_dir
2321 ac_install_sh="$ac_aux_dir/install-sh -c"
2322 break
2323 elif test -f "$ac_dir/install.sh"; then
2324 ac_aux_dir=$ac_dir
2325 ac_install_sh="$ac_aux_dir/install.sh -c"
2326 break
2327 elif test -f "$ac_dir/shtool"; then
2328 ac_aux_dir=$ac_dir
2329 ac_install_sh="$ac_aux_dir/shtool install -c"
2330 break
2331 fi
2332done
2333if test -z "$ac_aux_dir"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002334 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 -08002335fi
2336
2337# These three variables are undocumented and unsupported,
2338# and are intended to be withdrawn in a future Autoconf release.
2339# They can cause serious problems if a builder's source tree is in a directory
2340# whose full name contains unusual characters.
2341ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
2342ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
2343ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2344
2345
2346# Make sure we can run config.sub.
2347$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
JP Abgrall511eca32014-02-12 13:46:45 -08002348 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002349
JP Abgrall511eca32014-02-12 13:46:45 -08002350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2351$as_echo_n "checking build system type... " >&6; }
2352if ${ac_cv_build+:} false; then :
2353 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002354else
2355 ac_build_alias=$build_alias
2356test "x$ac_build_alias" = x &&
2357 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2358test "x$ac_build_alias" = x &&
JP Abgrall511eca32014-02-12 13:46:45 -08002359 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002360ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
JP Abgrall511eca32014-02-12 13:46:45 -08002361 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 -08002362
2363fi
JP Abgrall511eca32014-02-12 13:46:45 -08002364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2365$as_echo "$ac_cv_build" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002366case $ac_cv_build in
2367*-*-*) ;;
JP Abgrall511eca32014-02-12 13:46:45 -08002368*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002369esac
2370build=$ac_cv_build
2371ac_save_IFS=$IFS; IFS='-'
2372set x $ac_cv_build
2373shift
2374build_cpu=$1
2375build_vendor=$2
2376shift; shift
2377# Remember, the first character of IFS is used to create $*,
2378# except with old shells:
2379build_os=$*
2380IFS=$ac_save_IFS
2381case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2382
2383
JP Abgrall511eca32014-02-12 13:46:45 -08002384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2385$as_echo_n "checking host system type... " >&6; }
2386if ${ac_cv_host+:} false; then :
2387 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002388else
2389 if test "x$host_alias" = x; then
2390 ac_cv_host=$ac_cv_build
2391else
2392 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
JP Abgrall511eca32014-02-12 13:46:45 -08002393 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002394fi
2395
2396fi
JP Abgrall511eca32014-02-12 13:46:45 -08002397{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2398$as_echo "$ac_cv_host" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002399case $ac_cv_host in
2400*-*-*) ;;
JP Abgrall511eca32014-02-12 13:46:45 -08002401*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002402esac
2403host=$ac_cv_host
2404ac_save_IFS=$IFS; IFS='-'
2405set x $ac_cv_host
2406shift
2407host_cpu=$1
2408host_vendor=$2
2409shift; shift
2410# Remember, the first character of IFS is used to create $*,
2411# except with old shells:
2412host_os=$*
2413IFS=$ac_save_IFS
2414case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
2415
2416
JP Abgrall511eca32014-02-12 13:46:45 -08002417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
2418$as_echo_n "checking target system type... " >&6; }
2419if ${ac_cv_target+:} false; then :
2420 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002421else
2422 if test "x$target_alias" = x; then
2423 ac_cv_target=$ac_cv_host
2424else
2425 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
JP Abgrall511eca32014-02-12 13:46:45 -08002426 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002427fi
2428
2429fi
JP Abgrall511eca32014-02-12 13:46:45 -08002430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
2431$as_echo "$ac_cv_target" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002432case $ac_cv_target in
2433*-*-*) ;;
JP Abgrall511eca32014-02-12 13:46:45 -08002434*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002435esac
2436target=$ac_cv_target
2437ac_save_IFS=$IFS; IFS='-'
2438set x $ac_cv_target
2439shift
2440target_cpu=$1
2441target_vendor=$2
2442shift; shift
2443# Remember, the first character of IFS is used to create $*,
2444# except with old shells:
2445target_os=$*
2446IFS=$ac_save_IFS
2447case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
2448
2449
2450# The aliases save the names the user supplied, while $host etc.
2451# will get canonicalized.
2452test -n "$target_alias" &&
2453 test "$program_prefix$program_suffix$program_transform_name" = \
2454 NONENONEs,x,x, &&
2455 program_prefix=${target_alias}-
2456
2457
2458
2459
2460
2461
JP Abgrall511eca32014-02-12 13:46:45 -08002462
2463
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002464# Check whether --with-gcc was given.
JP Abgrall511eca32014-02-12 13:46:45 -08002465if test "${with_gcc+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002466 withval=$with_gcc;
2467fi
2468
JP Abgrall511eca32014-02-12 13:46:45 -08002469 V_CCOPT=""
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002470 if test "${srcdir}" != "." ; then
JP Abgrall511eca32014-02-12 13:46:45 -08002471 V_CCOPT="-I\$(srcdir)"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002472 fi
2473 if test "${CFLAGS+set}" = set; then
2474 LBL_CFLAGS="$CFLAGS"
2475 fi
2476 if test -z "$CC" ; then
JP Abgrall511eca32014-02-12 13:46:45 -08002477 case "$host_os" in
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002478
2479 bsdi*)
2480 # Extract the first word of "shlicc2", so it can be a program name with args.
2481set dummy shlicc2; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2483$as_echo_n "checking for $ac_word... " >&6; }
2484if ${ac_cv_prog_SHLICC2+:} false; then :
2485 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002486else
2487 if test -n "$SHLICC2"; then
2488 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test.
2489else
2490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2491for as_dir in $PATH
2492do
2493 IFS=$as_save_IFS
2494 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002495 for ac_exec_ext in '' $ac_executable_extensions; do
2496 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002497 ac_cv_prog_SHLICC2="yes"
JP Abgrall511eca32014-02-12 13:46:45 -08002498 $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 -08002499 break 2
2500 fi
2501done
JP Abgrall511eca32014-02-12 13:46:45 -08002502 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002503IFS=$as_save_IFS
2504
2505 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no"
2506fi
2507fi
2508SHLICC2=$ac_cv_prog_SHLICC2
2509if test -n "$SHLICC2"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5
2511$as_echo "$SHLICC2" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002512else
JP Abgrall511eca32014-02-12 13:46:45 -08002513 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2514$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002515fi
2516
2517
2518 if test $SHLICC2 = yes ; then
2519 CC=shlicc2
2520 export CC
2521 fi
2522 ;;
2523 esac
2524 fi
2525 if test -z "$CC" -a "$with_gcc" = no ; then
2526 CC=cc
2527 export CC
2528 fi
JP Abgrall511eca32014-02-12 13:46:45 -08002529
2530ac_ext=c
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002531ac_cpp='$CPP $CPPFLAGS'
2532ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2533ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2534ac_compiler_gnu=$ac_cv_c_compiler_gnu
2535if test -n "$ac_tool_prefix"; then
2536 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2537set dummy ${ac_tool_prefix}gcc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2539$as_echo_n "checking for $ac_word... " >&6; }
2540if ${ac_cv_prog_CC+:} false; then :
2541 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002542else
2543 if test -n "$CC"; then
2544 ac_cv_prog_CC="$CC" # Let the user override the test.
2545else
2546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2547for as_dir in $PATH
2548do
2549 IFS=$as_save_IFS
2550 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002551 for ac_exec_ext in '' $ac_executable_extensions; do
2552 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002553 ac_cv_prog_CC="${ac_tool_prefix}gcc"
JP Abgrall511eca32014-02-12 13:46:45 -08002554 $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 -08002555 break 2
2556 fi
2557done
JP Abgrall511eca32014-02-12 13:46:45 -08002558 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002559IFS=$as_save_IFS
2560
2561fi
2562fi
2563CC=$ac_cv_prog_CC
2564if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2566$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002567else
JP Abgrall511eca32014-02-12 13:46:45 -08002568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2569$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002570fi
2571
2572
2573fi
2574if test -z "$ac_cv_prog_CC"; then
2575 ac_ct_CC=$CC
2576 # Extract the first word of "gcc", so it can be a program name with args.
2577set dummy gcc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2579$as_echo_n "checking for $ac_word... " >&6; }
2580if ${ac_cv_prog_ac_ct_CC+:} false; then :
2581 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002582else
2583 if test -n "$ac_ct_CC"; then
2584 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2585else
2586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2587for as_dir in $PATH
2588do
2589 IFS=$as_save_IFS
2590 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002591 for ac_exec_ext in '' $ac_executable_extensions; do
2592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002593 ac_cv_prog_ac_ct_CC="gcc"
JP Abgrall511eca32014-02-12 13:46:45 -08002594 $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 -08002595 break 2
2596 fi
2597done
JP Abgrall511eca32014-02-12 13:46:45 -08002598 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002599IFS=$as_save_IFS
2600
2601fi
2602fi
2603ac_ct_CC=$ac_cv_prog_ac_ct_CC
2604if test -n "$ac_ct_CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2606$as_echo "$ac_ct_CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002607else
JP Abgrall511eca32014-02-12 13:46:45 -08002608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2609$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002610fi
2611
2612 if test "x$ac_ct_CC" = x; then
2613 CC=""
2614 else
2615 case $cross_compiling:$ac_tool_warned in
2616yes:)
JP Abgrall511eca32014-02-12 13:46:45 -08002617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002619ac_tool_warned=yes ;;
2620esac
2621 CC=$ac_ct_CC
2622 fi
2623else
2624 CC="$ac_cv_prog_CC"
2625fi
2626
2627if test -z "$CC"; then
2628 if test -n "$ac_tool_prefix"; then
2629 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2630set dummy ${ac_tool_prefix}cc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2632$as_echo_n "checking for $ac_word... " >&6; }
2633if ${ac_cv_prog_CC+:} false; then :
2634 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002635else
2636 if test -n "$CC"; then
2637 ac_cv_prog_CC="$CC" # Let the user override the test.
2638else
2639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2640for as_dir in $PATH
2641do
2642 IFS=$as_save_IFS
2643 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002644 for ac_exec_ext in '' $ac_executable_extensions; do
2645 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002646 ac_cv_prog_CC="${ac_tool_prefix}cc"
JP Abgrall511eca32014-02-12 13:46:45 -08002647 $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 -08002648 break 2
2649 fi
2650done
JP Abgrall511eca32014-02-12 13:46:45 -08002651 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002652IFS=$as_save_IFS
2653
2654fi
2655fi
2656CC=$ac_cv_prog_CC
2657if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2659$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002660else
JP Abgrall511eca32014-02-12 13:46:45 -08002661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2662$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002663fi
2664
2665
2666 fi
2667fi
2668if test -z "$CC"; then
2669 # Extract the first word of "cc", so it can be a program name with args.
2670set dummy cc; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2672$as_echo_n "checking for $ac_word... " >&6; }
2673if ${ac_cv_prog_CC+:} false; then :
2674 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002675else
2676 if test -n "$CC"; then
2677 ac_cv_prog_CC="$CC" # Let the user override the test.
2678else
2679 ac_prog_rejected=no
2680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2681for as_dir in $PATH
2682do
2683 IFS=$as_save_IFS
2684 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002685 for ac_exec_ext in '' $ac_executable_extensions; do
2686 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002687 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2688 ac_prog_rejected=yes
2689 continue
2690 fi
2691 ac_cv_prog_CC="cc"
JP Abgrall511eca32014-02-12 13:46:45 -08002692 $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 -08002693 break 2
2694 fi
2695done
JP Abgrall511eca32014-02-12 13:46:45 -08002696 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002697IFS=$as_save_IFS
2698
2699if test $ac_prog_rejected = yes; then
2700 # We found a bogon in the path, so make sure we never use it.
2701 set dummy $ac_cv_prog_CC
2702 shift
2703 if test $# != 0; then
2704 # We chose a different compiler from the bogus one.
2705 # However, it has the same basename, so the bogon will be chosen
2706 # first if we set CC to just the basename; use the full file name.
2707 shift
2708 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2709 fi
2710fi
2711fi
2712fi
2713CC=$ac_cv_prog_CC
2714if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2716$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002717else
JP Abgrall511eca32014-02-12 13:46:45 -08002718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2719$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002720fi
2721
2722
2723fi
2724if test -z "$CC"; then
2725 if test -n "$ac_tool_prefix"; then
2726 for ac_prog in cl.exe
2727 do
2728 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2729set dummy $ac_tool_prefix$ac_prog; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2731$as_echo_n "checking for $ac_word... " >&6; }
2732if ${ac_cv_prog_CC+:} false; then :
2733 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002734else
2735 if test -n "$CC"; then
2736 ac_cv_prog_CC="$CC" # Let the user override the test.
2737else
2738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2739for as_dir in $PATH
2740do
2741 IFS=$as_save_IFS
2742 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002743 for ac_exec_ext in '' $ac_executable_extensions; do
2744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002745 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
JP Abgrall511eca32014-02-12 13:46:45 -08002746 $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 -08002747 break 2
2748 fi
2749done
JP Abgrall511eca32014-02-12 13:46:45 -08002750 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002751IFS=$as_save_IFS
2752
2753fi
2754fi
2755CC=$ac_cv_prog_CC
2756if test -n "$CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2758$as_echo "$CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002759else
JP Abgrall511eca32014-02-12 13:46:45 -08002760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2761$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002762fi
2763
2764
2765 test -n "$CC" && break
2766 done
2767fi
2768if test -z "$CC"; then
2769 ac_ct_CC=$CC
2770 for ac_prog in cl.exe
2771do
2772 # Extract the first word of "$ac_prog", so it can be a program name with args.
2773set dummy $ac_prog; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08002774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2775$as_echo_n "checking for $ac_word... " >&6; }
2776if ${ac_cv_prog_ac_ct_CC+:} false; then :
2777 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002778else
2779 if test -n "$ac_ct_CC"; then
2780 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2781else
2782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2783for as_dir in $PATH
2784do
2785 IFS=$as_save_IFS
2786 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08002787 for ac_exec_ext in '' $ac_executable_extensions; do
2788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002789 ac_cv_prog_ac_ct_CC="$ac_prog"
JP Abgrall511eca32014-02-12 13:46:45 -08002790 $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 -08002791 break 2
2792 fi
2793done
JP Abgrall511eca32014-02-12 13:46:45 -08002794 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002795IFS=$as_save_IFS
2796
2797fi
2798fi
2799ac_ct_CC=$ac_cv_prog_ac_ct_CC
2800if test -n "$ac_ct_CC"; then
JP Abgrall511eca32014-02-12 13:46:45 -08002801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2802$as_echo "$ac_ct_CC" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002803else
JP Abgrall511eca32014-02-12 13:46:45 -08002804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2805$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002806fi
2807
2808
2809 test -n "$ac_ct_CC" && break
2810done
2811
2812 if test "x$ac_ct_CC" = x; then
2813 CC=""
2814 else
2815 case $cross_compiling:$ac_tool_warned in
2816yes:)
JP Abgrall511eca32014-02-12 13:46:45 -08002817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002819ac_tool_warned=yes ;;
2820esac
2821 CC=$ac_ct_CC
2822 fi
2823fi
2824
2825fi
2826
2827
JP Abgrall511eca32014-02-12 13:46:45 -08002828test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2830as_fn_error $? "no acceptable C compiler found in \$PATH
2831See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002832
2833# Provide some information about the compiler.
JP Abgrall511eca32014-02-12 13:46:45 -08002834$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2835set X $ac_compile
2836ac_compiler=$2
2837for ac_option in --version -v -V -qversion; do
2838 { { ac_try="$ac_compiler $ac_option >&5"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002839case "(($ac_try" in
2840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2841 *) ac_try_echo=$ac_try;;
2842esac
JP Abgrall511eca32014-02-12 13:46:45 -08002843eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2844$as_echo "$ac_try_echo"; } >&5
2845 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002846 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08002847 if test -s conftest.err; then
2848 sed '10a\
2849... rest of stderr output deleted ...
2850 10q' conftest.err >conftest.er1
2851 cat conftest.er1 >&5
2852 fi
2853 rm -f conftest.er1 conftest.err
2854 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2855 test $ac_status = 0; }
2856done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002857
JP Abgrall511eca32014-02-12 13:46:45 -08002858cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002859/* end confdefs.h. */
2860
2861int
2862main ()
2863{
2864
2865 ;
2866 return 0;
2867}
2868_ACEOF
2869ac_clean_files_save=$ac_clean_files
JP Abgrall511eca32014-02-12 13:46:45 -08002870ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002871# Try to create an executable without -o first, disregard a.out.
2872# It will help us diagnose broken compilers, and finding out an intuition
2873# of exeext.
JP Abgrall511eca32014-02-12 13:46:45 -08002874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2875$as_echo_n "checking whether the C compiler works... " >&6; }
2876ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2877
2878# The possible output files:
2879ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2880
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002881ac_rmfiles=
2882for ac_file in $ac_files
2883do
2884 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08002885 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002886 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2887 esac
2888done
2889rm -f $ac_rmfiles
2890
JP Abgrall511eca32014-02-12 13:46:45 -08002891if { { ac_try="$ac_link_default"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002892case "(($ac_try" in
2893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2894 *) ac_try_echo=$ac_try;;
2895esac
JP Abgrall511eca32014-02-12 13:46:45 -08002896eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2897$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002898 (eval "$ac_link_default") 2>&5
2899 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08002900 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2901 test $ac_status = 0; }; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002902 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2903# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2904# in a Makefile. We should not override ac_cv_exeext if it was cached,
2905# so that the user can short-circuit this test for compilers unknown to
2906# Autoconf.
2907for ac_file in $ac_files ''
2908do
2909 test -f "$ac_file" || continue
2910 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08002911 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002912 ;;
2913 [ab].out )
2914 # We found the default executable, but exeext='' is most
2915 # certainly right.
2916 break;;
2917 *.* )
JP Abgrall511eca32014-02-12 13:46:45 -08002918 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002919 then :; else
2920 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2921 fi
2922 # We set ac_cv_exeext here because the later test for it is not
2923 # safe: cross compilers may not add the suffix if given an `-o'
2924 # argument, so we may need to know it at that point already.
2925 # Even if this section looks crufty: it has the advantage of
2926 # actually working.
2927 break;;
2928 * )
2929 break;;
2930 esac
2931done
2932test "$ac_cv_exeext" = no && ac_cv_exeext=
2933
2934else
2935 ac_file=''
2936fi
JP Abgrall511eca32014-02-12 13:46:45 -08002937if test -z "$ac_file"; then :
2938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2939$as_echo "no" >&6; }
2940$as_echo "$as_me: failed program was:" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002941sed 's/^/| /' conftest.$ac_ext >&5
2942
JP Abgrall511eca32014-02-12 13:46:45 -08002943{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2944$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2945as_fn_error 77 "C compiler cannot create executables
2946See \`config.log' for more details" "$LINENO" 5; }
2947else
2948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2949$as_echo "yes" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002950fi
JP Abgrall511eca32014-02-12 13:46:45 -08002951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2952$as_echo_n "checking for C compiler default output file name... " >&6; }
2953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2954$as_echo "$ac_file" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002955ac_exeext=$ac_cv_exeext
2956
JP Abgrall511eca32014-02-12 13:46:45 -08002957rm -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 -08002958ac_clean_files=$ac_clean_files_save
JP Abgrall511eca32014-02-12 13:46:45 -08002959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2960$as_echo_n "checking for suffix of executables... " >&6; }
2961if { { ac_try="$ac_link"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002962case "(($ac_try" in
2963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2964 *) ac_try_echo=$ac_try;;
2965esac
JP Abgrall511eca32014-02-12 13:46:45 -08002966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2967$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002968 (eval "$ac_link") 2>&5
2969 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08002970 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2971 test $ac_status = 0; }; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002972 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2973# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2974# work properly (i.e., refer to `conftest.exe'), while it won't with
2975# `rm'.
2976for ac_file in conftest.exe conftest conftest.*; do
2977 test -f "$ac_file" || continue
2978 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08002979 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002980 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2981 break;;
2982 * ) break;;
2983 esac
2984done
2985else
JP Abgrall511eca32014-02-12 13:46:45 -08002986 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2987$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2988as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2989See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002990fi
JP Abgrall511eca32014-02-12 13:46:45 -08002991rm -f conftest conftest$ac_cv_exeext
2992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2993$as_echo "$ac_cv_exeext" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08002994
2995rm -f conftest.$ac_ext
2996EXEEXT=$ac_cv_exeext
2997ac_exeext=$EXEEXT
JP Abgrall511eca32014-02-12 13:46:45 -08002998cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2999/* end confdefs.h. */
3000#include <stdio.h>
3001int
3002main ()
3003{
3004FILE *f = fopen ("conftest.out", "w");
3005 return ferror (f) || fclose (f) != 0;
3006
3007 ;
3008 return 0;
3009}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003010_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003011ac_clean_files="$ac_clean_files conftest.out"
3012# Check that the compiler produces executables we can run. If not, either
3013# the compiler is broken, or we cross compile.
3014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3015$as_echo_n "checking whether we are cross compiling... " >&6; }
3016if test "$cross_compiling" != yes; then
3017 { { ac_try="$ac_link"
3018case "(($ac_try" in
3019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3020 *) ac_try_echo=$ac_try;;
3021esac
3022eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3023$as_echo "$ac_try_echo"; } >&5
3024 (eval "$ac_link") 2>&5
3025 ac_status=$?
3026 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3027 test $ac_status = 0; }
3028 if { ac_try='./conftest$ac_cv_exeext'
3029 { { case "(($ac_try" in
3030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3031 *) ac_try_echo=$ac_try;;
3032esac
3033eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3034$as_echo "$ac_try_echo"; } >&5
3035 (eval "$ac_try") 2>&5
3036 ac_status=$?
3037 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3038 test $ac_status = 0; }; }; then
3039 cross_compiling=no
3040 else
3041 if test "$cross_compiling" = maybe; then
3042 cross_compiling=yes
3043 else
3044 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3045$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3046as_fn_error $? "cannot run C compiled programs.
3047If you meant to cross compile, use \`--host'.
3048See \`config.log' for more details" "$LINENO" 5; }
3049 fi
3050 fi
3051fi
3052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3053$as_echo "$cross_compiling" >&6; }
3054
3055rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3056ac_clean_files=$ac_clean_files_save
3057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3058$as_echo_n "checking for suffix of object files... " >&6; }
3059if ${ac_cv_objext+:} false; then :
3060 $as_echo_n "(cached) " >&6
3061else
3062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003063/* end confdefs.h. */
3064
3065int
3066main ()
3067{
3068
3069 ;
3070 return 0;
3071}
3072_ACEOF
3073rm -f conftest.o conftest.obj
JP Abgrall511eca32014-02-12 13:46:45 -08003074if { { ac_try="$ac_compile"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003075case "(($ac_try" in
3076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3077 *) ac_try_echo=$ac_try;;
3078esac
JP Abgrall511eca32014-02-12 13:46:45 -08003079eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3080$as_echo "$ac_try_echo"; } >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003081 (eval "$ac_compile") 2>&5
3082 ac_status=$?
JP Abgrall511eca32014-02-12 13:46:45 -08003083 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3084 test $ac_status = 0; }; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003085 for ac_file in conftest.o conftest.obj conftest.*; do
3086 test -f "$ac_file" || continue;
3087 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -08003088 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003089 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3090 break;;
3091 esac
3092done
3093else
JP Abgrall511eca32014-02-12 13:46:45 -08003094 $as_echo "$as_me: failed program was:" >&5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003095sed 's/^/| /' conftest.$ac_ext >&5
3096
JP Abgrall511eca32014-02-12 13:46:45 -08003097{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3098$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3099as_fn_error $? "cannot compute suffix of object files: cannot compile
3100See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003101fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003102rm -f conftest.$ac_cv_objext conftest.$ac_ext
3103fi
JP Abgrall511eca32014-02-12 13:46:45 -08003104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3105$as_echo "$ac_cv_objext" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003106OBJEXT=$ac_cv_objext
3107ac_objext=$OBJEXT
JP Abgrall511eca32014-02-12 13:46:45 -08003108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3109$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3110if ${ac_cv_c_compiler_gnu+:} false; then :
3111 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003112else
JP Abgrall511eca32014-02-12 13:46:45 -08003113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003114/* end confdefs.h. */
3115
3116int
3117main ()
3118{
3119#ifndef __GNUC__
3120 choke me
3121#endif
3122
3123 ;
3124 return 0;
3125}
3126_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003127if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003128 ac_compiler_gnu=yes
3129else
JP Abgrall511eca32014-02-12 13:46:45 -08003130 ac_compiler_gnu=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003131fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003132rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3133ac_cv_c_compiler_gnu=$ac_compiler_gnu
3134
3135fi
JP Abgrall511eca32014-02-12 13:46:45 -08003136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3137$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3138if test $ac_compiler_gnu = yes; then
3139 GCC=yes
3140else
3141 GCC=
3142fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003143ac_test_CFLAGS=${CFLAGS+set}
3144ac_save_CFLAGS=$CFLAGS
JP Abgrall511eca32014-02-12 13:46:45 -08003145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3146$as_echo_n "checking whether $CC accepts -g... " >&6; }
3147if ${ac_cv_prog_cc_g+:} false; then :
3148 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003149else
3150 ac_save_c_werror_flag=$ac_c_werror_flag
3151 ac_c_werror_flag=yes
3152 ac_cv_prog_cc_g=no
3153 CFLAGS="-g"
JP Abgrall511eca32014-02-12 13:46:45 -08003154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003155/* end confdefs.h. */
3156
3157int
3158main ()
3159{
3160
3161 ;
3162 return 0;
3163}
3164_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003165if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003166 ac_cv_prog_cc_g=yes
3167else
JP Abgrall511eca32014-02-12 13:46:45 -08003168 CFLAGS=""
3169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003170/* end confdefs.h. */
3171
3172int
3173main ()
3174{
3175
3176 ;
3177 return 0;
3178}
3179_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003180if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003181
JP Abgrall511eca32014-02-12 13:46:45 -08003182else
3183 ac_c_werror_flag=$ac_save_c_werror_flag
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003184 CFLAGS="-g"
JP Abgrall511eca32014-02-12 13:46:45 -08003185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003186/* end confdefs.h. */
3187
3188int
3189main ()
3190{
3191
3192 ;
3193 return 0;
3194}
3195_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003196if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003197 ac_cv_prog_cc_g=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003198fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3200fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3202fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3204 ac_c_werror_flag=$ac_save_c_werror_flag
3205fi
JP Abgrall511eca32014-02-12 13:46:45 -08003206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3207$as_echo "$ac_cv_prog_cc_g" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003208if test "$ac_test_CFLAGS" = set; then
3209 CFLAGS=$ac_save_CFLAGS
3210elif test $ac_cv_prog_cc_g = yes; then
3211 if test "$GCC" = yes; then
3212 CFLAGS="-g -O2"
3213 else
3214 CFLAGS="-g"
3215 fi
3216else
3217 if test "$GCC" = yes; then
3218 CFLAGS="-O2"
3219 else
3220 CFLAGS=
3221 fi
3222fi
JP Abgrall511eca32014-02-12 13:46:45 -08003223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3224$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3225if ${ac_cv_prog_cc_c89+:} false; then :
3226 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003227else
3228 ac_cv_prog_cc_c89=no
3229ac_save_CC=$CC
JP Abgrall511eca32014-02-12 13:46:45 -08003230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003231/* end confdefs.h. */
3232#include <stdarg.h>
3233#include <stdio.h>
JP Abgrall511eca32014-02-12 13:46:45 -08003234struct stat;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003235/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3236struct buf { int x; };
3237FILE * (*rcsopen) (struct buf *, struct stat *, int);
3238static char *e (p, i)
3239 char **p;
3240 int i;
3241{
3242 return p[i];
3243}
3244static char *f (char * (*g) (char **, int), char **p, ...)
3245{
3246 char *s;
3247 va_list v;
3248 va_start (v,p);
3249 s = g (p, va_arg (v,int));
3250 va_end (v);
3251 return s;
3252}
3253
3254/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3255 function prototypes and stuff, but not '\xHH' hex character constants.
3256 These don't provoke an error unfortunately, instead are silently treated
3257 as 'x'. The following induces an error, until -std is added to get
3258 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3259 array size at least. It's necessary to write '\x00'==0 to get something
3260 that's true only with -std. */
3261int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3262
3263/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3264 inside strings and character constants. */
3265#define FOO(x) 'x'
3266int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3267
3268int test (int i, double x);
3269struct s1 {int (*f) (int a);};
3270struct s2 {int (*f) (double a);};
3271int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3272int argc;
3273char **argv;
3274int
3275main ()
3276{
3277return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3278 ;
3279 return 0;
3280}
3281_ACEOF
3282for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3283 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3284do
3285 CC="$ac_save_CC $ac_arg"
JP Abgrall511eca32014-02-12 13:46:45 -08003286 if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003287 ac_cv_prog_cc_c89=$ac_arg
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003288fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003289rm -f core conftest.err conftest.$ac_objext
3290 test "x$ac_cv_prog_cc_c89" != "xno" && break
3291done
3292rm -f conftest.$ac_ext
3293CC=$ac_save_CC
3294
3295fi
3296# AC_CACHE_VAL
3297case "x$ac_cv_prog_cc_c89" in
3298 x)
JP Abgrall511eca32014-02-12 13:46:45 -08003299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3300$as_echo "none needed" >&6; } ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003301 xno)
JP Abgrall511eca32014-02-12 13:46:45 -08003302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3303$as_echo "unsupported" >&6; } ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003304 *)
3305 CC="$CC $ac_cv_prog_cc_c89"
JP Abgrall511eca32014-02-12 13:46:45 -08003306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3307$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003308esac
JP Abgrall511eca32014-02-12 13:46:45 -08003309if test "x$ac_cv_prog_cc_c89" != xno; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003310
JP Abgrall511eca32014-02-12 13:46:45 -08003311fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003312
3313ac_ext=c
3314ac_cpp='$CPP $CPPFLAGS'
3315ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3316ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3317ac_compiler_gnu=$ac_cv_c_compiler_gnu
3318
JP Abgrall511eca32014-02-12 13:46:45 -08003319
3320
3321
3322
Elliott Hughes965a4b52017-05-15 10:37:39 -07003323
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003324 if test "$GCC" = yes ; then
JP Abgrall511eca32014-02-12 13:46:45 -08003325 #
3326 # -Werror forces warnings to be errors.
3327 #
3328 ac_lbl_cc_force_warning_errors=-Werror
Elliott Hughes965a4b52017-05-15 10:37:39 -07003329
3330 #
3331 # Try to have the compiler default to hiding symbols,
3332 # so that only symbols explicitly exported with
3333 # PCAP_API will be visible outside (shared) libraries.
3334 #
3335
3336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3337$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3338 save_CFLAGS="$CFLAGS"
3339 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3340 then
3341 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3342 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3343 then
3344 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3345 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3346 then
3347 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3348 else
3349 CFLAGS="$CFLAGS -fvisibility=hidden"
3350 fi
3351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3352/* end confdefs.h. */
3353
3354int
3355main ()
3356{
3357return 0
3358 ;
3359 return 0;
3360}
3361_ACEOF
3362if ac_fn_c_try_compile "$LINENO"; then :
3363
3364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3365$as_echo "yes" >&6; }
3366 CFLAGS="$save_CFLAGS"
3367 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3368
3369else
3370
3371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3372$as_echo "no" >&6; }
3373 CFLAGS="$save_CFLAGS"
3374
3375fi
3376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3377
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003378 else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003379 V_INCLS="$V_INCLS -I/usr/local/include"
3380 LDFLAGS="$LDFLAGS -L/usr/local/lib"
3381
JP Abgrall511eca32014-02-12 13:46:45 -08003382 case "$host_os" in
3383
3384 darwin*)
3385 #
3386 # This is assumed either to be GCC or clang, both
3387 # of which use -Werror to force warnings to be errors.
3388 #
3389 ac_lbl_cc_force_warning_errors=-Werror
Elliott Hughes965a4b52017-05-15 10:37:39 -07003390
3391 #
3392 # Try to have the compiler default to hiding symbols,
3393 # so that only symbols explicitly exported with
3394 # PCAP_API will be visible outside (shared) libraries.
3395 #
3396
3397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5
3398$as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; }
3399 save_CFLAGS="$CFLAGS"
3400 if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null
3401 then
3402 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden"
3403 elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null
3404 then
3405 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3406 elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null
3407 then
3408 CFLAGS="$CFLAGS -Werror -fvisibility=hidden"
3409 else
3410 CFLAGS="$CFLAGS -fvisibility=hidden"
3411 fi
3412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3413/* end confdefs.h. */
3414
3415int
3416main ()
3417{
3418return 0
3419 ;
3420 return 0;
3421}
3422_ACEOF
3423if ac_fn_c_try_compile "$LINENO"; then :
3424
3425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3426$as_echo "yes" >&6; }
3427 CFLAGS="$save_CFLAGS"
3428 V_CCOPT="$V_CCOPT -fvisibility=hidden"
3429
3430else
3431
3432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3433$as_echo "no" >&6; }
3434 CFLAGS="$save_CFLAGS"
3435
3436fi
3437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3438
JP Abgrall511eca32014-02-12 13:46:45 -08003439 ;;
3440
3441 hpux*)
3442 #
3443 # HP C, which is what we presume we're using, doesn't
3444 # exit with a non-zero exit status if we hand it an
3445 # invalid -W flag, can't be forced to do so even with
3446 # +We, and doesn't handle GCC-style -W flags, so we
3447 # don't want to try using GCC-style -W flags.
3448 #
3449 ac_lbl_cc_dont_try_gcc_dashW=yes
3450 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003451
3452 irix*)
JP Abgrall511eca32014-02-12 13:46:45 -08003453 #
3454 # MIPS C, which is what we presume we're using, doesn't
3455 # necessarily exit with a non-zero exit status if we
3456 # hand it an invalid -W flag, can't be forced to do
3457 # so, and doesn't handle GCC-style -W flags, so we
3458 # don't want to try using GCC-style -W flags.
3459 #
3460 ac_lbl_cc_dont_try_gcc_dashW=yes
3461 #
3462 # It also, apparently, defaults to "char" being
3463 # unsigned, unlike most other C implementations;
3464 # I suppose we could say "signed char" whenever
3465 # we want to guarantee a signed "char", but let's
3466 # just force signed chars.
3467 #
3468 # -xansi is normally the default, but the
3469 # configure script was setting it; perhaps -cckr
3470 # was the default in the Old Days. (Then again,
3471 # that would probably be for backwards compatibility
3472 # in the days when ANSI C was Shiny and New, i.e.
3473 # 1989 and the early '90's, so maybe we can just
3474 # drop support for those compilers.)
3475 #
3476 # -g is equivalent to -g2, which turns off
3477 # optimization; we choose -g3, which generates
3478 # debugging information but doesn't turn off
3479 # optimization (even if the optimization would
3480 # cause inaccuracies in debugging).
3481 #
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003482 V_CCOPT="$V_CCOPT -xansi -signed -g3"
3483 ;;
3484
3485 osf*)
JP Abgrall511eca32014-02-12 13:46:45 -08003486 #
3487 # Presumed to be DEC OSF/1, Digital UNIX, or
3488 # Tru64 UNIX.
3489 #
3490 # The DEC C compiler, which is what we presume we're
3491 # using, doesn't exit with a non-zero exit status if we
3492 # hand it an invalid -W flag, can't be forced to do
3493 # so, and doesn't handle GCC-style -W flags, so we
3494 # don't want to try using GCC-style -W flags.
3495 #
3496 ac_lbl_cc_dont_try_gcc_dashW=yes
3497 #
3498 # -g is equivalent to -g2, which turns off
3499 # optimization; we choose -g3, which generates
3500 # debugging information but doesn't turn off
3501 # optimization (even if the optimization would
3502 # cause inaccuracies in debugging).
3503 #
3504 V_CCOPT="$V_CCOPT -g3"
3505 ;;
3506
3507 solaris*)
3508 #
3509 # Assumed to be Sun C, which requires -errwarn to force
3510 # warnings to be treated as errors.
3511 #
3512 ac_lbl_cc_force_warning_errors=-errwarn
Elliott Hughes965a4b52017-05-15 10:37:39 -07003513
3514 #
3515 # Try to have the compiler default to hiding symbols,
3516 # so that only symbols explicitly exported with
3517 # PCAP_API will be visible outside (shared) libraries.
3518 #
3519
3520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5
3521$as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; }
3522 save_CFLAGS="$CFLAGS"
3523 if expr "x-xldscope=hidden" : "x-W.*" >/dev/null
3524 then
3525 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden"
3526 elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null
3527 then
3528 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
3529 elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null
3530 then
3531 CFLAGS="$CFLAGS -Werror -xldscope=hidden"
3532 else
3533 CFLAGS="$CFLAGS -xldscope=hidden"
3534 fi
3535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3536/* end confdefs.h. */
3537
3538int
3539main ()
3540{
3541return 0
3542 ;
3543 return 0;
3544}
3545_ACEOF
3546if ac_fn_c_try_compile "$LINENO"; then :
3547
3548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3549$as_echo "yes" >&6; }
3550 CFLAGS="$save_CFLAGS"
3551 V_CCOPT="$V_CCOPT -xldscope=hidden"
3552
3553else
3554
3555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3556$as_echo "no" >&6; }
3557 CFLAGS="$save_CFLAGS"
3558
3559fi
3560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3561
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003562 ;;
3563
3564 ultrix*)
JP Abgrall511eca32014-02-12 13:46:45 -08003565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5
3566$as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; }
3567 if ${ac_cv_lbl_cc_const_proto+:} false; then :
3568 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003569else
Elliott Hughes965a4b52017-05-15 10:37:39 -07003570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003571/* end confdefs.h. */
3572#include <sys/types.h>
3573int
3574main ()
3575{
3576struct a { int b; };
3577 void c(const struct a *)
3578 ;
3579 return 0;
3580}
3581_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003582if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003583 ac_cv_lbl_cc_const_proto=yes
3584else
JP Abgrall511eca32014-02-12 13:46:45 -08003585 ac_cv_lbl_cc_const_proto=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003586fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3588fi
3589
JP Abgrall511eca32014-02-12 13:46:45 -08003590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5
3591$as_echo "$ac_cv_lbl_cc_const_proto" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003592 if test $ac_cv_lbl_cc_const_proto = no ; then
JP Abgrall511eca32014-02-12 13:46:45 -08003593
3594$as_echo "#define const /**/" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003595
3596 fi
3597 ;;
3598 esac
JP Abgrall511eca32014-02-12 13:46:45 -08003599 V_CCOPT="$V_CCOPT -O"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003600 fi
3601
JP Abgrall511eca32014-02-12 13:46:45 -08003602
3603 if test "$GCC" = yes ; then
3604 #
3605 # On platforms where we build a shared library:
3606 #
3607 # add options to generate position-independent code,
3608 # if necessary (it's the default in AIX and Darwin/OS X);
3609 #
3610 # define option to set the soname of the shared library,
3611 # if the OS supports that;
3612 #
3613 # add options to specify, at link time, a directory to
3614 # add to the run-time search path, if that's necessary.
3615 #
3616 V_SHLIB_CMD="\$(CC)"
3617 V_SHLIB_OPT="-shared"
3618 case "$host_os" in
3619
3620 aix*)
3621 ;;
3622
3623 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*)
3624 #
3625 # Platforms where the linker is the GNU linker
3626 # or accepts command-line arguments like
3627 # those the GNU linker accepts.
3628 #
3629 # Some instruction sets require -fPIC on some
3630 # operating systems. Check for them. If you
3631 # have a combination that requires it, add it
3632 # here.
3633 #
3634 PIC_OPT=-fpic
3635 case "$host_cpu" in
3636
3637 sparc64*)
3638 case "$host_os" in
3639
3640 freebsd*|openbsd*)
3641 PIC_OPT=-fPIC
3642 ;;
3643 esac
3644 ;;
3645 esac
3646 V_CCOPT="$V_CCOPT $PIC_OPT"
3647 V_SONAME_OPT="-Wl,-soname,"
3648 V_RPATH_OPT="-Wl,-rpath,"
3649 ;;
3650
3651 hpux*)
3652 V_CCOPT="$V_CCOPT -fpic"
3653 #
3654 # XXX - this assumes GCC is using the HP linker,
3655 # rather than the GNU linker, and that the "+h"
3656 # option is used on all HP-UX platforms, both .sl
3657 # and .so.
3658 #
3659 V_SONAME_OPT="-Wl,+h,"
3660 #
3661 # By default, directories specifed with -L
3662 # are added to the run-time search path, so
3663 # we don't add them in pcap-config.
3664 #
3665 ;;
3666
3667 solaris*)
3668 V_CCOPT="$V_CCOPT -fpic"
3669 #
3670 # XXX - this assumes GCC is using the Sun linker,
3671 # rather than the GNU linker.
3672 #
3673 V_SONAME_OPT="-Wl,-h,"
3674 V_RPATH_OPT="-Wl,-R,"
3675 ;;
3676 esac
3677 else
3678 #
3679 # Set the appropriate compiler flags and, on platforms
3680 # where we build a shared library:
3681 #
3682 # add options to generate position-independent code,
3683 # if necessary (it's the default in Darwin/OS X);
3684 #
3685 # if we generate ".so" shared libraries, define the
3686 # appropriate options for building the shared library;
3687 #
3688 # add options to specify, at link time, a directory to
3689 # add to the run-time search path, if that's necessary.
3690 #
3691 # Note: spaces after V_SONAME_OPT are significant; on
3692 # some platforms the soname is passed with a GCC-like
3693 # "-Wl,-soname,{soname}" option, with the soname part
3694 # of the option, while on other platforms the C compiler
3695 # driver takes it as a regular option with the soname
3696 # following the option. The same applies to V_RPATH_OPT.
3697 #
3698 case "$host_os" in
3699
3700 aix*)
3701 V_SHLIB_CMD="\$(CC)"
3702 V_SHLIB_OPT="-G -bnoentry -bexpall"
3703 ;;
3704
3705 freebsd*|netbsd*|openbsd*|dragonfly*|linux*)
3706 #
3707 # "cc" is GCC.
3708 #
3709 V_CCOPT="$V_CCOPT -fpic"
3710 V_SHLIB_CMD="\$(CC)"
3711 V_SHLIB_OPT="-shared"
3712 V_SONAME_OPT="-Wl,-soname,"
3713 V_RPATH_OPT="-Wl,-rpath,"
3714 ;;
3715
3716 hpux*)
3717 V_CCOPT="$V_CCOPT +z"
3718 V_SHLIB_CMD="\$(LD)"
3719 V_SHLIB_OPT="-b"
3720 V_SONAME_OPT="+h "
3721 #
3722 # By default, directories specifed with -L
3723 # are added to the run-time search path, so
3724 # we don't add them in pcap-config.
3725 #
3726 ;;
3727
3728 osf*)
3729 #
3730 # Presumed to be DEC OSF/1, Digital UNIX, or
3731 # Tru64 UNIX.
3732 #
3733 V_SHLIB_CMD="\$(CC)"
3734 V_SHLIB_OPT="-shared"
3735 V_SONAME_OPT="-soname "
3736 V_RPATH_OPT="-rpath "
3737 ;;
3738
3739 solaris*)
3740 V_CCOPT="$V_CCOPT -Kpic"
3741 V_SHLIB_CMD="\$(CC)"
3742 V_SHLIB_OPT="-G"
3743 V_SONAME_OPT="-h "
3744 V_RPATH_OPT="-R"
3745 ;;
3746 esac
3747 fi
3748
3749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
3750$as_echo_n "checking for inline... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003751 save_CFLAGS="$CFLAGS"
3752 CFLAGS="$V_CCOPT"
JP Abgrall511eca32014-02-12 13:46:45 -08003753 if ${ac_cv_lbl_inline+:} false; then :
3754 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003755else
3756
3757 ac_cv_lbl_inline=""
3758 ac_lbl_cc_inline=no
3759 for ac_lbl_inline in inline __inline__ __inline
3760 do
JP Abgrall511eca32014-02-12 13:46:45 -08003761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003762/* end confdefs.h. */
3763#define inline $ac_lbl_inline
3764 static inline struct iltest *foo(void);
3765 struct iltest {
3766 int iltest1;
3767 int iltest2;
3768 };
3769
3770 static inline struct iltest *
3771 foo()
3772 {
3773 static struct iltest xxx;
3774
3775 return &xxx;
3776 }
3777int
3778main ()
3779{
3780
3781 ;
3782 return 0;
3783}
3784_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003785if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003786 ac_lbl_cc_inline=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003787fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3789 if test "$ac_lbl_cc_inline" = yes ; then
3790 break;
3791 fi
3792 done
3793 if test "$ac_lbl_cc_inline" = yes ; then
3794 ac_cv_lbl_inline=$ac_lbl_inline
3795 fi
3796fi
3797
3798 CFLAGS="$save_CFLAGS"
3799 if test ! -z "$ac_cv_lbl_inline" ; then
JP Abgrall511eca32014-02-12 13:46:45 -08003800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5
3801$as_echo "$ac_cv_lbl_inline" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003802 else
JP Abgrall511eca32014-02-12 13:46:45 -08003803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3804$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003805 fi
3806
3807cat >>confdefs.h <<_ACEOF
3808#define inline $ac_cv_lbl_inline
3809_ACEOF
3810
3811
JP Abgrall511eca32014-02-12 13:46:45 -08003812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5
3813$as_echo_n "checking for __attribute__... " >&6; }
3814if ${ac_cv___attribute__+:} false; then :
3815 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003816else
3817
JP Abgrall511eca32014-02-12 13:46:45 -08003818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003819/* end confdefs.h. */
3820
JP Abgrall511eca32014-02-12 13:46:45 -08003821
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003822#include <stdlib.h>
3823
3824static void foo(void) __attribute__ ((noreturn));
3825
3826static void
3827foo(void)
3828{
3829 exit(1);
3830}
3831
3832int
3833main(int argc, char **argv)
3834{
3835 foo();
3836}
3837
3838_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003839if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003840 ac_cv___attribute__=yes
3841else
JP Abgrall511eca32014-02-12 13:46:45 -08003842 ac_cv___attribute__=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003843fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3845fi
3846
3847if test "$ac_cv___attribute__" = "yes"; then
3848
JP Abgrall511eca32014-02-12 13:46:45 -08003849$as_echo "#define HAVE___ATTRIBUTE__ 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003850
JP Abgrall511eca32014-02-12 13:46:45 -08003851else
3852 #
3853 # We can't use __attribute__, so we can't use __attribute__((unused)),
3854 # so we define _U_ to an empty string.
3855 #
3856 V_DEFS="$V_DEFS -D_U_=\"\""
3857fi
3858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5
3859$as_echo "$ac_cv___attribute__" >&6; }
3860
3861if test "$ac_cv___attribute__" = "yes"; then
3862
3863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((unused)) can be used without warnings" >&5
3864$as_echo_n "checking whether __attribute__((unused)) can be used without warnings... " >&6; }
3865if ${ac_cv___attribute___unused+:} false; then :
3866 $as_echo_n "(cached) " >&6
3867else
3868
3869save_CFLAGS="$CFLAGS"
3870CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3871cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3872/* end confdefs.h. */
3873
3874
3875#include <stdlib.h>
3876#include <stdio.h>
3877
3878int
3879main(int argc __attribute((unused)), char **argv __attribute((unused)))
3880{
3881 printf("Hello, world!\n");
3882 return 0;
3883}
3884
3885_ACEOF
3886if ac_fn_c_try_compile "$LINENO"; then :
3887 ac_cv___attribute___unused=yes
3888else
3889 ac_cv___attribute___unused=no
3890fi
3891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3892fi
3893
3894CFLAGS="$save_CFLAGS"
3895if test "$ac_cv___attribute___unused" = "yes"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003896 V_DEFS="$V_DEFS -D_U_=\"__attribute__((unused))\""
3897else
3898 V_DEFS="$V_DEFS -D_U_=\"\""
3899fi
JP Abgrall511eca32014-02-12 13:46:45 -08003900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___unused" >&5
3901$as_echo "$ac_cv___attribute___unused" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003902
3903
JP Abgrall511eca32014-02-12 13:46:45 -08003904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __attribute__((format)) can be used without warnings" >&5
3905$as_echo_n "checking whether __attribute__((format)) can be used without warnings... " >&6; }
3906if ${ac_cv___attribute___format+:} false; then :
3907 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003908else
JP Abgrall511eca32014-02-12 13:46:45 -08003909
3910save_CFLAGS="$CFLAGS"
3911CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors"
3912cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003913/* end confdefs.h. */
3914
JP Abgrall511eca32014-02-12 13:46:45 -08003915
3916#include <stdlib.h>
3917
3918extern int foo(const char *fmt, ...)
3919 __attribute__ ((format (printf, 1, 2)));
3920
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003921int
JP Abgrall511eca32014-02-12 13:46:45 -08003922main(int argc, char **argv)
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003923{
JP Abgrall511eca32014-02-12 13:46:45 -08003924 foo("%s", "test");
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003925}
JP Abgrall511eca32014-02-12 13:46:45 -08003926
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003927_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003928if ac_fn_c_try_compile "$LINENO"; then :
3929 ac_cv___attribute___format=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003930else
JP Abgrall511eca32014-02-12 13:46:45 -08003931 ac_cv___attribute___format=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003932fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003933rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3934fi
3935
JP Abgrall511eca32014-02-12 13:46:45 -08003936CFLAGS="$save_CFLAGS"
3937if test "$ac_cv___attribute___format" = "yes"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003938
JP Abgrall511eca32014-02-12 13:46:45 -08003939$as_echo "#define __ATTRIBUTE___FORMAT_OK 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003940
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003941fi
JP Abgrall511eca32014-02-12 13:46:45 -08003942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute___format" >&5
3943$as_echo "$ac_cv___attribute___format" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003944
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003945fi
3946
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003947ac_ext=c
3948ac_cpp='$CPP $CPPFLAGS'
3949ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3950ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3951ac_compiler_gnu=$ac_cv_c_compiler_gnu
JP Abgrall511eca32014-02-12 13:46:45 -08003952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3953$as_echo_n "checking how to run the C preprocessor... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003954# On Suns, sometimes $CPP names a directory.
3955if test -n "$CPP" && test -d "$CPP"; then
3956 CPP=
3957fi
3958if test -z "$CPP"; then
JP Abgrall511eca32014-02-12 13:46:45 -08003959 if ${ac_cv_prog_CPP+:} false; then :
3960 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003961else
3962 # Double quotes because CPP needs to be expanded
3963 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3964 do
3965 ac_preproc_ok=false
3966for ac_c_preproc_warn_flag in '' yes
3967do
3968 # Use a header file that comes with gcc, so configuring glibc
3969 # with a fresh cross-compiler works.
3970 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3971 # <limits.h> exists even on freestanding compilers.
3972 # On the NeXT, cc -E runs the code through the compiler's parser,
3973 # not just through cpp. "Syntax error" is here to catch this case.
JP Abgrall511eca32014-02-12 13:46:45 -08003974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003975/* end confdefs.h. */
3976#ifdef __STDC__
3977# include <limits.h>
3978#else
3979# include <assert.h>
3980#endif
3981 Syntax error
3982_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003983if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003984
JP Abgrall511eca32014-02-12 13:46:45 -08003985else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003986 # Broken: fails on valid input.
3987continue
3988fi
JP Abgrall511eca32014-02-12 13:46:45 -08003989rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003990
3991 # OK, works on sane cases. Now check whether nonexistent headers
3992 # can be detected and how.
JP Abgrall511eca32014-02-12 13:46:45 -08003993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003994/* end confdefs.h. */
3995#include <ac_nonexistent.h>
3996_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08003997if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08003998 # Broken: success on invalid input.
3999continue
4000else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004001 # Passes both tests.
4002ac_preproc_ok=:
4003break
4004fi
JP Abgrall511eca32014-02-12 13:46:45 -08004005rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004006
4007done
4008# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
JP Abgrall511eca32014-02-12 13:46:45 -08004009rm -f conftest.i conftest.err conftest.$ac_ext
4010if $ac_preproc_ok; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004011 break
4012fi
4013
4014 done
4015 ac_cv_prog_CPP=$CPP
4016
4017fi
4018 CPP=$ac_cv_prog_CPP
4019else
4020 ac_cv_prog_CPP=$CPP
4021fi
JP Abgrall511eca32014-02-12 13:46:45 -08004022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4023$as_echo "$CPP" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004024ac_preproc_ok=false
4025for ac_c_preproc_warn_flag in '' yes
4026do
4027 # Use a header file that comes with gcc, so configuring glibc
4028 # with a fresh cross-compiler works.
4029 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4030 # <limits.h> exists even on freestanding compilers.
4031 # On the NeXT, cc -E runs the code through the compiler's parser,
4032 # not just through cpp. "Syntax error" is here to catch this case.
JP Abgrall511eca32014-02-12 13:46:45 -08004033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004034/* end confdefs.h. */
4035#ifdef __STDC__
4036# include <limits.h>
4037#else
4038# include <assert.h>
4039#endif
4040 Syntax error
4041_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004042if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004043
JP Abgrall511eca32014-02-12 13:46:45 -08004044else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004045 # Broken: fails on valid input.
4046continue
4047fi
JP Abgrall511eca32014-02-12 13:46:45 -08004048rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004049
4050 # OK, works on sane cases. Now check whether nonexistent headers
4051 # can be detected and how.
JP Abgrall511eca32014-02-12 13:46:45 -08004052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004053/* end confdefs.h. */
4054#include <ac_nonexistent.h>
4055_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004056if ac_fn_c_try_cpp "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004057 # Broken: success on invalid input.
4058continue
4059else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004060 # Passes both tests.
4061ac_preproc_ok=:
4062break
4063fi
JP Abgrall511eca32014-02-12 13:46:45 -08004064rm -f conftest.err conftest.i conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004065
4066done
4067# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
JP Abgrall511eca32014-02-12 13:46:45 -08004068rm -f conftest.i conftest.err conftest.$ac_ext
4069if $ac_preproc_ok; then :
4070
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004071else
JP Abgrall511eca32014-02-12 13:46:45 -08004072 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4073$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4074as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4075See \`config.log' for more details" "$LINENO" 5; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004076fi
4077
4078ac_ext=c
4079ac_cpp='$CPP $CPPFLAGS'
4080ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4081ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4082ac_compiler_gnu=$ac_cv_c_compiler_gnu
4083
4084
JP Abgrall511eca32014-02-12 13:46:45 -08004085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4086$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4087if ${ac_cv_path_GREP+:} false; then :
4088 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004089else
JP Abgrall511eca32014-02-12 13:46:45 -08004090 if test -z "$GREP"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004091 ac_path_GREP_found=false
JP Abgrall511eca32014-02-12 13:46:45 -08004092 # Loop through the user's path and test for each of PROGNAME-LIST
4093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004094for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4095do
4096 IFS=$as_save_IFS
4097 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08004098 for ac_prog in grep ggrep; do
4099 for ac_exec_ext in '' $ac_executable_extensions; do
4100 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4101 as_fn_executable_p "$ac_path_GREP" || continue
4102# Check for GNU ac_path_GREP and select it if it is found.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004103 # Check for GNU $ac_path_GREP
4104case `"$ac_path_GREP" --version 2>&1` in
4105*GNU*)
4106 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4107*)
4108 ac_count=0
JP Abgrall511eca32014-02-12 13:46:45 -08004109 $as_echo_n 0123456789 >"conftest.in"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004110 while :
4111 do
4112 cat "conftest.in" "conftest.in" >"conftest.tmp"
4113 mv "conftest.tmp" "conftest.in"
4114 cp "conftest.in" "conftest.nl"
JP Abgrall511eca32014-02-12 13:46:45 -08004115 $as_echo 'GREP' >> "conftest.nl"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004116 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4117 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
JP Abgrall511eca32014-02-12 13:46:45 -08004118 as_fn_arith $ac_count + 1 && ac_count=$as_val
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004119 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4120 # Best one so far, save it but keep looking for a better one
4121 ac_cv_path_GREP="$ac_path_GREP"
4122 ac_path_GREP_max=$ac_count
4123 fi
4124 # 10*(2^10) chars as input seems more than enough
4125 test $ac_count -gt 10 && break
4126 done
4127 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4128esac
4129
JP Abgrall511eca32014-02-12 13:46:45 -08004130 $ac_path_GREP_found && break 3
4131 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004132 done
JP Abgrall511eca32014-02-12 13:46:45 -08004133 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004134IFS=$as_save_IFS
JP Abgrall511eca32014-02-12 13:46:45 -08004135 if test -z "$ac_cv_path_GREP"; then
4136 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4137 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004138else
4139 ac_cv_path_GREP=$GREP
4140fi
4141
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004142fi
JP Abgrall511eca32014-02-12 13:46:45 -08004143{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4144$as_echo "$ac_cv_path_GREP" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004145 GREP="$ac_cv_path_GREP"
4146
4147
JP Abgrall511eca32014-02-12 13:46:45 -08004148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4149$as_echo_n "checking for egrep... " >&6; }
4150if ${ac_cv_path_EGREP+:} false; then :
4151 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004152else
4153 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4154 then ac_cv_path_EGREP="$GREP -E"
4155 else
JP Abgrall511eca32014-02-12 13:46:45 -08004156 if test -z "$EGREP"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004157 ac_path_EGREP_found=false
JP Abgrall511eca32014-02-12 13:46:45 -08004158 # Loop through the user's path and test for each of PROGNAME-LIST
4159 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004160for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4161do
4162 IFS=$as_save_IFS
4163 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08004164 for ac_prog in egrep; do
4165 for ac_exec_ext in '' $ac_executable_extensions; do
4166 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4167 as_fn_executable_p "$ac_path_EGREP" || continue
4168# Check for GNU ac_path_EGREP and select it if it is found.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004169 # Check for GNU $ac_path_EGREP
4170case `"$ac_path_EGREP" --version 2>&1` in
4171*GNU*)
4172 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4173*)
4174 ac_count=0
JP Abgrall511eca32014-02-12 13:46:45 -08004175 $as_echo_n 0123456789 >"conftest.in"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004176 while :
4177 do
4178 cat "conftest.in" "conftest.in" >"conftest.tmp"
4179 mv "conftest.tmp" "conftest.in"
4180 cp "conftest.in" "conftest.nl"
JP Abgrall511eca32014-02-12 13:46:45 -08004181 $as_echo 'EGREP' >> "conftest.nl"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004182 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4183 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
JP Abgrall511eca32014-02-12 13:46:45 -08004184 as_fn_arith $ac_count + 1 && ac_count=$as_val
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004185 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4186 # Best one so far, save it but keep looking for a better one
4187 ac_cv_path_EGREP="$ac_path_EGREP"
4188 ac_path_EGREP_max=$ac_count
4189 fi
4190 # 10*(2^10) chars as input seems more than enough
4191 test $ac_count -gt 10 && break
4192 done
4193 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4194esac
4195
JP Abgrall511eca32014-02-12 13:46:45 -08004196 $ac_path_EGREP_found && break 3
4197 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004198 done
JP Abgrall511eca32014-02-12 13:46:45 -08004199 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004200IFS=$as_save_IFS
JP Abgrall511eca32014-02-12 13:46:45 -08004201 if test -z "$ac_cv_path_EGREP"; then
4202 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4203 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004204else
4205 ac_cv_path_EGREP=$EGREP
4206fi
4207
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004208 fi
4209fi
JP Abgrall511eca32014-02-12 13:46:45 -08004210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4211$as_echo "$ac_cv_path_EGREP" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004212 EGREP="$ac_cv_path_EGREP"
4213
4214
JP Abgrall511eca32014-02-12 13:46:45 -08004215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4216$as_echo_n "checking for ANSI C header files... " >&6; }
4217if ${ac_cv_header_stdc+:} false; then :
4218 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004219else
JP Abgrall511eca32014-02-12 13:46:45 -08004220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004221/* end confdefs.h. */
4222#include <stdlib.h>
4223#include <stdarg.h>
4224#include <string.h>
4225#include <float.h>
4226
4227int
4228main ()
4229{
4230
4231 ;
4232 return 0;
4233}
4234_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004235if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004236 ac_cv_header_stdc=yes
4237else
JP Abgrall511eca32014-02-12 13:46:45 -08004238 ac_cv_header_stdc=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004239fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4241
4242if test $ac_cv_header_stdc = yes; then
4243 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
JP Abgrall511eca32014-02-12 13:46:45 -08004244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004245/* end confdefs.h. */
4246#include <string.h>
4247
4248_ACEOF
4249if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall511eca32014-02-12 13:46:45 -08004250 $EGREP "memchr" >/dev/null 2>&1; then :
4251
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004252else
4253 ac_cv_header_stdc=no
4254fi
4255rm -f conftest*
4256
4257fi
4258
4259if test $ac_cv_header_stdc = yes; then
4260 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
JP Abgrall511eca32014-02-12 13:46:45 -08004261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004262/* end confdefs.h. */
4263#include <stdlib.h>
4264
4265_ACEOF
4266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
JP Abgrall511eca32014-02-12 13:46:45 -08004267 $EGREP "free" >/dev/null 2>&1; then :
4268
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004269else
4270 ac_cv_header_stdc=no
4271fi
4272rm -f conftest*
4273
4274fi
4275
4276if test $ac_cv_header_stdc = yes; then
4277 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
JP Abgrall511eca32014-02-12 13:46:45 -08004278 if test "$cross_compiling" = yes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004279 :
4280else
JP Abgrall511eca32014-02-12 13:46:45 -08004281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004282/* end confdefs.h. */
4283#include <ctype.h>
4284#include <stdlib.h>
4285#if ((' ' & 0x0FF) == 0x020)
4286# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4287# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4288#else
4289# define ISLOWER(c) \
4290 (('a' <= (c) && (c) <= 'i') \
4291 || ('j' <= (c) && (c) <= 'r') \
4292 || ('s' <= (c) && (c) <= 'z'))
4293# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4294#endif
4295
4296#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4297int
4298main ()
4299{
4300 int i;
4301 for (i = 0; i < 256; i++)
4302 if (XOR (islower (i), ISLOWER (i))
4303 || toupper (i) != TOUPPER (i))
4304 return 2;
4305 return 0;
4306}
4307_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004308if ac_fn_c_try_run "$LINENO"; then :
4309
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004310else
JP Abgrall511eca32014-02-12 13:46:45 -08004311 ac_cv_header_stdc=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004312fi
JP Abgrall511eca32014-02-12 13:46:45 -08004313rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4314 conftest.$ac_objext conftest.beam conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004315fi
4316
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004317fi
4318fi
JP Abgrall511eca32014-02-12 13:46:45 -08004319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4320$as_echo "$ac_cv_header_stdc" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004321if test $ac_cv_header_stdc = yes; then
4322
JP Abgrall511eca32014-02-12 13:46:45 -08004323$as_echo "#define STDC_HEADERS 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004324
4325fi
4326
4327# On IRIX 5.3, sys/types and inttypes.h are conflicting.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004328for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4329 inttypes.h stdint.h unistd.h
JP Abgrall511eca32014-02-12 13:46:45 -08004330do :
4331 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4332ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4333"
4334if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004335 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004336#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004337_ACEOF
4338
4339fi
4340
4341done
4342
4343
JP Abgrall511eca32014-02-12 13:46:45 -08004344for ac_header in sys/bitypes.h
4345do :
4346 ac_fn_c_check_header_mongrel "$LINENO" "sys/bitypes.h" "ac_cv_header_sys_bitypes_h" "$ac_includes_default"
4347if test "x$ac_cv_header_sys_bitypes_h" = xyes; then :
4348 cat >>confdefs.h <<_ACEOF
4349#define HAVE_SYS_BITYPES_H 1
4350_ACEOF
4351
4352fi
4353
4354done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004355
4356
JP Abgrall511eca32014-02-12 13:46:45 -08004357ac_fn_c_check_type "$LINENO" "int8_t" "ac_cv_type_int8_t" "$ac_includes_default
4358#ifdef HAVE_SYS_BITYPES_H
4359#include <sys/bitypes.h>
4360#endif
4361"
4362if test "x$ac_cv_type_int8_t" = xyes; then :
4363
4364else
4365
4366$as_echo "#define int8_t signed char" >>confdefs.h
4367
4368fi
4369
4370ac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default
4371#ifdef HAVE_SYS_BITYPES_H
4372#include <sys/bitypes.h>
4373#endif
4374"
4375if test "x$ac_cv_type_u_int8_t" = xyes; then :
4376
4377else
4378
4379$as_echo "#define u_int8_t unsigned char" >>confdefs.h
4380
4381fi
4382
4383ac_fn_c_check_type "$LINENO" "int16_t" "ac_cv_type_int16_t" "$ac_includes_default"
4384if test "x$ac_cv_type_int16_t" = xyes; then :
4385
4386else
4387
4388$as_echo "#define int16_t short" >>confdefs.h
4389
4390 $ac_includes_default
4391#ifdef HAVE_SYS_BITYPES_H
4392#include <sys/bitypes.h>
4393#endif
4394fi
4395
4396ac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default
4397#ifdef HAVE_SYS_BITYPES_H
4398#include <sys/bitypes.h>
4399#endif
4400"
4401if test "x$ac_cv_type_u_int16_t" = xyes; then :
4402
4403else
4404
4405$as_echo "#define u_int16_t unsigned short" >>confdefs.h
4406
4407fi
4408
4409ac_fn_c_check_type "$LINENO" "int32_t" "ac_cv_type_int32_t" "$ac_includes_default
4410#ifdef HAVE_SYS_BITYPES_H
4411#include <sys/bitypes.h>
4412#endif
4413"
4414if test "x$ac_cv_type_int32_t" = xyes; then :
4415
4416else
4417
4418$as_echo "#define int32_t int" >>confdefs.h
4419
4420fi
4421
4422ac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default
4423#ifdef HAVE_SYS_BITYPES_H
4424#include <sys/bitypes.h>
4425#endif
4426"
4427if test "x$ac_cv_type_u_int32_t" = xyes; then :
4428
4429else
4430
4431$as_echo "#define u_int32_t unsigned int" >>confdefs.h
4432
4433fi
4434
4435ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default
4436#ifdef HAVE_SYS_BITYPES_H
4437#include <sys/bitypes.h>
4438#endif
4439"
4440if test "x$ac_cv_type_int64_t" = xyes; then :
4441
4442else
4443
4444$as_echo "#define int64_t long long" >>confdefs.h
4445
4446fi
4447
4448ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default
4449#ifdef HAVE_SYS_BITYPES_H
4450#include <sys/bitypes.h>
4451#endif
4452"
4453if test "x$ac_cv_type_u_int64_t" = xyes; then :
4454
4455else
4456
4457$as_echo "#define u_int64_t unsigned long long" >>confdefs.h
4458
4459fi
4460
4461
4462#
4463# Try to arrange for large file support.
4464#
4465# Check whether --enable-largefile was given.
4466if test "${enable_largefile+set}" = set; then :
4467 enableval=$enable_largefile;
4468fi
4469
4470if test "$enable_largefile" != no; then
4471
4472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4473$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4474if ${ac_cv_sys_largefile_CC+:} false; then :
4475 $as_echo_n "(cached) " >&6
4476else
4477 ac_cv_sys_largefile_CC=no
4478 if test "$GCC" != yes; then
4479 ac_save_CC=$CC
4480 while :; do
4481 # IRIX 6.2 and later do not support large files by default,
4482 # so use the C compiler's -n32 option if that helps.
4483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4484/* end confdefs.h. */
4485#include <sys/types.h>
4486 /* Check that off_t can represent 2**63 - 1 correctly.
4487 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4488 since some C++ compilers masquerading as C compilers
4489 incorrectly reject 9223372036854775807. */
4490#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4491 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4492 && LARGE_OFF_T % 2147483647 == 1)
4493 ? 1 : -1];
4494int
4495main ()
4496{
4497
4498 ;
4499 return 0;
4500}
4501_ACEOF
4502 if ac_fn_c_try_compile "$LINENO"; then :
4503 break
4504fi
4505rm -f core conftest.err conftest.$ac_objext
4506 CC="$CC -n32"
4507 if ac_fn_c_try_compile "$LINENO"; then :
4508 ac_cv_sys_largefile_CC=' -n32'; break
4509fi
4510rm -f core conftest.err conftest.$ac_objext
4511 break
4512 done
4513 CC=$ac_save_CC
4514 rm -f conftest.$ac_ext
4515 fi
4516fi
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4518$as_echo "$ac_cv_sys_largefile_CC" >&6; }
4519 if test "$ac_cv_sys_largefile_CC" != no; then
4520 CC=$CC$ac_cv_sys_largefile_CC
4521 fi
4522
4523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4524$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4525if ${ac_cv_sys_file_offset_bits+:} false; then :
4526 $as_echo_n "(cached) " >&6
4527else
4528 while :; do
4529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4530/* end confdefs.h. */
4531#include <sys/types.h>
4532 /* Check that off_t can represent 2**63 - 1 correctly.
4533 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4534 since some C++ compilers masquerading as C compilers
4535 incorrectly reject 9223372036854775807. */
4536#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4537 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4538 && LARGE_OFF_T % 2147483647 == 1)
4539 ? 1 : -1];
4540int
4541main ()
4542{
4543
4544 ;
4545 return 0;
4546}
4547_ACEOF
4548if ac_fn_c_try_compile "$LINENO"; then :
4549 ac_cv_sys_file_offset_bits=no; break
4550fi
4551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4553/* end confdefs.h. */
4554#define _FILE_OFFSET_BITS 64
4555#include <sys/types.h>
4556 /* Check that off_t can represent 2**63 - 1 correctly.
4557 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4558 since some C++ compilers masquerading as C compilers
4559 incorrectly reject 9223372036854775807. */
4560#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4561 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4562 && LARGE_OFF_T % 2147483647 == 1)
4563 ? 1 : -1];
4564int
4565main ()
4566{
4567
4568 ;
4569 return 0;
4570}
4571_ACEOF
4572if ac_fn_c_try_compile "$LINENO"; then :
4573 ac_cv_sys_file_offset_bits=64; break
4574fi
4575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4576 ac_cv_sys_file_offset_bits=unknown
4577 break
4578done
4579fi
4580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4581$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4582case $ac_cv_sys_file_offset_bits in #(
4583 no | unknown) ;;
4584 *)
4585cat >>confdefs.h <<_ACEOF
4586#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4587_ACEOF
4588;;
4589esac
4590rm -rf conftest*
4591 if test $ac_cv_sys_file_offset_bits = unknown; then
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4593$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4594if ${ac_cv_sys_large_files+:} false; then :
4595 $as_echo_n "(cached) " >&6
4596else
4597 while :; do
4598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4599/* end confdefs.h. */
4600#include <sys/types.h>
4601 /* Check that off_t can represent 2**63 - 1 correctly.
4602 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4603 since some C++ compilers masquerading as C compilers
4604 incorrectly reject 9223372036854775807. */
4605#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4606 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4607 && LARGE_OFF_T % 2147483647 == 1)
4608 ? 1 : -1];
4609int
4610main ()
4611{
4612
4613 ;
4614 return 0;
4615}
4616_ACEOF
4617if ac_fn_c_try_compile "$LINENO"; then :
4618 ac_cv_sys_large_files=no; break
4619fi
4620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4622/* end confdefs.h. */
4623#define _LARGE_FILES 1
4624#include <sys/types.h>
4625 /* Check that off_t can represent 2**63 - 1 correctly.
4626 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4627 since some C++ compilers masquerading as C compilers
4628 incorrectly reject 9223372036854775807. */
4629#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4630 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4631 && LARGE_OFF_T % 2147483647 == 1)
4632 ? 1 : -1];
4633int
4634main ()
4635{
4636
4637 ;
4638 return 0;
4639}
4640_ACEOF
4641if ac_fn_c_try_compile "$LINENO"; then :
4642 ac_cv_sys_large_files=1; break
4643fi
4644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4645 ac_cv_sys_large_files=unknown
4646 break
4647done
4648fi
4649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4650$as_echo "$ac_cv_sys_large_files" >&6; }
4651case $ac_cv_sys_large_files in #(
4652 no | unknown) ;;
4653 *)
4654cat >>confdefs.h <<_ACEOF
4655#define _LARGE_FILES $ac_cv_sys_large_files
4656_ACEOF
4657;;
4658esac
4659rm -rf conftest*
4660 fi
4661
4662
4663fi
4664
4665{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
4666$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
4667if ${ac_cv_sys_largefile_source+:} false; then :
4668 $as_echo_n "(cached) " >&6
4669else
4670 while :; do
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672/* end confdefs.h. */
4673#include <sys/types.h> /* for off_t */
4674 #include <stdio.h>
4675int
4676main ()
4677{
4678int (*fp) (FILE *, off_t, int) = fseeko;
4679 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4680 ;
4681 return 0;
4682}
4683_ACEOF
4684if ac_fn_c_try_link "$LINENO"; then :
4685 ac_cv_sys_largefile_source=no; break
4686fi
4687rm -f core conftest.err conftest.$ac_objext \
4688 conftest$ac_exeext conftest.$ac_ext
4689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4690/* end confdefs.h. */
4691#define _LARGEFILE_SOURCE 1
4692#include <sys/types.h> /* for off_t */
4693 #include <stdio.h>
4694int
4695main ()
4696{
4697int (*fp) (FILE *, off_t, int) = fseeko;
4698 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
4699 ;
4700 return 0;
4701}
4702_ACEOF
4703if ac_fn_c_try_link "$LINENO"; then :
4704 ac_cv_sys_largefile_source=1; break
4705fi
4706rm -f core conftest.err conftest.$ac_objext \
4707 conftest$ac_exeext conftest.$ac_ext
4708 ac_cv_sys_largefile_source=unknown
4709 break
4710done
4711fi
4712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
4713$as_echo "$ac_cv_sys_largefile_source" >&6; }
4714case $ac_cv_sys_largefile_source in #(
4715 no | unknown) ;;
4716 *)
4717cat >>confdefs.h <<_ACEOF
4718#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
4719_ACEOF
4720;;
4721esac
4722rm -rf conftest*
4723
4724# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
4725# in glibc 2.1.3, but that breaks too many other things.
4726# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
4727if test $ac_cv_sys_largefile_source != unknown; then
4728
4729$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
4730
4731fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004732
4733
Elliott Hughes965a4b52017-05-15 10:37:39 -07004734for ac_header in sys/ioccom.h sys/select.h sys/sockio.h limits.h
JP Abgrall511eca32014-02-12 13:46:45 -08004735do :
4736 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4737ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4738if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004739 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004740#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004741_ACEOF
4742
4743fi
4744
4745done
4746
JP Abgrall511eca32014-02-12 13:46:45 -08004747for ac_header in linux/types.h
4748do :
4749 ac_fn_c_check_header_mongrel "$LINENO" "linux/types.h" "ac_cv_header_linux_types_h" "$ac_includes_default"
4750if test "x$ac_cv_header_linux_types_h" = xyes; then :
4751 cat >>confdefs.h <<_ACEOF
4752#define HAVE_LINUX_TYPES_H 1
4753_ACEOF
4754
4755fi
4756
4757done
4758
4759for ac_header in linux/if_packet.h netpacket/packet.h netpacket/if_packet.h
4760do :
4761 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4762ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
4763if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4764 cat >>confdefs.h <<_ACEOF
4765#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4766_ACEOF
4767
4768fi
4769
4770done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004771
4772for ac_header in net/pfvar.h
JP Abgrall511eca32014-02-12 13:46:45 -08004773do :
4774 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 -08004775#include <sys/socket.h>
4776#include <net/if.h>
JP Abgrall511eca32014-02-12 13:46:45 -08004777"
4778if test "x$ac_cv_header_net_pfvar_h" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004779 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004780#define HAVE_NET_PFVAR_H 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004781_ACEOF
4782
4783fi
4784
4785done
4786
JP Abgrall511eca32014-02-12 13:46:45 -08004787if test "$ac_cv_header_net_pfvar_h" = yes; then
4788 #
4789 # Check for various PF actions.
4790 #
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5
4792$as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; }
4793 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004794/* end confdefs.h. */
4795#include <sys/types.h>
JP Abgrall511eca32014-02-12 13:46:45 -08004796 #include <sys/socket.h>
4797 #include <net/if.h>
4798 #include <net/pfvar.h>
4799int
4800main ()
4801{
4802return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR;
4803 ;
4804 return 0;
4805}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004806_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004807if ac_fn_c_try_compile "$LINENO"; then :
4808
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4810$as_echo "yes" >&6; }
4811
4812$as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h
4813
4814
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004815else
JP Abgrall511eca32014-02-12 13:46:45 -08004816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4817$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004818fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4820fi
JP Abgrall511eca32014-02-12 13:46:45 -08004821for ac_header in netinet/if_ether.h
4822do :
4823 ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
4824#include <sys/socket.h>
4825"
4826if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004827 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004828#define HAVE_NETINET_IF_ETHER_H 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004829_ACEOF
4830
4831fi
4832
4833done
4834
4835if test "$ac_cv_header_netinet_if_ether_h" != yes; then
4836 #
4837 # The simple test didn't work.
4838 # Do we need to include <net/if.h> first?
4839 # Unset ac_cv_header_netinet_if_ether_h so we don't
4840 # treat the previous failure as a cached value and
4841 # suppress the next test.
4842 #
JP Abgrall511eca32014-02-12 13:46:45 -08004843 { $as_echo "$as_me:${as_lineno-$LINENO}: Rechecking with some additional includes" >&5
4844$as_echo "$as_me: Rechecking with some additional includes" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004845 unset ac_cv_header_netinet_if_ether_h
JP Abgrall511eca32014-02-12 13:46:45 -08004846 for ac_header in netinet/if_ether.h
4847do :
4848 ac_fn_c_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#include <sys/types.h>
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004849#include <sys/socket.h>
4850#include <netinet/in.h>
4851struct mbuf;
4852struct rtentry;
4853#include <net/if.h>
JP Abgrall511eca32014-02-12 13:46:45 -08004854"
4855if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004856 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004857#define HAVE_NETINET_IF_ETHER_H 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004858_ACEOF
4859
4860fi
4861
4862done
4863
4864fi
4865
Elliott Hughesd8845d72015-10-19 18:07:04 -07004866case "$host_os" in
Elliott Hughes965a4b52017-05-15 10:37:39 -07004867linux*|uclinux*)
Elliott Hughesd8845d72015-10-19 18:07:04 -07004868 for ac_header in linux/sockios.h linux/if_bonding.h
4869do :
4870 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4871ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
4872#include <sys/socket.h>
4873#include <linux/if.h>
4874
4875"
4876if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4877 cat >>confdefs.h <<_ACEOF
4878#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4879_ACEOF
4880
4881fi
4882
4883done
4884
4885 ;;
4886esac
4887
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004888if test "$GCC" = yes ; then
JP Abgrall511eca32014-02-12 13:46:45 -08004889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5
4890$as_echo_n "checking for ANSI ioctl definitions... " >&6; }
4891 if ${ac_cv_lbl_gcc_fixincludes+:} false; then :
4892 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004893else
JP Abgrall511eca32014-02-12 13:46:45 -08004894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004895/* end confdefs.h. */
4896/*
4897 * This generates a "duplicate case value" when fixincludes
4898 * has not be run.
4899 */
4900# include <sys/types.h>
4901# include <sys/time.h>
4902# include <sys/ioctl.h>
4903# ifdef HAVE_SYS_IOCCOM_H
4904# include <sys/ioccom.h>
4905# endif
4906int
4907main ()
4908{
4909switch (0) {
4910 case _IO('A', 1):;
4911 case _IO('B', 1):;
4912 }
4913 ;
4914 return 0;
4915}
4916_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004917if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004918 ac_cv_lbl_gcc_fixincludes=yes
4919else
JP Abgrall511eca32014-02-12 13:46:45 -08004920 ac_cv_lbl_gcc_fixincludes=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004921fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923fi
4924
JP Abgrall511eca32014-02-12 13:46:45 -08004925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5
4926$as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004927 if test $ac_cv_lbl_gcc_fixincludes = no ; then
4928 # Don't cache failure
4929 unset ac_cv_lbl_gcc_fixincludes
JP Abgrall511eca32014-02-12 13:46:45 -08004930 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004931 fi
4932 fi
4933
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004934for ac_func in strerror strlcpy
JP Abgrall511eca32014-02-12 13:46:45 -08004935do :
4936 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4937ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4938if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004939 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004940#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004941_ACEOF
4942
4943fi
4944done
4945
4946
4947needsnprintf=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004948for ac_func in vsnprintf snprintf
JP Abgrall511eca32014-02-12 13:46:45 -08004949do :
4950 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
4951ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
4952if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004953 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08004954#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004955_ACEOF
4956
4957else
4958 needsnprintf=yes
4959fi
4960done
4961
4962if test $needsnprintf = yes; then
4963 case " $LIBOBJS " in
4964 *" snprintf.$ac_objext "* ) ;;
4965 *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
4966 ;;
4967esac
4968
4969fi
4970
Elliott Hughes965a4b52017-05-15 10:37:39 -07004971needstrtok_r=no
4972for ac_func in strtok_r
4973do :
4974 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r"
4975if test "x$ac_cv_func_strtok_r" = xyes; then :
4976 cat >>confdefs.h <<_ACEOF
4977#define HAVE_STRTOK_R 1
4978_ACEOF
4979
4980else
4981 needstrtok_r=yes
4982fi
4983done
4984
4985if test $needstrtok_r = yes; then
4986 case " $LIBOBJS " in
4987 *" strtok_r.$ac_objext "* ) ;;
4988 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext"
4989 ;;
4990esac
4991
4992fi
4993
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08004994#
4995# Do this before checking for ether_hostton(), as it's a
4996# "gethostbyname() -ish function".
4997#
4998
4999 # Most operating systems have gethostbyname() in the default searched
5000 # libraries (i.e. libc):
5001 # Some OSes (eg. Solaris) place it in libnsl
5002 # Some strange OSes (SINIX) have it in libsocket:
JP Abgrall511eca32014-02-12 13:46:45 -08005003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
5004$as_echo_n "checking for library containing gethostbyname... " >&6; }
5005if ${ac_cv_search_gethostbyname+:} false; then :
5006 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005007else
5008 ac_func_search_save_LIBS=$LIBS
JP Abgrall511eca32014-02-12 13:46:45 -08005009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005010/* end confdefs.h. */
5011
5012/* Override any GCC internal prototype to avoid an error.
5013 Use char because int might match the return type of a GCC
5014 builtin and then its argument prototype would still apply. */
5015#ifdef __cplusplus
5016extern "C"
5017#endif
5018char gethostbyname ();
5019int
5020main ()
5021{
5022return gethostbyname ();
5023 ;
5024 return 0;
5025}
5026_ACEOF
5027for ac_lib in '' nsl socket resolv; do
5028 if test -z "$ac_lib"; then
5029 ac_res="none required"
5030 else
5031 ac_res=-l$ac_lib
5032 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5033 fi
JP Abgrall511eca32014-02-12 13:46:45 -08005034 if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005035 ac_cv_search_gethostbyname=$ac_res
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005036fi
JP Abgrall511eca32014-02-12 13:46:45 -08005037rm -f core conftest.err conftest.$ac_objext \
5038 conftest$ac_exeext
5039 if ${ac_cv_search_gethostbyname+:} false; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005040 break
5041fi
5042done
JP Abgrall511eca32014-02-12 13:46:45 -08005043if ${ac_cv_search_gethostbyname+:} false; then :
5044
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005045else
5046 ac_cv_search_gethostbyname=no
5047fi
5048rm conftest.$ac_ext
5049LIBS=$ac_func_search_save_LIBS
5050fi
JP Abgrall511eca32014-02-12 13:46:45 -08005051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
5052$as_echo "$ac_cv_search_gethostbyname" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005053ac_res=$ac_cv_search_gethostbyname
JP Abgrall511eca32014-02-12 13:46:45 -08005054if test "$ac_res" != no; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005055 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5056
5057fi
5058
5059 # Unfortunately libsocket sometimes depends on libnsl and
5060 # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this.
5061 if test "$ac_cv_search_gethostbyname" = "no"
5062 then
JP Abgrall511eca32014-02-12 13:46:45 -08005063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lsocket" >&5
5064$as_echo_n "checking for gethostbyname in -lsocket... " >&6; }
5065if ${ac_cv_lib_socket_gethostbyname+:} false; then :
5066 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005067else
5068 ac_check_lib_save_LIBS=$LIBS
5069LIBS="-lsocket -lnsl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005071/* end confdefs.h. */
5072
5073/* Override any GCC internal prototype to avoid an error.
5074 Use char because int might match the return type of a GCC
5075 builtin and then its argument prototype would still apply. */
5076#ifdef __cplusplus
5077extern "C"
5078#endif
5079char gethostbyname ();
5080int
5081main ()
5082{
5083return gethostbyname ();
5084 ;
5085 return 0;
5086}
5087_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005088if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005089 ac_cv_lib_socket_gethostbyname=yes
5090else
JP Abgrall511eca32014-02-12 13:46:45 -08005091 ac_cv_lib_socket_gethostbyname=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005092fi
JP Abgrall511eca32014-02-12 13:46:45 -08005093rm -f core conftest.err conftest.$ac_objext \
5094 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005095LIBS=$ac_check_lib_save_LIBS
5096fi
JP Abgrall511eca32014-02-12 13:46:45 -08005097{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyname" >&5
5098$as_echo "$ac_cv_lib_socket_gethostbyname" >&6; }
5099if test "x$ac_cv_lib_socket_gethostbyname" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005100 LIBS="-lsocket -lnsl $LIBS"
5101fi
5102
5103 fi
JP Abgrall511eca32014-02-12 13:46:45 -08005104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5
5105$as_echo_n "checking for library containing socket... " >&6; }
5106if ${ac_cv_search_socket+:} false; then :
5107 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005108else
5109 ac_func_search_save_LIBS=$LIBS
JP Abgrall511eca32014-02-12 13:46:45 -08005110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005111/* end confdefs.h. */
5112
5113/* Override any GCC internal prototype to avoid an error.
5114 Use char because int might match the return type of a GCC
5115 builtin and then its argument prototype would still apply. */
5116#ifdef __cplusplus
5117extern "C"
5118#endif
5119char socket ();
5120int
5121main ()
5122{
5123return socket ();
5124 ;
5125 return 0;
5126}
5127_ACEOF
5128for ac_lib in '' socket; do
5129 if test -z "$ac_lib"; then
5130 ac_res="none required"
5131 else
5132 ac_res=-l$ac_lib
5133 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5134 fi
JP Abgrall511eca32014-02-12 13:46:45 -08005135 if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005136 ac_cv_search_socket=$ac_res
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005137fi
JP Abgrall511eca32014-02-12 13:46:45 -08005138rm -f core conftest.err conftest.$ac_objext \
5139 conftest$ac_exeext
5140 if ${ac_cv_search_socket+:} false; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005141 break
5142fi
5143done
JP Abgrall511eca32014-02-12 13:46:45 -08005144if ${ac_cv_search_socket+:} false; then :
5145
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005146else
5147 ac_cv_search_socket=no
5148fi
5149rm conftest.$ac_ext
5150LIBS=$ac_func_search_save_LIBS
5151fi
JP Abgrall511eca32014-02-12 13:46:45 -08005152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5
5153$as_echo "$ac_cv_search_socket" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005154ac_res=$ac_cv_search_socket
JP Abgrall511eca32014-02-12 13:46:45 -08005155if test "$ac_res" != no; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005156 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5157
5158else
JP Abgrall511eca32014-02-12 13:46:45 -08005159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5
5160$as_echo_n "checking for socket in -lsocket... " >&6; }
5161if ${ac_cv_lib_socket_socket+:} false; then :
5162 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005163else
5164 ac_check_lib_save_LIBS=$LIBS
5165LIBS="-lsocket -lnsl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005166cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005167/* end confdefs.h. */
5168
5169/* Override any GCC internal prototype to avoid an error.
5170 Use char because int might match the return type of a GCC
5171 builtin and then its argument prototype would still apply. */
5172#ifdef __cplusplus
5173extern "C"
5174#endif
5175char socket ();
5176int
5177main ()
5178{
5179return socket ();
5180 ;
5181 return 0;
5182}
5183_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005184if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005185 ac_cv_lib_socket_socket=yes
5186else
JP Abgrall511eca32014-02-12 13:46:45 -08005187 ac_cv_lib_socket_socket=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005188fi
JP Abgrall511eca32014-02-12 13:46:45 -08005189rm -f core conftest.err conftest.$ac_objext \
5190 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005191LIBS=$ac_check_lib_save_LIBS
5192fi
JP Abgrall511eca32014-02-12 13:46:45 -08005193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5
5194$as_echo "$ac_cv_lib_socket_socket" >&6; }
5195if test "x$ac_cv_lib_socket_socket" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005196 LIBS="-lsocket -lnsl $LIBS"
5197fi
5198
5199fi
5200
5201 # DLPI needs putmsg under HPUX so test for -lstr while we're at it
JP Abgrall511eca32014-02-12 13:46:45 -08005202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5
5203$as_echo_n "checking for library containing putmsg... " >&6; }
5204if ${ac_cv_search_putmsg+:} false; then :
5205 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005206else
5207 ac_func_search_save_LIBS=$LIBS
JP Abgrall511eca32014-02-12 13:46:45 -08005208cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005209/* end confdefs.h. */
5210
5211/* Override any GCC internal prototype to avoid an error.
5212 Use char because int might match the return type of a GCC
5213 builtin and then its argument prototype would still apply. */
5214#ifdef __cplusplus
5215extern "C"
5216#endif
5217char putmsg ();
5218int
5219main ()
5220{
5221return putmsg ();
5222 ;
5223 return 0;
5224}
5225_ACEOF
5226for ac_lib in '' str; do
5227 if test -z "$ac_lib"; then
5228 ac_res="none required"
5229 else
5230 ac_res=-l$ac_lib
5231 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5232 fi
JP Abgrall511eca32014-02-12 13:46:45 -08005233 if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005234 ac_cv_search_putmsg=$ac_res
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005235fi
JP Abgrall511eca32014-02-12 13:46:45 -08005236rm -f core conftest.err conftest.$ac_objext \
5237 conftest$ac_exeext
5238 if ${ac_cv_search_putmsg+:} false; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005239 break
5240fi
5241done
JP Abgrall511eca32014-02-12 13:46:45 -08005242if ${ac_cv_search_putmsg+:} false; then :
5243
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005244else
5245 ac_cv_search_putmsg=no
5246fi
5247rm conftest.$ac_ext
5248LIBS=$ac_func_search_save_LIBS
5249fi
JP Abgrall511eca32014-02-12 13:46:45 -08005250{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5
5251$as_echo "$ac_cv_search_putmsg" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005252ac_res=$ac_cv_search_putmsg
JP Abgrall511eca32014-02-12 13:46:45 -08005253if test "$ac_res" != no; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005254 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
5255
5256fi
5257
5258
5259
5260#
5261# You are in a twisty little maze of UN*Xes, all different.
5262# Some might not have ether_hostton().
5263# Some might have it, but not declare it in any header file.
5264# Some might have it, but declare it in <netinet/if_ether.h>.
5265# Some might have it, but declare it in <netinet/ether.h>
5266# (And some might have it but document it as something declared in
5267# <netinet/ethernet.h>, although <netinet/if_ether.h> appears to work.)
5268#
5269# Before you is a C compiler.
5270#
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005271for ac_func in ether_hostton
JP Abgrall511eca32014-02-12 13:46:45 -08005272do :
5273 ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton"
5274if test "x$ac_cv_func_ether_hostton" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005275 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005276#define HAVE_ETHER_HOSTTON 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005277_ACEOF
5278
5279fi
5280done
5281
5282if test "$ac_cv_func_ether_hostton" = yes; then
5283 #
5284 # OK, we have ether_hostton(). Do we have <netinet/if_ether.h>?
5285 #
5286 if test "$ac_cv_header_netinet_if_ether_h" = yes; then
5287 #
5288 # Yes. Does it declare ether_hostton()?
5289 #
JP Abgrall511eca32014-02-12 13:46:45 -08005290 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005291#include <sys/types.h>
5292#include <sys/socket.h>
5293#include <netinet/in.h>
5294#include <arpa/inet.h>
5295struct mbuf;
5296struct rtentry;
5297#include <net/if.h>
5298#include <netinet/if_ether.h>
5299
JP Abgrall511eca32014-02-12 13:46:45 -08005300"
5301if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005302
5303
JP Abgrall511eca32014-02-12 13:46:45 -08005304$as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005305
5306
5307fi
5308
5309 fi
5310 #
5311 # Did that succeed?
5312 #
5313 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5314 #
5315 # No, how about <netinet/ether.h>, as on Linux?
5316 #
JP Abgrall511eca32014-02-12 13:46:45 -08005317 for ac_header in netinet/ether.h
5318do :
5319 ac_fn_c_check_header_mongrel "$LINENO" "netinet/ether.h" "ac_cv_header_netinet_ether_h" "$ac_includes_default"
5320if test "x$ac_cv_header_netinet_ether_h" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005321 cat >>confdefs.h <<_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08005322#define HAVE_NETINET_ETHER_H 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005323_ACEOF
5324
5325fi
5326
5327done
5328
5329 if test "$ac_cv_header_netinet_ether_h" = yes; then
5330 #
5331 # We have it - does it declare ether_hostton()?
5332 # Unset ac_cv_have_decl_ether_hostton so we don't
5333 # treat the previous failure as a cached value and
5334 # suppress the next test.
5335 #
5336 unset ac_cv_have_decl_ether_hostton
JP Abgrall511eca32014-02-12 13:46:45 -08005337 ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" "
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005338#include <netinet/ether.h>
5339
JP Abgrall511eca32014-02-12 13:46:45 -08005340"
5341if test "x$ac_cv_have_decl_ether_hostton" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005342
5343
JP Abgrall511eca32014-02-12 13:46:45 -08005344$as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005345
5346
5347fi
5348
5349 fi
5350 fi
5351 #
5352 # Is ether_hostton() declared?
5353 #
5354 if test "$ac_cv_have_decl_ether_hostton" != yes; then
5355 #
5356 # No, we'll have to declare it ourselves.
5357 # Do we have "struct ether_addr"?
5358 #
JP Abgrall511eca32014-02-12 13:46:45 -08005359 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" "
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005360#include <sys/types.h>
5361#include <sys/socket.h>
5362#include <netinet/in.h>
5363#include <arpa/inet.h>
5364struct mbuf;
5365struct rtentry;
5366#include <net/if.h>
5367#include <netinet/if_ether.h>
5368
JP Abgrall511eca32014-02-12 13:46:45 -08005369"
5370if test "x$ac_cv_type_struct_ether_addr" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005371
5372cat >>confdefs.h <<_ACEOF
5373#define HAVE_STRUCT_ETHER_ADDR 1
5374_ACEOF
5375
5376
5377fi
5378
5379
JP Abgrall511eca32014-02-12 13:46:45 -08005380$as_echo "#define HAVE_DECL_ETHER_HOSTTON 0" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005381
5382 else
5383
JP Abgrall511eca32014-02-12 13:46:45 -08005384$as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005385
5386 fi
5387fi
5388
JP Abgrall511eca32014-02-12 13:46:45 -08005389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5
5390$as_echo_n "checking if --disable-protochain option is specified... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005391# Check whether --enable-protochain was given.
JP Abgrall511eca32014-02-12 13:46:45 -08005392if test "${enable_protochain+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005393 enableval=$enable_protochain;
5394fi
5395
5396case "x$enable_protochain" in
5397xyes) enable_protochain=enabled ;;
5398xno) enable_protochain=disabled ;;
5399x) enable_protochain=enabled ;;
5400esac
5401
5402if test "$enable_protochain" = "disabled"; then
5403
JP Abgrall511eca32014-02-12 13:46:45 -08005404$as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005405
5406fi
JP Abgrall511eca32014-02-12 13:46:45 -08005407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5
5408$as_echo "${enable_protochain}" >&6; }
5409
5410#
Elliott Hughes965a4b52017-05-15 10:37:39 -07005411# valgrindtest directly uses the native capture mechanism, but
5412# only tests with BPF and PF_PACKET sockets; only enable it if
5413# we have BPF or PF_PACKET sockets.
5414#
5415VALGRINDTEST=
5416
5417#
JP Abgrall511eca32014-02-12 13:46:45 -08005418# SITA support is mutually exclusive with native capture support;
5419# "--with-sita" selects SITA support.
5420#
5421
5422# Check whether --with-sita was given.
5423if test "${with_sita+set}" = set; then :
5424 withval=$with_sita;
5425 if test ! "x$withval" = "xno" ; then
5426
5427$as_echo "#define SITA 1" >>confdefs.h
5428
5429 { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling SITA ACN support" >&5
5430$as_echo "$as_me: Enabling SITA ACN support" >&6;}
5431 V_PCAP=sita
JP Abgrall511eca32014-02-12 13:46:45 -08005432 fi
5433
5434else
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005435
5436if test -z "$with_pcap" && test "$cross_compiling" = yes; then
JP Abgrall511eca32014-02-12 13:46:45 -08005437 as_fn_error $? "pcap type not determined when cross-compiling; use --with-pcap=..." "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005438fi
5439
5440# Check whether --with-pcap was given.
JP Abgrall511eca32014-02-12 13:46:45 -08005441if test "${with_pcap+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005442 withval=$with_pcap;
5443fi
5444
JP Abgrall511eca32014-02-12 13:46:45 -08005445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5
5446$as_echo_n "checking packet capture type... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005447if test ! -z "$with_pcap" ; then
5448 V_PCAP="$withval"
JP Abgrall511eca32014-02-12 13:46:45 -08005449elif test -r /dev/bpf -o -h /dev/bpf ; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005450 #
5451 # Cloning BPF device.
5452 #
5453 V_PCAP=bpf
5454
JP Abgrall511eca32014-02-12 13:46:45 -08005455$as_echo "#define HAVE_CLONING_BPF 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005456
Elliott Hughes965a4b52017-05-15 10:37:39 -07005457
5458 #
5459 # We have BPF, so build valgrindtest with "make test".
5460 #
5461 VALGRINDTEST=valgrindtest
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005462elif test -r /dev/bpf0 ; then
5463 V_PCAP=bpf
Elliott Hughes965a4b52017-05-15 10:37:39 -07005464
5465 #
5466 # We have BPF, so build valgrindtest with "make test".
5467 #
5468 VALGRINDTEST=valgrindtest
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005469elif test -r /usr/include/net/pfilt.h ; then
5470 V_PCAP=pf
5471elif test -r /dev/enet ; then
5472 V_PCAP=enet
5473elif test -r /dev/nit ; then
5474 V_PCAP=snit
5475elif test -r /usr/include/sys/net/nit.h ; then
5476 V_PCAP=nit
5477elif test -r /usr/include/linux/socket.h ; then
5478 V_PCAP=linux
Elliott Hughes965a4b52017-05-15 10:37:39 -07005479
5480 #
5481 # XXX - this won't work with older kernels that have SOCK_PACKET
5482 # sockets but not PF_PACKET sockets.
5483 #
5484 VALGRINDTEST=valgrindtest
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005485elif test -r /usr/include/net/raw.h ; then
5486 V_PCAP=snoop
5487elif test -r /usr/include/odmi.h ; then
5488 #
5489 # On AIX, the BPF devices might not yet be present - they're
5490 # created the first time libpcap runs after booting.
5491 # We check for odmi.h instead.
5492 #
5493 V_PCAP=bpf
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005494elif test -c /dev/bpf0 ; then # check again in case not readable
5495 V_PCAP=bpf
Elliott Hughes965a4b52017-05-15 10:37:39 -07005496
5497 #
5498 # We have BPF, so build valgrindtest with "make test".
5499 #
5500 VALGRINDTEST=valgrindtest
JP Abgrall511eca32014-02-12 13:46:45 -08005501elif test -r /usr/include/sys/dlpi.h ; then
5502 V_PCAP=dlpi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08005503elif test -c /dev/enet ; then # check again in case not readable
5504 V_PCAP=enet
5505elif test -c /dev/nit ; then # check again in case not readable
5506 V_PCAP=snit
5507else
5508 V_PCAP=null
5509fi
JP Abgrall511eca32014-02-12 13:46:45 -08005510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5
5511$as_echo "$V_PCAP" >&6; }
5512
Elliott Hughes965a4b52017-05-15 10:37:39 -07005513
JP Abgrall511eca32014-02-12 13:46:45 -08005514#
5515# Do capture-mechanism-dependent tests.
5516#
5517case "$V_PCAP" in
5518dlpi)
5519 #
5520 # Needed for common functions used by pcap-[dlpi,libdlpi].c
5521 #
5522 SSRC="dlpisubs.c"
5523
5524 #
5525 # Checks for some header files.
5526 #
5527 for ac_header in sys/bufmod.h sys/dlpi_ext.h
5528do :
5529 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5530ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
5531if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5532 cat >>confdefs.h <<_ACEOF
5533#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5534_ACEOF
5535
5536fi
5537
5538done
5539
5540
5541 #
5542 # Checks to see if Solaris has the public libdlpi(3LIB) library.
5543 # Note: The existence of /usr/include/libdlpi.h does not mean it is the
5544 # public libdlpi(3LIB) version. Before libdlpi was made public, a
5545 # private version also existed, which did not have the same APIs.
5546 # Due to a gcc bug, the default search path for 32-bit libraries does
5547 # not include /lib, we add it explicitly here.
5548 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485].
5549 # Also, due to the bug above applications that link to libpcap with
5550 # libdlpi will have to add "-L/lib" option to "configure".
5551 #
5552 saved_ldflags=$LDFLAGS
5553 LDFLAGS="$LIBS -L/lib"
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5
5555$as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; }
5556if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then :
5557 $as_echo_n "(cached) " >&6
5558else
5559 ac_check_lib_save_LIBS=$LIBS
5560LIBS="-ldlpi $LIBS"
5561cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5562/* end confdefs.h. */
5563
5564/* Override any GCC internal prototype to avoid an error.
5565 Use char because int might match the return type of a GCC
5566 builtin and then its argument prototype would still apply. */
5567#ifdef __cplusplus
5568extern "C"
5569#endif
5570char dlpi_walk ();
5571int
5572main ()
5573{
5574return dlpi_walk ();
5575 ;
5576 return 0;
5577}
5578_ACEOF
5579if ac_fn_c_try_link "$LINENO"; then :
5580 ac_cv_lib_dlpi_dlpi_walk=yes
5581else
5582 ac_cv_lib_dlpi_dlpi_walk=no
5583fi
5584rm -f core conftest.err conftest.$ac_objext \
5585 conftest$ac_exeext conftest.$ac_ext
5586LIBS=$ac_check_lib_save_LIBS
5587fi
5588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5
5589$as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; }
5590if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then :
5591
5592 LIBS="-ldlpi $LIBS"
5593 V_PCAP=libdlpi
5594
5595$as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h
5596
5597
5598else
5599 V_PCAP=dlpi
5600fi
5601
5602 LDFLAGS=$saved_ldflags
5603
5604 #
5605 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO
5606 # versions of DLPI.
5607 #
5608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5
5609$as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; }
5610 if ${ac_cv_sys_dlpi_usable+:} false; then :
5611 $as_echo_n "(cached) " >&6
5612else
5613 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5614/* end confdefs.h. */
5615
5616 #include <sys/types.h>
5617 #include <sys/time.h>
5618 #include <sys/dlpi.h>
5619
5620int
5621main ()
5622{
5623int i = DL_PROMISC_PHYS;
5624 ;
5625 return 0;
5626}
5627_ACEOF
5628if ac_fn_c_try_compile "$LINENO"; then :
5629 ac_cv_sys_dlpi_usable=yes
5630else
5631 ac_cv_sys_dlpi_usable=no
5632fi
5633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5634fi
5635
5636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5
5637$as_echo "$ac_cv_sys_dlpi_usable" >&6; }
5638 if test $ac_cv_sys_dlpi_usable = no ; then
5639 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5
5640 fi
5641
5642 #
5643 # Check whether we have a /dev/dlpi device or have multiple devices.
5644 #
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/dlpi device" >&5
5646$as_echo_n "checking for /dev/dlpi device... " >&6; }
5647 if test -c /dev/dlpi ; then
5648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5649$as_echo "yes" >&6; }
5650
5651$as_echo "#define HAVE_DEV_DLPI 1" >>confdefs.h
5652
5653 else
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5655$as_echo "no" >&6; }
5656 dir="/dev/dlpi"
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $dir directory" >&5
5658$as_echo_n "checking for $dir directory... " >&6; }
5659 if test -d $dir ; then
5660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5661$as_echo "yes" >&6; }
5662
5663cat >>confdefs.h <<_ACEOF
5664#define PCAP_DEV_PREFIX "$dir"
5665_ACEOF
5666
5667 else
5668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5669$as_echo "no" >&6; }
5670 fi
5671 fi
5672
5673 #
5674 # This check is for Solaris with DLPI support for passive modes.
5675 # See dlpi(7P) for more details.
5676 #
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dl_passive_req_t struct exists" >&5
5678$as_echo_n "checking if dl_passive_req_t struct exists... " >&6; }
5679 if ${ac_cv_lbl_has_dl_passive_req_t+:} false; then :
5680 $as_echo_n "(cached) " >&6
5681else
5682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5683/* end confdefs.h. */
5684
5685# include <sys/types.h>
5686# include <sys/dlpi.h>
5687int
5688main ()
5689{
5690u_int i = sizeof(dl_passive_req_t)
5691 ;
5692 return 0;
5693}
5694_ACEOF
5695if ac_fn_c_try_compile "$LINENO"; then :
5696 ac_cv_lbl_has_dl_passive_req_t=yes
5697else
5698 ac_cv_lbl_has_dl_passive_req_t=no
5699fi
5700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5701fi
5702
5703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_has_dl_passive_req_t" >&5
5704$as_echo "$ac_cv_lbl_has_dl_passive_req_t" >&6; }
5705 if test $ac_cv_lbl_has_dl_passive_req_t = yes ; then
5706
5707$as_echo "#define HAVE_DLPI_PASSIVE 1" >>confdefs.h
5708
5709 fi
5710 ;;
5711
5712linux)
5713 #
5714 # Do we have the wireless extensions?
5715 #
5716 for ac_header in linux/wireless.h
5717do :
5718 ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" "
5719#include <sys/socket.h>
5720#include <linux/if.h>
5721#include <linux/types.h>
5722
5723"
5724if test "x$ac_cv_header_linux_wireless_h" = xyes; then :
5725 cat >>confdefs.h <<_ACEOF
5726#define HAVE_LINUX_WIRELESS_H 1
5727_ACEOF
5728
5729fi
5730
5731done
5732
5733
5734 #
5735 # Do we have libnl?
5736 #
5737
5738# Check whether --with-libnl was given.
5739if test "${with_libnl+set}" = set; then :
5740 withval=$with_libnl; with_libnl=$withval
5741fi
5742
5743
5744 if test x$with_libnl != xno ; then
5745 have_any_nl="no"
5746
Elliott Hughesd8845d72015-10-19 18:07:04 -07005747 incdir=-I/usr/include/libnl3
5748 libnldir=
5749 if test x$withval != x ; then
5750 libnldir=-L${withval}/lib/.libs
5751 incdir=-I${withval}/include
5752 fi
5753
JP Abgrall511eca32014-02-12 13:46:45 -08005754 #
5755 # Try libnl 3.x first.
5756 #
5757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5
5758$as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; }
5759if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then :
5760 $as_echo_n "(cached) " >&6
5761else
5762 ac_check_lib_save_LIBS=$LIBS
Elliott Hughesd8845d72015-10-19 18:07:04 -07005763LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005764cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5765/* end confdefs.h. */
5766
5767/* Override any GCC internal prototype to avoid an error.
5768 Use char because int might match the return type of a GCC
5769 builtin and then its argument prototype would still apply. */
5770#ifdef __cplusplus
5771extern "C"
5772#endif
5773char nl_socket_alloc ();
5774int
5775main ()
5776{
5777return nl_socket_alloc ();
5778 ;
5779 return 0;
5780}
5781_ACEOF
5782if ac_fn_c_try_link "$LINENO"; then :
5783 ac_cv_lib_nl_3_nl_socket_alloc=yes
5784else
5785 ac_cv_lib_nl_3_nl_socket_alloc=no
5786fi
5787rm -f core conftest.err conftest.$ac_objext \
5788 conftest$ac_exeext conftest.$ac_ext
5789LIBS=$ac_check_lib_save_LIBS
5790fi
5791{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5
5792$as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; }
5793if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then :
5794
5795 #
5796 # Yes, we have libnl 3.x.
5797 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07005798 LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005799
5800$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
5801
5802
5803$as_echo "#define HAVE_LIBNL_3_x 1" >>confdefs.h
5804
5805
5806$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
5807
5808
5809$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
5810
Elliott Hughesd8845d72015-10-19 18:07:04 -07005811 V_INCLS="$V_INCLS ${incdir}"
JP Abgrall511eca32014-02-12 13:46:45 -08005812 have_any_nl="yes"
5813
5814fi
5815
5816
5817 if test x$have_any_nl = xno ; then
5818 #
5819 # Try libnl 2.x
5820 #
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5
5822$as_echo_n "checking for nl_socket_alloc in -lnl... " >&6; }
5823if ${ac_cv_lib_nl_nl_socket_alloc+:} false; then :
5824 $as_echo_n "(cached) " >&6
5825else
5826 ac_check_lib_save_LIBS=$LIBS
5827LIBS="-lnl $LIBS"
5828cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5829/* end confdefs.h. */
5830
5831/* Override any GCC internal prototype to avoid an error.
5832 Use char because int might match the return type of a GCC
5833 builtin and then its argument prototype would still apply. */
5834#ifdef __cplusplus
5835extern "C"
5836#endif
5837char nl_socket_alloc ();
5838int
5839main ()
5840{
5841return nl_socket_alloc ();
5842 ;
5843 return 0;
5844}
5845_ACEOF
5846if ac_fn_c_try_link "$LINENO"; then :
5847 ac_cv_lib_nl_nl_socket_alloc=yes
5848else
5849 ac_cv_lib_nl_nl_socket_alloc=no
5850fi
5851rm -f core conftest.err conftest.$ac_objext \
5852 conftest$ac_exeext conftest.$ac_ext
5853LIBS=$ac_check_lib_save_LIBS
5854fi
5855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_socket_alloc" >&5
5856$as_echo "$ac_cv_lib_nl_nl_socket_alloc" >&6; }
5857if test "x$ac_cv_lib_nl_nl_socket_alloc" = xyes; then :
5858
5859 #
5860 # Yes, we have libnl 2.x.
5861 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07005862 LIBS="${libnldir} -lnl-genl -lnl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005863
5864$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
5865
5866
5867$as_echo "#define HAVE_LIBNL_2_x 1" >>confdefs.h
5868
5869
5870$as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h
5871
5872
5873$as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h
5874
5875 have_any_nl="yes"
5876
5877fi
5878
5879 fi
5880
5881 if test x$have_any_nl = xno ; then
5882 #
5883 # No, we don't; do we have libnl 1.x?
5884 #
5885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_handle_alloc in -lnl" >&5
5886$as_echo_n "checking for nl_handle_alloc in -lnl... " >&6; }
5887if ${ac_cv_lib_nl_nl_handle_alloc+:} false; then :
5888 $as_echo_n "(cached) " >&6
5889else
5890 ac_check_lib_save_LIBS=$LIBS
5891LIBS="-lnl $LIBS"
5892cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5893/* end confdefs.h. */
5894
5895/* Override any GCC internal prototype to avoid an error.
5896 Use char because int might match the return type of a GCC
5897 builtin and then its argument prototype would still apply. */
5898#ifdef __cplusplus
5899extern "C"
5900#endif
5901char nl_handle_alloc ();
5902int
5903main ()
5904{
5905return nl_handle_alloc ();
5906 ;
5907 return 0;
5908}
5909_ACEOF
5910if ac_fn_c_try_link "$LINENO"; then :
5911 ac_cv_lib_nl_nl_handle_alloc=yes
5912else
5913 ac_cv_lib_nl_nl_handle_alloc=no
5914fi
5915rm -f core conftest.err conftest.$ac_objext \
5916 conftest$ac_exeext conftest.$ac_ext
5917LIBS=$ac_check_lib_save_LIBS
5918fi
5919{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_handle_alloc" >&5
5920$as_echo "$ac_cv_lib_nl_nl_handle_alloc" >&6; }
5921if test "x$ac_cv_lib_nl_nl_handle_alloc" = xyes; then :
5922
5923 #
5924 # Yes.
5925 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07005926 LIBS="${libnldir} -lnl $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08005927
5928$as_echo "#define HAVE_LIBNL 1" >>confdefs.h
5929
5930 have_any_nl="yes"
5931
5932fi
5933
5934 fi
5935
5936 if test x$have_any_nl = xno ; then
5937 #
5938 # No, we don't have libnl at all.
5939 #
5940 if test x$with_libnl = xyes ; then
5941 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5
5942 fi
5943 fi
5944 fi
5945
5946 for ac_header in linux/ethtool.h
5947do :
5948 ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" "
5949$ac_includes_default
5950#include <linux/types.h>
5951
5952"
5953if test "x$ac_cv_header_linux_ethtool_h" = xyes; then :
5954 cat >>confdefs.h <<_ACEOF
5955#define HAVE_LINUX_ETHTOOL_H 1
5956_ACEOF
5957
5958fi
5959
5960done
5961
5962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if if_packet.h has tpacket_stats defined" >&5
5963$as_echo_n "checking if if_packet.h has tpacket_stats defined... " >&6; }
5964 if ${ac_cv_lbl_tpacket_stats+:} false; then :
5965 $as_echo_n "(cached) " >&6
5966else
5967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5968/* end confdefs.h. */
5969
5970# include <linux/if_packet.h>
5971int
5972main ()
5973{
5974struct tpacket_stats stats
5975 ;
5976 return 0;
5977}
5978_ACEOF
5979if ac_fn_c_try_compile "$LINENO"; then :
5980 ac_cv_lbl_tpacket_stats=yes
5981else
5982 ac_cv_lbl_tpacket_stats=no
5983fi
5984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5985fi
5986
5987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_tpacket_stats" >&5
5988$as_echo "$ac_cv_lbl_tpacket_stats" >&6; }
5989 if test $ac_cv_lbl_tpacket_stats = yes; then
5990
5991$as_echo "#define HAVE_TPACKET_STATS 1" >>confdefs.h
5992
5993 fi
5994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if tpacket_auxdata struct has tp_vlan_tci member" >&5
5995$as_echo_n "checking if tpacket_auxdata struct has tp_vlan_tci member... " >&6; }
5996 if ${ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci+:} false; then :
5997 $as_echo_n "(cached) " >&6
5998else
5999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6000/* end confdefs.h. */
6001
6002# include <sys/types.h>
6003# include <linux/if_packet.h>
6004int
6005main ()
6006{
6007u_int i = sizeof(((struct tpacket_auxdata *)0)->tp_vlan_tci)
6008 ;
6009 return 0;
6010}
6011_ACEOF
6012if ac_fn_c_try_compile "$LINENO"; then :
6013 ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci=yes
6014else
6015 ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci=no
6016fi
6017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6018fi
6019
6020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci" >&5
6021$as_echo "$ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci" >&6; }
6022 if test $ac_cv_lbl_linux_tpacket_auxdata_tp_vlan_tci = yes ; then
6023 HAVE_LINUX_TPACKET_AUXDATA=tp_vlan_tci
6024
6025
6026$as_echo "#define HAVE_LINUX_TPACKET_AUXDATA_TP_VLAN_TCI 1" >>confdefs.h
6027
6028 fi
6029 ;;
6030
6031bpf)
6032 #
6033 # Check whether we have the *BSD-style ioctls.
6034 #
6035 for ac_header in net/if_media.h
6036do :
6037 ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default"
6038if test "x$ac_cv_header_net_if_media_h" = xyes; then :
6039 cat >>confdefs.h <<_ACEOF
6040#define HAVE_NET_IF_MEDIA_H 1
6041_ACEOF
6042
6043fi
6044
6045done
6046
6047
6048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the system supports zerocopy BPF" >&5
6049$as_echo_n "checking whether the system supports zerocopy BPF... " >&6; }
6050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6051/* end confdefs.h. */
6052#include <sys/socket.h>
6053 #include <sys/ioctl.h>
6054 #include <net/if.h>
6055 #include <net/bpf.h>
6056int
6057main ()
6058{
6059return (BIOCROTZBUF + BPF_BUFMODE_ZBUF);
6060 ;
6061 return 0;
6062}
6063_ACEOF
6064if ac_fn_c_try_compile "$LINENO"; then :
6065
6066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6067$as_echo "yes" >&6; }
6068
6069$as_echo "#define HAVE_ZEROCOPY_BPF 1" >>confdefs.h
6070
6071
6072else
6073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
6075fi
6076rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6077
6078 #
6079 # Check whether we have struct BPF_TIMEVAL.
6080 #
6081 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" "
6082#include <sys/types.h>
6083#include <sys/ioctl.h>
6084#ifdef HAVE_SYS_IOCCOM_H
6085#include <sys/ioccom.h>
6086#endif
6087#include <net/bpf.h>
6088
6089"
6090if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then :
6091
6092cat >>confdefs.h <<_ACEOF
6093#define HAVE_STRUCT_BPF_TIMEVAL 1
6094_ACEOF
6095
6096
6097fi
6098
6099 ;;
6100
6101dag)
Elliott Hughes965a4b52017-05-15 10:37:39 -07006102 #
6103 # --with-pcap=dag is the only way to get here, and it means
6104 # "DAG support but nothing else"
6105 #
JP Abgrall511eca32014-02-12 13:46:45 -08006106 V_DEFS="$V_DEFS -DDAG_ONLY"
Elliott Hughes965a4b52017-05-15 10:37:39 -07006107 xxx_only=yes
JP Abgrall511eca32014-02-12 13:46:45 -08006108 ;;
6109
6110septel)
Elliott Hughes965a4b52017-05-15 10:37:39 -07006111 #
6112 # --with-pcap=septel is the only way to get here, and it means
6113 # "Septel support but nothing else"
6114 #
JP Abgrall511eca32014-02-12 13:46:45 -08006115 V_DEFS="$V_DEFS -DSEPTEL_ONLY"
Elliott Hughes965a4b52017-05-15 10:37:39 -07006116 xxx_only=yes
JP Abgrall511eca32014-02-12 13:46:45 -08006117 ;;
6118
6119snf)
Elliott Hughes965a4b52017-05-15 10:37:39 -07006120 #
6121 # --with-pcap=snf is the only way to get here, and it means
6122 # "SNF support but nothing else"
6123 #
JP Abgrall511eca32014-02-12 13:46:45 -08006124 V_DEFS="$V_DEFS -DSNF_ONLY"
Elliott Hughes965a4b52017-05-15 10:37:39 -07006125 xxx_only=yes
JP Abgrall511eca32014-02-12 13:46:45 -08006126 ;;
6127
6128null)
6129 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5
6130$as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;}
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5
6132$as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;}
6133 ;;
6134esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006135
Elliott Hughes965a4b52017-05-15 10:37:39 -07006136if test "$V_PCAP" != null
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006137then
JP Abgrall511eca32014-02-12 13:46:45 -08006138 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs"
6139if test "x$ac_cv_func_getifaddrs" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006140
6141 #
6142 # We have "getifaddrs()"; make sure we have <ifaddrs.h>
6143 # as well, just in case some platform is really weird.
6144 #
JP Abgrall511eca32014-02-12 13:46:45 -08006145 ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default"
6146if test "x$ac_cv_header_ifaddrs_h" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006147
6148 #
6149 # We have the header, so we use "getifaddrs()" to
6150 # get the list of interfaces.
6151 #
Elliott Hughes965a4b52017-05-15 10:37:39 -07006152 V_FINDALLDEVS=fad-getad.c
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006153
6154else
6155
6156 #
6157 # We don't have the header - give up.
6158 # XXX - we could also fall back on some other
6159 # mechanism, but, for now, this'll catch this
6160 # problem so that we can at least try to figure
6161 # out something to do on systems with "getifaddrs()"
6162 # but without "ifaddrs.h", if there is something
6163 # we can do on those systems.
6164 #
JP Abgrall511eca32014-02-12 13:46:45 -08006165 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 -08006166
6167fi
6168
6169
6170
6171else
6172
6173 #
6174 # Well, we don't have "getifaddrs()", so we have to use
6175 # some other mechanism; determine what that mechanism is.
6176 #
6177 # The first thing we use is the type of capture mechanism,
6178 # which is somewhat of a proxy for the OS we're using.
6179 #
6180 case "$V_PCAP" in
6181
JP Abgrall511eca32014-02-12 13:46:45 -08006182 dlpi|libdlpi)
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006183 #
6184 # This might be Solaris 8 or later, with
6185 # SIOCGLIFCONF, or it might be some other OS
6186 # or some older version of Solaris, with
6187 # just SIOCGIFCONF.
6188 #
JP Abgrall511eca32014-02-12 13:46:45 -08006189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5
6190$as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; }
6191 if ${ac_cv_lbl_have_siocglifconf+:} false; then :
6192 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006193else
JP Abgrall511eca32014-02-12 13:46:45 -08006194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006195/* end confdefs.h. */
6196#include <sys/param.h>
6197 #include <sys/file.h>
6198 #include <sys/ioctl.h>
6199 #include <sys/socket.h>
6200 #include <sys/sockio.h>
6201int
6202main ()
6203{
6204ioctl(0, SIOCGLIFCONF, (char *)0);
6205 ;
6206 return 0;
6207}
6208_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08006209if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006210 ac_cv_lbl_have_siocglifconf=yes
6211else
JP Abgrall511eca32014-02-12 13:46:45 -08006212 ac_cv_lbl_have_siocglifconf=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006213fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6215fi
6216
JP Abgrall511eca32014-02-12 13:46:45 -08006217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5
6218$as_echo "$ac_cv_lbl_have_siocglifconf" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006219 if test $ac_cv_lbl_have_siocglifconf = yes ; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006220 V_FINDALLDEVS=fad-glifc.c
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006221 else
Elliott Hughes965a4b52017-05-15 10:37:39 -07006222 V_FINDALLDEVS=fad-gifc.c
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006223 fi
6224 ;;
6225
6226 *)
6227 #
6228 # Assume we just have SIOCGIFCONF.
6229 # (XXX - on at least later Linux kernels, there's
6230 # another mechanism, and we should be using that
6231 # instead.)
6232 #
Elliott Hughes965a4b52017-05-15 10:37:39 -07006233 V_FINDALLDEVS=fad-gifc.c
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006234 ;;
6235 esac
6236fi
6237
6238fi
6239
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006240fi
6241
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006242
JP Abgrall511eca32014-02-12 13:46:45 -08006243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5
6244$as_echo_n "checking for socklen_t... " >&6; }
6245cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6246/* end confdefs.h. */
6247
6248 #include <sys/types.h>
6249 #include <sys/socket.h>
6250
6251int
6252main ()
6253{
6254 socklen_t x;
6255 ;
6256 return 0;
6257}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006258_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08006259if ac_fn_c_try_compile "$LINENO"; then :
6260 have_socklen_t=yes
6261else
6262 have_socklen_t=no
6263fi
6264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6265if test "x$have_socklen_t" = "xyes"; then
6266
6267$as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006268
6269fi
JP Abgrall511eca32014-02-12 13:46:45 -08006270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_socklen_t" >&5
6271$as_echo "$have_socklen_t" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006272
JP Abgrall511eca32014-02-12 13:46:45 -08006273# Check whether --enable-ipv6 was given.
6274if test "${enable_ipv6+set}" = set; then :
6275 enableval=$enable_ipv6;
6276else
6277 enable_ipv6=ifavailable
6278fi
6279
6280if test "$enable_ipv6" != "no"; then
6281 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo"
6282if test "x$ac_cv_func_getaddrinfo" = xyes; then :
6283
6284
6285$as_echo "#define INET6 1" >>confdefs.h
6286
6287
6288else
6289
6290 if test "$enable_ipv6" != "ifavailable"; then
6291 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6293as_fn_error $? "--enable-ipv6 was given, but getaddrinfo isn't available
6294See \`config.log' for more details" "$LINENO" 5; }
6295 fi
6296
6297fi
6298
6299fi
6300
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5
6302$as_echo_n "checking whether to build optimizer debugging code... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006303# Check whether --enable-optimizer-dbg was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006304if test "${enable_optimizer_dbg+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006305 enableval=$enable_optimizer_dbg;
6306fi
6307
6308if test "$enable_optimizer_dbg" = "yes"; then
6309
JP Abgrall511eca32014-02-12 13:46:45 -08006310$as_echo "#define BDEBUG 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006311
6312fi
JP Abgrall511eca32014-02-12 13:46:45 -08006313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5
6314$as_echo "${enable_optimizer_dbg-no}" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006315
JP Abgrall511eca32014-02-12 13:46:45 -08006316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5
6317$as_echo_n "checking whether to build parser debugging code... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006318# Check whether --enable-yydebug was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006319if test "${enable_yydebug+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006320 enableval=$enable_yydebug;
6321fi
6322
6323if test "$enable_yydebug" = "yes"; then
6324
JP Abgrall511eca32014-02-12 13:46:45 -08006325$as_echo "#define YYDEBUG 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006326
6327fi
JP Abgrall511eca32014-02-12 13:46:45 -08006328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5
6329$as_echo "${enable_yydebug-no}" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006330
6331# Check for Endace DAG card support.
6332
6333# Check whether --with-dag was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006334if test "${with_dag+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006335 withval=$with_dag;
6336 if test "$withval" = no
6337 then
6338 # User doesn't want DAG support.
6339 want_dag=no
6340 elif test "$withval" = yes
6341 then
6342 # User wants DAG support but hasn't specified a directory.
6343 want_dag=yes
6344 else
6345 # User wants DAG support and has specified a directory, so use the provided value.
6346 want_dag=yes
6347 dag_root=$withval
6348 fi
6349
6350else
6351
Elliott Hughes965a4b52017-05-15 10:37:39 -07006352 if test "$V_PCAP" = dag; then
6353 # User requested DAG-only libpcap, so we'd better have
6354 # the DAG API.
6355 want_dag=yes
6356 elif test "xxx_only" = yes; then
6357 # User requested something-else-only pcap, so they don't
6358 # want DAG support.
6359 want_dag=no
6360 else
6361 #
6362 # Use DAG API if present, otherwise don't
6363 #
6364 want_dag=ifpresent
6365 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006366
6367fi
6368
6369
6370
6371# Check whether --with-dag-includes was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006372if test "${with_dag_includes+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006373 withval=$with_dag_includes;
6374 # User wants DAG support and has specified a header directory, so use the provided value.
6375 want_dag=yes
6376 dag_include_dir=$withval
6377
6378fi
6379
6380
6381
6382# Check whether --with-dag-libraries was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006383if test "${with_dag_libraries+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006384 withval=$with_dag_libraries;
6385 # User wants DAG support and has specified a library directory, so use the provided value.
6386 want_dag=yes
6387 dag_lib_dir=$withval
6388
6389fi
6390
6391
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006392ac_cv_lbl_dag_api=no
6393if test "$want_dag" != no; then
6394
JP Abgrall511eca32014-02-12 13:46:45 -08006395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have DAG API headers" >&5
6396$as_echo_n "checking whether we have DAG API headers... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006397
6398 # If necessary, set default paths for DAG API headers and libraries.
6399 if test -z "$dag_root"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006400 dag_root=/usr/local
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006401 fi
6402
6403 if test -z "$dag_include_dir"; then
6404 dag_include_dir="$dag_root/include"
6405 fi
6406
6407 if test -z "$dag_lib_dir"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006408 dag_lib_dir="$dag_root/lib"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006409 fi
6410
6411 if test -z "$dag_tools_dir"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006412 dag_tools_dir="$dag_root/tools"
JP Abgrall511eca32014-02-12 13:46:45 -08006413 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006414
6415 if test -r $dag_include_dir/dagapi.h; then
6416 ac_cv_lbl_dag_api=yes
6417 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006418
Elliott Hughes965a4b52017-05-15 10:37:39 -07006419 if test "$ac_cv_lbl_dag_api" = yes; then
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($dag_include_dir)" >&5
6421$as_echo "yes ($dag_include_dir)" >&6; }
JP Abgrall511eca32014-02-12 13:46:45 -08006422
Elliott Hughes965a4b52017-05-15 10:37:39 -07006423 V_INCLS="$V_INCLS -I$dag_include_dir"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006424
Elliott Hughes965a4b52017-05-15 10:37:39 -07006425 if test $V_PCAP != dag ; then
6426 SSRC="$SSRC pcap-dag.c"
6427 fi
6428
6429 # See if we can find a general version string.
6430 # Don't need to save and restore LIBS to prevent -ldag being
6431 # included if there's a found-action (arg 3).
6432 saved_ldflags=$LDFLAGS
6433 LDFLAGS="-L$dag_lib_dir"
6434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006435$as_echo_n "checking for dag_attach_stream in -ldag... " >&6; }
6436if ${ac_cv_lib_dag_dag_attach_stream+:} false; then :
6437 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006438else
6439 ac_check_lib_save_LIBS=$LIBS
6440LIBS="-ldag $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08006441cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006442/* end confdefs.h. */
6443
6444/* Override any GCC internal prototype to avoid an error.
6445 Use char because int might match the return type of a GCC
6446 builtin and then its argument prototype would still apply. */
6447#ifdef __cplusplus
6448extern "C"
6449#endif
6450char dag_attach_stream ();
6451int
6452main ()
6453{
6454return dag_attach_stream ();
6455 ;
6456 return 0;
6457}
6458_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08006459if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006460 ac_cv_lib_dag_dag_attach_stream=yes
6461else
JP Abgrall511eca32014-02-12 13:46:45 -08006462 ac_cv_lib_dag_dag_attach_stream=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006463fi
JP Abgrall511eca32014-02-12 13:46:45 -08006464rm -f core conftest.err conftest.$ac_objext \
6465 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006466LIBS=$ac_check_lib_save_LIBS
6467fi
JP Abgrall511eca32014-02-12 13:46:45 -08006468{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5
6469$as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; }
6470if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then :
6471 dag_streams="1"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006472else
JP Abgrall511eca32014-02-12 13:46:45 -08006473 dag_streams="0"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006474fi
6475
Elliott Hughes965a4b52017-05-15 10:37:39 -07006476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006477$as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; }
6478if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then :
6479 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006480else
6481 ac_check_lib_save_LIBS=$LIBS
6482LIBS="-ldag $LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08006483cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006484/* end confdefs.h. */
6485
6486/* Override any GCC internal prototype to avoid an error.
6487 Use char because int might match the return type of a GCC
6488 builtin and then its argument prototype would still apply. */
6489#ifdef __cplusplus
6490extern "C"
6491#endif
6492char dag_get_erf_types ();
6493int
6494main ()
6495{
6496return dag_get_erf_types ();
6497 ;
6498 return 0;
6499}
6500_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08006501if ac_fn_c_try_link "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006502 ac_cv_lib_dag_dag_get_erf_types=yes
6503else
JP Abgrall511eca32014-02-12 13:46:45 -08006504 ac_cv_lib_dag_dag_get_erf_types=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006505fi
JP Abgrall511eca32014-02-12 13:46:45 -08006506rm -f core conftest.err conftest.$ac_objext \
6507 conftest$ac_exeext conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006508LIBS=$ac_check_lib_save_LIBS
6509fi
JP Abgrall511eca32014-02-12 13:46:45 -08006510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5
6511$as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; }
6512if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006513
6514
JP Abgrall511eca32014-02-12 13:46:45 -08006515$as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006516
6517fi
6518
Elliott Hughes965a4b52017-05-15 10:37:39 -07006519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006520$as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; }
6521if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then :
6522 $as_echo_n "(cached) " >&6
6523else
6524 ac_check_lib_save_LIBS=$LIBS
6525LIBS="-ldag $LIBS"
6526cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527/* end confdefs.h. */
6528
6529/* Override any GCC internal prototype to avoid an error.
6530 Use char because int might match the return type of a GCC
6531 builtin and then its argument prototype would still apply. */
6532#ifdef __cplusplus
6533extern "C"
6534#endif
6535char dag_get_stream_erf_types ();
6536int
6537main ()
6538{
6539return dag_get_stream_erf_types ();
6540 ;
6541 return 0;
6542}
6543_ACEOF
6544if ac_fn_c_try_link "$LINENO"; then :
6545 ac_cv_lib_dag_dag_get_stream_erf_types=yes
6546else
6547 ac_cv_lib_dag_dag_get_stream_erf_types=no
6548fi
6549rm -f core conftest.err conftest.$ac_objext \
6550 conftest$ac_exeext conftest.$ac_ext
6551LIBS=$ac_check_lib_save_LIBS
6552fi
6553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5
6554$as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; }
6555if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then :
6556
6557
6558$as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h
6559
6560fi
6561
6562
Elliott Hughes965a4b52017-05-15 10:37:39 -07006563 LDFLAGS=$saved_ldflags
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006564
Elliott Hughes965a4b52017-05-15 10:37:39 -07006565 if test "$dag_streams" = 1; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006566
JP Abgrall511eca32014-02-12 13:46:45 -08006567$as_echo "#define HAVE_DAG_STREAMS_API 1" >>confdefs.h
6568
Elliott Hughes965a4b52017-05-15 10:37:39 -07006569 LIBS="$LIBS -ldag"
6570 LDFLAGS="$LDFLAGS -L$dag_lib_dir"
JP Abgrall511eca32014-02-12 13:46:45 -08006571
Elliott Hughes965a4b52017-05-15 10:37:39 -07006572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006573$as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; }
6574if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then :
6575 $as_echo_n "(cached) " >&6
6576else
6577 ac_check_lib_save_LIBS=$LIBS
6578LIBS="-lvdag $LIBS"
6579cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6580/* end confdefs.h. */
6581
6582/* Override any GCC internal prototype to avoid an error.
6583 Use char because int might match the return type of a GCC
6584 builtin and then its argument prototype would still apply. */
6585#ifdef __cplusplus
6586extern "C"
6587#endif
6588char vdag_set_device_info ();
6589int
6590main ()
6591{
6592return vdag_set_device_info ();
6593 ;
6594 return 0;
6595}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006596_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08006597if ac_fn_c_try_link "$LINENO"; then :
6598 ac_cv_lib_vdag_vdag_set_device_info=yes
6599else
6600 ac_cv_lib_vdag_vdag_set_device_info=no
6601fi
6602rm -f core conftest.err conftest.$ac_objext \
6603 conftest$ac_exeext conftest.$ac_ext
6604LIBS=$ac_check_lib_save_LIBS
6605fi
6606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5
6607$as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; }
6608if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then :
6609 ac_dag_have_vdag="1"
6610else
6611 ac_dag_have_vdag="0"
6612fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006613
Elliott Hughes965a4b52017-05-15 10:37:39 -07006614 if test "$ac_dag_have_vdag" = 1; then
JP Abgrall511eca32014-02-12 13:46:45 -08006615
6616$as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h
6617
Elliott Hughes965a4b52017-05-15 10:37:39 -07006618 LIBS="$LIBS -lpthread"
6619 fi
JP Abgrall511eca32014-02-12 13:46:45 -08006620 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006621
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006622
JP Abgrall511eca32014-02-12 13:46:45 -08006623$as_echo "#define HAVE_DAG_API 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006624
Elliott Hughes965a4b52017-05-15 10:37:39 -07006625 else
6626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006627$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006628
Elliott Hughes965a4b52017-05-15 10:37:39 -07006629 if test "$V_PCAP" = dag; then
6630 # User requested "dag" capture type but we couldn't
6631 # find the DAG API support.
6632 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
6633 fi
6634
6635 if test "$want_dag" = yes; then
6636 # User wanted DAG support but we couldn't find it.
6637 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
6638 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006639 fi
6640fi
6641
6642
6643# Check whether --with-septel was given.
JP Abgrall511eca32014-02-12 13:46:45 -08006644if test "${with_septel+set}" = set; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006645 withval=$with_septel;
6646 if test "$withval" = no
6647 then
6648 want_septel=no
6649 elif test "$withval" = yes
6650 then
6651 want_septel=yes
6652 septel_root=
6653 else
6654 want_septel=yes
6655 septel_root=$withval
6656 fi
6657
6658else
6659
Elliott Hughes965a4b52017-05-15 10:37:39 -07006660 if test "$V_PCAP" = septel; then
6661 # User requested Septel-only libpcap, so we'd better have
6662 # the Septel API.
6663 want_septel=yes
6664 elif test "xxx_only" = yes; then
6665 # User requested something-else-only pcap, so they don't
6666 # want Septel support.
6667 want_septel=no
6668 else
6669 #
6670 # Use Septel API if present, otherwise don't
6671 #
6672 want_septel=ifpresent
6673 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006674
6675fi
6676
Elliott Hughes965a4b52017-05-15 10:37:39 -07006677
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006678ac_cv_lbl_septel_api=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006679if test "$with_septel" != no; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006680
Elliott Hughes965a4b52017-05-15 10:37:39 -07006681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5
6682$as_echo_n "checking whether we have Septel API headers... " >&6; }
6683
6684 # If necessary, set default paths for Septel API headers and libraries.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006685 if test -z "$septel_root"; then
6686 septel_root=$srcdir/../septel
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006687 fi
6688
6689 septel_tools_dir="$septel_root"
6690 septel_include_dir="$septel_root/INC"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006691
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006692 if test -r "$septel_include_dir/msg.h"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006693 ac_cv_lbl_septel_api=yes
6694 fi
6695
6696 if test "$ac_cv_lbl_septel_api" = yes; then
6697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5
6698$as_echo "yes ($septel_include_dir)" >&6; }
6699
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006700 V_INCLS="$V_INCLS -I$septel_include_dir"
JP Abgrall511eca32014-02-12 13:46:45 -08006701 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"
6702 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 -08006703
6704 if test "$V_PCAP" != septel ; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006705 SSRC="$SSRC pcap-septel.c"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006706 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006707
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006708
JP Abgrall511eca32014-02-12 13:46:45 -08006709$as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006710
Elliott Hughes965a4b52017-05-15 10:37:39 -07006711 else
6712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6713$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006714
Elliott Hughes965a4b52017-05-15 10:37:39 -07006715 if test "$V_PCAP" = septel; then
6716 # User requested "septel" capture type but
6717 # we couldn't find the Septel API support.
6718 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
6719 fi
6720
6721 if test "$want_septel" = yes; then
6722 # User wanted Septel support but we couldn't find it.
6723 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
6724 fi
6725 fi
JP Abgrall511eca32014-02-12 13:46:45 -08006726fi
6727
6728# Check for Myricom SNF support.
6729
6730# Check whether --with-snf was given.
6731if test "${with_snf+set}" = set; then :
6732 withval=$with_snf;
6733 if test "$withval" = no
6734 then
6735 # User explicitly doesn't want SNF
6736 want_snf=no
6737 elif test "$withval" = yes
6738 then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006739 # User wants SNF support but hasn't specified a directory.
JP Abgrall511eca32014-02-12 13:46:45 -08006740 want_snf=yes
6741 else
6742 # User wants SNF support with a specified directory.
6743 want_snf=yes
6744 snf_root=$withval
6745 fi
6746
6747else
6748
Elliott Hughes965a4b52017-05-15 10:37:39 -07006749 if test "$V_PCAP" = snf; then
6750 # User requested Sniffer-only libpcap, so we'd better have
6751 # the Sniffer API.
6752 want_snf=yes
6753 elif test "xxx_only" = yes; then
6754 # User requested something-else-only pcap, so they don't
6755 # want SNF support.
6756 want_snf=no
6757 else
6758 #
6759 # Use Sniffer API if present, otherwise don't
6760 #
6761 want_snf=ifpresent
6762 fi
JP Abgrall511eca32014-02-12 13:46:45 -08006763
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006764fi
6765
6766
6767
JP Abgrall511eca32014-02-12 13:46:45 -08006768# Check whether --with-snf-includes was given.
6769if test "${with_snf_includes+set}" = set; then :
6770 withval=$with_snf_includes;
6771 # User wants SNF with specific header directory
6772 want_snf=yes
6773 snf_include_dir=$withval
6774
6775fi
6776
6777
6778
6779# Check whether --with-snf-libraries was given.
6780if test "${with_snf_libraries+set}" = set; then :
6781 withval=$with_snf_libraries;
6782 # User wants SNF with specific lib directory
6783 want_snf=yes
6784 snf_lib_dir=$withval
6785
6786fi
6787
6788
JP Abgrall511eca32014-02-12 13:46:45 -08006789ac_cv_lbl_snf_api=no
6790if test "$with_snf" != no; then
6791
6792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5
6793$as_echo_n "checking whether we have Myricom Sniffer API... " >&6; }
6794
Elliott Hughes965a4b52017-05-15 10:37:39 -07006795 # If necessary, set default paths for Sniffer headers and libraries.
JP Abgrall511eca32014-02-12 13:46:45 -08006796 if test -z "$snf_root"; then
6797 snf_root=/opt/snf
6798 fi
6799
6800 if test -z "$snf_include_dir"; then
6801 snf_include_dir="$snf_root/include"
6802 fi
6803
6804 if test -z "$snf_lib_dir"; then
6805 snf_lib_dir="$snf_root/lib"
6806 fi
6807
6808 if test -f "$snf_include_dir/snf.h"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07006809 # We found a header; make sure we can link with the library
JP Abgrall511eca32014-02-12 13:46:45 -08006810 saved_ldflags=$LDFLAGS
6811 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
6812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5
6813$as_echo_n "checking for snf_init in -lsnf... " >&6; }
6814if ${ac_cv_lib_snf_snf_init+:} false; then :
6815 $as_echo_n "(cached) " >&6
6816else
6817 ac_check_lib_save_LIBS=$LIBS
6818LIBS="-lsnf $LIBS"
6819cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6820/* end confdefs.h. */
6821
6822/* Override any GCC internal prototype to avoid an error.
6823 Use char because int might match the return type of a GCC
6824 builtin and then its argument prototype would still apply. */
6825#ifdef __cplusplus
6826extern "C"
6827#endif
6828char snf_init ();
6829int
6830main ()
6831{
6832return snf_init ();
6833 ;
6834 return 0;
6835}
6836_ACEOF
6837if ac_fn_c_try_link "$LINENO"; then :
6838 ac_cv_lib_snf_snf_init=yes
6839else
6840 ac_cv_lib_snf_snf_init=no
6841fi
6842rm -f core conftest.err conftest.$ac_objext \
6843 conftest$ac_exeext conftest.$ac_ext
6844LIBS=$ac_check_lib_save_LIBS
6845fi
6846{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5
6847$as_echo "$ac_cv_lib_snf_snf_init" >&6; }
6848if test "x$ac_cv_lib_snf_snf_init" = xyes; then :
6849 ac_cv_lbl_snf_api="yes"
JP Abgrall511eca32014-02-12 13:46:45 -08006850fi
6851
6852 LDFLAGS="$saved_ldflags"
Elliott Hughes965a4b52017-05-15 10:37:39 -07006853 if test "$ac_cv_lbl_snf_api" = no; then
6854 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5
6855 fi
6856 fi
JP Abgrall511eca32014-02-12 13:46:45 -08006857
Elliott Hughes965a4b52017-05-15 10:37:39 -07006858 if test "$ac_cv_lbl_snf_api" = yes; then
6859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5
6860$as_echo "yes ($snf_root)" >&6; }
6861
6862 V_INCLS="$V_INCLS -I$snf_include_dir"
6863 LIBS="$LIBS -lsnf"
6864 LDFLAGS="$LDFLAGS -L$snf_lib_dir"
6865
6866 if test "$V_PCAP" != snf ; then
6867 SSRC="$SSRC pcap-snf.c"
6868 fi
6869
JP Abgrall511eca32014-02-12 13:46:45 -08006870
6871$as_echo "#define HAVE_SNF_API 1" >>confdefs.h
6872
Elliott Hughes965a4b52017-05-15 10:37:39 -07006873 else
6874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875$as_echo "no" >&6; }
6876
6877 if test "$want_snf" = yes; then
6878 # User requested "snf" capture type but
6879 # we couldn't find the Sniffer API support.
6880 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
6881 fi
6882
6883 if test "$want_snf" = yes; then
6884 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 -08006885 fi
6886 fi
6887fi
6888
Elliott Hughes965a4b52017-05-15 10:37:39 -07006889# Check for Riverbed TurboCap support.
JP Abgrall511eca32014-02-12 13:46:45 -08006890
Elliott Hughes965a4b52017-05-15 10:37:39 -07006891# Check whether --with-turbocap was given.
6892if test "${with_turbocap+set}" = set; then :
6893 withval=$with_turbocap;
6894 if test "$withval" = no
6895 then
6896 # User explicitly doesn't want TurboCap
6897 want_turbocap=no
6898 elif test "$withval" = yes
6899 then
6900 # User wants TurboCap support but hasn't specified a directory.
6901 want_turbocap=yes
6902 else
6903 # User wants TurboCap support with a specified directory.
6904 want_turbocap=yes
6905 turbocap_root=$withval
6906 fi
JP Abgrall511eca32014-02-12 13:46:45 -08006907
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006908else
Elliott Hughes965a4b52017-05-15 10:37:39 -07006909
6910 if test "xxx_only" = yes; then
6911 # User requested something-else-only pcap, so they don't
6912 # want TurboCap support.
6913 want_turbocap=no
6914 else
6915 #
6916 # Use TurboCap API if present, otherwise don't
6917 #
6918 want_turbocap=ifpresent
6919 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006920
6921fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07006922
6923
6924ac_cv_lbl_turbocap_api=no
6925if test "$want_turbocap" != no; then
6926
6927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5
6928$as_echo_n "checking whether TurboCap is supported... " >&6; }
6929
6930 save_CFLAGS="$CFLAGS"
6931 save_LIBS="$LIBS"
6932 if test ! -z "$turbocap_root"; then
6933 TURBOCAP_CFLAGS="-I$turbocap_root/include"
6934 TURBOCAP_LIBS="-L$turbocap_root/lib"
6935 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS"
6936 fi
6937
6938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6939/* end confdefs.h. */
6940
6941 #include <TcApi.h>
6942
6943int
6944main ()
6945{
6946
6947 TC_INSTANCE a; TC_PORT b; TC_BOARD c;
6948 TC_INSTANCE i;
6949 (void)TcInstanceCreateByName("foo", &i);
6950
6951 ;
6952 return 0;
6953}
6954_ACEOF
6955if ac_fn_c_try_compile "$LINENO"; then :
6956 ac_cv_lbl_turbocap_api=yes
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006957fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07006958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6959
6960 CFLAGS="$save_CFLAGS"
6961 if test $ac_cv_lbl_turbocap_api = yes; then
6962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6963$as_echo "yes" >&6; }
6964
6965 SSRC="$SSRC pcap-tc.c"
6966 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS"
6967 LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++"
6968
6969
6970$as_echo "#define HAVE_TC_API 1" >>confdefs.h
6971
6972 else
6973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08006974$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006975
Elliott Hughes965a4b52017-05-15 10:37:39 -07006976 if test "$want_turbocap" = yes; then
6977 # User wanted Turbo support but we couldn't find it.
6978 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 -08006979 fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07006980 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006981fi
6982
Elliott Hughes965a4b52017-05-15 10:37:39 -07006983#
6984# Look for {f}lex.
6985#
6986for ac_prog in flex lex
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006987do
6988 # Extract the first word of "$ac_prog", so it can be a program name with args.
6989set dummy $ac_prog; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08006990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6991$as_echo_n "checking for $ac_word... " >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07006992if ${ac_cv_prog_LEX+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08006993 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006994else
Elliott Hughes965a4b52017-05-15 10:37:39 -07006995 if test -n "$LEX"; then
6996 ac_cv_prog_LEX="$LEX" # Let the user override the test.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08006997else
6998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6999for as_dir in $PATH
7000do
7001 IFS=$as_save_IFS
7002 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08007003 for ac_exec_ext in '' $ac_executable_extensions; do
7004 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Elliott Hughes965a4b52017-05-15 10:37:39 -07007005 ac_cv_prog_LEX="$ac_prog"
JP Abgrall511eca32014-02-12 13:46:45 -08007006 $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 -08007007 break 2
7008 fi
7009done
JP Abgrall511eca32014-02-12 13:46:45 -08007010 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007011IFS=$as_save_IFS
7012
7013fi
7014fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07007015LEX=$ac_cv_prog_LEX
7016if test -n "$LEX"; then
7017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
7018$as_echo "$LEX" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007019else
JP Abgrall511eca32014-02-12 13:46:45 -08007020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7021$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007022fi
7023
7024
Elliott Hughes965a4b52017-05-15 10:37:39 -07007025 test -n "$LEX" && break
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007026done
Elliott Hughes965a4b52017-05-15 10:37:39 -07007027test -n "$LEX" || LEX=":"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007028
Elliott Hughes965a4b52017-05-15 10:37:39 -07007029if test "x$LEX" != "x:"; then
7030 cat >conftest.l <<_ACEOF
7031%%
7032a { ECHO; }
7033b { REJECT; }
7034c { yymore (); }
7035d { yyless (1); }
7036e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */
7037 yyless ((input () != 0)); }
7038f { unput (yytext[0]); }
7039. { BEGIN INITIAL; }
7040%%
7041#ifdef YYTEXT_POINTER
7042extern char *yytext;
7043#endif
7044int
7045main (void)
7046{
7047 return ! yylex () + ! yywrap ();
7048}
7049_ACEOF
7050{ { ac_try="$LEX conftest.l"
7051case "(($ac_try" in
7052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7053 *) ac_try_echo=$ac_try;;
7054esac
7055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
7056$as_echo "$ac_try_echo"; } >&5
7057 (eval "$LEX conftest.l") 2>&5
7058 ac_status=$?
7059 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7060 test $ac_status = 0; }
7061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5
7062$as_echo_n "checking lex output file root... " >&6; }
7063if ${ac_cv_prog_lex_root+:} false; then :
7064 $as_echo_n "(cached) " >&6
7065else
JP Abgrall511eca32014-02-12 13:46:45 -08007066
Elliott Hughes965a4b52017-05-15 10:37:39 -07007067if test -f lex.yy.c; then
7068 ac_cv_prog_lex_root=lex.yy
7069elif test -f lexyy.c; then
7070 ac_cv_prog_lex_root=lexyy
7071else
7072 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5
7073fi
7074fi
7075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5
7076$as_echo "$ac_cv_prog_lex_root" >&6; }
7077LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
JP Abgrall511eca32014-02-12 13:46:45 -08007078
Elliott Hughes965a4b52017-05-15 10:37:39 -07007079if test -z "${LEXLIB+set}"; then
7080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5
7081$as_echo_n "checking lex library... " >&6; }
7082if ${ac_cv_lib_lex+:} false; then :
7083 $as_echo_n "(cached) " >&6
7084else
7085
7086 ac_save_LIBS=$LIBS
7087 ac_cv_lib_lex='none needed'
7088 for ac_lib in '' -lfl -ll; do
7089 LIBS="$ac_lib $ac_save_LIBS"
7090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7091/* end confdefs.h. */
7092`cat $LEX_OUTPUT_ROOT.c`
7093_ACEOF
7094if ac_fn_c_try_link "$LINENO"; then :
7095 ac_cv_lib_lex=$ac_lib
7096fi
7097rm -f core conftest.err conftest.$ac_objext \
7098 conftest$ac_exeext conftest.$ac_ext
7099 test "$ac_cv_lib_lex" != 'none needed' && break
7100 done
7101 LIBS=$ac_save_LIBS
7102
7103fi
7104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5
7105$as_echo "$ac_cv_lib_lex" >&6; }
7106 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex
7107fi
7108
7109
7110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5
7111$as_echo_n "checking whether yytext is a pointer... " >&6; }
7112if ${ac_cv_prog_lex_yytext_pointer+:} false; then :
7113 $as_echo_n "(cached) " >&6
7114else
7115 # POSIX says lex can declare yytext either as a pointer or an array; the
7116# default is implementation-dependent. Figure out which it is, since
7117# not all implementations provide the %pointer and %array declarations.
7118ac_cv_prog_lex_yytext_pointer=no
7119ac_save_LIBS=$LIBS
7120LIBS="$LEXLIB $ac_save_LIBS"
7121cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7122/* end confdefs.h. */
7123
7124 #define YYTEXT_POINTER 1
7125`cat $LEX_OUTPUT_ROOT.c`
7126_ACEOF
7127if ac_fn_c_try_link "$LINENO"; then :
7128 ac_cv_prog_lex_yytext_pointer=yes
7129fi
7130rm -f core conftest.err conftest.$ac_objext \
7131 conftest$ac_exeext conftest.$ac_ext
7132LIBS=$ac_save_LIBS
7133
7134fi
7135{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5
7136$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; }
7137if test $ac_cv_prog_lex_yytext_pointer = yes; then
7138
7139$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h
7140
7141fi
7142rm -f conftest.l $LEX_OUTPUT_ROOT.c
7143
7144fi
7145if test "$LEX" = ":"; then
7146 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5
7147fi
7148
7149#
7150# Make sure {f}lex supports the -P, --header-file, and --nounput flags
7151# and supports processing our scanner.l.
7152#
7153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08007154$as_echo_n "checking for capable lex... " >&6; }
7155if ${tcpdump_cv_capable_lex+:} false; then :
7156 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007157else
Elliott Hughes965a4b52017-05-15 10:37:39 -07007158 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then
7159 tcpdump_cv_capable_lex=yes
7160 else
7161 tcpdump_cv_capable_lex=insufficient
7162 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007163fi
JP Abgrall511eca32014-02-12 13:46:45 -08007164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5
7165$as_echo "$tcpdump_cv_capable_lex" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07007166if test $tcpdump_cv_capable_lex = insufficient ; then
7167 as_fn_error $? "$LEX is insufficient to compile libpcap.
7168 libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5
7169fi
7170
7171#
7172# Look for yacc/bison/byacc.
7173#
7174for ac_prog in 'bison -y' byacc
7175do
7176 # Extract the first word of "$ac_prog", so it can be a program name with args.
7177set dummy $ac_prog; ac_word=$2
7178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7179$as_echo_n "checking for $ac_word... " >&6; }
7180if ${ac_cv_prog_YACC+:} false; then :
7181 $as_echo_n "(cached) " >&6
7182else
7183 if test -n "$YACC"; then
7184 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7185else
7186as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7187for as_dir in $PATH
7188do
7189 IFS=$as_save_IFS
7190 test -z "$as_dir" && as_dir=.
7191 for ac_exec_ext in '' $ac_executable_extensions; do
7192 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7193 ac_cv_prog_YACC="$ac_prog"
7194 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7195 break 2
7196 fi
7197done
7198 done
7199IFS=$as_save_IFS
7200
7201fi
7202fi
7203YACC=$ac_cv_prog_YACC
7204if test -n "$YACC"; then
7205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7206$as_echo "$YACC" >&6; }
7207else
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7209$as_echo "no" >&6; }
7210fi
7211
7212
7213 test -n "$YACC" && break
7214done
7215test -n "$YACC" || YACC="yacc"
7216
7217
7218#
7219# Make sure it supports the -p flag and supports processing our
7220# grammar.y.
7221#
7222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc/bison" >&5
7223$as_echo_n "checking for capable yacc/bison... " >&6; }
7224if ${tcpdump_cv_capable_yacc+:} false; then :
7225 $as_echo_n "(cached) " >&6
7226else
7227 if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then
7228 tcpdump_cv_capable_yacc=yes
7229 else
7230 tcpdump_cv_capable_yacc=insufficient
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007231 fi
7232fi
Elliott Hughes965a4b52017-05-15 10:37:39 -07007233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5
7234$as_echo "$tcpdump_cv_capable_yacc" >&6; }
7235if test $tcpdump_cv_capable_yacc = insufficient ; then
7236 as_fn_error $? "$YACC is insufficient to compile libpcap.
7237 libpcap requires Bison, Berkeley YACC, or another YACC compatible with them." "$LINENO" 5
7238fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007239
JP Abgrall511eca32014-02-12 13:46:45 -08007240#
7241# Assume, by default, no support for shared libraries and V7/BSD convention
7242# for man pages (file formats in section 5, miscellaneous info in section 7).
7243# Individual cases can override this.
7244#
7245DYEXT="none"
7246MAN_FILE_FORMATS=5
7247MAN_MISC_INFO=7
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007248case "$host_os" in
7249
7250aix*)
7251
JP Abgrall511eca32014-02-12 13:46:45 -08007252$as_echo "#define _SUN 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007253
JP Abgrall511eca32014-02-12 13:46:45 -08007254
7255 #
7256 # AIX makes it fun to build shared and static libraries,
7257 # because they're *both* ".a" archive libraries. We
7258 # build the static library for the benefit of the traditional
7259 # scheme of building libpcap and tcpdump in subdirectories of
7260 # the same directory, with tcpdump statically linked with the
7261 # libpcap in question, but we also build a shared library as
7262 # "libpcap.shareda" and install *it*, rather than the static
7263 # library, as "libpcap.a".
7264 #
7265 DYEXT="shareda"
7266
7267 case "$V_PCAP" in
7268
7269 dlpi)
7270 #
7271 # If we're using DLPI, applications will need to
7272 # use /lib/pse.exp if present, as we use the
7273 # STREAMS routines.
7274 #
7275 pseexe="/lib/pse.exp"
7276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5
7277$as_echo_n "checking for $pseexe... " >&6; }
7278 if test -f $pseexe ; then
7279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7280$as_echo "yes" >&6; }
7281 LIBS="-I:$pseexe"
7282 fi
7283 ;;
7284
7285 bpf)
7286 #
7287 # If we're using BPF, we need "-lodm" and "-lcfg", as
7288 # we use them to load the BPF module.
7289 #
7290 LIBS="-lodm -lcfg"
7291 ;;
7292 esac
7293 ;;
7294
7295darwin*)
7296 DYEXT="dylib"
7297 V_CCOPT="$V_CCOPT -fno-common"
7298 # Check whether --enable-universal was given.
7299if test "${enable_universal+set}" = set; then :
7300 enableval=$enable_universal;
7301fi
7302
7303 if test "$enable_universal" != "no"; then
7304 case "$host_os" in
7305
7306 darwin0-7.*)
7307 #
7308 # Pre-Tiger. Build only for 32-bit PowerPC; no
7309 # need for any special compiler or linker flags.
7310 #
7311 ;;
7312
7313 darwin8.0123*)
7314 #
7315 # Tiger, prior to Intel support. Build for 32-bit
7316 # PowerPC and 64-bit PowerPC, with 32-bit PowerPC
7317 # first. (I'm guessing that's what Apple does.)
7318 #
7319 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64"
7320 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64"
7321 ;;
7322
7323 darwin8.456*)
7324 #
7325 # Tiger, subsequent to Intel support but prior to
7326 # x86-64 support. Build for 32-bit PowerPC, 64-bit
7327 # PowerPC, and x86, with 32-bit PowerPC first.
7328 # (I'm guessing that's what Apple does.)
7329 #
7330 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386"
7331 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386"
7332 ;;
7333
7334 darwin8.*)
7335 #
7336 # All other Tiger, so subsequent to x86-64
7337 # support. Build for 32-bit PowerPC, 64-bit
7338 # PowerPC, x86, and x86-64, and with 32-bit PowerPC
7339 # first. (I'm guessing that's what Apple does.)
7340 #
7341 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
7342 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
7343 ;;
7344
7345 darwin9.*)
7346 #
7347 # Leopard. Build for 32-bit PowerPC, 64-bit
7348 # PowerPC, x86, and x86-64, with 32-bit PowerPC
7349 # first. (That's what Apple does.)
7350 #
7351 V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64"
7352 LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64"
7353 ;;
7354
7355 darwin10.*)
7356 #
7357 # Snow Leopard. Build for x86-64, x86, and
7358 # 32-bit PowerPC, with x86-64 first. (That's
7359 # what Apple does, even though Snow Leopard
7360 # doesn't run on PPC, so PPC libpcap runs under
7361 # Rosetta, and Rosetta doesn't support BPF
7362 # ioctls, so PPC programs can't do live
7363 # captures.)
7364 #
7365 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386 -arch ppc"
7366 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386 -arch ppc"
7367 ;;
7368
7369 darwin*)
7370 #
7371 # Post-Snow Leopard. Build for x86-64 and
7372 # x86, with x86-64 first. (That's probably what
7373 # Apple does, given that Rosetta is gone.)
7374 # XXX - update if and when Apple drops support
7375 # for 32-bit x86 code.
7376 #
7377 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386"
7378 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386"
7379 ;;
7380 esac
7381 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007382 ;;
7383
7384hpux9*)
7385
JP Abgrall511eca32014-02-12 13:46:45 -08007386$as_echo "#define HAVE_HPUX9 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007387
JP Abgrall511eca32014-02-12 13:46:45 -08007388
7389 #
7390 # Use System V conventions for man pages.
7391 #
7392 MAN_FILE_FORMATS=4
7393 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007394 ;;
7395
7396hpux10.0*)
JP Abgrall511eca32014-02-12 13:46:45 -08007397
7398 #
7399 # Use System V conventions for man pages.
7400 #
7401 MAN_FILE_FORMATS=4
7402 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007403 ;;
7404
7405hpux10.1*)
JP Abgrall511eca32014-02-12 13:46:45 -08007406
7407 #
7408 # Use System V conventions for man pages.
7409 #
7410 MAN_FILE_FORMATS=4
7411 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007412 ;;
7413
7414hpux*)
7415
JP Abgrall511eca32014-02-12 13:46:45 -08007416$as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007417
JP Abgrall511eca32014-02-12 13:46:45 -08007418 if test "`uname -m`" = "ia64"; then
7419 DYEXT="so"
7420 else
7421 DYEXT="sl"
7422 fi
7423
7424 #
7425 # "-b" builds a shared library; "+h" sets the soname.
7426 #
7427 SHLIB_OPT="-b"
7428 SONAME_OPT="+h"
7429
7430 #
7431 # Use System V conventions for man pages.
7432 #
7433 MAN_FILE_FORMATS=4
7434 MAN_MISC_INFO=5
7435 ;;
7436
7437irix*)
7438 #
7439 # Use System V conventions for man pages.
7440 #
7441 MAN_FILE_FORMATS=4
7442 MAN_MISC_INFO=5
7443 ;;
7444
7445linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*)
7446 DYEXT="so"
7447
7448 #
7449 # Compiler assumed to be GCC; run-time linker may require a -R
7450 # flag.
7451 #
7452 if test "$libdir" != "/usr/lib"; then
7453 V_RFLAGS=-Wl,-R$libdir
7454 fi
7455 ;;
7456
7457osf*)
7458 DYEXT="so"
7459
7460 #
7461 # Use System V conventions for man pages.
7462 #
7463 MAN_FILE_FORMATS=4
7464 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007465 ;;
7466
7467sinix*)
JP Abgrall511eca32014-02-12 13:46:45 -08007468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5
7469$as_echo_n "checking if SINIX compiler defines sinix... " >&6; }
7470 if ${ac_cv_cc_sinix_defined+:} false; then :
7471 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007472else
JP Abgrall511eca32014-02-12 13:46:45 -08007473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007474/* end confdefs.h. */
7475
7476int
7477main ()
7478{
7479int i = sinix;
7480 ;
7481 return 0;
7482}
7483_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08007484if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007485 ac_cv_cc_sinix_defined=yes
7486else
JP Abgrall511eca32014-02-12 13:46:45 -08007487 ac_cv_cc_sinix_defined=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007488fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7490fi
7491
JP Abgrall511eca32014-02-12 13:46:45 -08007492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5
7493$as_echo "$ac_cv_cc_sinix_defined" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007494 if test $ac_cv_cc_sinix_defined = no ; then
7495
JP Abgrall511eca32014-02-12 13:46:45 -08007496$as_echo "#define sinix 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007497
7498 fi
7499 ;;
7500
7501solaris*)
7502
JP Abgrall511eca32014-02-12 13:46:45 -08007503$as_echo "#define HAVE_SOLARIS 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007504
JP Abgrall511eca32014-02-12 13:46:45 -08007505
7506 DYEXT="so"
7507 #
7508 # Use System V conventions for man pages.
7509 #
7510 MAN_FILE_FORMATS=4
7511 MAN_MISC_INFO=5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007512 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007513esac
7514
JP Abgrall511eca32014-02-12 13:46:45 -08007515# Check whether --enable-shared was given.
7516if test "${enable_shared+set}" = set; then :
7517 enableval=$enable_shared;
7518fi
7519
7520test "x$enable_shared" = "xno" && DYEXT="none"
7521
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007522if test -n "$ac_tool_prefix"; then
7523 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7524set dummy ${ac_tool_prefix}ranlib; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08007525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7526$as_echo_n "checking for $ac_word... " >&6; }
7527if ${ac_cv_prog_RANLIB+:} false; then :
7528 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007529else
7530 if test -n "$RANLIB"; then
7531 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7532else
7533as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7534for as_dir in $PATH
7535do
7536 IFS=$as_save_IFS
7537 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08007538 for ac_exec_ext in '' $ac_executable_extensions; do
7539 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007540 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
JP Abgrall511eca32014-02-12 13:46:45 -08007541 $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 -08007542 break 2
7543 fi
7544done
JP Abgrall511eca32014-02-12 13:46:45 -08007545 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007546IFS=$as_save_IFS
7547
7548fi
7549fi
7550RANLIB=$ac_cv_prog_RANLIB
7551if test -n "$RANLIB"; then
JP Abgrall511eca32014-02-12 13:46:45 -08007552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7553$as_echo "$RANLIB" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007554else
JP Abgrall511eca32014-02-12 13:46:45 -08007555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7556$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007557fi
7558
7559
7560fi
7561if test -z "$ac_cv_prog_RANLIB"; then
7562 ac_ct_RANLIB=$RANLIB
7563 # Extract the first word of "ranlib", so it can be a program name with args.
7564set dummy ranlib; ac_word=$2
JP Abgrall511eca32014-02-12 13:46:45 -08007565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7566$as_echo_n "checking for $ac_word... " >&6; }
7567if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7568 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007569else
7570 if test -n "$ac_ct_RANLIB"; then
7571 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7572else
7573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7574for as_dir in $PATH
7575do
7576 IFS=$as_save_IFS
7577 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08007578 for ac_exec_ext in '' $ac_executable_extensions; do
7579 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007580 ac_cv_prog_ac_ct_RANLIB="ranlib"
JP Abgrall511eca32014-02-12 13:46:45 -08007581 $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 -08007582 break 2
7583 fi
7584done
JP Abgrall511eca32014-02-12 13:46:45 -08007585 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007586IFS=$as_save_IFS
7587
7588fi
7589fi
7590ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7591if test -n "$ac_ct_RANLIB"; then
JP Abgrall511eca32014-02-12 13:46:45 -08007592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7593$as_echo "$ac_ct_RANLIB" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007594else
JP Abgrall511eca32014-02-12 13:46:45 -08007595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7596$as_echo "no" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007597fi
7598
7599 if test "x$ac_ct_RANLIB" = x; then
7600 RANLIB=":"
7601 else
7602 case $cross_compiling:$ac_tool_warned in
7603yes:)
JP Abgrall511eca32014-02-12 13:46:45 -08007604{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7605$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007606ac_tool_warned=yes ;;
7607esac
7608 RANLIB=$ac_ct_RANLIB
7609 fi
7610else
7611 RANLIB="$ac_cv_prog_RANLIB"
7612fi
7613
JP Abgrall511eca32014-02-12 13:46:45 -08007614if test -n "$ac_tool_prefix"; then
7615 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7616set dummy ${ac_tool_prefix}ar; ac_word=$2
7617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7618$as_echo_n "checking for $ac_word... " >&6; }
7619if ${ac_cv_prog_AR+:} false; then :
7620 $as_echo_n "(cached) " >&6
7621else
7622 if test -n "$AR"; then
7623 ac_cv_prog_AR="$AR" # Let the user override the test.
7624else
7625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626for as_dir in $PATH
7627do
7628 IFS=$as_save_IFS
7629 test -z "$as_dir" && as_dir=.
7630 for ac_exec_ext in '' $ac_executable_extensions; do
7631 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7632 ac_cv_prog_AR="${ac_tool_prefix}ar"
7633 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7634 break 2
7635 fi
7636done
7637 done
7638IFS=$as_save_IFS
7639
7640fi
7641fi
7642AR=$ac_cv_prog_AR
7643if test -n "$AR"; then
7644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7645$as_echo "$AR" >&6; }
7646else
7647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7648$as_echo "no" >&6; }
7649fi
7650
7651
7652fi
7653if test -z "$ac_cv_prog_AR"; then
7654 ac_ct_AR=$AR
7655 # Extract the first word of "ar", so it can be a program name with args.
7656set dummy ar; ac_word=$2
7657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658$as_echo_n "checking for $ac_word... " >&6; }
7659if ${ac_cv_prog_ac_ct_AR+:} false; then :
7660 $as_echo_n "(cached) " >&6
7661else
7662 if test -n "$ac_ct_AR"; then
7663 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7664else
7665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7666for as_dir in $PATH
7667do
7668 IFS=$as_save_IFS
7669 test -z "$as_dir" && as_dir=.
7670 for ac_exec_ext in '' $ac_executable_extensions; do
7671 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7672 ac_cv_prog_ac_ct_AR="ar"
7673 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7674 break 2
7675 fi
7676done
7677 done
7678IFS=$as_save_IFS
7679
7680fi
7681fi
7682ac_ct_AR=$ac_cv_prog_ac_ct_AR
7683if test -n "$ac_ct_AR"; then
7684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7685$as_echo "$ac_ct_AR" >&6; }
7686else
7687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688$as_echo "no" >&6; }
7689fi
7690
7691 if test "x$ac_ct_AR" = x; then
7692 AR=""
7693 else
7694 case $cross_compiling:$ac_tool_warned in
7695yes:)
7696{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7697$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7698ac_tool_warned=yes ;;
7699esac
7700 AR=$ac_ct_AR
7701 fi
7702else
7703 AR="$ac_cv_prog_AR"
7704fi
7705
7706
7707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7708$as_echo_n "checking whether ln -s works... " >&6; }
7709LN_S=$as_ln_s
7710if test "$LN_S" = "ln -s"; then
7711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7712$as_echo "yes" >&6; }
7713else
7714 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7715$as_echo "no, using $LN_S" >&6; }
7716fi
7717
7718
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007719
7720rm -f os-proto.h
7721 if test "${LBL_CFLAGS+set}" = set; then
7722 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
7723 fi
7724 if test -f .devel ; then
JP Abgrall511eca32014-02-12 13:46:45 -08007725 #
7726 # Skip all the warning option stuff on some compilers.
7727 #
7728 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007729
JP Abgrall511eca32014-02-12 13:46:45 -08007730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5
7731$as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; }
7732 save_CFLAGS="$CFLAGS"
7733 CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy"
7734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7735/* end confdefs.h. */
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08007736
JP Abgrall511eca32014-02-12 13:46:45 -08007737int
7738main ()
7739{
7740return 0
7741 ;
7742 return 0;
7743}
7744_ACEOF
7745if ac_fn_c_try_compile "$LINENO"; then :
7746
7747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7748$as_echo "no" >&6; }
7749 #
7750 # We're assuming this is clang, where
7751 # -Werror=unknown-warning-option is the appropriate
7752 # option to force the compiler to fail.
7753 #
7754 ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option"
7755
7756else
7757
7758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7759$as_echo "yes" >&6; }
7760
7761fi
7762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7763 CFLAGS="$save_CFLAGS"
7764
7765
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5
7767$as_echo_n "checking whether the compiler supports the -Wall option... " >&6; }
7768 save_CFLAGS="$CFLAGS"
Elliott Hughes965a4b52017-05-15 10:37:39 -07007769 if expr "x-Wall" : "x-W.*" >/dev/null
7770 then
7771 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall"
7772 elif expr "x-Wall" : "x-f.*" >/dev/null
7773 then
7774 CFLAGS="$CFLAGS -Werror -Wall"
7775 elif expr "x-Wall" : "x-m.*" >/dev/null
7776 then
7777 CFLAGS="$CFLAGS -Werror -Wall"
7778 else
7779 CFLAGS="$CFLAGS -Wall"
7780 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7782/* end confdefs.h. */
7783
7784int
7785main ()
7786{
7787return 0
7788 ;
7789 return 0;
7790}
7791_ACEOF
7792if ac_fn_c_try_compile "$LINENO"; then :
7793
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7795$as_echo "yes" >&6; }
7796 CFLAGS="$save_CFLAGS"
7797 V_CCOPT="$V_CCOPT -Wall"
7798
7799else
7800
7801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802$as_echo "no" >&6; }
7803 CFLAGS="$save_CFLAGS"
7804
7805fi
7806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7807
7808
Elliott Hughes965a4b52017-05-15 10:37:39 -07007809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5
7810$as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; }
7811 save_CFLAGS="$CFLAGS"
7812 if expr "x-Wsign-compare" : "x-W.*" >/dev/null
7813 then
7814 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare"
7815 elif expr "x-Wsign-compare" : "x-f.*" >/dev/null
7816 then
7817 CFLAGS="$CFLAGS -Werror -Wsign-compare"
7818 elif expr "x-Wsign-compare" : "x-m.*" >/dev/null
7819 then
7820 CFLAGS="$CFLAGS -Werror -Wsign-compare"
7821 else
7822 CFLAGS="$CFLAGS -Wsign-compare"
7823 fi
7824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7825/* end confdefs.h. */
7826
7827int
7828main ()
7829{
7830return 0
7831 ;
7832 return 0;
7833}
7834_ACEOF
7835if ac_fn_c_try_compile "$LINENO"; then :
7836
7837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7838$as_echo "yes" >&6; }
7839 CFLAGS="$save_CFLAGS"
7840 V_CCOPT="$V_CCOPT -Wsign-compare"
7841
7842else
7843
7844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7845$as_echo "no" >&6; }
7846 CFLAGS="$save_CFLAGS"
7847
7848fi
7849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7850
7851
JP Abgrall511eca32014-02-12 13:46:45 -08007852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5
7853$as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; }
7854 save_CFLAGS="$CFLAGS"
Elliott Hughes965a4b52017-05-15 10:37:39 -07007855 if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null
7856 then
7857 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes"
7858 elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null
7859 then
7860 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
7861 elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null
7862 then
7863 CFLAGS="$CFLAGS -Werror -Wmissing-prototypes"
7864 else
7865 CFLAGS="$CFLAGS -Wmissing-prototypes"
7866 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7868/* end confdefs.h. */
7869
7870int
7871main ()
7872{
7873return 0
7874 ;
7875 return 0;
7876}
7877_ACEOF
7878if ac_fn_c_try_compile "$LINENO"; then :
7879
7880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7881$as_echo "yes" >&6; }
7882 CFLAGS="$save_CFLAGS"
7883 V_CCOPT="$V_CCOPT -Wmissing-prototypes"
7884
7885else
7886
7887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7888$as_echo "no" >&6; }
7889 CFLAGS="$save_CFLAGS"
7890
7891fi
7892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7893
7894
7895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5
7896$as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; }
7897 save_CFLAGS="$CFLAGS"
Elliott Hughes965a4b52017-05-15 10:37:39 -07007898 if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null
7899 then
7900 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes"
7901 elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null
7902 then
7903 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
7904 elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null
7905 then
7906 CFLAGS="$CFLAGS -Werror -Wstrict-prototypes"
7907 else
7908 CFLAGS="$CFLAGS -Wstrict-prototypes"
7909 fi
JP Abgrall511eca32014-02-12 13:46:45 -08007910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7911/* end confdefs.h. */
7912
7913int
7914main ()
7915{
7916return 0
7917 ;
7918 return 0;
7919}
7920_ACEOF
7921if ac_fn_c_try_compile "$LINENO"; then :
7922
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7924$as_echo "yes" >&6; }
7925 CFLAGS="$save_CFLAGS"
7926 V_CCOPT="$V_CCOPT -Wstrict-prototypes"
7927
7928else
7929
7930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7931$as_echo "no" >&6; }
7932 CFLAGS="$save_CFLAGS"
7933
7934fi
7935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7936
Elliott Hughes965a4b52017-05-15 10:37:39 -07007937
7938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5
7939$as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; }
7940 save_CFLAGS="$CFLAGS"
7941 if expr "x-Wshadow" : "x-W.*" >/dev/null
7942 then
7943 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow"
7944 elif expr "x-Wshadow" : "x-f.*" >/dev/null
7945 then
7946 CFLAGS="$CFLAGS -Werror -Wshadow"
7947 elif expr "x-Wshadow" : "x-m.*" >/dev/null
7948 then
7949 CFLAGS="$CFLAGS -Werror -Wshadow"
7950 else
7951 CFLAGS="$CFLAGS -Wshadow"
7952 fi
7953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7954/* end confdefs.h. */
7955
7956int
7957main ()
7958{
7959return 0
7960 ;
7961 return 0;
7962}
7963_ACEOF
7964if ac_fn_c_try_compile "$LINENO"; then :
7965
7966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7967$as_echo "yes" >&6; }
7968 CFLAGS="$save_CFLAGS"
7969 V_CCOPT="$V_CCOPT -Wshadow"
7970
7971else
7972
7973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7974$as_echo "no" >&6; }
7975 CFLAGS="$save_CFLAGS"
7976
7977fi
7978rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7979
7980
7981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdeclaration-after-statement option" >&5
7982$as_echo_n "checking whether the compiler supports the -Wdeclaration-after-statement option... " >&6; }
7983 save_CFLAGS="$CFLAGS"
7984 if expr "x-Wdeclaration-after-statement" : "x-W.*" >/dev/null
7985 then
7986 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdeclaration-after-statement"
7987 elif expr "x-Wdeclaration-after-statement" : "x-f.*" >/dev/null
7988 then
7989 CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
7990 elif expr "x-Wdeclaration-after-statement" : "x-m.*" >/dev/null
7991 then
7992 CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement"
7993 else
7994 CFLAGS="$CFLAGS -Wdeclaration-after-statement"
7995 fi
7996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7997/* end confdefs.h. */
7998
7999int
8000main ()
8001{
8002return 0
8003 ;
8004 return 0;
8005}
8006_ACEOF
8007if ac_fn_c_try_compile "$LINENO"; then :
8008
8009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8010$as_echo "yes" >&6; }
8011 CFLAGS="$save_CFLAGS"
8012 V_CCOPT="$V_CCOPT -Wdeclaration-after-statement"
8013
8014else
8015
8016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8017$as_echo "no" >&6; }
8018 CFLAGS="$save_CFLAGS"
8019
8020fi
8021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8022
8023
8024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5
8025$as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; }
8026 save_CFLAGS="$CFLAGS"
8027 if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null
8028 then
8029 CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused"
8030 elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null
8031 then
8032 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
8033 elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null
8034 then
8035 CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused"
8036 else
8037 CFLAGS="$CFLAGS -Wused-but-marked-unused"
8038 fi
8039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8040/* end confdefs.h. */
8041
8042int
8043main ()
8044{
8045return 0
8046 ;
8047 return 0;
8048}
8049_ACEOF
8050if ac_fn_c_try_compile "$LINENO"; then :
8051
8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8053$as_echo "yes" >&6; }
8054 CFLAGS="$save_CFLAGS"
8055 V_CCOPT="$V_CCOPT -Wused-but-marked-unused"
8056
8057else
8058
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8060$as_echo "no" >&6; }
8061 CFLAGS="$save_CFLAGS"
8062
8063fi
8064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8065
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008066 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008067
8068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5
8069$as_echo_n "checking whether the compiler supports generating dependencies... " >&6; }
8070 if test "$GCC" = yes ; then
8071 #
8072 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even
8073 # though it's not); we assume that, in this case, the flag
8074 # would be -M.
8075 #
8076 ac_lbl_dependency_flag="-M"
8077 else
8078 #
8079 # Not GCC or a compiler deemed to be GCC; what platform is
8080 # this? (We're assuming that if the compiler isn't GCC
8081 # it's the compiler from the vendor of the OS; that won't
8082 # necessarily be true for x86 platforms, where it might be
8083 # the Intel C compiler.)
8084 #
8085 case "$host_os" in
8086
8087 irix*|osf*|darwin*)
8088 #
8089 # MIPS C for IRIX, DEC C, and clang all use -M.
8090 #
8091 ac_lbl_dependency_flag="-M"
8092 ;;
8093
8094 solaris*)
8095 #
8096 # Sun C uses -xM.
8097 #
8098 ac_lbl_dependency_flag="-xM"
8099 ;;
8100
8101 hpux*)
8102 #
8103 # HP's older C compilers don't support this.
8104 # HP's newer C compilers support this with
8105 # either +M or +Make; the older compilers
8106 # interpret +M as something completely
8107 # different, so we use +Make so we don't
8108 # think it works with the older compilers.
8109 #
8110 ac_lbl_dependency_flag="+Make"
8111 ;;
8112
8113 *)
8114 #
8115 # Not one of the above; assume no support for
8116 # generating dependencies.
8117 #
8118 ac_lbl_dependency_flag=""
8119 ;;
8120 esac
8121 fi
8122
8123 #
8124 # Is ac_lbl_dependency_flag defined and, if so, does the compiler
8125 # complain about it?
8126 #
8127 # Note: clang doesn't seem to exit with an error status when handed
8128 # an unknown non-warning error, even if you pass it
8129 # -Werror=unknown-warning-option. However, it always supports
8130 # -M, so the fact that this test always succeeds with clang
8131 # isn't an issue.
8132 #
8133 if test ! -z "$ac_lbl_dependency_flag"; then
8134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8135/* end confdefs.h. */
8136int main(void) { return 0; }
8137_ACEOF
8138 echo "$CC" $ac_lbl_dependency_flag conftest.c >&5
8139 if "$CC" $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1; then
8140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5
8141$as_echo "yes, with $ac_lbl_dependency_flag" >&6; }
8142 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag"
8143 MKDEP='${srcdir}/mkdep'
8144 else
8145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8146$as_echo "no" >&6; }
8147 #
8148 # We can't run mkdep, so have "make depend" do
8149 # nothing.
8150 #
8151 MKDEP=:
8152 fi
8153 rm -rf conftest*
8154 else
8155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8156$as_echo "no" >&6; }
8157 #
8158 # We can't run mkdep, so have "make depend" do
8159 # nothing.
8160 #
8161 MKDEP=:
8162 fi
8163
8164
8165
8166 #
8167 # We used to set -n32 for IRIX 6 when not using GCC (presumed
8168 # to mean that we're using MIPS C or MIPSpro C); it specified
8169 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm
8170 # not sure why that would be something to do *only* with a
8171 # .devel file; why should the ABI for which we produce code
8172 # depend on .devel?
8173 #
8174 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008175 name="lbl/os-$os.h"
8176 if test -f $name ; then
8177 ln -s $name os-proto.h
8178
JP Abgrall511eca32014-02-12 13:46:45 -08008179$as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008180
8181 else
JP Abgrall511eca32014-02-12 13:46:45 -08008182 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5
8183$as_echo "$as_me: WARNING: can't find $name" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008184 fi
8185 fi
8186
JP Abgrall511eca32014-02-12 13:46:45 -08008187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr struct has the sa_len member" >&5
8188$as_echo_n "checking if sockaddr struct has the sa_len member... " >&6; }
8189 if ${ac_cv_lbl_sockaddr_has_sa_len+:} false; then :
8190 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008191else
JP Abgrall511eca32014-02-12 13:46:45 -08008192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008193/* end confdefs.h. */
8194
8195# include <sys/types.h>
8196# include <sys/socket.h>
8197int
8198main ()
8199{
8200u_int i = sizeof(((struct sockaddr *)0)->sa_len)
8201 ;
8202 return 0;
8203}
8204_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08008205if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008206 ac_cv_lbl_sockaddr_has_sa_len=yes
8207else
JP Abgrall511eca32014-02-12 13:46:45 -08008208 ac_cv_lbl_sockaddr_has_sa_len=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008209fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8211fi
8212
JP Abgrall511eca32014-02-12 13:46:45 -08008213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_sockaddr_has_sa_len" >&5
8214$as_echo "$ac_cv_lbl_sockaddr_has_sa_len" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008215 if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
8216
JP Abgrall511eca32014-02-12 13:46:45 -08008217$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008218
8219 fi
8220
JP Abgrall511eca32014-02-12 13:46:45 -08008221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr_storage struct exists" >&5
8222$as_echo_n "checking if sockaddr_storage struct exists... " >&6; }
8223 if ${ac_cv_lbl_has_sockaddr_storage+:} false; then :
8224 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008225else
JP Abgrall511eca32014-02-12 13:46:45 -08008226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008227/* end confdefs.h. */
8228
8229# include <sys/types.h>
8230# include <sys/socket.h>
8231int
8232main ()
8233{
8234u_int i = sizeof (struct sockaddr_storage)
8235 ;
8236 return 0;
8237}
8238_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08008239if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008240 ac_cv_lbl_has_sockaddr_storage=yes
8241else
JP Abgrall511eca32014-02-12 13:46:45 -08008242 ac_cv_lbl_has_sockaddr_storage=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008243fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8245fi
8246
JP Abgrall511eca32014-02-12 13:46:45 -08008247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_has_sockaddr_storage" >&5
8248$as_echo "$ac_cv_lbl_has_sockaddr_storage" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008249 if test $ac_cv_lbl_has_sockaddr_storage = yes ; then
8250
JP Abgrall511eca32014-02-12 13:46:45 -08008251$as_echo "#define HAVE_SOCKADDR_STORAGE 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008252
8253 fi
8254
JP Abgrall511eca32014-02-12 13:46:45 -08008255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if dl_hp_ppa_info_t struct has dl_module_id_1 member" >&5
8256$as_echo_n "checking if dl_hp_ppa_info_t struct has dl_module_id_1 member... " >&6; }
8257 if ${ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1+:} false; then :
8258 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008259else
JP Abgrall511eca32014-02-12 13:46:45 -08008260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008261/* end confdefs.h. */
8262
8263# include <sys/types.h>
8264# include <sys/dlpi.h>
8265# include <sys/dlpi_ext.h>
8266int
8267main ()
8268{
8269u_int i = sizeof(((dl_hp_ppa_info_t *)0)->dl_module_id_1)
8270 ;
8271 return 0;
8272}
8273_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -08008274if ac_fn_c_try_compile "$LINENO"; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008275 ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1=yes
8276else
JP Abgrall511eca32014-02-12 13:46:45 -08008277 ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1=no
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008278fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8280fi
8281
JP Abgrall511eca32014-02-12 13:46:45 -08008282 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1" >&5
8283$as_echo "$ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008284 if test $ac_cv_lbl_dl_hp_ppa_info_t_has_dl_module_id_1 = yes ; then
8285
JP Abgrall511eca32014-02-12 13:46:45 -08008286$as_echo "#define HAVE_HP_PPA_INFO_T_DL_MODULE_ID_1 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008287
8288 fi
8289
JP Abgrall511eca32014-02-12 13:46:45 -08008290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned accesses fail" >&5
8291$as_echo_n "checking if unaligned accesses fail... " >&6; }
8292 if ${ac_cv_lbl_unaligned_fail+:} false; then :
8293 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008294else
8295 case "$host_cpu" in
8296
8297 #
8298 # These are CPU types where:
8299 #
8300 # the CPU faults on an unaligned access, but at least some
8301 # OSes that support that CPU catch the fault and simulate
8302 # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) -
8303 # the simulation is slow, so we don't want to use it;
8304 #
8305 # the CPU, I infer (from the old
8306 #
8307 # XXX: should also check that they don't do weird things (like on arm)
8308 #
8309 # comment) doesn't fault on unaligned accesses, but doesn't
8310 # do a normal unaligned fetch, either (e.g., presumably, ARM);
8311 #
8312 # for whatever reason, the test program doesn't work
8313 # (this has been claimed to be the case for several of those
8314 # CPUs - I don't know what the problem is; the problem
8315 # was reported as "the test program dumps core" for SuperH,
8316 # but that's what the test program is *supposed* to do -
8317 # it dumps core before it writes anything, so the test
8318 # for an empty output file should find an empty output
8319 # file and conclude that unaligned accesses don't work).
8320 #
8321 # This run-time test won't work if you're cross-compiling, so
8322 # in order to support cross-compiling for a particular CPU,
8323 # we have to wire in the list of CPU types anyway, as far as
8324 # I know, so perhaps we should just have a set of CPUs on
8325 # which we know it doesn't work, a set of CPUs on which we
8326 # know it does work, and have the script just fail on other
8327 # cpu types and update it when such a failure occurs.
8328 #
JP Abgrall511eca32014-02-12 13:46:45 -08008329 alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1)
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008330 ac_cv_lbl_unaligned_fail=yes
8331 ;;
8332
8333 *)
8334 cat >conftest.c <<EOF
8335# include <sys/types.h>
8336# include <sys/wait.h>
8337# include <stdio.h>
8338 unsigned char a[5] = { 1, 2, 3, 4, 5 };
8339 main() {
8340 unsigned int i;
8341 pid_t pid;
8342 int status;
8343 /* avoid "core dumped" message */
8344 pid = fork();
8345 if (pid < 0)
8346 exit(2);
8347 if (pid > 0) {
8348 /* parent */
8349 pid = waitpid(pid, &status, 0);
8350 if (pid < 0)
8351 exit(3);
8352 exit(!WIFEXITED(status));
8353 }
8354 /* child */
8355 i = *(unsigned int *)&a[1];
8356 printf("%d\n", i);
8357 exit(0);
8358 }
8359EOF
8360 ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
8361 conftest.c $LIBS >/dev/null 2>&1
8362 if test ! -x conftest ; then
8363 ac_cv_lbl_unaligned_fail=yes
8364 else
8365 ./conftest >conftest.out
8366 if test ! -s conftest.out ; then
8367 ac_cv_lbl_unaligned_fail=yes
8368 else
8369 ac_cv_lbl_unaligned_fail=no
8370 fi
8371 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008372 rm -f -r conftest* core core.conftest
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008373 ;;
8374 esac
8375fi
8376
JP Abgrall511eca32014-02-12 13:46:45 -08008377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_unaligned_fail" >&5
8378$as_echo "$ac_cv_lbl_unaligned_fail" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008379 if test $ac_cv_lbl_unaligned_fail = yes ; then
8380
JP Abgrall511eca32014-02-12 13:46:45 -08008381$as_echo "#define LBL_ALIGN 1" >>confdefs.h
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008382
8383 fi
8384
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008385rm -f net
8386ln -s ${srcdir}/bpf/net net
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
JP Abgrall511eca32014-02-12 13:46:45 -08008401
8402
8403
8404
8405
Elliott Hughesd8845d72015-10-19 18:07:04 -07008406# Check whether --enable-usb was given.
8407if test "${enable_usb+set}" = set; then :
8408 enableval=$enable_usb;
8409else
8410 enable_usb=yes
8411fi
8412
8413
Elliott Hughes965a4b52017-05-15 10:37:39 -07008414if test "xxx_only" = yes; then
8415 # User requested something-else-only pcap, so they don't
8416 # want USB support.
8417 enable_usb=no
8418fi
8419
Elliott Hughesd8845d72015-10-19 18:07:04 -07008420if test "x$enable_usb" != "xno" ; then
8421 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USB sniffing support" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008422$as_echo_n "checking for USB sniffing support... " >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -07008423 case "$host_os" in
8424 linux*)
JP Abgrall511eca32014-02-12 13:46:45 -08008425
8426$as_echo "#define PCAP_SUPPORT_USB 1" >>confdefs.h
8427
8428 USB_SRC=pcap-usb-linux.c
8429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8430$as_echo "yes" >&6; }
8431 ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null`
8432 if test $? -ne 0 ; then
8433 ac_usb_dev_name="usbmon"
8434 fi
8435
8436cat >>confdefs.h <<_ACEOF
8437#define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name"
8438_ACEOF
8439
8440 { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5
8441$as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;}
8442 #
8443 # Do we have a version of <linux/compiler.h> available?
8444 # If so, we might need it for <linux/usbdevice_fs.h>.
8445 #
8446 for ac_header in linux/compiler.h
8447do :
8448 ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default"
8449if test "x$ac_cv_header_linux_compiler_h" = xyes; then :
8450 cat >>confdefs.h <<_ACEOF
8451#define HAVE_LINUX_COMPILER_H 1
8452_ACEOF
8453
8454fi
8455
8456done
8457
8458 if test "$ac_cv_header_linux_compiler_h" = yes; then
8459 #
8460 # Yes - include it when testing for <linux/usbdevice_fs.h>.
8461 #
8462 for ac_header in linux/usbdevice_fs.h
8463do :
8464 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h>
8465"
8466if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
8467 cat >>confdefs.h <<_ACEOF
8468#define HAVE_LINUX_USBDEVICE_FS_H 1
8469_ACEOF
8470
8471fi
8472
8473done
8474
8475 else
8476 for ac_header in linux/usbdevice_fs.h
8477do :
8478 ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default"
8479if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then :
8480 cat >>confdefs.h <<_ACEOF
8481#define HAVE_LINUX_USBDEVICE_FS_H 1
8482_ACEOF
8483
8484fi
8485
8486done
8487
8488 fi
8489 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then
8490 #
8491 # OK, does it define bRequestType? Older versions of the kernel
8492 # define fields with names like "requesttype, "request", and
8493 # "value", rather than "bRequestType", "bRequest", and
8494 # "wValue".
8495 #
8496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if usbdevfs_ctrltransfer struct has bRequestType member" >&5
8497$as_echo_n "checking if usbdevfs_ctrltransfer struct has bRequestType member... " >&6; }
8498 if ${ac_cv_usbdevfs_ctrltransfer_has_bRequestType+:} false; then :
8499 $as_echo_n "(cached) " >&6
8500else
8501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8502/* end confdefs.h. */
8503
8504$ac_includes_default
8505#ifdef HAVE_SYS_BITYPES_H
8506#include <sys/bitypes.h>
8507#endif
8508#ifdef HAVE_LINUX_COMPILER_H
8509#include <linux/compiler.h>
8510#endif
8511#include <linux/usbdevice_fs.h>
8512int
8513main ()
8514{
8515u_int i = sizeof(((struct usbdevfs_ctrltransfer *)0)->bRequestType)
8516 ;
8517 return 0;
8518}
8519_ACEOF
8520if ac_fn_c_try_compile "$LINENO"; then :
8521 ac_cv_usbdevfs_ctrltransfer_has_bRequestType=yes
8522else
8523 ac_cv_usbdevfs_ctrltransfer_has_bRequestType=no
8524fi
8525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8526fi
8527
8528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_usbdevfs_ctrltransfer_has_bRequestType" >&5
8529$as_echo "$ac_cv_usbdevfs_ctrltransfer_has_bRequestType" >&6; }
8530 if test $ac_cv_usbdevfs_ctrltransfer_has_bRequestType = yes ; then
8531
8532$as_echo "#define HAVE_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1" >>confdefs.h
8533
8534 fi
8535 fi
8536 ;;
Elliott Hughes965a4b52017-05-15 10:37:39 -07008537 freebsd*)
8538 #
8539 # This just uses BPF in FreeBSD 8.4 and later; we don't need
8540 # to check for anything special for capturing.
8541 #
8542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in FreeBSD 8.4 and later" >&5
8543$as_echo "yes, in FreeBSD 8.4 and later" >&6; }
8544 ;;
8545
Elliott Hughesd8845d72015-10-19 18:07:04 -07008546 *)
JP Abgrall511eca32014-02-12 13:46:45 -08008547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8548$as_echo "no" >&6; }
8549 ;;
8550esac
Elliott Hughesd8845d72015-10-19 18:07:04 -07008551fi
JP Abgrall511eca32014-02-12 13:46:45 -08008552
8553
8554
Elliott Hughes965a4b52017-05-15 10:37:39 -07008555if test "xxx_only" != yes; then
8556 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the platform could support netfilter sniffing" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008557$as_echo_n "checking whether the platform could support netfilter sniffing... " >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07008558 case "$host_os" in
8559 linux*)
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008561$as_echo "yes" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07008562 #
8563 # Life's too short to deal with trying to get this to compile
8564 # if you don't get the right types defined with
8565 # __KERNEL_STRICT_NAMES getting defined by some other include.
8566 #
8567 # Check whether the includes Just Work. If not, don't turn on
8568 # netfilter support.
8569 #
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008571$as_echo_n "checking whether we can compile the netfilter support... " >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07008572 if ${ac_cv_netfilter_can_compile+:} false; then :
JP Abgrall511eca32014-02-12 13:46:45 -08008573 $as_echo_n "(cached) " >&6
8574else
8575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8576/* end confdefs.h. */
8577
8578$ac_includes_default
8579#include <sys/socket.h>
8580#include <netinet/in.h>
8581#include <linux/types.h>
8582
8583#include <linux/netlink.h>
8584#include <linux/netfilter.h>
8585#include <linux/netfilter/nfnetlink.h>
8586#include <linux/netfilter/nfnetlink_log.h>
8587#include <linux/netfilter/nfnetlink_queue.h>
8588int
8589main ()
8590{
8591
8592 ;
8593 return 0;
8594}
8595_ACEOF
8596if ac_fn_c_try_compile "$LINENO"; then :
8597 ac_cv_netfilter_can_compile=yes
8598else
8599 ac_cv_netfilter_can_compile=no
8600fi
8601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8602fi
8603
Elliott Hughes965a4b52017-05-15 10:37:39 -07008604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008605$as_echo "$ac_cv_netfilter_can_compile" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07008606 if test $ac_cv_netfilter_can_compile = yes ; then
JP Abgrall511eca32014-02-12 13:46:45 -08008607
8608$as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h
8609
Elliott Hughes965a4b52017-05-15 10:37:39 -07008610 NETFILTER_SRC=pcap-netfilter-linux.c
8611 fi
8612 ;;
8613 *)
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008615$as_echo "no" >&6; }
Elliott Hughes965a4b52017-05-15 10:37:39 -07008616 ;;
8617 esac
8618fi
JP Abgrall511eca32014-02-12 13:46:45 -08008619
8620
8621
8622# Check whether --enable-bluetooth was given.
8623if test "${enable_bluetooth+set}" = set; then :
8624 enableval=$enable_bluetooth;
8625else
Elliott Hughesd8845d72015-10-19 18:07:04 -07008626 enable_bluetooth=ifsupportavailable
JP Abgrall511eca32014-02-12 13:46:45 -08008627fi
8628
8629
Elliott Hughes965a4b52017-05-15 10:37:39 -07008630if test "xxx_only" = yes; then
8631 # User requested something-else-only pcap, so they don't
8632 # want Bluetooth support.
8633 enable_bluetooth=no
8634fi
8635
JP Abgrall511eca32014-02-12 13:46:45 -08008636if test "x$enable_bluetooth" != "xno" ; then
8637 case "$host_os" in
8638 linux*)
8639 ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default"
8640if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then :
8641
8642
8643$as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h
8644
8645 BT_SRC=pcap-bt-linux.c
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5
8647$as_echo "$as_me: Bluetooth sniffing is supported" >&6;}
8648
8649 #
8650 # OK, does struct sockaddr_hci have an hci_channel
8651 # member?
8652 #
8653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct sockaddr_hci has hci_channel member" >&5
8654$as_echo_n "checking if struct sockaddr_hci has hci_channel member... " >&6; }
8655 if ${ac_cv_lbl_sockaddr_hci_has_hci_channel+:} false; then :
8656 $as_echo_n "(cached) " >&6
8657else
8658 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8659/* end confdefs.h. */
8660
8661#include <bluetooth/bluetooth.h>
8662#include <bluetooth/hci.h>
8663
8664int
8665main ()
8666{
8667u_int i = sizeof(((struct sockaddr_hci *)0)->hci_channel)
8668 ;
8669 return 0;
8670}
8671_ACEOF
8672if ac_fn_c_try_compile "$LINENO"; then :
8673 ac_cv_lbl_sockaddr_hci_has_hci_channel=yes
8674else
8675 ac_cv_lbl_sockaddr_hci_has_hci_channel=no
8676fi
8677rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8678fi
8679
8680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_sockaddr_hci_has_hci_channel" >&5
8681$as_echo "$ac_cv_lbl_sockaddr_hci_has_hci_channel" >&6; }
8682 if test $ac_cv_lbl_sockaddr_hci_has_hci_channel = yes ; then
8683
8684$as_echo "#define SOCKADDR_HCI_HAS_HCI_CHANNEL /**/" >>confdefs.h
8685
Elliott Hughesd8845d72015-10-19 18:07:04 -07008686
8687 #
8688 # OK, is HCI_CHANNEL_MONITOR defined?
8689 #
8690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5
8691$as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; }
8692 if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then :
8693 $as_echo_n "(cached) " >&6
8694else
8695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8696/* end confdefs.h. */
8697
8698#include <bluetooth/bluetooth.h>
8699#include <bluetooth/hci.h>
8700
8701int
8702main ()
8703{
8704u_int i = HCI_CHANNEL_MONITOR
8705 ;
8706 return 0;
8707}
8708_ACEOF
8709if ac_fn_c_try_compile "$LINENO"; then :
8710 ac_cv_lbl_hci_channel_monitor_is_defined=yes
8711else
8712 ac_cv_lbl_hci_channel_monitor_is_defined=no
8713fi
8714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8715fi
8716
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_hci_channel_monitor_is_defined" >&5
8718$as_echo "$ac_cv_lbl_hci_channel_monitor_is_defined" >&6; }
8719 if test $ac_cv_lbl_hci_channel_monitor_is_defined = yes ; then
8720
8721$as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h
8722
8723 BT_MONITOR_SRC=pcap-bt-monitor-linux.c
8724 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008725 fi
Elliott Hughesd8845d72015-10-19 18:07:04 -07008726 ac_lbl_bluetooth_available=yes
JP Abgrall511eca32014-02-12 13:46:45 -08008727
8728else
Elliott Hughesd8845d72015-10-19 18:07:04 -07008729 ac_lbl_bluetooth_available=no
JP Abgrall511eca32014-02-12 13:46:45 -08008730
8731fi
8732
8733
Elliott Hughesd8845d72015-10-19 18:07:04 -07008734 if test "x$ac_lbl_bluetooth_available" == "xno" ; then
8735 if test "x$enable_bluetooth" = "xyes" ; then
8736 as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5
8737 else
8738 { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5
8739$as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;}
8740 fi
8741 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008742 ;;
8743 *)
Elliott Hughesd8845d72015-10-19 18:07:04 -07008744 if test "x$enable_bluetooth" = "xyes" ; then
8745 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5
8746 else
8747 { $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008748$as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;}
Elliott Hughesd8845d72015-10-19 18:07:04 -07008749 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008750 ;;
8751 esac
8752
8753
Elliott Hughesd8845d72015-10-19 18:07:04 -07008754
JP Abgrall511eca32014-02-12 13:46:45 -08008755fi
8756
JP Abgrall511eca32014-02-12 13:46:45 -08008757# Check whether --enable-dbus was given.
8758if test "${enable_dbus+set}" = set; then :
8759 enableval=$enable_dbus;
8760else
8761 enable_dbus=ifavailable
8762fi
8763
8764
Elliott Hughes965a4b52017-05-15 10:37:39 -07008765if test "xxx_only" = yes; then
8766 # User requested something-else-only pcap, so they don't
8767 # want D-Bus support.
8768 enable_dbus=no
8769fi
8770
JP Abgrall511eca32014-02-12 13:46:45 -08008771if test "x$enable_dbus" != "xno"; then
8772 if test "x$enable_dbus" = "xyes"; then
8773 case "$host_os" in
8774
8775 darwin*)
8776 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07008777 # We don't support D-Bus sniffing on OS X; see
8778 #
JP Abgrall511eca32014-02-12 13:46:45 -08008779 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
8780 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07008781 # The user requested it, so fail.
8782 #
JP Abgrall511eca32014-02-12 13:46:45 -08008783 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on OS X" "$LINENO" 5
JP Abgrall511eca32014-02-12 13:46:45 -08008784 esac
8785 else
8786 case "$host_os" in
8787
8788 darwin*)
8789 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07008790 # We don't support D-Bus sniffing on OS X; see
8791 #
JP Abgrall511eca32014-02-12 13:46:45 -08008792 # https://bugs.freedesktop.org/show_bug.cgi?id=74029
8793 #
Elliott Hughesd8845d72015-10-19 18:07:04 -07008794 # The user dind't explicitly request it, so just
8795 # silently refuse to enable it.
8796 #
8797 enable_dbus="no"
JP Abgrall511eca32014-02-12 13:46:45 -08008798 ;;
Elliott Hughesd8845d72015-10-19 18:07:04 -07008799 esac
8800 fi
8801fi
JP Abgrall511eca32014-02-12 13:46:45 -08008802
Elliott Hughesd8845d72015-10-19 18:07:04 -07008803if test "x$enable_dbus" != "xno"; then
8804 # Extract the first word of "pkg-config", so it can be a program name with args.
JP Abgrall511eca32014-02-12 13:46:45 -08008805set dummy pkg-config; ac_word=$2
8806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8807$as_echo_n "checking for $ac_word... " >&6; }
8808if ${ac_cv_prog_PKGCONFIG+:} false; then :
8809 $as_echo_n "(cached) " >&6
8810else
8811 if test -n "$PKGCONFIG"; then
8812 ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test.
8813else
8814as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8815for as_dir in $PATH
8816do
8817 IFS=$as_save_IFS
8818 test -z "$as_dir" && as_dir=.
8819 for ac_exec_ext in '' $ac_executable_extensions; do
8820 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8821 ac_cv_prog_PKGCONFIG="pkg-config"
8822 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8823 break 2
8824 fi
8825done
8826 done
8827IFS=$as_save_IFS
8828
8829 test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no"
8830fi
8831fi
8832PKGCONFIG=$ac_cv_prog_PKGCONFIG
8833if test -n "$PKGCONFIG"; then
8834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
8835$as_echo "$PKGCONFIG" >&6; }
8836else
8837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8838$as_echo "no" >&6; }
8839fi
8840
8841
Elliott Hughesd8845d72015-10-19 18:07:04 -07008842 if test "x$PKGCONFIG" != "xno"; then
8843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008844$as_echo_n "checking for D-Bus... " >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -07008845 if "$PKGCONFIG" dbus-1; then
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008847$as_echo "yes" >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -07008848 DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1`
8849 DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1`
8850 save_CFLAGS="$CFLAGS"
8851 save_LIBS="$LIBS"
8852 CFLAGS="$CFLAGS $DBUS_CFLAGS"
8853 LIBS="$LIBS $DBUS_LIBS"
8854 { $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 -08008855$as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -07008856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
JP Abgrall511eca32014-02-12 13:46:45 -08008857/* end confdefs.h. */
8858#include <string.h>
8859
Elliott Hughesd8845d72015-10-19 18:07:04 -07008860 #include <time.h>
8861 #include <sys/time.h>
JP Abgrall511eca32014-02-12 13:46:45 -08008862
Elliott Hughesd8845d72015-10-19 18:07:04 -07008863 #include <dbus/dbus.h>
JP Abgrall511eca32014-02-12 13:46:45 -08008864int
8865main ()
8866{
8867return dbus_connection_read_write(NULL, 0);
8868 ;
8869 return 0;
8870}
8871_ACEOF
8872if ac_fn_c_try_link "$LINENO"; then :
8873
Elliott Hughesd8845d72015-10-19 18:07:04 -07008874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008875$as_echo "yes" >&6; }
8876
8877$as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h
8878
Elliott Hughesd8845d72015-10-19 18:07:04 -07008879 DBUS_SRC=pcap-dbus.c
8880 V_INCLS="$V_INCLS $DBUS_CFLAGS"
JP Abgrall511eca32014-02-12 13:46:45 -08008881
8882else
8883
Elliott Hughesd8845d72015-10-19 18:07:04 -07008884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008885$as_echo "no" >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -07008886 if test "x$enable_dbus" = "xyes"; then
8887 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5
8888 fi
8889 LIBS="$save_LIBS"
JP Abgrall511eca32014-02-12 13:46:45 -08008890
8891fi
8892rm -f core conftest.err conftest.$ac_objext \
8893 conftest$ac_exeext conftest.$ac_ext
Elliott Hughesd8845d72015-10-19 18:07:04 -07008894 CFLAGS="$save_CFLAGS"
8895 else
8896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
JP Abgrall511eca32014-02-12 13:46:45 -08008897$as_echo "no" >&6; }
Elliott Hughesd8845d72015-10-19 18:07:04 -07008898 if test "x$enable_dbus" = "xyes"; then
8899 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5
JP Abgrall511eca32014-02-12 13:46:45 -08008900 fi
Elliott Hughesd8845d72015-10-19 18:07:04 -07008901 fi
JP Abgrall511eca32014-02-12 13:46:45 -08008902 fi
8903
8904
8905fi
8906
8907case "$host_os" in
8908linux*)
8909 for ac_header in linux/net_tstamp.h
8910do :
8911 ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default"
8912if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then :
8913 cat >>confdefs.h <<_ACEOF
8914#define HAVE_LINUX_NET_TSTAMP_H 1
8915_ACEOF
8916
8917fi
8918
8919done
8920
8921 ;;
8922*)
8923 { $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5
8924$as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;}
8925 ;;
8926esac
8927
Elliott Hughesd8845d72015-10-19 18:07:04 -07008928# Check whether --enable-packet-ring was given.
8929if test "${enable_packet_ring+set}" = set; then :
8930 enableval=$enable_packet_ring;
8931else
8932 enable_packet_ring=yes
8933fi
8934
8935
8936if test "x$enable_packet_ring" != "xno" ; then
8937
8938$as_echo "#define PCAP_SUPPORT_PACKET_RING 1" >>confdefs.h
8939
8940
8941fi
8942
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008943# Find a good install program. We prefer a C program (faster),
8944# so one script is as good as another. But avoid the broken or
8945# incompatible versions:
8946# SysV /etc/install, /usr/sbin/install
8947# SunOS /usr/etc/install
8948# IRIX /sbin/install
8949# AIX /bin/install
8950# AmigaOS /C/install, which installs bootblocks on floppy discs
8951# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
8952# AFS /usr/afsws/bin/install, which mishandles nonexistent args
8953# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
8954# OS/2's system install, which has a completely different semantic
8955# ./install, which can be erroneously created by make from ./install.sh.
JP Abgrall511eca32014-02-12 13:46:45 -08008956# Reject install programs that cannot install multiple files.
8957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
8958$as_echo_n "checking for a BSD-compatible install... " >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008959if test -z "$INSTALL"; then
JP Abgrall511eca32014-02-12 13:46:45 -08008960if ${ac_cv_path_install+:} false; then :
8961 $as_echo_n "(cached) " >&6
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008962else
8963 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8964for as_dir in $PATH
8965do
8966 IFS=$as_save_IFS
8967 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08008968 # Account for people who put trailing slashes in PATH elements.
8969case $as_dir/ in #((
8970 ./ | .// | /[cC]/* | \
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008971 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
JP Abgrall511eca32014-02-12 13:46:45 -08008972 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008973 /usr/ucb/* ) ;;
8974 *)
8975 # OSF1 and SCO ODT 3.0 have their own names for install.
8976 # Don't use installbsd from OSF since it installs stuff as root
8977 # by default.
8978 for ac_prog in ginstall scoinst install; do
8979 for ac_exec_ext in '' $ac_executable_extensions; do
JP Abgrall511eca32014-02-12 13:46:45 -08008980 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08008981 if test $ac_prog = install &&
8982 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8983 # AIX install. It has an incompatible calling convention.
8984 :
8985 elif test $ac_prog = install &&
8986 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
8987 # program-specific install script used by HP pwplus--don't use.
8988 :
8989 else
JP Abgrall511eca32014-02-12 13:46:45 -08008990 rm -rf conftest.one conftest.two conftest.dir
8991 echo one > conftest.one
8992 echo two > conftest.two
8993 mkdir conftest.dir
8994 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
8995 test -s conftest.one && test -s conftest.two &&
8996 test -s conftest.dir/conftest.one &&
8997 test -s conftest.dir/conftest.two
8998 then
8999 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
9000 break 3
9001 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009002 fi
9003 fi
9004 done
9005 done
9006 ;;
9007esac
JP Abgrall511eca32014-02-12 13:46:45 -08009008
9009 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009010IFS=$as_save_IFS
9011
JP Abgrall511eca32014-02-12 13:46:45 -08009012rm -rf conftest.one conftest.two conftest.dir
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009013
9014fi
9015 if test "${ac_cv_path_install+set}" = set; then
9016 INSTALL=$ac_cv_path_install
9017 else
9018 # As a last resort, use the slow shell script. Don't cache a
9019 # value for INSTALL within a source directory, because that will
9020 # break other packages using the cache if that directory is
9021 # removed, or if the value is a relative name.
9022 INSTALL=$ac_install_sh
9023 fi
9024fi
JP Abgrall511eca32014-02-12 13:46:45 -08009025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
9026$as_echo "$INSTALL" >&6; }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009027
9028# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
9029# It thinks the first close brace ends the variable substitution.
9030test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
9031
9032test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
9033
9034test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
9035
9036
9037ac_config_headers="$ac_config_headers config.h"
9038
9039
JP Abgrall511eca32014-02-12 13:46:45 -08009040ac_config_commands="$ac_config_commands default-1"
9041
9042ac_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"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009043
9044cat >confcache <<\_ACEOF
9045# This file is a shell script that caches the results of configure
9046# tests run on this system so they can be shared between configure
9047# scripts and configure runs, see configure's option --config-cache.
9048# It is not useful on other systems. If it contains results you don't
9049# want to keep, you may remove or edit it.
9050#
9051# config.status only pays attention to the cache file if you give it
9052# the --recheck option to rerun configure.
9053#
9054# `ac_cv_env_foo' variables (set or unset) will be overridden when
9055# loading this file, other *unset* `ac_cv_foo' will be assigned the
9056# following values.
9057
9058_ACEOF
9059
9060# The following way of writing the cache mishandles newlines in values,
9061# but we know of no workaround that is simple, portable, and efficient.
9062# So, we kill variables containing newlines.
9063# Ultrix sh set writes to stderr and can't be redirected directly,
9064# and sets the high bit in the cache file unless we assign to the vars.
9065(
9066 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
9067 eval ac_val=\$$ac_var
9068 case $ac_val in #(
9069 *${as_nl}*)
9070 case $ac_var in #(
JP Abgrall511eca32014-02-12 13:46:45 -08009071 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
9072$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009073 esac
9074 case $ac_var in #(
9075 _ | IFS | as_nl) ;; #(
JP Abgrall511eca32014-02-12 13:46:45 -08009076 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
9077 *) { eval $ac_var=; unset $ac_var;} ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009078 esac ;;
9079 esac
9080 done
9081
9082 (set) 2>&1 |
9083 case $as_nl`(ac_space=' '; set) 2>&1` in #(
9084 *${as_nl}ac_space=\ *)
JP Abgrall511eca32014-02-12 13:46:45 -08009085 # `set' does not quote correctly, so add quotes: double-quote
9086 # substitution turns \\\\ into \\, and sed turns \\ into \.
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009087 sed -n \
9088 "s/'/'\\\\''/g;
9089 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
9090 ;; #(
9091 *)
9092 # `set' quotes correctly as required by POSIX, so do not add quotes.
9093 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
9094 ;;
9095 esac |
9096 sort
9097) |
9098 sed '
9099 /^ac_cv_env_/b end
9100 t clear
9101 :clear
9102 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
9103 t end
9104 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
9105 :end' >>confcache
9106if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
9107 if test -w "$cache_file"; then
JP Abgrall511eca32014-02-12 13:46:45 -08009108 if test "x$cache_file" != "x/dev/null"; then
9109 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
9110$as_echo "$as_me: updating cache $cache_file" >&6;}
9111 if test ! -f "$cache_file" || test -h "$cache_file"; then
9112 cat confcache >"$cache_file"
9113 else
9114 case $cache_file in #(
9115 */* | ?:*)
9116 mv -f confcache "$cache_file"$$ &&
9117 mv -f "$cache_file"$$ "$cache_file" ;; #(
9118 *)
9119 mv -f confcache "$cache_file" ;;
9120 esac
9121 fi
9122 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009123 else
JP Abgrall511eca32014-02-12 13:46:45 -08009124 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
9125$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009126 fi
9127fi
9128rm -f confcache
9129
9130test "x$prefix" = xNONE && prefix=$ac_default_prefix
9131# Let make expand exec_prefix.
9132test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9133
9134DEFS=-DHAVE_CONFIG_H
9135
9136ac_libobjs=
9137ac_ltlibobjs=
JP Abgrall511eca32014-02-12 13:46:45 -08009138U=
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009139for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
9140 # 1. Remove the extension, and $U if already installed.
9141 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
JP Abgrall511eca32014-02-12 13:46:45 -08009142 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009143 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
9144 # will be set to the directory where LIBOBJS objects are built.
JP Abgrall511eca32014-02-12 13:46:45 -08009145 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
9146 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009147done
9148LIBOBJS=$ac_libobjs
9149
9150LTLIBOBJS=$ac_ltlibobjs
9151
9152
9153
JP Abgrall511eca32014-02-12 13:46:45 -08009154: "${CONFIG_STATUS=./config.status}"
9155ac_write_fail=0
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009156ac_clean_files_save=$ac_clean_files
9157ac_clean_files="$ac_clean_files $CONFIG_STATUS"
JP Abgrall511eca32014-02-12 13:46:45 -08009158{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
9159$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
9160as_write_fail=0
9161cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009162#! $SHELL
9163# Generated by $as_me.
9164# Run this file to recreate the current configuration.
9165# Compiler output produced by configure, useful for debugging
9166# configure, is in config.log if it exists.
9167
9168debug=false
9169ac_cs_recheck=false
9170ac_cs_silent=false
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009171
JP Abgrall511eca32014-02-12 13:46:45 -08009172SHELL=\${CONFIG_SHELL-$SHELL}
9173export SHELL
9174_ASEOF
9175cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
9176## -------------------- ##
9177## M4sh Initialization. ##
9178## -------------------- ##
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009179
9180# Be more Bourne compatible
9181DUALCASE=1; export DUALCASE # for MKS sh
JP Abgrall511eca32014-02-12 13:46:45 -08009182if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009183 emulate sh
9184 NULLCMD=:
JP Abgrall511eca32014-02-12 13:46:45 -08009185 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009186 # is contrary to our usage. Disable this feature.
9187 alias -g '${1+"$@"}'='"$@"'
9188 setopt NO_GLOB_SUBST
9189else
JP Abgrall511eca32014-02-12 13:46:45 -08009190 case `(set -o) 2>/dev/null` in #(
9191 *posix*) :
9192 set -o posix ;; #(
9193 *) :
9194 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009195esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009196fi
9197
9198
JP Abgrall511eca32014-02-12 13:46:45 -08009199as_nl='
9200'
9201export as_nl
9202# Printing a long string crashes Solaris 7 /usr/bin/printf.
9203as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
9204as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
9205as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
9206# Prefer a ksh shell builtin over an external printf program on Solaris,
9207# but without wasting forks for bash or zsh.
9208if test -z "$BASH_VERSION$ZSH_VERSION" \
9209 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
9210 as_echo='print -r --'
9211 as_echo_n='print -rn --'
9212elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
9213 as_echo='printf %s\n'
9214 as_echo_n='printf %s'
9215else
9216 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
9217 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
9218 as_echo_n='/usr/ucb/echo -n'
9219 else
9220 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
9221 as_echo_n_body='eval
9222 arg=$1;
9223 case $arg in #(
9224 *"$as_nl"*)
9225 expr "X$arg" : "X\\(.*\\)$as_nl";
9226 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
9227 esac;
9228 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
9229 '
9230 export as_echo_n_body
9231 as_echo_n='sh -c $as_echo_n_body as_echo'
9232 fi
9233 export as_echo_body
9234 as_echo='sh -c $as_echo_body as_echo'
9235fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009236
9237# The user is always right.
9238if test "${PATH_SEPARATOR+set}" != set; then
JP Abgrall511eca32014-02-12 13:46:45 -08009239 PATH_SEPARATOR=:
9240 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
9241 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
9242 PATH_SEPARATOR=';'
9243 }
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009244fi
9245
9246
9247# IFS
9248# We need space, tab and new line, in precisely that order. Quoting is
9249# there to prevent editors from complaining about space-tab.
9250# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9251# splitting by setting IFS to empty value.)
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009252IFS=" "" $as_nl"
9253
9254# Find who we are. Look in the path if we contain no directory separator.
JP Abgrall511eca32014-02-12 13:46:45 -08009255as_myself=
9256case $0 in #((
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009257 *[\\/]* ) as_myself=$0 ;;
9258 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9259for as_dir in $PATH
9260do
9261 IFS=$as_save_IFS
9262 test -z "$as_dir" && as_dir=.
JP Abgrall511eca32014-02-12 13:46:45 -08009263 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
9264 done
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009265IFS=$as_save_IFS
9266
9267 ;;
9268esac
9269# We did not find ourselves, most probably we were run as `sh COMMAND'
9270# in which case we are not to be found in the path.
9271if test "x$as_myself" = x; then
9272 as_myself=$0
9273fi
9274if test ! -f "$as_myself"; then
JP Abgrall511eca32014-02-12 13:46:45 -08009275 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
9276 exit 1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009277fi
9278
JP Abgrall511eca32014-02-12 13:46:45 -08009279# Unset variables that we do not need and which cause bugs (e.g. in
9280# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
9281# suppresses any "Segmentation fault" message there. '((' could
9282# trigger a bug in pdksh 5.2.14.
9283for as_var in BASH_ENV ENV MAIL MAILPATH
9284do eval test x\${$as_var+set} = xset \
9285 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009286done
9287PS1='$ '
9288PS2='> '
9289PS4='+ '
9290
9291# NLS nuisances.
JP Abgrall511eca32014-02-12 13:46:45 -08009292LC_ALL=C
9293export LC_ALL
9294LANGUAGE=C
9295export LANGUAGE
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009296
JP Abgrall511eca32014-02-12 13:46:45 -08009297# CDPATH.
9298(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
9299
9300
9301# as_fn_error STATUS ERROR [LINENO LOG_FD]
9302# ----------------------------------------
9303# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
9304# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
9305# script with STATUS, using 1 if that was 0.
9306as_fn_error ()
9307{
9308 as_status=$1; test $as_status -eq 0 && as_status=1
9309 if test "$4"; then
9310 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
9311 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
9312 fi
9313 $as_echo "$as_me: error: $2" >&2
9314 as_fn_exit $as_status
9315} # as_fn_error
9316
9317
9318# as_fn_set_status STATUS
9319# -----------------------
9320# Set $? to STATUS, without forking.
9321as_fn_set_status ()
9322{
9323 return $1
9324} # as_fn_set_status
9325
9326# as_fn_exit STATUS
9327# -----------------
9328# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
9329as_fn_exit ()
9330{
9331 set +e
9332 as_fn_set_status $1
9333 exit $1
9334} # as_fn_exit
9335
9336# as_fn_unset VAR
9337# ---------------
9338# Portably unset VAR.
9339as_fn_unset ()
9340{
9341 { eval $1=; unset $1;}
9342}
9343as_unset=as_fn_unset
9344# as_fn_append VAR VALUE
9345# ----------------------
9346# Append the text in VALUE to the end of the definition contained in VAR. Take
9347# advantage of any shell optimizations that allow amortized linear growth over
9348# repeated appends, instead of the typical quadratic growth present in naive
9349# implementations.
9350if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
9351 eval 'as_fn_append ()
9352 {
9353 eval $1+=\$2
9354 }'
9355else
9356 as_fn_append ()
9357 {
9358 eval $1=\$$1\$2
9359 }
9360fi # as_fn_append
9361
9362# as_fn_arith ARG...
9363# ------------------
9364# Perform arithmetic evaluation on the ARGs, and store the result in the
9365# global $as_val. Take advantage of shells that can avoid forks. The arguments
9366# must be portable across $(()) and expr.
9367if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
9368 eval 'as_fn_arith ()
9369 {
9370 as_val=$(( $* ))
9371 }'
9372else
9373 as_fn_arith ()
9374 {
9375 as_val=`expr "$@" || test $? -eq 1`
9376 }
9377fi # as_fn_arith
9378
9379
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009380if expr a : '\(a\)' >/dev/null 2>&1 &&
9381 test "X`expr 00001 : '.*\(...\)'`" = X001; then
9382 as_expr=expr
9383else
9384 as_expr=false
9385fi
9386
9387if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
9388 as_basename=basename
9389else
9390 as_basename=false
9391fi
9392
JP Abgrall511eca32014-02-12 13:46:45 -08009393if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
9394 as_dirname=dirname
9395else
9396 as_dirname=false
9397fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009398
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009399as_me=`$as_basename -- "$0" ||
9400$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
9401 X"$0" : 'X\(//\)$' \| \
9402 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall511eca32014-02-12 13:46:45 -08009403$as_echo X/"$0" |
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009404 sed '/^.*\/\([^/][^/]*\)\/*$/{
9405 s//\1/
9406 q
9407 }
9408 /^X\/\(\/\/\)$/{
9409 s//\1/
9410 q
9411 }
9412 /^X\/\(\/\).*/{
9413 s//\1/
9414 q
9415 }
9416 s/.*/./; q'`
9417
JP Abgrall511eca32014-02-12 13:46:45 -08009418# Avoid depending upon Character Ranges.
9419as_cr_letters='abcdefghijklmnopqrstuvwxyz'
9420as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
9421as_cr_Letters=$as_cr_letters$as_cr_LETTERS
9422as_cr_digits='0123456789'
9423as_cr_alnum=$as_cr_Letters$as_cr_digits
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009424
9425ECHO_C= ECHO_N= ECHO_T=
JP Abgrall511eca32014-02-12 13:46:45 -08009426case `echo -n x` in #(((((
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009427-n*)
JP Abgrall511eca32014-02-12 13:46:45 -08009428 case `echo 'xy\c'` in
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009429 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
JP Abgrall511eca32014-02-12 13:46:45 -08009430 xy) ECHO_C='\c';;
9431 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
9432 ECHO_T=' ';;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009433 esac;;
9434*)
9435 ECHO_N='-n';;
9436esac
9437
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009438rm -f conf$$ conf$$.exe conf$$.file
9439if test -d conf$$.dir; then
9440 rm -f conf$$.dir/conf$$.file
9441else
9442 rm -f conf$$.dir
JP Abgrall511eca32014-02-12 13:46:45 -08009443 mkdir conf$$.dir 2>/dev/null
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009444fi
JP Abgrall511eca32014-02-12 13:46:45 -08009445if (echo >conf$$.file) 2>/dev/null; then
9446 if ln -s conf$$.file conf$$ 2>/dev/null; then
9447 as_ln_s='ln -s'
9448 # ... but there are two gotchas:
9449 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
9450 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
9451 # In both cases, we have to default to `cp -pR'.
9452 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
9453 as_ln_s='cp -pR'
9454 elif ln conf$$.file conf$$ 2>/dev/null; then
9455 as_ln_s=ln
9456 else
9457 as_ln_s='cp -pR'
9458 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009459else
JP Abgrall511eca32014-02-12 13:46:45 -08009460 as_ln_s='cp -pR'
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009461fi
9462rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
9463rmdir conf$$.dir 2>/dev/null
9464
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009465
JP Abgrall511eca32014-02-12 13:46:45 -08009466# as_fn_mkdir_p
9467# -------------
9468# Create "$as_dir" as a directory, including parents if necessary.
9469as_fn_mkdir_p ()
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009470{
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009471
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009472 case $as_dir in #(
9473 -*) as_dir=./$as_dir;;
9474 esac
JP Abgrall511eca32014-02-12 13:46:45 -08009475 test -d "$as_dir" || eval $as_mkdir_p || {
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009476 as_dirs=
9477 while :; do
9478 case $as_dir in #(
JP Abgrall511eca32014-02-12 13:46:45 -08009479 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009480 *) as_qdir=$as_dir;;
9481 esac
9482 as_dirs="'$as_qdir' $as_dirs"
9483 as_dir=`$as_dirname -- "$as_dir" ||
9484$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
9485 X"$as_dir" : 'X\(//\)[^/]' \| \
9486 X"$as_dir" : 'X\(//\)$' \| \
9487 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
JP Abgrall511eca32014-02-12 13:46:45 -08009488$as_echo X"$as_dir" |
The Android Open Source Project478ab6c2009-03-03 19:30:05 -08009489 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
9490 s//\1/
9491 q
9492 }
9493 /^X\(\/\/\)[^/].*/{
9494 s//\1/
9495 q
9496 }
9497 /^X\(\/\/\)$/{
9498 s//\1/
9499 q
9500 }
9501 /^X\(\/\).*/{
9502 s//\1/
9503 q
9504 }
9505 s/.*/./; q'`
9506 test -d "$as_dir" && break
9507 done
9508 test -z "$as_dirs" || eval "mkdir $as_dirs"
JP Abgrall511eca32014-02-12 13:46:45 -08009509 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
9510
9511
9512} # as_fn_mkdir_p
9513if mkdir -p . 2>/dev/null; then
9514 as_mkdir_p='mkdir -p "$as_dir"'
9515else
9516 test -d ./-p && rmdir ./-p
9517 as_mkdir_p=false
9518fi
9519
9520
9521# as_fn_executable_p FILE
9522# -----------------------
9523# Test if FILE is an executable regular file.
9524as_fn_executable_p ()
9525{
9526 test -f "$1" && test -x "$1"
9527} # as_fn_executable_p
9528as_test_x='test -x'
9529as_executable_p=as_fn_executable_p
9530
9531# Sed expression to map a string onto a valid CPP name.
9532as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
9533
9534# Sed expression to map a string onto a valid variable name.
9535as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
9536
9537
9538exec 6>&1
9539## ----------------------------------- ##
9540## Main body of $CONFIG_STATUS script. ##
9541## ----------------------------------- ##
9542_ASEOF
9543test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
9544
9545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9546# Save the log message, to keep $0 and so on meaningful, and to
9547# report actual input values of CONFIG_FILES etc. instead of their
9548# values after options handling.
9549ac_log="
9550This file was extended by $as_me, which was
9551generated by GNU Autoconf 2.69. Invocation command line was
9552
9553 CONFIG_FILES = $CONFIG_FILES
9554 CONFIG_HEADERS = $CONFIG_HEADERS
9555 CONFIG_LINKS = $CONFIG_LINKS
9556 CONFIG_COMMANDS = $CONFIG_COMMANDS
9557 $ $0 $@
9558
9559on `(hostname || uname -n) 2>/dev/null | sed 1q`
9560"
9561
9562_ACEOF
9563
9564case $ac_config_files in *"
9565"*) set x $ac_config_files; shift; ac_config_files=$*;;
9566esac
9567
9568case $ac_config_headers in *"
9569"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
9570esac
9571
9572
9573cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9574# Files that config.status was made for.
9575config_files="$ac_config_files"
9576config_headers="$ac_config_headers"
9577config_commands="$ac_config_commands"
9578
9579_ACEOF
9580
9581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9582ac_cs_usage="\
9583\`$as_me' instantiates files and other configuration actions
9584from templates according to the current configuration. Unless the files
9585and actions are specified as TAGs, all are instantiated by default.
9586
9587Usage: $0 [OPTION]... [TAG]...
9588
9589 -h, --help print this help, then exit
9590 -V, --version print version number and configuration settings, then exit
9591 --config print configuration, then exit
9592 -q, --quiet, --silent
9593 do not print progress messages
9594 -d, --debug don't remove temporary files
9595 --recheck update $as_me by reconfiguring in the same conditions
9596 --file=FILE[:TEMPLATE]
9597 instantiate the configuration file FILE
9598 --header=FILE[:TEMPLATE]
9599 instantiate the configuration header FILE
9600
9601Configuration files:
9602$config_files
9603
9604Configuration headers:
9605$config_headers
9606
9607Configuration commands:
9608$config_commands
9609
9610Report bugs to the package provider."
9611
9612_ACEOF
9613cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9614ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
9615ac_cs_version="\\
9616config.status
9617configured by $0, generated by GNU Autoconf 2.69,
9618 with options \\"\$ac_cs_config\\"
9619
9620Copyright (C) 2012 Free Software Foundation, Inc.
9621This config.status script is free software; the Free Software Foundation
9622gives unlimited permission to copy, distribute and modify it."
9623
9624ac_pwd='$ac_pwd'
9625srcdir='$srcdir'
9626INSTALL='$INSTALL'
9627test -n "\$AWK" || AWK=awk
9628_ACEOF
9629
9630cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9631# The default lists apply if the user does not specify any file.
9632ac_need_defaults=:
9633while test $# != 0
9634do
9635 case $1 in
9636 --*=?*)
9637 ac_option=`expr "X$1" : 'X\([^=]*\)='`
9638 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
9639 ac_shift=:
9640 ;;
9641 --*=)
9642 ac_option=`expr "X$1" : 'X\([^=]*\)='`
9643 ac_optarg=
9644 ac_shift=:
9645 ;;
9646 *)
9647 ac_option=$1
9648 ac_optarg=$2
9649 ac_shift=shift
9650 ;;
9651 esac
9652
9653 case $ac_option in
9654 # Handling of the options.
9655 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
9656 ac_cs_recheck=: ;;
9657 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
9658 $as_echo "$ac_cs_version"; exit ;;
9659 --config | --confi | --conf | --con | --co | --c )
9660 $as_echo "$ac_cs_config"; exit ;;
9661 --debug | --debu | --deb | --de | --d | -d )
9662 debug=: ;;
9663 --file | --fil | --fi | --f )
9664 $ac_shift
9665 case $ac_optarg in
9666 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9667 '') as_fn_error $? "missing file argument" ;;
9668 esac
9669 as_fn_append CONFIG_FILES " '$ac_optarg'"
9670 ac_need_defaults=false;;
9671 --header | --heade | --head | --hea )
9672 $ac_shift
9673 case $ac_optarg in
9674 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
9675 esac
9676 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
9677 ac_need_defaults=false;;
9678 --he | --h)
9679 # Conflict between --help and --header
9680 as_fn_error $? "ambiguous option: \`$1'
9681Try \`$0 --help' for more information.";;
9682 --help | --hel | -h )
9683 $as_echo "$ac_cs_usage"; exit ;;
9684 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
9685 | -silent | --silent | --silen | --sile | --sil | --si | --s)
9686 ac_cs_silent=: ;;
9687
9688 # This is an error.
9689 -*) as_fn_error $? "unrecognized option: \`$1'
9690Try \`$0 --help' for more information." ;;
9691
9692 *) as_fn_append ac_config_targets " $1"
9693 ac_need_defaults=false ;;
9694
9695 esac
9696 shift
9697done
9698
9699ac_configure_extra_args=
9700
9701if $ac_cs_silent; then
9702 exec 6>/dev/null
9703 ac_configure_extra_args="$ac_configure_extra_args --silent"
9704fi
9705
9706_ACEOF
9707cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9708if \$ac_cs_recheck; then
9709 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
9710 shift
9711 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
9712 CONFIG_SHELL='$SHELL'
9713 export CONFIG_SHELL
9714 exec "\$@"
9715fi
9716
9717_ACEOF
9718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9719exec 5>>config.log
9720{
9721 echo
9722 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
9723## Running $as_me. ##
9724_ASBOX
9725 $as_echo "$ac_log"
9726} >&5
9727
9728_ACEOF
9729cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9730#
9731# INIT-COMMANDS
9732#
9733
9734
9735_ACEOF
9736
9737cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9738
9739# Handling of arguments.
9740for ac_config_target in $ac_config_targets
9741do
9742 case $ac_config_target in
9743 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
9744 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
9745 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
9746 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;;
9747 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;;
9748 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;;
9749 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;;
9750 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;;
9751 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;;
9752 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;;
9753 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;;
9754 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;;
9755 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;;
9756 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;;
9757 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;;
9758 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;;
9759 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;;
9760 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;;
9761
9762 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
9763 esac
9764done
9765
9766
9767# If the user did not use the arguments to specify the items to instantiate,
9768# then the envvar interface is used. Set only those that are not.
9769# We use the long form for the default assignment because of an extremely
9770# bizarre bug on SunOS 4.1.3.
9771if $ac_need_defaults; then
9772 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
9773 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
9774 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
9775fi
9776
9777# Have a temporary directory for convenience. Make it in the build tree
9778# simply because there is no reason against having it here, and in addition,
9779# creating and moving files from /tmp can sometimes cause problems.
9780# Hook for its removal unless debugging.
9781# Note that there is a small window in which the directory will not be cleaned:
9782# after its creation but before its name has been assigned to `$tmp'.
9783$debug ||
9784{
9785 tmp= ac_tmp=
9786 trap 'exit_status=$?
9787 : "${ac_tmp:=$tmp}"
9788 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
9789' 0
9790 trap 'as_fn_exit 1' 1 2 13 15
9791}
9792# Create a (secure) tmp directory for tmp files.
9793
9794{
9795 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
9796 test -d "$tmp"
9797} ||
9798{
9799 tmp=./conf$$-$RANDOM
9800 (umask 077 && mkdir "$tmp")
9801} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
9802ac_tmp=$tmp
9803
9804# Set up the scripts for CONFIG_FILES section.
9805# No need to generate them if there are no CONFIG_FILES.
9806# This happens for instance with `./config.status config.h'.
9807if test -n "$CONFIG_FILES"; then
9808
9809
9810ac_cr=`echo X | tr X '\015'`
9811# On cygwin, bash can eat \r inside `` if the user requested igncr.
9812# But we know of no other shell where ac_cr would be empty at this
9813# point, so we can use a bashism as a fallback.
9814if test "x$ac_cr" = x; then
9815 eval ac_cr=\$\'\\r\'
9816fi
9817ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
9818if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
9819 ac_cs_awk_cr='\\r'
9820else
9821 ac_cs_awk_cr=$ac_cr
9822fi
9823
9824echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
9825_ACEOF
9826
9827
9828{
9829 echo "cat >conf$$subs.awk <<_ACEOF" &&
9830 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
9831 echo "_ACEOF"
9832} >conf$$subs.sh ||
9833 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9834ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
9835ac_delim='%!_!# '
9836for ac_last_try in false false false false false :; do
9837 . ./conf$$subs.sh ||
9838 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9839
9840 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
9841 if test $ac_delim_n = $ac_delim_num; then
9842 break
9843 elif $ac_last_try; then
9844 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
9845 else
9846 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9847 fi
9848done
9849rm -f conf$$subs.sh
9850
9851cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9852cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
9853_ACEOF
9854sed -n '
9855h
9856s/^/S["/; s/!.*/"]=/
9857p
9858g
9859s/^[^!]*!//
9860:repl
9861t repl
9862s/'"$ac_delim"'$//
9863t delim
9864:nl
9865h
9866s/\(.\{148\}\)..*/\1/
9867t more1
9868s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
9869p
9870n
9871b repl
9872:more1
9873s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9874p
9875g
9876s/.\{148\}//
9877t nl
9878:delim
9879h
9880s/\(.\{148\}\)..*/\1/
9881t more2
9882s/["\\]/\\&/g; s/^/"/; s/$/"/
9883p
9884b
9885:more2
9886s/["\\]/\\&/g; s/^/"/; s/$/"\\/
9887p
9888g
9889s/.\{148\}//
9890t delim
9891' <conf$$subs.awk | sed '
9892/^[^""]/{
9893 N
9894 s/\n//
9895}
9896' >>$CONFIG_STATUS || ac_write_fail=1
9897rm -f conf$$subs.awk
9898cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
9899_ACAWK
9900cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
9901 for (key in S) S_is_set[key] = 1
9902 FS = ""
9903
9904}
9905{
9906 line = $ 0
9907 nfields = split(line, field, "@")
9908 substed = 0
9909 len = length(field[1])
9910 for (i = 2; i < nfields; i++) {
9911 key = field[i]
9912 keylen = length(key)
9913 if (S_is_set[key]) {
9914 value = S[key]
9915 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
9916 len += length(value) + length(field[++i])
9917 substed = 1
9918 } else
9919 len += 1 + keylen
9920 }
9921
9922 print line
9923}
9924
9925_ACAWK
9926_ACEOF
9927cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9928if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
9929 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
9930else
9931 cat
9932fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
9933 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
9934_ACEOF
9935
9936# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
9937# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
9938# trailing colons and then remove the whole line if VPATH becomes empty
9939# (actually we leave an empty line to preserve line numbers).
9940if test "x$srcdir" = x.; then
9941 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
9942h
9943s///
9944s/^/:/
9945s/[ ]*$/:/
9946s/:\$(srcdir):/:/g
9947s/:\${srcdir}:/:/g
9948s/:@srcdir@:/:/g
9949s/^:*//
9950s/:*$//
9951x
9952s/\(=[ ]*\).*/\1/
9953G
9954s/\n//
9955s/^[^=]*=[ ]*$//
9956}'
9957fi
9958
9959cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
9960fi # test -n "$CONFIG_FILES"
9961
9962# Set up the scripts for CONFIG_HEADERS section.
9963# No need to generate them if there are no CONFIG_HEADERS.
9964# This happens for instance with `./config.status Makefile'.
9965if test -n "$CONFIG_HEADERS"; then
9966cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
9967BEGIN {
9968_ACEOF
9969
9970# Transform confdefs.h into an awk script `defines.awk', embedded as
9971# here-document in config.status, that substitutes the proper values into
9972# config.h.in to produce config.h.
9973
9974# Create a delimiter string that does not exist in confdefs.h, to ease
9975# handling of long lines.
9976ac_delim='%!_!# '
9977for ac_last_try in false false :; do
9978 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
9979 if test -z "$ac_tt"; then
9980 break
9981 elif $ac_last_try; then
9982 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
9983 else
9984 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
9985 fi
9986done
9987
9988# For the awk script, D is an array of macro values keyed by name,
9989# likewise P contains macro parameters if any. Preserve backslash
9990# newline sequences.
9991
9992ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
9993sed -n '
9994s/.\{148\}/&'"$ac_delim"'/g
9995t rset
9996:rset
9997s/^[ ]*#[ ]*define[ ][ ]*/ /
9998t def
9999d
10000:def
10001s/\\$//
10002t bsnl
10003s/["\\]/\\&/g
10004s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10005D["\1"]=" \3"/p
10006s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
10007d
10008:bsnl
10009s/["\\]/\\&/g
10010s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
10011D["\1"]=" \3\\\\\\n"\\/p
10012t cont
10013s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
10014t cont
10015d
10016:cont
10017n
10018s/.\{148\}/&'"$ac_delim"'/g
10019t clear
10020:clear
10021s/\\$//
10022t bsnlc
10023s/["\\]/\\&/g; s/^/"/; s/$/"/p
10024d
10025:bsnlc
10026s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
10027b cont
10028' <confdefs.h | sed '
10029s/'"$ac_delim"'/"\\\
10030"/g' >>$CONFIG_STATUS || ac_write_fail=1
10031
10032cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10033 for (key in D) D_is_set[key] = 1
10034 FS = ""
10035}
10036/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
10037 line = \$ 0
10038 split(line, arg, " ")
10039 if (arg[1] == "#") {
10040 defundef = arg[2]
10041 mac1 = arg[3]
10042 } else {
10043 defundef = substr(arg[1], 2)
10044 mac1 = arg[2]
10045 }
10046 split(mac1, mac2, "(") #)
10047 macro = mac2[1]
10048 prefix = substr(line, 1, index(line, defundef) - 1)
10049 if (D_is_set[macro]) {
10050 # Preserve the white space surrounding the "#".
10051 print prefix "define", macro P[macro] D[macro]
10052 next
10053 } else {
10054 # Replace #undef with comments. This is necessary, for example,
10055 # in the case of _POSIX_SOURCE, which is predefined and required
10056 # on some systems where configure will not decide to define it.
10057 if (defundef == "undef") {
10058 print "/*", prefix defundef, macro, "*/"
10059 next
10060 }
10061 }
10062}
10063{ print }
10064_ACAWK
10065_ACEOF
10066cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
10067 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
10068fi # test -n "$CONFIG_HEADERS"
10069
10070
10071eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
10072shift
10073for ac_tag
10074do
10075 case $ac_tag in
10076 :[FHLC]) ac_mode=$ac_tag; continue;;
10077 esac
10078 case $ac_mode$ac_tag in
10079 :[FHL]*:*);;
10080 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
10081 :[FH]-) ac_tag=-:-;;
10082 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
10083 esac
10084 ac_save_IFS=$IFS
10085 IFS=:
10086 set x $ac_tag
10087 IFS=$ac_save_IFS
10088 shift
10089 ac_file=$1
10090 shift
10091
10092 case $ac_mode in
10093 :L) ac_source=$1;;
10094 :[FH])
10095 ac_file_inputs=
10096 for ac_f
10097 do
10098 case $ac_f in
10099 -) ac_f="$ac_tmp/stdin";;
10100 *) # Look for the file first in the build tree, then in the source tree
10101 # (if the path is not absolute). The absolute path cannot be DOS-style,
10102 # because $ac_f cannot contain `:'.
10103 test -f "$ac_f" ||
10104 case $ac_f in
10105 [\\/$]*) false;;
10106 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
10107 esac ||
10108 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
10109 esac
10110 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
10111 as_fn_append ac_file_inputs " '$ac_f'"
10112 done
10113
10114 # Let's still pretend it is `configure' which instantiates (i.e., don't
10115 # use $as_me), people would be surprised to read:
10116 # /* config.h. Generated by config.status. */
10117 configure_input='Generated from '`
10118 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
10119 `' by configure.'
10120 if test x"$ac_file" != x-; then
10121 configure_input="$ac_file. $configure_input"
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
10123$as_echo "$as_me: creating $ac_file" >&6;}
10124 fi
10125 # Neutralize special characters interpreted by sed in replacement strings.
10126 case $configure_input in #(
10127 *\&* | *\|* | *\\* )
10128 ac_sed_conf_input=`$as_echo "$configure_input" |
10129 sed 's/[\\\\&|]/\\\\&/g'`;; #(
10130 *) ac_sed_conf_input=$configure_input;;
10131 esac
10132
10133 case $ac_tag in
10134 *:-:* | *:-) cat >"$ac_tmp/stdin" \
10135 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
10136 esac
10137 ;;
10138 esac
10139
10140 ac_dir=`$as_dirname -- "$ac_file" ||
10141$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
10142 X"$ac_file" : 'X\(//\)[^/]' \| \
10143 X"$ac_file" : 'X\(//\)$' \| \
10144 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
10145$as_echo X"$ac_file" |
10146 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
10147 s//\1/
10148 q
10149 }
10150 /^X\(\/\/\)[^/].*/{
10151 s//\1/
10152 q
10153 }
10154 /^X\(\/\/\)$/{
10155 s//\1/
10156 q
10157 }
10158 /^X\(\/\).*/{
10159 s//\1/
10160 q
10161 }
10162 s/.*/./; q'`
10163 as_dir="$ac_dir"; as_fn_mkdir_p
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010164 ac_builddir=.
10165
10166case "$ac_dir" in
10167.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
10168*)
JP Abgrall511eca32014-02-12 13:46:45 -080010169 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010170 # A ".." for each directory in $ac_dir_suffix.
JP Abgrall511eca32014-02-12 13:46:45 -080010171 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010172 case $ac_top_builddir_sub in
10173 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
10174 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
10175 esac ;;
10176esac
10177ac_abs_top_builddir=$ac_pwd
10178ac_abs_builddir=$ac_pwd$ac_dir_suffix
10179# for backward compatibility:
10180ac_top_builddir=$ac_top_build_prefix
10181
10182case $srcdir in
10183 .) # We are building in place.
10184 ac_srcdir=.
10185 ac_top_srcdir=$ac_top_builddir_sub
10186 ac_abs_top_srcdir=$ac_pwd ;;
10187 [\\/]* | ?:[\\/]* ) # Absolute name.
10188 ac_srcdir=$srcdir$ac_dir_suffix;
10189 ac_top_srcdir=$srcdir
10190 ac_abs_top_srcdir=$srcdir ;;
10191 *) # Relative name.
10192 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
10193 ac_top_srcdir=$ac_top_build_prefix$srcdir
10194 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
10195esac
10196ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
10197
10198
10199 case $ac_mode in
10200 :F)
10201 #
10202 # CONFIG_FILE
10203 #
10204
10205 case $INSTALL in
10206 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
10207 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
10208 esac
10209_ACEOF
10210
JP Abgrall511eca32014-02-12 13:46:45 -080010211cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010212# If the template does not know about datarootdir, expand it.
10213# FIXME: This hack should be removed a few years after 2.60.
10214ac_datarootdir_hack=; ac_datarootdir_seen=
JP Abgrall511eca32014-02-12 13:46:45 -080010215ac_sed_dataroot='
10216/datarootdir/ {
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010217 p
10218 q
10219}
10220/@datadir@/p
10221/@docdir@/p
10222/@infodir@/p
10223/@localedir@/p
JP Abgrall511eca32014-02-12 13:46:45 -080010224/@mandir@/p'
10225case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010226*datarootdir*) ac_datarootdir_seen=yes;;
10227*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
JP Abgrall511eca32014-02-12 13:46:45 -080010228 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
10229$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 -080010230_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -080010231cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010232 ac_datarootdir_hack='
10233 s&@datadir@&$datadir&g
10234 s&@docdir@&$docdir&g
10235 s&@infodir@&$infodir&g
10236 s&@localedir@&$localedir&g
10237 s&@mandir@&$mandir&g
JP Abgrall511eca32014-02-12 13:46:45 -080010238 s&\\\${datarootdir}&$datarootdir&g' ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010239esac
10240_ACEOF
10241
10242# Neutralize VPATH when `$srcdir' = `.'.
10243# Shell code in configure.ac might set extrasub.
10244# FIXME: do we really want to maintain this feature?
JP Abgrall511eca32014-02-12 13:46:45 -080010245cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
10246ac_sed_extra="$ac_vpsub
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010247$extrasub
10248_ACEOF
JP Abgrall511eca32014-02-12 13:46:45 -080010249cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010250:t
10251/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
JP Abgrall511eca32014-02-12 13:46:45 -080010252s|@configure_input@|$ac_sed_conf_input|;t t
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010253s&@top_builddir@&$ac_top_builddir_sub&;t t
JP Abgrall511eca32014-02-12 13:46:45 -080010254s&@top_build_prefix@&$ac_top_build_prefix&;t t
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010255s&@srcdir@&$ac_srcdir&;t t
10256s&@abs_srcdir@&$ac_abs_srcdir&;t t
10257s&@top_srcdir@&$ac_top_srcdir&;t t
10258s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
10259s&@builddir@&$ac_builddir&;t t
10260s&@abs_builddir@&$ac_abs_builddir&;t t
10261s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
10262s&@INSTALL@&$ac_INSTALL&;t t
10263$ac_datarootdir_hack
JP Abgrall511eca32014-02-12 13:46:45 -080010264"
10265eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
10266 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010267
10268test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
JP Abgrall511eca32014-02-12 13:46:45 -080010269 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
10270 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
10271 "$ac_tmp/out"`; test -z "$ac_out"; } &&
10272 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10273which seems to be undefined. Please make sure it is defined" >&5
10274$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
10275which seems to be undefined. Please make sure it is defined" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010276
JP Abgrall511eca32014-02-12 13:46:45 -080010277 rm -f "$ac_tmp/stdin"
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010278 case $ac_file in
JP Abgrall511eca32014-02-12 13:46:45 -080010279 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
10280 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
10281 esac \
10282 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010283 ;;
10284 :H)
10285 #
10286 # CONFIG_HEADER
10287 #
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010288 if test x"$ac_file" != x-; then
JP Abgrall511eca32014-02-12 13:46:45 -080010289 {
10290 $as_echo "/* $configure_input */" \
10291 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
10292 } >"$ac_tmp/config.h" \
10293 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
10294 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
10295 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
10296$as_echo "$as_me: $ac_file is unchanged" >&6;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010297 else
JP Abgrall511eca32014-02-12 13:46:45 -080010298 rm -f "$ac_file"
10299 mv "$ac_tmp/config.h" "$ac_file" \
10300 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010301 fi
10302 else
JP Abgrall511eca32014-02-12 13:46:45 -080010303 $as_echo "/* $configure_input */" \
10304 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
10305 || as_fn_error $? "could not create -" "$LINENO" 5
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010306 fi
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010307 ;;
10308
JP Abgrall511eca32014-02-12 13:46:45 -080010309 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
10310$as_echo "$as_me: executing $ac_file commands" >&6;}
10311 ;;
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010312 esac
10313
JP Abgrall511eca32014-02-12 13:46:45 -080010314
10315 case $ac_file$ac_mode in
10316 "default-1":C) if test -f .devel; then
10317 echo timestamp > stamp-h
10318 cat Makefile-devel-adds >> Makefile
10319 make depend
10320fi ;;
10321
10322 esac
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010323done # for ac_tag
10324
10325
JP Abgrall511eca32014-02-12 13:46:45 -080010326as_fn_exit 0
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010327_ACEOF
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010328ac_clean_files=$ac_clean_files_save
10329
JP Abgrall511eca32014-02-12 13:46:45 -080010330test $ac_write_fail = 0 ||
10331 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
10332
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010333
10334# configure is writing to config.log, and then calls config.status.
10335# config.status does its own redirection, appending to config.log.
10336# Unfortunately, on DOS this fails, as config.log is still kept open
10337# by configure, so config.status won't be able to write to it; its
10338# output is simply discarded. So we exec the FD to /dev/null,
10339# effectively closing config.log, so it can be properly (re)opened and
10340# appended to by config.status. When coming back to configure, we
10341# need to make the FD available again.
10342if test "$no_create" != yes; then
10343 ac_cs_success=:
10344 ac_config_status_args=
10345 test "$silent" = yes &&
10346 ac_config_status_args="$ac_config_status_args --quiet"
10347 exec 5>/dev/null
10348 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
10349 exec 5>>config.log
10350 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
10351 # would make configure fail if this is the last instruction.
JP Abgrall511eca32014-02-12 13:46:45 -080010352 $ac_cs_success || as_fn_exit 1
10353fi
10354if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
10355 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
10356$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010357fi
10358
The Android Open Source Project478ab6c2009-03-03 19:30:05 -080010359exit 0