The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1 | #! /bin/sh |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2 | # Guess values for system-dependent variables and create Makefiles. |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3 | # Generated by GNU Autoconf 2.69 for pcap 1.9.0-PRE-GIT. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5 | # |
| 6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
| 7 | # |
| 8 | # |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9 | # This configure script is free software; the Free Software Foundation |
| 10 | # gives unlimited permission to copy, distribute and modify it. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11 | ## -------------------- ## |
| 12 | ## M4sh Initialization. ## |
| 13 | ## -------------------- ## |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 14 | |
| 15 | # Be more Bourne compatible |
| 16 | DUALCASE=1; export DUALCASE # for MKS sh |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 18 | emulate sh |
| 19 | NULLCMD=: |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 21 | # is contrary to our usage. Disable this feature. |
| 22 | alias -g '${1+"$@"}'='"$@"' |
| 23 | setopt NO_GLOB_SUBST |
| 24 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 25 | case `(set -o) 2>/dev/null` in #( |
| 26 | *posix*) : |
| 27 | set -o posix ;; #( |
| 28 | *) : |
| 29 | ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 30 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 31 | fi |
| 32 | |
| 33 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 34 | as_nl=' |
| 35 | ' |
| 36 | export as_nl |
| 37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. |
| 38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo |
| 40 | as_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. |
| 43 | if 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 --' |
| 47 | elif (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' |
| 50 | else |
| 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' |
| 70 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 71 | |
| 72 | # The user is always right. |
| 73 | if test "${PATH_SEPARATOR+set}" != set; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 74 | 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 Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 79 | fi |
| 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 Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 87 | IFS=" "" $as_nl" |
| 88 | |
| 89 | # Find who we are. Look in the path if we contain no directory separator. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 90 | as_myself= |
| 91 | case $0 in #(( |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 92 | *[\\/]* ) as_myself=$0 ;; |
| 93 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 94 | for as_dir in $PATH |
| 95 | do |
| 96 | IFS=$as_save_IFS |
| 97 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 98 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
| 99 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 100 | IFS=$as_save_IFS |
| 101 | |
| 102 | ;; |
| 103 | esac |
| 104 | # We did not find ourselves, most probably we were run as `sh COMMAND' |
| 105 | # in which case we are not to be found in the path. |
| 106 | if test "x$as_myself" = x; then |
| 107 | as_myself=$0 |
| 108 | fi |
| 109 | if test ! -f "$as_myself"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 110 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
| 111 | exit 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 112 | fi |
| 113 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 114 | # 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. |
| 118 | for as_var in BASH_ENV ENV MAIL MAILPATH |
| 119 | do eval test x\${$as_var+set} = xset \ |
| 120 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 121 | done |
| 122 | PS1='$ ' |
| 123 | PS2='> ' |
| 124 | PS4='+ ' |
| 125 | |
| 126 | # NLS nuisances. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 127 | LC_ALL=C |
| 128 | export LC_ALL |
| 129 | LANGUAGE=C |
| 130 | export LANGUAGE |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 131 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 132 | # 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. |
| 143 | BASH_ENV=/dev/null |
| 144 | ENV=/dev/null |
| 145 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV |
| 146 | case $- in # (((( |
| 147 | *v*x* | *x*v* ) as_opts=-vx ;; |
| 148 | *v* ) as_opts=-v ;; |
| 149 | *x* ) as_opts=-x ;; |
| 150 | * ) as_opts= ;; |
| 151 | esac |
| 152 | exec $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 |
| 156 | as_fn_exit 255 |
| 157 | fi |
| 158 | # We don't want this to propagate to other subprocesses. |
| 159 | { _as_can_reexec=; unset _as_can_reexec;} |
| 160 | if 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 |
| 168 | else |
| 169 | case \`(set -o) 2>/dev/null\` in #( |
| 170 | *posix*) : |
| 171 | set -o posix ;; #( |
| 172 | *) : |
| 173 | ;; |
| 174 | esac |
| 175 | fi |
| 176 | " |
| 177 | as_required="as_fn_return () { (exit \$1); } |
| 178 | as_fn_success () { as_fn_return 0; } |
| 179 | as_fn_failure () { as_fn_return 1; } |
| 180 | as_fn_ret_success () { return 0; } |
| 181 | as_fn_ret_failure () { return 1; } |
| 182 | |
| 183 | exitcode=0 |
| 184 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } |
| 185 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } |
| 186 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } |
| 187 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } |
| 188 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : |
| 189 | |
| 190 | else |
| 191 | exitcode=1; echo positional parameters were not saved. |
| 192 | fi |
| 193 | test x\$exitcode = x0 || exit 1 |
| 194 | test -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 |
| 199 | test \$(( 1 + 1 )) = 2 || exit 1" |
| 200 | if (eval "$as_required") 2>/dev/null; then : |
| 201 | as_have_required=yes |
| 202 | else |
| 203 | as_have_required=no |
| 204 | fi |
| 205 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : |
| 206 | |
| 207 | else |
| 208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 209 | as_found=false |
| 210 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH |
| 211 | do |
| 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 |
| 225 | fi |
| 226 | fi |
| 227 | done;; |
| 228 | esac |
| 229 | as_found=false |
| 230 | done |
| 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 |
| 234 | fi; } |
| 235 | IFS=$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. |
| 244 | BASH_ENV=/dev/null |
| 245 | ENV=/dev/null |
| 246 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV |
| 247 | case $- in # (((( |
| 248 | *v*x* | *x*v* ) as_opts=-vx ;; |
| 249 | *v* ) as_opts=-v ;; |
| 250 | *x* ) as_opts=-x ;; |
| 251 | * ) as_opts= ;; |
| 252 | esac |
| 253 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} |
| 254 | # Admittedly, this is quite paranoid, since all the known shells bail |
| 255 | # out after a failed `exec'. |
| 256 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 |
| 257 | exit 255 |
| 258 | fi |
| 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 |
| 273 | fi |
| 274 | fi |
| 275 | fi |
| 276 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 277 | export SHELL |
| 278 | # Unset more variables known to interfere with behavior of common tools. |
| 279 | CLICOLOR_FORCE= GREP_OPTIONS= |
| 280 | unset CLICOLOR_FORCE GREP_OPTIONS |
| 281 | |
| 282 | ## --------------------- ## |
| 283 | ## M4sh Shell Functions. ## |
| 284 | ## --------------------- ## |
| 285 | # as_fn_unset VAR |
| 286 | # --------------- |
| 287 | # Portably unset VAR. |
| 288 | as_fn_unset () |
| 289 | { |
| 290 | { eval $1=; unset $1;} |
| 291 | } |
| 292 | as_unset=as_fn_unset |
| 293 | |
| 294 | # as_fn_set_status STATUS |
| 295 | # ----------------------- |
| 296 | # Set $? to STATUS, without forking. |
| 297 | as_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. |
| 305 | as_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. |
| 315 | as_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. |
| 363 | as_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. |
| 373 | if (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 | }' |
| 378 | else |
| 379 | as_fn_append () |
| 380 | { |
| 381 | eval $1=\$$1\$2 |
| 382 | } |
| 383 | fi # 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. |
| 390 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : |
| 391 | eval 'as_fn_arith () |
| 392 | { |
| 393 | as_val=$(( $* )) |
| 394 | }' |
| 395 | else |
| 396 | as_fn_arith () |
| 397 | { |
| 398 | as_val=`expr "$@" || test $? -eq 1` |
| 399 | } |
| 400 | fi # 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. |
| 408 | as_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 Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 419 | if expr a : '\(a\)' >/dev/null 2>&1 && |
| 420 | test "X`expr 00001 : '.*\(...\)'`" = X001; then |
| 421 | as_expr=expr |
| 422 | else |
| 423 | as_expr=false |
| 424 | fi |
| 425 | |
| 426 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
| 427 | as_basename=basename |
| 428 | else |
| 429 | as_basename=false |
| 430 | fi |
| 431 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 432 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
| 433 | as_dirname=dirname |
| 434 | else |
| 435 | as_dirname=false |
| 436 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 437 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 438 | as_me=`$as_basename -- "$0" || |
| 439 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
| 440 | X"$0" : 'X\(//\)$' \| \ |
| 441 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 442 | $as_echo X/"$0" | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 443 | 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 Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 457 | # Avoid depending upon Character Ranges. |
| 458 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' |
| 459 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
| 460 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS |
| 461 | as_cr_digits='0123456789' |
| 462 | as_cr_alnum=$as_cr_Letters$as_cr_digits |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 463 | |
| 464 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 465 | 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 Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 470 | 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 Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 486 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 487 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 488 | # 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 Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 492 | # 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 Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 500 | ECHO_C= ECHO_N= ECHO_T= |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 501 | case `echo -n x` in #((((( |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 502 | -n*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 503 | case `echo 'xy\c'` in |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 504 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 505 | xy) ECHO_C='\c';; |
| 506 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null |
| 507 | ECHO_T=' ';; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 508 | esac;; |
| 509 | *) |
| 510 | ECHO_N='-n';; |
| 511 | esac |
| 512 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 513 | rm -f conf$$ conf$$.exe conf$$.file |
| 514 | if test -d conf$$.dir; then |
| 515 | rm -f conf$$.dir/conf$$.file |
| 516 | else |
| 517 | rm -f conf$$.dir |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 518 | mkdir conf$$.dir 2>/dev/null |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 519 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 520 | if (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 Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 534 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 535 | as_ln_s='cp -pR' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 536 | fi |
| 537 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
| 538 | rmdir conf$$.dir 2>/dev/null |
| 539 | |
| 540 | if mkdir -p . 2>/dev/null; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 541 | as_mkdir_p='mkdir -p "$as_dir"' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 542 | else |
| 543 | test -d ./-p && rmdir ./-p |
| 544 | as_mkdir_p=false |
| 545 | fi |
| 546 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 547 | as_test_x='test -x' |
| 548 | as_executable_p=as_fn_executable_p |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 549 | |
| 550 | # Sed expression to map a string onto a valid CPP name. |
| 551 | as_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. |
| 554 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
| 555 | |
| 556 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 557 | test -n "$DJDIR" || exec 7<&0 </dev/null |
| 558 | exec 6>&1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 559 | |
| 560 | # Name of the host. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 561 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 562 | # so uname gets run too. |
| 563 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` |
| 564 | |
| 565 | # |
| 566 | # Initializations. |
| 567 | # |
| 568 | ac_default_prefix=/usr/local |
| 569 | ac_clean_files= |
| 570 | ac_config_libobj_dir=. |
| 571 | LIBOBJS= |
| 572 | cross_compiling=no |
| 573 | subdirs= |
| 574 | MFLAGS= |
| 575 | MAKEFLAGS= |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 576 | |
| 577 | # Identity of this package. |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 578 | PACKAGE_NAME='pcap' |
| 579 | PACKAGE_TARNAME='pcap' |
| 580 | PACKAGE_VERSION='1.9.0-PRE-GIT' |
| 581 | PACKAGE_STRING='pcap 1.9.0-PRE-GIT' |
| 582 | PACKAGE_BUGREPORT='' |
| 583 | PACKAGE_URL='' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 584 | |
| 585 | ac_unique_file="pcap.c" |
| 586 | # Factoring default headers for most tests. |
| 587 | ac_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 Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 622 | ac_subst_vars='LTLIBOBJS |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 623 | INSTALL_DATA |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 624 | INSTALL_SCRIPT |
| 625 | INSTALL_PROGRAM |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 626 | RDMA_SRC |
| 627 | PCAP_SUPPORT_RDMASNIFF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 628 | DBUS_SRC |
| 629 | PCAP_SUPPORT_DBUS |
| 630 | PKGCONFIG |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 631 | BT_MONITOR_SRC |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 632 | BT_SRC |
| 633 | PCAP_SUPPORT_BT |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 634 | NETMAP_SRC |
| 635 | PCAP_SUPPORT_NETMAP |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 636 | NETFILTER_SRC |
| 637 | PCAP_SUPPORT_NETFILTER |
| 638 | USB_SRC |
| 639 | PCAP_SUPPORT_USB |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 640 | EXTRA_NETWORK_LIBS |
| 641 | RPCAPD_LIBS |
| 642 | INSTALL_RPCAPD |
| 643 | BUILD_RPCAPD |
| 644 | PTHREAD_LIBS |
| 645 | MAN_ADMIN_COMMANDS |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 646 | MAN_MISC_INFO |
| 647 | MAN_FILE_FORMATS |
| 648 | DYEXT |
| 649 | SSRC |
| 650 | ADDLARCHIVEOBJS |
| 651 | ADDLOBJS |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 652 | V_YACC |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 653 | V_RPATH_OPT |
| 654 | V_SONAME_OPT |
| 655 | V_SHLIB_OPT |
| 656 | V_SHLIB_CMD |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 657 | V_SHLIB_CCOPT |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 658 | V_PCAP |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 659 | V_LEX |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 660 | V_INCLS |
| 661 | V_FINDALLDEVS |
| 662 | V_DEFS |
| 663 | V_CCOPT |
| 664 | MKDEP |
| 665 | DEPENDENCY_CFLAG |
| 666 | LN_S |
| 667 | AR |
| 668 | RANLIB |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 669 | YFLAGS |
| 670 | YACC |
| 671 | LEXLIB |
| 672 | LEX_OUTPUT_ROOT |
| 673 | LEX |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 674 | PCAP_SUPPORT_PACKET_RING |
| 675 | VALGRINDTEST_SRC |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 676 | LIBOBJS |
| 677 | EGREP |
| 678 | GREP |
| 679 | CPP |
| 680 | OBJEXT |
| 681 | EXEEXT |
| 682 | ac_ct_CC |
| 683 | CPPFLAGS |
| 684 | LDFLAGS |
| 685 | CFLAGS |
| 686 | CC |
| 687 | SHLICC2 |
| 688 | target_os |
| 689 | target_vendor |
| 690 | target_cpu |
| 691 | target |
| 692 | host_os |
| 693 | host_vendor |
| 694 | host_cpu |
| 695 | host |
| 696 | build_os |
| 697 | build_vendor |
| 698 | build_cpu |
| 699 | build |
| 700 | target_alias |
| 701 | host_alias |
| 702 | build_alias |
| 703 | LIBS |
| 704 | ECHO_T |
| 705 | ECHO_N |
| 706 | ECHO_C |
| 707 | DEFS |
| 708 | mandir |
| 709 | localedir |
| 710 | libdir |
| 711 | psdir |
| 712 | pdfdir |
| 713 | dvidir |
| 714 | htmldir |
| 715 | infodir |
| 716 | docdir |
| 717 | oldincludedir |
| 718 | includedir |
| 719 | localstatedir |
| 720 | sharedstatedir |
| 721 | sysconfdir |
| 722 | datadir |
| 723 | datarootdir |
| 724 | libexecdir |
| 725 | sbindir |
| 726 | bindir |
| 727 | program_transform_name |
| 728 | prefix |
| 729 | exec_prefix |
| 730 | PACKAGE_URL |
| 731 | PACKAGE_BUGREPORT |
| 732 | PACKAGE_STRING |
| 733 | PACKAGE_VERSION |
| 734 | PACKAGE_TARNAME |
| 735 | PACKAGE_NAME |
| 736 | PATH_SEPARATOR |
| 737 | SHELL' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 738 | ac_subst_files='' |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 739 | ac_user_opts=' |
| 740 | enable_option_checking |
| 741 | with_gcc |
| 742 | enable_largefile |
| 743 | enable_protochain |
| 744 | with_sita |
| 745 | with_pcap |
| 746 | with_libnl |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 747 | enable_packet_ring |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 748 | enable_ipv6 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 749 | with_dag |
| 750 | with_dag_includes |
| 751 | with_dag_libraries |
| 752 | with_septel |
| 753 | with_snf |
| 754 | with_snf_includes |
| 755 | with_snf_libraries |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 756 | with_turbocap |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 757 | enable_remote |
| 758 | enable_optimizer_dbg |
| 759 | enable_yydebug |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 760 | enable_universal |
| 761 | enable_shared |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 762 | enable_usb |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 763 | enable_netmap |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 764 | enable_bluetooth |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 765 | enable_dbus |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 766 | enable_rdma |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 767 | ' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 768 | ac_precious_vars='build_alias |
| 769 | host_alias |
| 770 | target_alias |
| 771 | CC |
| 772 | CFLAGS |
| 773 | LDFLAGS |
| 774 | LIBS |
| 775 | CPPFLAGS |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 776 | CPP |
| 777 | YACC |
| 778 | YFLAGS' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 779 | |
| 780 | |
| 781 | # Initialize some variables set by options. |
| 782 | ac_init_help= |
| 783 | ac_init_version=false |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 784 | ac_unrecognized_opts= |
| 785 | ac_unrecognized_sep= |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 786 | # The variables have the same names as the options, with |
| 787 | # dashes changed to underlines. |
| 788 | cache_file=/dev/null |
| 789 | exec_prefix=NONE |
| 790 | no_create= |
| 791 | no_recursion= |
| 792 | prefix=NONE |
| 793 | program_prefix=NONE |
| 794 | program_suffix=NONE |
| 795 | program_transform_name=s,x,x, |
| 796 | silent= |
| 797 | site= |
| 798 | srcdir= |
| 799 | verbose= |
| 800 | x_includes=NONE |
| 801 | x_libraries=NONE |
| 802 | |
| 803 | # Installation directory options. |
| 804 | # These are left unexpanded so users can "make install exec_prefix=/foo" |
| 805 | # and all the variables that are supposed to be based on exec_prefix |
| 806 | # by default will actually change. |
| 807 | # Use braces instead of parens because sh, perl, etc. also accept them. |
| 808 | # (The list follows the same order as the GNU Coding Standards.) |
| 809 | bindir='${exec_prefix}/bin' |
| 810 | sbindir='${exec_prefix}/sbin' |
| 811 | libexecdir='${exec_prefix}/libexec' |
| 812 | datarootdir='${prefix}/share' |
| 813 | datadir='${datarootdir}' |
| 814 | sysconfdir='${prefix}/etc' |
| 815 | sharedstatedir='${prefix}/com' |
| 816 | localstatedir='${prefix}/var' |
| 817 | includedir='${prefix}/include' |
| 818 | oldincludedir='/usr/include' |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 819 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 820 | infodir='${datarootdir}/info' |
| 821 | htmldir='${docdir}' |
| 822 | dvidir='${docdir}' |
| 823 | pdfdir='${docdir}' |
| 824 | psdir='${docdir}' |
| 825 | libdir='${exec_prefix}/lib' |
| 826 | localedir='${datarootdir}/locale' |
| 827 | mandir='${datarootdir}/man' |
| 828 | |
| 829 | ac_prev= |
| 830 | ac_dashdash= |
| 831 | for ac_option |
| 832 | do |
| 833 | # If the previous option needs an argument, assign it. |
| 834 | if test -n "$ac_prev"; then |
| 835 | eval $ac_prev=\$ac_option |
| 836 | ac_prev= |
| 837 | continue |
| 838 | fi |
| 839 | |
| 840 | case $ac_option in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 841 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
| 842 | *=) ac_optarg= ;; |
| 843 | *) ac_optarg=yes ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 844 | esac |
| 845 | |
| 846 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 847 | |
| 848 | case $ac_dashdash$ac_option in |
| 849 | --) |
| 850 | ac_dashdash=yes ;; |
| 851 | |
| 852 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 853 | ac_prev=bindir ;; |
| 854 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 855 | bindir=$ac_optarg ;; |
| 856 | |
| 857 | -build | --build | --buil | --bui | --bu) |
| 858 | ac_prev=build_alias ;; |
| 859 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
| 860 | build_alias=$ac_optarg ;; |
| 861 | |
| 862 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 863 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 864 | ac_prev=cache_file ;; |
| 865 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 866 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 867 | cache_file=$ac_optarg ;; |
| 868 | |
| 869 | --config-cache | -C) |
| 870 | cache_file=config.cache ;; |
| 871 | |
| 872 | -datadir | --datadir | --datadi | --datad) |
| 873 | ac_prev=datadir ;; |
| 874 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
| 875 | datadir=$ac_optarg ;; |
| 876 | |
| 877 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
| 878 | | --dataroo | --dataro | --datar) |
| 879 | ac_prev=datarootdir ;; |
| 880 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ |
| 881 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) |
| 882 | datarootdir=$ac_optarg ;; |
| 883 | |
| 884 | -disable-* | --disable-*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 885 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 886 | # Reject names that are not valid shell variable names. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 887 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 888 | as_fn_error $? "invalid feature name: $ac_useropt" |
| 889 | ac_useropt_orig=$ac_useropt |
| 890 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 891 | case $ac_user_opts in |
| 892 | *" |
| 893 | "enable_$ac_useropt" |
| 894 | "*) ;; |
| 895 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" |
| 896 | ac_unrecognized_sep=', ';; |
| 897 | esac |
| 898 | eval enable_$ac_useropt=no ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 899 | |
| 900 | -docdir | --docdir | --docdi | --doc | --do) |
| 901 | ac_prev=docdir ;; |
| 902 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) |
| 903 | docdir=$ac_optarg ;; |
| 904 | |
| 905 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) |
| 906 | ac_prev=dvidir ;; |
| 907 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) |
| 908 | dvidir=$ac_optarg ;; |
| 909 | |
| 910 | -enable-* | --enable-*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 911 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 912 | # Reject names that are not valid shell variable names. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 913 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 914 | as_fn_error $? "invalid feature name: $ac_useropt" |
| 915 | ac_useropt_orig=$ac_useropt |
| 916 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 917 | case $ac_user_opts in |
| 918 | *" |
| 919 | "enable_$ac_useropt" |
| 920 | "*) ;; |
| 921 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" |
| 922 | ac_unrecognized_sep=', ';; |
| 923 | esac |
| 924 | eval enable_$ac_useropt=\$ac_optarg ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 925 | |
| 926 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 927 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 928 | | --exec | --exe | --ex) |
| 929 | ac_prev=exec_prefix ;; |
| 930 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 931 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 932 | | --exec=* | --exe=* | --ex=*) |
| 933 | exec_prefix=$ac_optarg ;; |
| 934 | |
| 935 | -gas | --gas | --ga | --g) |
| 936 | # Obsolete; use --with-gas. |
| 937 | with_gas=yes ;; |
| 938 | |
| 939 | -help | --help | --hel | --he | -h) |
| 940 | ac_init_help=long ;; |
| 941 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) |
| 942 | ac_init_help=recursive ;; |
| 943 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) |
| 944 | ac_init_help=short ;; |
| 945 | |
| 946 | -host | --host | --hos | --ho) |
| 947 | ac_prev=host_alias ;; |
| 948 | -host=* | --host=* | --hos=* | --ho=*) |
| 949 | host_alias=$ac_optarg ;; |
| 950 | |
| 951 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
| 952 | ac_prev=htmldir ;; |
| 953 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ |
| 954 | | --ht=*) |
| 955 | htmldir=$ac_optarg ;; |
| 956 | |
| 957 | -includedir | --includedir | --includedi | --included | --include \ |
| 958 | | --includ | --inclu | --incl | --inc) |
| 959 | ac_prev=includedir ;; |
| 960 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 961 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 962 | includedir=$ac_optarg ;; |
| 963 | |
| 964 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 965 | ac_prev=infodir ;; |
| 966 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 967 | infodir=$ac_optarg ;; |
| 968 | |
| 969 | -libdir | --libdir | --libdi | --libd) |
| 970 | ac_prev=libdir ;; |
| 971 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 972 | libdir=$ac_optarg ;; |
| 973 | |
| 974 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 975 | | --libexe | --libex | --libe) |
| 976 | ac_prev=libexecdir ;; |
| 977 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 978 | | --libexe=* | --libex=* | --libe=*) |
| 979 | libexecdir=$ac_optarg ;; |
| 980 | |
| 981 | -localedir | --localedir | --localedi | --localed | --locale) |
| 982 | ac_prev=localedir ;; |
| 983 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) |
| 984 | localedir=$ac_optarg ;; |
| 985 | |
| 986 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 987 | | --localstate | --localstat | --localsta | --localst | --locals) |
| 988 | ac_prev=localstatedir ;; |
| 989 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 990 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
| 991 | localstatedir=$ac_optarg ;; |
| 992 | |
| 993 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 994 | ac_prev=mandir ;; |
| 995 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 996 | mandir=$ac_optarg ;; |
| 997 | |
| 998 | -nfp | --nfp | --nf) |
| 999 | # Obsolete; use --without-fp. |
| 1000 | with_fp=no ;; |
| 1001 | |
| 1002 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 1003 | | --no-cr | --no-c | -n) |
| 1004 | no_create=yes ;; |
| 1005 | |
| 1006 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 1007 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 1008 | no_recursion=yes ;; |
| 1009 | |
| 1010 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 1011 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 1012 | | --oldin | --oldi | --old | --ol | --o) |
| 1013 | ac_prev=oldincludedir ;; |
| 1014 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 1015 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 1016 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 1017 | oldincludedir=$ac_optarg ;; |
| 1018 | |
| 1019 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 1020 | ac_prev=prefix ;; |
| 1021 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 1022 | prefix=$ac_optarg ;; |
| 1023 | |
| 1024 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 1025 | | --program-pre | --program-pr | --program-p) |
| 1026 | ac_prev=program_prefix ;; |
| 1027 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 1028 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 1029 | program_prefix=$ac_optarg ;; |
| 1030 | |
| 1031 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 1032 | | --program-suf | --program-su | --program-s) |
| 1033 | ac_prev=program_suffix ;; |
| 1034 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 1035 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 1036 | program_suffix=$ac_optarg ;; |
| 1037 | |
| 1038 | -program-transform-name | --program-transform-name \ |
| 1039 | | --program-transform-nam | --program-transform-na \ |
| 1040 | | --program-transform-n | --program-transform- \ |
| 1041 | | --program-transform | --program-transfor \ |
| 1042 | | --program-transfo | --program-transf \ |
| 1043 | | --program-trans | --program-tran \ |
| 1044 | | --progr-tra | --program-tr | --program-t) |
| 1045 | ac_prev=program_transform_name ;; |
| 1046 | -program-transform-name=* | --program-transform-name=* \ |
| 1047 | | --program-transform-nam=* | --program-transform-na=* \ |
| 1048 | | --program-transform-n=* | --program-transform-=* \ |
| 1049 | | --program-transform=* | --program-transfor=* \ |
| 1050 | | --program-transfo=* | --program-transf=* \ |
| 1051 | | --program-trans=* | --program-tran=* \ |
| 1052 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 1053 | program_transform_name=$ac_optarg ;; |
| 1054 | |
| 1055 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
| 1056 | ac_prev=pdfdir ;; |
| 1057 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) |
| 1058 | pdfdir=$ac_optarg ;; |
| 1059 | |
| 1060 | -psdir | --psdir | --psdi | --psd | --ps) |
| 1061 | ac_prev=psdir ;; |
| 1062 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) |
| 1063 | psdir=$ac_optarg ;; |
| 1064 | |
| 1065 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 1066 | | -silent | --silent | --silen | --sile | --sil) |
| 1067 | silent=yes ;; |
| 1068 | |
| 1069 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 1070 | ac_prev=sbindir ;; |
| 1071 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 1072 | | --sbi=* | --sb=*) |
| 1073 | sbindir=$ac_optarg ;; |
| 1074 | |
| 1075 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 1076 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 1077 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 1078 | | --sha | --sh) |
| 1079 | ac_prev=sharedstatedir ;; |
| 1080 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 1081 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 1082 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 1083 | | --sha=* | --sh=*) |
| 1084 | sharedstatedir=$ac_optarg ;; |
| 1085 | |
| 1086 | -site | --site | --sit) |
| 1087 | ac_prev=site ;; |
| 1088 | -site=* | --site=* | --sit=*) |
| 1089 | site=$ac_optarg ;; |
| 1090 | |
| 1091 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 1092 | ac_prev=srcdir ;; |
| 1093 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 1094 | srcdir=$ac_optarg ;; |
| 1095 | |
| 1096 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 1097 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 1098 | ac_prev=sysconfdir ;; |
| 1099 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 1100 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 1101 | sysconfdir=$ac_optarg ;; |
| 1102 | |
| 1103 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 1104 | ac_prev=target_alias ;; |
| 1105 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 1106 | target_alias=$ac_optarg ;; |
| 1107 | |
| 1108 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 1109 | verbose=yes ;; |
| 1110 | |
| 1111 | -version | --version | --versio | --versi | --vers | -V) |
| 1112 | ac_init_version=: ;; |
| 1113 | |
| 1114 | -with-* | --with-*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1115 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1116 | # Reject names that are not valid shell variable names. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1117 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 1118 | as_fn_error $? "invalid package name: $ac_useropt" |
| 1119 | ac_useropt_orig=$ac_useropt |
| 1120 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1121 | case $ac_user_opts in |
| 1122 | *" |
| 1123 | "with_$ac_useropt" |
| 1124 | "*) ;; |
| 1125 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" |
| 1126 | ac_unrecognized_sep=', ';; |
| 1127 | esac |
| 1128 | eval with_$ac_useropt=\$ac_optarg ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1129 | |
| 1130 | -without-* | --without-*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1131 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1132 | # Reject names that are not valid shell variable names. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1133 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 1134 | as_fn_error $? "invalid package name: $ac_useropt" |
| 1135 | ac_useropt_orig=$ac_useropt |
| 1136 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1137 | case $ac_user_opts in |
| 1138 | *" |
| 1139 | "with_$ac_useropt" |
| 1140 | "*) ;; |
| 1141 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" |
| 1142 | ac_unrecognized_sep=', ';; |
| 1143 | esac |
| 1144 | eval with_$ac_useropt=no ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1145 | |
| 1146 | --x) |
| 1147 | # Obsolete; use --with-x. |
| 1148 | with_x=yes ;; |
| 1149 | |
| 1150 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 1151 | | --x-incl | --x-inc | --x-in | --x-i) |
| 1152 | ac_prev=x_includes ;; |
| 1153 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 1154 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 1155 | x_includes=$ac_optarg ;; |
| 1156 | |
| 1157 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 1158 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 1159 | ac_prev=x_libraries ;; |
| 1160 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 1161 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 1162 | x_libraries=$ac_optarg ;; |
| 1163 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1164 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
| 1165 | Try \`$0 --help' for more information" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1166 | ;; |
| 1167 | |
| 1168 | *=*) |
| 1169 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` |
| 1170 | # Reject names that are not valid shell variable names. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1171 | case $ac_envvar in #( |
| 1172 | '' | [0-9]* | *[!_$as_cr_alnum]* ) |
| 1173 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
| 1174 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1175 | eval $ac_envvar=\$ac_optarg |
| 1176 | export $ac_envvar ;; |
| 1177 | |
| 1178 | *) |
| 1179 | # FIXME: should be removed in autoconf 3.0. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1180 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1181 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1182 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
| 1183 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1184 | ;; |
| 1185 | |
| 1186 | esac |
| 1187 | done |
| 1188 | |
| 1189 | if test -n "$ac_prev"; then |
| 1190 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1191 | as_fn_error $? "missing argument to $ac_option" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1192 | fi |
| 1193 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1194 | if test -n "$ac_unrecognized_opts"; then |
| 1195 | case $enable_option_checking in |
| 1196 | no) ;; |
| 1197 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
| 1198 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
| 1199 | esac |
| 1200 | fi |
| 1201 | |
| 1202 | # Check all directory arguments for consistency. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1203 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
| 1204 | datadir sysconfdir sharedstatedir localstatedir includedir \ |
| 1205 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ |
| 1206 | libdir localedir mandir |
| 1207 | do |
| 1208 | eval ac_val=\$$ac_var |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1209 | # Remove trailing slashes. |
| 1210 | case $ac_val in |
| 1211 | */ ) |
| 1212 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` |
| 1213 | eval $ac_var=\$ac_val;; |
| 1214 | esac |
| 1215 | # Be sure to have absolute directory names. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1216 | case $ac_val in |
| 1217 | [\\/$]* | ?:[\\/]* ) continue;; |
| 1218 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; |
| 1219 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1220 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1221 | done |
| 1222 | |
| 1223 | # There might be people who depend on the old broken behavior: `$host' |
| 1224 | # used to hold the argument of --host etc. |
| 1225 | # FIXME: To remove some day. |
| 1226 | build=$build_alias |
| 1227 | host=$host_alias |
| 1228 | target=$target_alias |
| 1229 | |
| 1230 | # FIXME: To remove some day. |
| 1231 | if test "x$host_alias" != x; then |
| 1232 | if test "x$build_alias" = x; then |
| 1233 | cross_compiling=maybe |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1234 | elif test "x$build_alias" != "x$host_alias"; then |
| 1235 | cross_compiling=yes |
| 1236 | fi |
| 1237 | fi |
| 1238 | |
| 1239 | ac_tool_prefix= |
| 1240 | test -n "$host_alias" && ac_tool_prefix=$host_alias- |
| 1241 | |
| 1242 | test "$silent" = yes && exec 6>/dev/null |
| 1243 | |
| 1244 | |
| 1245 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
| 1246 | ac_ls_di=`ls -di .` && |
| 1247 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1248 | as_fn_error $? "working directory cannot be determined" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1249 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1250 | as_fn_error $? "pwd does not report name of working directory" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1251 | |
| 1252 | |
| 1253 | # Find the source files, if location was not specified. |
| 1254 | if test -z "$srcdir"; then |
| 1255 | ac_srcdir_defaulted=yes |
| 1256 | # Try the directory containing this script, then the parent directory. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1257 | ac_confdir=`$as_dirname -- "$as_myself" || |
| 1258 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 1259 | X"$as_myself" : 'X\(//\)[^/]' \| \ |
| 1260 | X"$as_myself" : 'X\(//\)$' \| \ |
| 1261 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || |
| 1262 | $as_echo X"$as_myself" | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1263 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 1264 | s//\1/ |
| 1265 | q |
| 1266 | } |
| 1267 | /^X\(\/\/\)[^/].*/{ |
| 1268 | s//\1/ |
| 1269 | q |
| 1270 | } |
| 1271 | /^X\(\/\/\)$/{ |
| 1272 | s//\1/ |
| 1273 | q |
| 1274 | } |
| 1275 | /^X\(\/\).*/{ |
| 1276 | s//\1/ |
| 1277 | q |
| 1278 | } |
| 1279 | s/.*/./; q'` |
| 1280 | srcdir=$ac_confdir |
| 1281 | if test ! -r "$srcdir/$ac_unique_file"; then |
| 1282 | srcdir=.. |
| 1283 | fi |
| 1284 | else |
| 1285 | ac_srcdir_defaulted=no |
| 1286 | fi |
| 1287 | if test ! -r "$srcdir/$ac_unique_file"; then |
| 1288 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1289 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1290 | fi |
| 1291 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" |
| 1292 | ac_abs_confdir=`( |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1293 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1294 | pwd)` |
| 1295 | # When building in place, set srcdir=. |
| 1296 | if test "$ac_abs_confdir" = "$ac_pwd"; then |
| 1297 | srcdir=. |
| 1298 | fi |
| 1299 | # Remove unnecessary trailing slashes from srcdir. |
| 1300 | # Double slashes in file names in object file debugging info |
| 1301 | # mess up M-x gdb in Emacs. |
| 1302 | case $srcdir in |
| 1303 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; |
| 1304 | esac |
| 1305 | for ac_var in $ac_precious_vars; do |
| 1306 | eval ac_env_${ac_var}_set=\${${ac_var}+set} |
| 1307 | eval ac_env_${ac_var}_value=\$${ac_var} |
| 1308 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} |
| 1309 | eval ac_cv_env_${ac_var}_value=\$${ac_var} |
| 1310 | done |
| 1311 | |
| 1312 | # |
| 1313 | # Report the --help message. |
| 1314 | # |
| 1315 | if test "$ac_init_help" = "long"; then |
| 1316 | # Omit some internal or obsolete options to make the list less imposing. |
| 1317 | # This message is too long to be a string in the A/UX 3.1 sh. |
| 1318 | cat <<_ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1319 | \`configure' configures pcap 1.9.0-PRE-GIT to adapt to many kinds of systems. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1320 | |
| 1321 | Usage: $0 [OPTION]... [VAR=VALUE]... |
| 1322 | |
| 1323 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
| 1324 | VAR=VALUE. See below for descriptions of some of the useful variables. |
| 1325 | |
| 1326 | Defaults for the options are specified in brackets. |
| 1327 | |
| 1328 | Configuration: |
| 1329 | -h, --help display this help and exit |
| 1330 | --help=short display options specific to this package |
| 1331 | --help=recursive display the short help of all the included packages |
| 1332 | -V, --version display version information and exit |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1333 | -q, --quiet, --silent do not print \`checking ...' messages |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1334 | --cache-file=FILE cache test results in FILE [disabled] |
| 1335 | -C, --config-cache alias for \`--cache-file=config.cache' |
| 1336 | -n, --no-create do not create output files |
| 1337 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] |
| 1338 | |
| 1339 | Installation directories: |
| 1340 | --prefix=PREFIX install architecture-independent files in PREFIX |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1341 | [$ac_default_prefix] |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1342 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1343 | [PREFIX] |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1344 | |
| 1345 | By default, \`make install' will install all the files in |
| 1346 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify |
| 1347 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', |
| 1348 | for instance \`--prefix=\$HOME'. |
| 1349 | |
| 1350 | For better control, use the options below. |
| 1351 | |
| 1352 | Fine tuning of the installation directories: |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1353 | --bindir=DIR user executables [EPREFIX/bin] |
| 1354 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
| 1355 | --libexecdir=DIR program executables [EPREFIX/libexec] |
| 1356 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
| 1357 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
| 1358 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
| 1359 | --libdir=DIR object code libraries [EPREFIX/lib] |
| 1360 | --includedir=DIR C header files [PREFIX/include] |
| 1361 | --oldincludedir=DIR C header files for non-gcc [/usr/include] |
| 1362 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
| 1363 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
| 1364 | --infodir=DIR info documentation [DATAROOTDIR/info] |
| 1365 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
| 1366 | --mandir=DIR man documentation [DATAROOTDIR/man] |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1367 | --docdir=DIR documentation root [DATAROOTDIR/doc/pcap] |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1368 | --htmldir=DIR html documentation [DOCDIR] |
| 1369 | --dvidir=DIR dvi documentation [DOCDIR] |
| 1370 | --pdfdir=DIR pdf documentation [DOCDIR] |
| 1371 | --psdir=DIR ps documentation [DOCDIR] |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1372 | _ACEOF |
| 1373 | |
| 1374 | cat <<\_ACEOF |
| 1375 | |
| 1376 | System types: |
| 1377 | --build=BUILD configure for building on BUILD [guessed] |
| 1378 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
| 1379 | --target=TARGET configure for building compilers for TARGET [HOST] |
| 1380 | _ACEOF |
| 1381 | fi |
| 1382 | |
| 1383 | if test -n "$ac_init_help"; then |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1384 | case $ac_init_help in |
| 1385 | short | recursive ) echo "Configuration of pcap 1.9.0-PRE-GIT:";; |
| 1386 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1387 | cat <<\_ACEOF |
| 1388 | |
| 1389 | Optional Features: |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1390 | --disable-option-checking ignore unrecognized --enable/--with options |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1391 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 1392 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1393 | --disable-largefile omit support for large files |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1394 | --disable-protochain disable \"protochain\" insn |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1395 | --enable-packet-ring enable packet ring support on Linux [default=yes] |
| 1396 | --enable-ipv6 build IPv6-capable version [default=yes] |
| 1397 | --enable-remote enable remote packet capture [default=no] |
| 1398 | --disable-remote disable remote packet capture |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1399 | --enable-optimizer-dbg build optimizer debugging code |
| 1400 | --enable-yydebug build parser debugging code |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1401 | --disable-universal don't build universal on macOS |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1402 | --enable-shared build shared libraries [default=yes, if support |
| 1403 | available] |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1404 | --enable-usb enable USB capture support [default=yes, if support |
| 1405 | available] |
| 1406 | --enable-netmap enable netmap support [default=yes, if support |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 1407 | available] |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1408 | --enable-bluetooth enable Bluetooth support [default=yes, if support |
| 1409 | available] |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1410 | --enable-dbus enable D-Bus capture support [default=yes, if |
| 1411 | support available] |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1412 | --enable-rdma enable RDMA capture support [default=yes, if support |
| 1413 | available] |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1414 | |
| 1415 | Optional Packages: |
| 1416 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 1417 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 1418 | --without-gcc don't use gcc |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1419 | --with-sita include SITA support |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1420 | --with-pcap=TYPE use packet capture TYPE |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1421 | --without-libnl disable libnl support [default=yes, on Linux, if |
| 1422 | present] |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 1423 | --with-dag[=DIR] include Endace DAG support (located in directory |
| 1424 | DIR, if supplied). [default=yes, if present] |
| 1425 | --with-dag-includes=IDIR |
| 1426 | Endace DAG include directory, if not DIR/include |
| 1427 | --with-dag-libraries=LDIR |
| 1428 | Endace DAG library directory, if not DIR/lib |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1429 | --with-septel[=DIR] include Septel support (located in directory DIR, if |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 1430 | supplied). [default=yes, if present] |
| 1431 | --with-snf[=DIR] include Myricom SNF support (located in directory |
| 1432 | DIR, if supplied). [default=yes, if present] |
| 1433 | --with-snf-includes=IDIR |
| 1434 | Myricom SNF include directory, if not DIR/include |
| 1435 | --with-snf-libraries=LDIR |
| 1436 | Myricom SNF library directory, if not DIR/lib |
| 1437 | --with-turbocap[=DIR] include Riverbed TurboCap support (located in |
| 1438 | directory DIR, if supplied). [default=yes, if |
| 1439 | present] |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1440 | |
| 1441 | Some influential environment variables: |
| 1442 | CC C compiler command |
| 1443 | CFLAGS C compiler flags |
| 1444 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a |
| 1445 | nonstandard directory <lib dir> |
| 1446 | LIBS libraries to pass to the linker, e.g. -l<library> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1447 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1448 | you have headers in a nonstandard directory <include dir> |
| 1449 | CPP C preprocessor |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 1450 | YACC The `Yet Another Compiler Compiler' implementation to use. |
| 1451 | Defaults to the first program found out of: `bison -y', `byacc', |
| 1452 | `yacc'. |
| 1453 | YFLAGS The list of arguments that will be passed by default to $YACC. |
| 1454 | This script will default YFLAGS to the empty string to avoid a |
| 1455 | default value of `-d' given by some make applications. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1456 | |
| 1457 | Use these variables to override the choices made by `configure' or to help |
| 1458 | it to find libraries and programs with nonstandard names/locations. |
| 1459 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1460 | Report bugs to the package provider. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1461 | _ACEOF |
| 1462 | ac_status=$? |
| 1463 | fi |
| 1464 | |
| 1465 | if test "$ac_init_help" = "recursive"; then |
| 1466 | # If there are subdirs, report their specific --help. |
| 1467 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1468 | test -d "$ac_dir" || |
| 1469 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || |
| 1470 | continue |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1471 | ac_builddir=. |
| 1472 | |
| 1473 | case "$ac_dir" in |
| 1474 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1475 | *) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1476 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1477 | # A ".." for each directory in $ac_dir_suffix. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1478 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1479 | case $ac_top_builddir_sub in |
| 1480 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1481 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 1482 | esac ;; |
| 1483 | esac |
| 1484 | ac_abs_top_builddir=$ac_pwd |
| 1485 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 1486 | # for backward compatibility: |
| 1487 | ac_top_builddir=$ac_top_build_prefix |
| 1488 | |
| 1489 | case $srcdir in |
| 1490 | .) # We are building in place. |
| 1491 | ac_srcdir=. |
| 1492 | ac_top_srcdir=$ac_top_builddir_sub |
| 1493 | ac_abs_top_srcdir=$ac_pwd ;; |
| 1494 | [\\/]* | ?:[\\/]* ) # Absolute name. |
| 1495 | ac_srcdir=$srcdir$ac_dir_suffix; |
| 1496 | ac_top_srcdir=$srcdir |
| 1497 | ac_abs_top_srcdir=$srcdir ;; |
| 1498 | *) # Relative name. |
| 1499 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 1500 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 1501 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
| 1502 | esac |
| 1503 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
| 1504 | |
| 1505 | cd "$ac_dir" || { ac_status=$?; continue; } |
| 1506 | # Check for guested configure. |
| 1507 | if test -f "$ac_srcdir/configure.gnu"; then |
| 1508 | echo && |
| 1509 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive |
| 1510 | elif test -f "$ac_srcdir/configure"; then |
| 1511 | echo && |
| 1512 | $SHELL "$ac_srcdir/configure" --help=recursive |
| 1513 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1514 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1515 | fi || ac_status=$? |
| 1516 | cd "$ac_pwd" || { ac_status=$?; break; } |
| 1517 | done |
| 1518 | fi |
| 1519 | |
| 1520 | test -n "$ac_init_help" && exit $ac_status |
| 1521 | if $ac_init_version; then |
| 1522 | cat <<\_ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1523 | pcap configure 1.9.0-PRE-GIT |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1524 | generated by GNU Autoconf 2.69 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1525 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1526 | Copyright (C) 2012 Free Software Foundation, Inc. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1527 | This configure script is free software; the Free Software Foundation |
| 1528 | gives unlimited permission to copy, distribute and modify it. |
| 1529 | _ACEOF |
| 1530 | exit |
| 1531 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1532 | |
| 1533 | ## ------------------------ ## |
| 1534 | ## Autoconf initialization. ## |
| 1535 | ## ------------------------ ## |
| 1536 | |
| 1537 | # ac_fn_c_try_compile LINENO |
| 1538 | # -------------------------- |
| 1539 | # Try to compile conftest.$ac_ext, and return whether this succeeded. |
| 1540 | ac_fn_c_try_compile () |
| 1541 | { |
| 1542 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1543 | rm -f conftest.$ac_objext |
| 1544 | if { { ac_try="$ac_compile" |
| 1545 | case "(($ac_try" in |
| 1546 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1547 | *) ac_try_echo=$ac_try;; |
| 1548 | esac |
| 1549 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1550 | $as_echo "$ac_try_echo"; } >&5 |
| 1551 | (eval "$ac_compile") 2>conftest.err |
| 1552 | ac_status=$? |
| 1553 | if test -s conftest.err; then |
| 1554 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1555 | cat conftest.er1 >&5 |
| 1556 | mv -f conftest.er1 conftest.err |
| 1557 | fi |
| 1558 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1559 | test $ac_status = 0; } && { |
| 1560 | test -z "$ac_c_werror_flag" || |
| 1561 | test ! -s conftest.err |
| 1562 | } && test -s conftest.$ac_objext; then : |
| 1563 | ac_retval=0 |
| 1564 | else |
| 1565 | $as_echo "$as_me: failed program was:" >&5 |
| 1566 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1567 | |
| 1568 | ac_retval=1 |
| 1569 | fi |
| 1570 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1571 | as_fn_set_status $ac_retval |
| 1572 | |
| 1573 | } # ac_fn_c_try_compile |
| 1574 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1575 | # ac_fn_c_try_link LINENO |
| 1576 | # ----------------------- |
| 1577 | # Try to link conftest.$ac_ext, and return whether this succeeded. |
| 1578 | ac_fn_c_try_link () |
| 1579 | { |
| 1580 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1581 | rm -f conftest.$ac_objext conftest$ac_exeext |
| 1582 | if { { ac_try="$ac_link" |
| 1583 | case "(($ac_try" in |
| 1584 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1585 | *) ac_try_echo=$ac_try;; |
| 1586 | esac |
| 1587 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1588 | $as_echo "$ac_try_echo"; } >&5 |
| 1589 | (eval "$ac_link") 2>conftest.err |
| 1590 | ac_status=$? |
| 1591 | if test -s conftest.err; then |
| 1592 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1593 | cat conftest.er1 >&5 |
| 1594 | mv -f conftest.er1 conftest.err |
| 1595 | fi |
| 1596 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1597 | test $ac_status = 0; } && { |
| 1598 | test -z "$ac_c_werror_flag" || |
| 1599 | test ! -s conftest.err |
| 1600 | } && test -s conftest$ac_exeext && { |
| 1601 | test "$cross_compiling" = yes || |
| 1602 | test -x conftest$ac_exeext |
| 1603 | }; then : |
| 1604 | ac_retval=0 |
| 1605 | else |
| 1606 | $as_echo "$as_me: failed program was:" >&5 |
| 1607 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1608 | |
| 1609 | ac_retval=1 |
| 1610 | fi |
| 1611 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
| 1612 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would |
| 1613 | # interfere with the next link command; also delete a directory that is |
| 1614 | # left behind by Apple's compiler. We do this before executing the actions. |
| 1615 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
| 1616 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1617 | as_fn_set_status $ac_retval |
| 1618 | |
| 1619 | } # ac_fn_c_try_link |
| 1620 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1621 | # ac_fn_c_try_cpp LINENO |
| 1622 | # ---------------------- |
| 1623 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. |
| 1624 | ac_fn_c_try_cpp () |
| 1625 | { |
| 1626 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1627 | if { { ac_try="$ac_cpp conftest.$ac_ext" |
| 1628 | case "(($ac_try" in |
| 1629 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1630 | *) ac_try_echo=$ac_try;; |
| 1631 | esac |
| 1632 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1633 | $as_echo "$ac_try_echo"; } >&5 |
| 1634 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err |
| 1635 | ac_status=$? |
| 1636 | if test -s conftest.err; then |
| 1637 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1638 | cat conftest.er1 >&5 |
| 1639 | mv -f conftest.er1 conftest.err |
| 1640 | fi |
| 1641 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1642 | test $ac_status = 0; } > conftest.i && { |
| 1643 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
| 1644 | test ! -s conftest.err |
| 1645 | }; then : |
| 1646 | ac_retval=0 |
| 1647 | else |
| 1648 | $as_echo "$as_me: failed program was:" >&5 |
| 1649 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1650 | |
| 1651 | ac_retval=1 |
| 1652 | fi |
| 1653 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1654 | as_fn_set_status $ac_retval |
| 1655 | |
| 1656 | } # ac_fn_c_try_cpp |
| 1657 | |
| 1658 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
| 1659 | # ------------------------------------------------------- |
| 1660 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using |
| 1661 | # the include files in INCLUDES and setting the cache variable VAR |
| 1662 | # accordingly. |
| 1663 | ac_fn_c_check_header_mongrel () |
| 1664 | { |
| 1665 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1666 | if eval \${$3+:} false; then : |
| 1667 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1668 | $as_echo_n "checking for $2... " >&6; } |
| 1669 | if eval \${$3+:} false; then : |
| 1670 | $as_echo_n "(cached) " >&6 |
| 1671 | fi |
| 1672 | eval ac_res=\$$3 |
| 1673 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1674 | $as_echo "$ac_res" >&6; } |
| 1675 | else |
| 1676 | # Is the header compilable? |
| 1677 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 |
| 1678 | $as_echo_n "checking $2 usability... " >&6; } |
| 1679 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1680 | /* end confdefs.h. */ |
| 1681 | $4 |
| 1682 | #include <$2> |
| 1683 | _ACEOF |
| 1684 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1685 | ac_header_compiler=yes |
| 1686 | else |
| 1687 | ac_header_compiler=no |
| 1688 | fi |
| 1689 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1690 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 |
| 1691 | $as_echo "$ac_header_compiler" >&6; } |
| 1692 | |
| 1693 | # Is the header present? |
| 1694 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 |
| 1695 | $as_echo_n "checking $2 presence... " >&6; } |
| 1696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1697 | /* end confdefs.h. */ |
| 1698 | #include <$2> |
| 1699 | _ACEOF |
| 1700 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 1701 | ac_header_preproc=yes |
| 1702 | else |
| 1703 | ac_header_preproc=no |
| 1704 | fi |
| 1705 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 1706 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
| 1707 | $as_echo "$ac_header_preproc" >&6; } |
| 1708 | |
| 1709 | # So? What about this header? |
| 1710 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( |
| 1711 | yes:no: ) |
| 1712 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 |
| 1713 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} |
| 1714 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1715 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
| 1716 | ;; |
| 1717 | no:yes:* ) |
| 1718 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 |
| 1719 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} |
| 1720 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 |
| 1721 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} |
| 1722 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 |
| 1723 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} |
| 1724 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 |
| 1725 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} |
| 1726 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1727 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
| 1728 | ;; |
| 1729 | esac |
| 1730 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1731 | $as_echo_n "checking for $2... " >&6; } |
| 1732 | if eval \${$3+:} false; then : |
| 1733 | $as_echo_n "(cached) " >&6 |
| 1734 | else |
| 1735 | eval "$3=\$ac_header_compiler" |
| 1736 | fi |
| 1737 | eval ac_res=\$$3 |
| 1738 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1739 | $as_echo "$ac_res" >&6; } |
| 1740 | fi |
| 1741 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1742 | |
| 1743 | } # ac_fn_c_check_header_mongrel |
| 1744 | |
| 1745 | # ac_fn_c_try_run LINENO |
| 1746 | # ---------------------- |
| 1747 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes |
| 1748 | # that executables *can* be run. |
| 1749 | ac_fn_c_try_run () |
| 1750 | { |
| 1751 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1752 | if { { ac_try="$ac_link" |
| 1753 | case "(($ac_try" in |
| 1754 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1755 | *) ac_try_echo=$ac_try;; |
| 1756 | esac |
| 1757 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1758 | $as_echo "$ac_try_echo"; } >&5 |
| 1759 | (eval "$ac_link") 2>&5 |
| 1760 | ac_status=$? |
| 1761 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1762 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' |
| 1763 | { { case "(($ac_try" in |
| 1764 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1765 | *) ac_try_echo=$ac_try;; |
| 1766 | esac |
| 1767 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1768 | $as_echo "$ac_try_echo"; } >&5 |
| 1769 | (eval "$ac_try") 2>&5 |
| 1770 | ac_status=$? |
| 1771 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1772 | test $ac_status = 0; }; }; then : |
| 1773 | ac_retval=0 |
| 1774 | else |
| 1775 | $as_echo "$as_me: program exited with status $ac_status" >&5 |
| 1776 | $as_echo "$as_me: failed program was:" >&5 |
| 1777 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1778 | |
| 1779 | ac_retval=$ac_status |
| 1780 | fi |
| 1781 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
| 1782 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1783 | as_fn_set_status $ac_retval |
| 1784 | |
| 1785 | } # ac_fn_c_try_run |
| 1786 | |
| 1787 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
| 1788 | # ------------------------------------------------------- |
| 1789 | # Tests whether HEADER exists and can be compiled using the include files in |
| 1790 | # INCLUDES, setting the cache variable VAR accordingly. |
| 1791 | ac_fn_c_check_header_compile () |
| 1792 | { |
| 1793 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1795 | $as_echo_n "checking for $2... " >&6; } |
| 1796 | if eval \${$3+:} false; then : |
| 1797 | $as_echo_n "(cached) " >&6 |
| 1798 | else |
| 1799 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1800 | /* end confdefs.h. */ |
| 1801 | $4 |
| 1802 | #include <$2> |
| 1803 | _ACEOF |
| 1804 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1805 | eval "$3=yes" |
| 1806 | else |
| 1807 | eval "$3=no" |
| 1808 | fi |
| 1809 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1810 | fi |
| 1811 | eval ac_res=\$$3 |
| 1812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1813 | $as_echo "$ac_res" >&6; } |
| 1814 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1815 | |
| 1816 | } # ac_fn_c_check_header_compile |
| 1817 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 1818 | # ac_fn_c_check_func LINENO FUNC VAR |
| 1819 | # ---------------------------------- |
| 1820 | # Tests whether FUNC exists, setting the cache variable VAR accordingly |
| 1821 | ac_fn_c_check_func () |
| 1822 | { |
| 1823 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1824 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1825 | $as_echo_n "checking for $2... " >&6; } |
| 1826 | if eval \${$3+:} false; then : |
| 1827 | $as_echo_n "(cached) " >&6 |
| 1828 | else |
| 1829 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1830 | /* end confdefs.h. */ |
| 1831 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
| 1832 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
| 1833 | #define $2 innocuous_$2 |
| 1834 | |
| 1835 | /* System header to define __stub macros and hopefully few prototypes, |
| 1836 | which can conflict with char $2 (); below. |
| 1837 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 1838 | <limits.h> exists even on freestanding compilers. */ |
| 1839 | |
| 1840 | #ifdef __STDC__ |
| 1841 | # include <limits.h> |
| 1842 | #else |
| 1843 | # include <assert.h> |
| 1844 | #endif |
| 1845 | |
| 1846 | #undef $2 |
| 1847 | |
| 1848 | /* Override any GCC internal prototype to avoid an error. |
| 1849 | Use char because int might match the return type of a GCC |
| 1850 | builtin and then its argument prototype would still apply. */ |
| 1851 | #ifdef __cplusplus |
| 1852 | extern "C" |
| 1853 | #endif |
| 1854 | char $2 (); |
| 1855 | /* The GNU C library defines this for functions which it implements |
| 1856 | to always fail with ENOSYS. Some functions are actually named |
| 1857 | something starting with __ and the normal name is an alias. */ |
| 1858 | #if defined __stub_$2 || defined __stub___$2 |
| 1859 | choke me |
| 1860 | #endif |
| 1861 | |
| 1862 | int |
| 1863 | main () |
| 1864 | { |
| 1865 | return $2 (); |
| 1866 | ; |
| 1867 | return 0; |
| 1868 | } |
| 1869 | _ACEOF |
| 1870 | if ac_fn_c_try_link "$LINENO"; then : |
| 1871 | eval "$3=yes" |
| 1872 | else |
| 1873 | eval "$3=no" |
| 1874 | fi |
| 1875 | rm -f core conftest.err conftest.$ac_objext \ |
| 1876 | conftest$ac_exeext conftest.$ac_ext |
| 1877 | fi |
| 1878 | eval ac_res=\$$3 |
| 1879 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1880 | $as_echo "$ac_res" >&6; } |
| 1881 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1882 | |
| 1883 | } # ac_fn_c_check_func |
| 1884 | |
| 1885 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
| 1886 | # --------------------------------------------- |
| 1887 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR |
| 1888 | # accordingly. |
| 1889 | ac_fn_c_check_decl () |
| 1890 | { |
| 1891 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1892 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
| 1893 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` |
| 1894 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 |
| 1895 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } |
| 1896 | if eval \${$3+:} false; then : |
| 1897 | $as_echo_n "(cached) " >&6 |
| 1898 | else |
| 1899 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1900 | /* end confdefs.h. */ |
| 1901 | $4 |
| 1902 | int |
| 1903 | main () |
| 1904 | { |
| 1905 | #ifndef $as_decl_name |
| 1906 | #ifdef __cplusplus |
| 1907 | (void) $as_decl_use; |
| 1908 | #else |
| 1909 | (void) $as_decl_name; |
| 1910 | #endif |
| 1911 | #endif |
| 1912 | |
| 1913 | ; |
| 1914 | return 0; |
| 1915 | } |
| 1916 | _ACEOF |
| 1917 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1918 | eval "$3=yes" |
| 1919 | else |
| 1920 | eval "$3=no" |
| 1921 | fi |
| 1922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1923 | fi |
| 1924 | eval ac_res=\$$3 |
| 1925 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1926 | $as_echo "$ac_res" >&6; } |
| 1927 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1928 | |
| 1929 | } # ac_fn_c_check_decl |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 1930 | |
| 1931 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
| 1932 | # ------------------------------------------- |
| 1933 | # Tests whether TYPE exists after having included INCLUDES, setting cache |
| 1934 | # variable VAR accordingly. |
| 1935 | ac_fn_c_check_type () |
| 1936 | { |
| 1937 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1938 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1939 | $as_echo_n "checking for $2... " >&6; } |
| 1940 | if eval \${$3+:} false; then : |
| 1941 | $as_echo_n "(cached) " >&6 |
| 1942 | else |
| 1943 | eval "$3=no" |
| 1944 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1945 | /* end confdefs.h. */ |
| 1946 | $4 |
| 1947 | int |
| 1948 | main () |
| 1949 | { |
| 1950 | if (sizeof ($2)) |
| 1951 | return 0; |
| 1952 | ; |
| 1953 | return 0; |
| 1954 | } |
| 1955 | _ACEOF |
| 1956 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1957 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1958 | /* end confdefs.h. */ |
| 1959 | $4 |
| 1960 | int |
| 1961 | main () |
| 1962 | { |
| 1963 | if (sizeof (($2))) |
| 1964 | return 0; |
| 1965 | ; |
| 1966 | return 0; |
| 1967 | } |
| 1968 | _ACEOF |
| 1969 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1970 | |
| 1971 | else |
| 1972 | eval "$3=yes" |
| 1973 | fi |
| 1974 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1975 | fi |
| 1976 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1977 | fi |
| 1978 | eval ac_res=\$$3 |
| 1979 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1980 | $as_echo "$ac_res" >&6; } |
| 1981 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1982 | |
| 1983 | } # ac_fn_c_check_type |
| 1984 | |
| 1985 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
| 1986 | # ---------------------------------------------------- |
| 1987 | # Tries to find if the field MEMBER exists in type AGGR, after including |
| 1988 | # INCLUDES, setting cache variable VAR accordingly. |
| 1989 | ac_fn_c_check_member () |
| 1990 | { |
| 1991 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1992 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 |
| 1993 | $as_echo_n "checking for $2.$3... " >&6; } |
| 1994 | if eval \${$4+:} false; then : |
| 1995 | $as_echo_n "(cached) " >&6 |
| 1996 | else |
| 1997 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1998 | /* end confdefs.h. */ |
| 1999 | $5 |
| 2000 | int |
| 2001 | main () |
| 2002 | { |
| 2003 | static $2 ac_aggr; |
| 2004 | if (ac_aggr.$3) |
| 2005 | return 0; |
| 2006 | ; |
| 2007 | return 0; |
| 2008 | } |
| 2009 | _ACEOF |
| 2010 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2011 | eval "$4=yes" |
| 2012 | else |
| 2013 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2014 | /* end confdefs.h. */ |
| 2015 | $5 |
| 2016 | int |
| 2017 | main () |
| 2018 | { |
| 2019 | static $2 ac_aggr; |
| 2020 | if (sizeof ac_aggr.$3) |
| 2021 | return 0; |
| 2022 | ; |
| 2023 | return 0; |
| 2024 | } |
| 2025 | _ACEOF |
| 2026 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2027 | eval "$4=yes" |
| 2028 | else |
| 2029 | eval "$4=no" |
| 2030 | fi |
| 2031 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2032 | fi |
| 2033 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2034 | fi |
| 2035 | eval ac_res=\$$4 |
| 2036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2037 | $as_echo "$ac_res" >&6; } |
| 2038 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2039 | |
| 2040 | } # ac_fn_c_check_member |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2041 | cat >config.log <<_ACEOF |
| 2042 | This file contains any messages produced by compilers while |
| 2043 | running configure, to aid debugging if configure makes a mistake. |
| 2044 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 2045 | It was created by pcap $as_me 1.9.0-PRE-GIT, which was |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2046 | generated by GNU Autoconf 2.69. Invocation command line was |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2047 | |
| 2048 | $ $0 $@ |
| 2049 | |
| 2050 | _ACEOF |
| 2051 | exec 5>>config.log |
| 2052 | { |
| 2053 | cat <<_ASUNAME |
| 2054 | ## --------- ## |
| 2055 | ## Platform. ## |
| 2056 | ## --------- ## |
| 2057 | |
| 2058 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 2059 | uname -m = `(uname -m) 2>/dev/null || echo unknown` |
| 2060 | uname -r = `(uname -r) 2>/dev/null || echo unknown` |
| 2061 | uname -s = `(uname -s) 2>/dev/null || echo unknown` |
| 2062 | uname -v = `(uname -v) 2>/dev/null || echo unknown` |
| 2063 | |
| 2064 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
| 2065 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` |
| 2066 | |
| 2067 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
| 2068 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` |
| 2069 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` |
| 2070 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` |
| 2071 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
| 2072 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` |
| 2073 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` |
| 2074 | |
| 2075 | _ASUNAME |
| 2076 | |
| 2077 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2078 | for as_dir in $PATH |
| 2079 | do |
| 2080 | IFS=$as_save_IFS |
| 2081 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2082 | $as_echo "PATH: $as_dir" |
| 2083 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2084 | IFS=$as_save_IFS |
| 2085 | |
| 2086 | } >&5 |
| 2087 | |
| 2088 | cat >&5 <<_ACEOF |
| 2089 | |
| 2090 | |
| 2091 | ## ----------- ## |
| 2092 | ## Core tests. ## |
| 2093 | ## ----------- ## |
| 2094 | |
| 2095 | _ACEOF |
| 2096 | |
| 2097 | |
| 2098 | # Keep a trace of the command line. |
| 2099 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 2100 | # Strip out --silent because we don't want to record it for future runs. |
| 2101 | # Also quote any args containing shell meta-characters. |
| 2102 | # Make two passes to allow for proper duplicate-argument suppression. |
| 2103 | ac_configure_args= |
| 2104 | ac_configure_args0= |
| 2105 | ac_configure_args1= |
| 2106 | ac_must_keep_next=false |
| 2107 | for ac_pass in 1 2 |
| 2108 | do |
| 2109 | for ac_arg |
| 2110 | do |
| 2111 | case $ac_arg in |
| 2112 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; |
| 2113 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 2114 | | -silent | --silent | --silen | --sile | --sil) |
| 2115 | continue ;; |
| 2116 | *\'*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2117 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2118 | esac |
| 2119 | case $ac_pass in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2120 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2121 | 2) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2122 | as_fn_append ac_configure_args1 " '$ac_arg'" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2123 | if test $ac_must_keep_next = true; then |
| 2124 | ac_must_keep_next=false # Got value, back to normal. |
| 2125 | else |
| 2126 | case $ac_arg in |
| 2127 | *=* | --config-cache | -C | -disable-* | --disable-* \ |
| 2128 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ |
| 2129 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ |
| 2130 | | -with-* | --with-* | -without-* | --without-* | --x) |
| 2131 | case "$ac_configure_args0 " in |
| 2132 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; |
| 2133 | esac |
| 2134 | ;; |
| 2135 | -* ) ac_must_keep_next=true ;; |
| 2136 | esac |
| 2137 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2138 | as_fn_append ac_configure_args " '$ac_arg'" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2139 | ;; |
| 2140 | esac |
| 2141 | done |
| 2142 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2143 | { ac_configure_args0=; unset ac_configure_args0;} |
| 2144 | { ac_configure_args1=; unset ac_configure_args1;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2145 | |
| 2146 | # When interrupted or exit'd, cleanup temporary files, and complete |
| 2147 | # config.log. We remove comments because anyway the quotes in there |
| 2148 | # would cause problems or look ugly. |
| 2149 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
| 2150 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. |
| 2151 | trap 'exit_status=$? |
| 2152 | # Save into config.log some information that might help in debugging. |
| 2153 | { |
| 2154 | echo |
| 2155 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2156 | $as_echo "## ---------------- ## |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2157 | ## Cache variables. ## |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2158 | ## ---------------- ##" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2159 | echo |
| 2160 | # The following way of writing the cache mishandles newlines in values, |
| 2161 | ( |
| 2162 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do |
| 2163 | eval ac_val=\$$ac_var |
| 2164 | case $ac_val in #( |
| 2165 | *${as_nl}*) |
| 2166 | case $ac_var in #( |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2167 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 2168 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2169 | esac |
| 2170 | case $ac_var in #( |
| 2171 | _ | IFS | as_nl) ;; #( |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2172 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 2173 | *) { eval $ac_var=; unset $ac_var;} ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2174 | esac ;; |
| 2175 | esac |
| 2176 | done |
| 2177 | (set) 2>&1 | |
| 2178 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
| 2179 | *${as_nl}ac_space=\ *) |
| 2180 | sed -n \ |
| 2181 | "s/'\''/'\''\\\\'\'''\''/g; |
| 2182 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" |
| 2183 | ;; #( |
| 2184 | *) |
| 2185 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
| 2186 | ;; |
| 2187 | esac | |
| 2188 | sort |
| 2189 | ) |
| 2190 | echo |
| 2191 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2192 | $as_echo "## ----------------- ## |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2193 | ## Output variables. ## |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2194 | ## ----------------- ##" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2195 | echo |
| 2196 | for ac_var in $ac_subst_vars |
| 2197 | do |
| 2198 | eval ac_val=\$$ac_var |
| 2199 | case $ac_val in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2200 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2201 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2202 | $as_echo "$ac_var='\''$ac_val'\''" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2203 | done | sort |
| 2204 | echo |
| 2205 | |
| 2206 | if test -n "$ac_subst_files"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2207 | $as_echo "## ------------------- ## |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2208 | ## File substitutions. ## |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2209 | ## ------------------- ##" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2210 | echo |
| 2211 | for ac_var in $ac_subst_files |
| 2212 | do |
| 2213 | eval ac_val=\$$ac_var |
| 2214 | case $ac_val in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2215 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2216 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2217 | $as_echo "$ac_var='\''$ac_val'\''" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2218 | done | sort |
| 2219 | echo |
| 2220 | fi |
| 2221 | |
| 2222 | if test -s confdefs.h; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2223 | $as_echo "## ----------- ## |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2224 | ## confdefs.h. ## |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2225 | ## ----------- ##" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2226 | echo |
| 2227 | cat confdefs.h |
| 2228 | echo |
| 2229 | fi |
| 2230 | test "$ac_signal" != 0 && |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2231 | $as_echo "$as_me: caught signal $ac_signal" |
| 2232 | $as_echo "$as_me: exit $exit_status" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2233 | } >&5 |
| 2234 | rm -f core *.core core.conftest.* && |
| 2235 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && |
| 2236 | exit $exit_status |
| 2237 | ' 0 |
| 2238 | for ac_signal in 1 2 13 15; do |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2239 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2240 | done |
| 2241 | ac_signal=0 |
| 2242 | |
| 2243 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 2244 | rm -f -r conftest* confdefs.h |
| 2245 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2246 | $as_echo "/* confdefs.h */" > confdefs.h |
| 2247 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2248 | # Predefined preprocessor variables. |
| 2249 | |
| 2250 | cat >>confdefs.h <<_ACEOF |
| 2251 | #define PACKAGE_NAME "$PACKAGE_NAME" |
| 2252 | _ACEOF |
| 2253 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2254 | cat >>confdefs.h <<_ACEOF |
| 2255 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" |
| 2256 | _ACEOF |
| 2257 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2258 | cat >>confdefs.h <<_ACEOF |
| 2259 | #define PACKAGE_VERSION "$PACKAGE_VERSION" |
| 2260 | _ACEOF |
| 2261 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2262 | cat >>confdefs.h <<_ACEOF |
| 2263 | #define PACKAGE_STRING "$PACKAGE_STRING" |
| 2264 | _ACEOF |
| 2265 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2266 | cat >>confdefs.h <<_ACEOF |
| 2267 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" |
| 2268 | _ACEOF |
| 2269 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2270 | cat >>confdefs.h <<_ACEOF |
| 2271 | #define PACKAGE_URL "$PACKAGE_URL" |
| 2272 | _ACEOF |
| 2273 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2274 | |
| 2275 | # Let the site file select an alternate cache file if it wants to. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2276 | # Prefer an explicitly selected file to automatically selected ones. |
| 2277 | ac_site_file1=NONE |
| 2278 | ac_site_file2=NONE |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2279 | if test -n "$CONFIG_SITE"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2280 | # We do not want a PATH search for config.site. |
| 2281 | case $CONFIG_SITE in #(( |
| 2282 | -*) ac_site_file1=./$CONFIG_SITE;; |
| 2283 | */*) ac_site_file1=$CONFIG_SITE;; |
| 2284 | *) ac_site_file1=./$CONFIG_SITE;; |
| 2285 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2286 | elif test "x$prefix" != xNONE; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2287 | ac_site_file1=$prefix/share/config.site |
| 2288 | ac_site_file2=$prefix/etc/config.site |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2289 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2290 | ac_site_file1=$ac_default_prefix/share/config.site |
| 2291 | ac_site_file2=$ac_default_prefix/etc/config.site |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2292 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2293 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2294 | do |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2295 | test "x$ac_site_file" = xNONE && continue |
| 2296 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
| 2297 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
| 2298 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2299 | sed 's/^/| /' "$ac_site_file" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2300 | . "$ac_site_file" \ |
| 2301 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2302 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2303 | as_fn_error $? "failed to load site script $ac_site_file |
| 2304 | See \`config.log' for more details" "$LINENO" 5; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2305 | fi |
| 2306 | done |
| 2307 | |
| 2308 | if test -r "$cache_file"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2309 | # Some versions of bash will fail to source /dev/null (special files |
| 2310 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. |
| 2311 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then |
| 2312 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
| 2313 | $as_echo "$as_me: loading cache $cache_file" >&6;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2314 | case $cache_file in |
| 2315 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
| 2316 | *) . "./$cache_file";; |
| 2317 | esac |
| 2318 | fi |
| 2319 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2320 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
| 2321 | $as_echo "$as_me: creating cache $cache_file" >&6;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2322 | >$cache_file |
| 2323 | fi |
| 2324 | |
| 2325 | # Check that the precious variables saved in the cache have kept the same |
| 2326 | # value. |
| 2327 | ac_cache_corrupted=false |
| 2328 | for ac_var in $ac_precious_vars; do |
| 2329 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
| 2330 | eval ac_new_set=\$ac_env_${ac_var}_set |
| 2331 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
| 2332 | eval ac_new_val=\$ac_env_${ac_var}_value |
| 2333 | case $ac_old_set,$ac_new_set in |
| 2334 | set,) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2335 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 |
| 2336 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2337 | ac_cache_corrupted=: ;; |
| 2338 | ,set) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2339 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 |
| 2340 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2341 | ac_cache_corrupted=: ;; |
| 2342 | ,);; |
| 2343 | *) |
| 2344 | if test "x$ac_old_val" != "x$ac_new_val"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2345 | # differences in whitespace do not lead to failure. |
| 2346 | ac_old_val_w=`echo x $ac_old_val` |
| 2347 | ac_new_val_w=`echo x $ac_new_val` |
| 2348 | if test "$ac_old_val_w" != "$ac_new_val_w"; then |
| 2349 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 |
| 2350 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
| 2351 | ac_cache_corrupted=: |
| 2352 | else |
| 2353 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 |
| 2354 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} |
| 2355 | eval $ac_var=\$ac_old_val |
| 2356 | fi |
| 2357 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 |
| 2358 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} |
| 2359 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 |
| 2360 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2361 | fi;; |
| 2362 | esac |
| 2363 | # Pass precious variables to config.status. |
| 2364 | if test "$ac_new_set" = set; then |
| 2365 | case $ac_new_val in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2366 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2367 | *) ac_arg=$ac_var=$ac_new_val ;; |
| 2368 | esac |
| 2369 | case " $ac_configure_args " in |
| 2370 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2371 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2372 | esac |
| 2373 | fi |
| 2374 | done |
| 2375 | if $ac_cache_corrupted; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2376 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2377 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2378 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 |
| 2379 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} |
| 2380 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2381 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2382 | ## -------------------- ## |
| 2383 | ## Main body of script. ## |
| 2384 | ## -------------------- ## |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2385 | |
| 2386 | ac_ext=c |
| 2387 | ac_cpp='$CPP $CPPFLAGS' |
| 2388 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 2389 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 2390 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 2391 | |
| 2392 | |
| 2393 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 2394 | |
| 2395 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2396 | ac_aux_dir= |
| 2397 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do |
| 2398 | if test -f "$ac_dir/install-sh"; then |
| 2399 | ac_aux_dir=$ac_dir |
| 2400 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 2401 | break |
| 2402 | elif test -f "$ac_dir/install.sh"; then |
| 2403 | ac_aux_dir=$ac_dir |
| 2404 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 2405 | break |
| 2406 | elif test -f "$ac_dir/shtool"; then |
| 2407 | ac_aux_dir=$ac_dir |
| 2408 | ac_install_sh="$ac_aux_dir/shtool install -c" |
| 2409 | break |
| 2410 | fi |
| 2411 | done |
| 2412 | if test -z "$ac_aux_dir"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2413 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2414 | fi |
| 2415 | |
| 2416 | # These three variables are undocumented and unsupported, |
| 2417 | # and are intended to be withdrawn in a future Autoconf release. |
| 2418 | # They can cause serious problems if a builder's source tree is in a directory |
| 2419 | # whose full name contains unusual characters. |
| 2420 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. |
| 2421 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. |
| 2422 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. |
| 2423 | |
| 2424 | |
| 2425 | # Make sure we can run config.sub. |
| 2426 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2427 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2428 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2429 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
| 2430 | $as_echo_n "checking build system type... " >&6; } |
| 2431 | if ${ac_cv_build+:} false; then : |
| 2432 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2433 | else |
| 2434 | ac_build_alias=$build_alias |
| 2435 | test "x$ac_build_alias" = x && |
| 2436 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` |
| 2437 | test "x$ac_build_alias" = x && |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2438 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2439 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2440 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2441 | |
| 2442 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
| 2444 | $as_echo "$ac_cv_build" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2445 | case $ac_cv_build in |
| 2446 | *-*-*) ;; |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2447 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2448 | esac |
| 2449 | build=$ac_cv_build |
| 2450 | ac_save_IFS=$IFS; IFS='-' |
| 2451 | set x $ac_cv_build |
| 2452 | shift |
| 2453 | build_cpu=$1 |
| 2454 | build_vendor=$2 |
| 2455 | shift; shift |
| 2456 | # Remember, the first character of IFS is used to create $*, |
| 2457 | # except with old shells: |
| 2458 | build_os=$* |
| 2459 | IFS=$ac_save_IFS |
| 2460 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac |
| 2461 | |
| 2462 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2463 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
| 2464 | $as_echo_n "checking host system type... " >&6; } |
| 2465 | if ${ac_cv_host+:} false; then : |
| 2466 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2467 | else |
| 2468 | if test "x$host_alias" = x; then |
| 2469 | ac_cv_host=$ac_cv_build |
| 2470 | else |
| 2471 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2472 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2473 | fi |
| 2474 | |
| 2475 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
| 2477 | $as_echo "$ac_cv_host" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2478 | case $ac_cv_host in |
| 2479 | *-*-*) ;; |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2480 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2481 | esac |
| 2482 | host=$ac_cv_host |
| 2483 | ac_save_IFS=$IFS; IFS='-' |
| 2484 | set x $ac_cv_host |
| 2485 | shift |
| 2486 | host_cpu=$1 |
| 2487 | host_vendor=$2 |
| 2488 | shift; shift |
| 2489 | # Remember, the first character of IFS is used to create $*, |
| 2490 | # except with old shells: |
| 2491 | host_os=$* |
| 2492 | IFS=$ac_save_IFS |
| 2493 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac |
| 2494 | |
| 2495 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2496 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
| 2497 | $as_echo_n "checking target system type... " >&6; } |
| 2498 | if ${ac_cv_target+:} false; then : |
| 2499 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2500 | else |
| 2501 | if test "x$target_alias" = x; then |
| 2502 | ac_cv_target=$ac_cv_host |
| 2503 | else |
| 2504 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2505 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2506 | fi |
| 2507 | |
| 2508 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2509 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 |
| 2510 | $as_echo "$ac_cv_target" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2511 | case $ac_cv_target in |
| 2512 | *-*-*) ;; |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2513 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2514 | esac |
| 2515 | target=$ac_cv_target |
| 2516 | ac_save_IFS=$IFS; IFS='-' |
| 2517 | set x $ac_cv_target |
| 2518 | shift |
| 2519 | target_cpu=$1 |
| 2520 | target_vendor=$2 |
| 2521 | shift; shift |
| 2522 | # Remember, the first character of IFS is used to create $*, |
| 2523 | # except with old shells: |
| 2524 | target_os=$* |
| 2525 | IFS=$ac_save_IFS |
| 2526 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac |
| 2527 | |
| 2528 | |
| 2529 | # The aliases save the names the user supplied, while $host etc. |
| 2530 | # will get canonicalized. |
| 2531 | test -n "$target_alias" && |
| 2532 | test "$program_prefix$program_suffix$program_transform_name" = \ |
| 2533 | NONENONEs,x,x, && |
| 2534 | program_prefix=${target_alias}- |
| 2535 | |
| 2536 | |
| 2537 | |
| 2538 | |
| 2539 | |
| 2540 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2541 | |
| 2542 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2543 | # Check whether --with-gcc was given. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2544 | if test "${with_gcc+set}" = set; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2545 | withval=$with_gcc; |
| 2546 | fi |
| 2547 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2548 | V_CCOPT="" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2549 | if test "${srcdir}" != "." ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2550 | V_CCOPT="-I\$(srcdir)" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2551 | fi |
| 2552 | if test "${CFLAGS+set}" = set; then |
| 2553 | LBL_CFLAGS="$CFLAGS" |
| 2554 | fi |
| 2555 | if test -z "$CC" ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2556 | case "$host_os" in |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2557 | |
| 2558 | bsdi*) |
| 2559 | # Extract the first word of "shlicc2", so it can be a program name with args. |
| 2560 | set dummy shlicc2; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2562 | $as_echo_n "checking for $ac_word... " >&6; } |
| 2563 | if ${ac_cv_prog_SHLICC2+:} false; then : |
| 2564 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2565 | else |
| 2566 | if test -n "$SHLICC2"; then |
| 2567 | ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test. |
| 2568 | else |
| 2569 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2570 | for as_dir in $PATH |
| 2571 | do |
| 2572 | IFS=$as_save_IFS |
| 2573 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2574 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2575 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2576 | ac_cv_prog_SHLICC2="yes" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2577 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2578 | break 2 |
| 2579 | fi |
| 2580 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2581 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2582 | IFS=$as_save_IFS |
| 2583 | |
| 2584 | test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no" |
| 2585 | fi |
| 2586 | fi |
| 2587 | SHLICC2=$ac_cv_prog_SHLICC2 |
| 2588 | if test -n "$SHLICC2"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5 |
| 2590 | $as_echo "$SHLICC2" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2591 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2592 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2593 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2594 | fi |
| 2595 | |
| 2596 | |
| 2597 | if test $SHLICC2 = yes ; then |
| 2598 | CC=shlicc2 |
| 2599 | export CC |
| 2600 | fi |
| 2601 | ;; |
| 2602 | esac |
| 2603 | fi |
| 2604 | if test -z "$CC" -a "$with_gcc" = no ; then |
| 2605 | CC=cc |
| 2606 | export CC |
| 2607 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2608 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 2609 | # |
| 2610 | # Try to enable as many C99 features as we can. |
| 2611 | # At minimum, we want C++/C99-style // comments. |
| 2612 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2613 | ac_ext=c |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2614 | ac_cpp='$CPP $CPPFLAGS' |
| 2615 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 2616 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 2617 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 2618 | if test -n "$ac_tool_prefix"; then |
| 2619 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. |
| 2620 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2621 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2622 | $as_echo_n "checking for $ac_word... " >&6; } |
| 2623 | if ${ac_cv_prog_CC+:} false; then : |
| 2624 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2625 | else |
| 2626 | if test -n "$CC"; then |
| 2627 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 2628 | else |
| 2629 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2630 | for as_dir in $PATH |
| 2631 | do |
| 2632 | IFS=$as_save_IFS |
| 2633 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2634 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2635 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2636 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2637 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2638 | break 2 |
| 2639 | fi |
| 2640 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2641 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2642 | IFS=$as_save_IFS |
| 2643 | |
| 2644 | fi |
| 2645 | fi |
| 2646 | CC=$ac_cv_prog_CC |
| 2647 | if test -n "$CC"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2648 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 2649 | $as_echo "$CC" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2650 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2651 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2652 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2653 | fi |
| 2654 | |
| 2655 | |
| 2656 | fi |
| 2657 | if test -z "$ac_cv_prog_CC"; then |
| 2658 | ac_ct_CC=$CC |
| 2659 | # Extract the first word of "gcc", so it can be a program name with args. |
| 2660 | set dummy gcc; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2661 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2662 | $as_echo_n "checking for $ac_word... " >&6; } |
| 2663 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
| 2664 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2665 | else |
| 2666 | if test -n "$ac_ct_CC"; then |
| 2667 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 2668 | else |
| 2669 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2670 | for as_dir in $PATH |
| 2671 | do |
| 2672 | IFS=$as_save_IFS |
| 2673 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2674 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2675 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2676 | ac_cv_prog_ac_ct_CC="gcc" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2677 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2678 | break 2 |
| 2679 | fi |
| 2680 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2681 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2682 | IFS=$as_save_IFS |
| 2683 | |
| 2684 | fi |
| 2685 | fi |
| 2686 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 2687 | if test -n "$ac_ct_CC"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2688 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 2689 | $as_echo "$ac_ct_CC" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2690 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2691 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2692 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2693 | fi |
| 2694 | |
| 2695 | if test "x$ac_ct_CC" = x; then |
| 2696 | CC="" |
| 2697 | else |
| 2698 | case $cross_compiling:$ac_tool_warned in |
| 2699 | yes:) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2700 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 2701 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2702 | ac_tool_warned=yes ;; |
| 2703 | esac |
| 2704 | CC=$ac_ct_CC |
| 2705 | fi |
| 2706 | else |
| 2707 | CC="$ac_cv_prog_CC" |
| 2708 | fi |
| 2709 | |
| 2710 | if test -z "$CC"; then |
| 2711 | if test -n "$ac_tool_prefix"; then |
| 2712 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. |
| 2713 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2714 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2715 | $as_echo_n "checking for $ac_word... " >&6; } |
| 2716 | if ${ac_cv_prog_CC+:} false; then : |
| 2717 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2718 | else |
| 2719 | if test -n "$CC"; then |
| 2720 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 2721 | else |
| 2722 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2723 | for as_dir in $PATH |
| 2724 | do |
| 2725 | IFS=$as_save_IFS |
| 2726 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2727 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2728 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2729 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2730 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2731 | break 2 |
| 2732 | fi |
| 2733 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2734 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2735 | IFS=$as_save_IFS |
| 2736 | |
| 2737 | fi |
| 2738 | fi |
| 2739 | CC=$ac_cv_prog_CC |
| 2740 | if test -n "$CC"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2741 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 2742 | $as_echo "$CC" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2743 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2745 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2746 | fi |
| 2747 | |
| 2748 | |
| 2749 | fi |
| 2750 | fi |
| 2751 | if test -z "$CC"; then |
| 2752 | # Extract the first word of "cc", so it can be a program name with args. |
| 2753 | set dummy cc; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2754 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2755 | $as_echo_n "checking for $ac_word... " >&6; } |
| 2756 | if ${ac_cv_prog_CC+:} false; then : |
| 2757 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2758 | else |
| 2759 | if test -n "$CC"; then |
| 2760 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 2761 | else |
| 2762 | ac_prog_rejected=no |
| 2763 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2764 | for as_dir in $PATH |
| 2765 | do |
| 2766 | IFS=$as_save_IFS |
| 2767 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2768 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2769 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2770 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
| 2771 | ac_prog_rejected=yes |
| 2772 | continue |
| 2773 | fi |
| 2774 | ac_cv_prog_CC="cc" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2775 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2776 | break 2 |
| 2777 | fi |
| 2778 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2779 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2780 | IFS=$as_save_IFS |
| 2781 | |
| 2782 | if test $ac_prog_rejected = yes; then |
| 2783 | # We found a bogon in the path, so make sure we never use it. |
| 2784 | set dummy $ac_cv_prog_CC |
| 2785 | shift |
| 2786 | if test $# != 0; then |
| 2787 | # We chose a different compiler from the bogus one. |
| 2788 | # However, it has the same basename, so the bogon will be chosen |
| 2789 | # first if we set CC to just the basename; use the full file name. |
| 2790 | shift |
| 2791 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
| 2792 | fi |
| 2793 | fi |
| 2794 | fi |
| 2795 | fi |
| 2796 | CC=$ac_cv_prog_CC |
| 2797 | if test -n "$CC"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 2799 | $as_echo "$CC" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2800 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2801 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2802 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2803 | fi |
| 2804 | |
| 2805 | |
| 2806 | fi |
| 2807 | if test -z "$CC"; then |
| 2808 | if test -n "$ac_tool_prefix"; then |
| 2809 | for ac_prog in cl.exe |
| 2810 | do |
| 2811 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 2812 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2813 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2814 | $as_echo_n "checking for $ac_word... " >&6; } |
| 2815 | if ${ac_cv_prog_CC+:} false; then : |
| 2816 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2817 | else |
| 2818 | if test -n "$CC"; then |
| 2819 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 2820 | else |
| 2821 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2822 | for as_dir in $PATH |
| 2823 | do |
| 2824 | IFS=$as_save_IFS |
| 2825 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2826 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2827 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2828 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2829 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2830 | break 2 |
| 2831 | fi |
| 2832 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2833 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2834 | IFS=$as_save_IFS |
| 2835 | |
| 2836 | fi |
| 2837 | fi |
| 2838 | CC=$ac_cv_prog_CC |
| 2839 | if test -n "$CC"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 2841 | $as_echo "$CC" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2842 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2843 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2844 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2845 | fi |
| 2846 | |
| 2847 | |
| 2848 | test -n "$CC" && break |
| 2849 | done |
| 2850 | fi |
| 2851 | if test -z "$CC"; then |
| 2852 | ac_ct_CC=$CC |
| 2853 | for ac_prog in cl.exe |
| 2854 | do |
| 2855 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 2856 | set dummy $ac_prog; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2857 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 2858 | $as_echo_n "checking for $ac_word... " >&6; } |
| 2859 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
| 2860 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2861 | else |
| 2862 | if test -n "$ac_ct_CC"; then |
| 2863 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 2864 | else |
| 2865 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2866 | for as_dir in $PATH |
| 2867 | do |
| 2868 | IFS=$as_save_IFS |
| 2869 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2870 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 2871 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2872 | ac_cv_prog_ac_ct_CC="$ac_prog" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2873 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2874 | break 2 |
| 2875 | fi |
| 2876 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2877 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2878 | IFS=$as_save_IFS |
| 2879 | |
| 2880 | fi |
| 2881 | fi |
| 2882 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 2883 | if test -n "$ac_ct_CC"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 2885 | $as_echo "$ac_ct_CC" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2886 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2887 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 2888 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2889 | fi |
| 2890 | |
| 2891 | |
| 2892 | test -n "$ac_ct_CC" && break |
| 2893 | done |
| 2894 | |
| 2895 | if test "x$ac_ct_CC" = x; then |
| 2896 | CC="" |
| 2897 | else |
| 2898 | case $cross_compiling:$ac_tool_warned in |
| 2899 | yes:) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2900 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 2901 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2902 | ac_tool_warned=yes ;; |
| 2903 | esac |
| 2904 | CC=$ac_ct_CC |
| 2905 | fi |
| 2906 | fi |
| 2907 | |
| 2908 | fi |
| 2909 | |
| 2910 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2911 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2912 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2913 | as_fn_error $? "no acceptable C compiler found in \$PATH |
| 2914 | See \`config.log' for more details" "$LINENO" 5; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2915 | |
| 2916 | # Provide some information about the compiler. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2917 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
| 2918 | set X $ac_compile |
| 2919 | ac_compiler=$2 |
| 2920 | for ac_option in --version -v -V -qversion; do |
| 2921 | { { ac_try="$ac_compiler $ac_option >&5" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2922 | case "(($ac_try" in |
| 2923 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 2924 | *) ac_try_echo=$ac_try;; |
| 2925 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2926 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 2927 | $as_echo "$ac_try_echo"; } >&5 |
| 2928 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2929 | ac_status=$? |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2930 | if test -s conftest.err; then |
| 2931 | sed '10a\ |
| 2932 | ... rest of stderr output deleted ... |
| 2933 | 10q' conftest.err >conftest.er1 |
| 2934 | cat conftest.er1 >&5 |
| 2935 | fi |
| 2936 | rm -f conftest.er1 conftest.err |
| 2937 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 2938 | test $ac_status = 0; } |
| 2939 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2940 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2941 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2942 | /* end confdefs.h. */ |
| 2943 | |
| 2944 | int |
| 2945 | main () |
| 2946 | { |
| 2947 | |
| 2948 | ; |
| 2949 | return 0; |
| 2950 | } |
| 2951 | _ACEOF |
| 2952 | ac_clean_files_save=$ac_clean_files |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2953 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2954 | # Try to create an executable without -o first, disregard a.out. |
| 2955 | # It will help us diagnose broken compilers, and finding out an intuition |
| 2956 | # of exeext. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2957 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
| 2958 | $as_echo_n "checking whether the C compiler works... " >&6; } |
| 2959 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
| 2960 | |
| 2961 | # The possible output files: |
| 2962 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" |
| 2963 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2964 | ac_rmfiles= |
| 2965 | for ac_file in $ac_files |
| 2966 | do |
| 2967 | case $ac_file in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2968 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2969 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; |
| 2970 | esac |
| 2971 | done |
| 2972 | rm -f $ac_rmfiles |
| 2973 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2974 | if { { ac_try="$ac_link_default" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2975 | case "(($ac_try" in |
| 2976 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 2977 | *) ac_try_echo=$ac_try;; |
| 2978 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2979 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 2980 | $as_echo "$ac_try_echo"; } >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2981 | (eval "$ac_link_default") 2>&5 |
| 2982 | ac_status=$? |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2983 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 2984 | test $ac_status = 0; }; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2985 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. |
| 2986 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' |
| 2987 | # in a Makefile. We should not override ac_cv_exeext if it was cached, |
| 2988 | # so that the user can short-circuit this test for compilers unknown to |
| 2989 | # Autoconf. |
| 2990 | for ac_file in $ac_files '' |
| 2991 | do |
| 2992 | test -f "$ac_file" || continue |
| 2993 | case $ac_file in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 2994 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 2995 | ;; |
| 2996 | [ab].out ) |
| 2997 | # We found the default executable, but exeext='' is most |
| 2998 | # certainly right. |
| 2999 | break;; |
| 3000 | *.* ) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3001 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3002 | then :; else |
| 3003 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 3004 | fi |
| 3005 | # We set ac_cv_exeext here because the later test for it is not |
| 3006 | # safe: cross compilers may not add the suffix if given an `-o' |
| 3007 | # argument, so we may need to know it at that point already. |
| 3008 | # Even if this section looks crufty: it has the advantage of |
| 3009 | # actually working. |
| 3010 | break;; |
| 3011 | * ) |
| 3012 | break;; |
| 3013 | esac |
| 3014 | done |
| 3015 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
| 3016 | |
| 3017 | else |
| 3018 | ac_file='' |
| 3019 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3020 | if test -z "$ac_file"; then : |
| 3021 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3022 | $as_echo "no" >&6; } |
| 3023 | $as_echo "$as_me: failed program was:" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3024 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 3025 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3026 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3027 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3028 | as_fn_error 77 "C compiler cannot create executables |
| 3029 | See \`config.log' for more details" "$LINENO" 5; } |
| 3030 | else |
| 3031 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3032 | $as_echo "yes" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3033 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3034 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
| 3035 | $as_echo_n "checking for C compiler default output file name... " >&6; } |
| 3036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 |
| 3037 | $as_echo "$ac_file" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3038 | ac_exeext=$ac_cv_exeext |
| 3039 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3040 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3041 | ac_clean_files=$ac_clean_files_save |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3042 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
| 3043 | $as_echo_n "checking for suffix of executables... " >&6; } |
| 3044 | if { { ac_try="$ac_link" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3045 | case "(($ac_try" in |
| 3046 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3047 | *) ac_try_echo=$ac_try;; |
| 3048 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3049 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3050 | $as_echo "$ac_try_echo"; } >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3051 | (eval "$ac_link") 2>&5 |
| 3052 | ac_status=$? |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3053 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3054 | test $ac_status = 0; }; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3055 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
| 3056 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will |
| 3057 | # work properly (i.e., refer to `conftest.exe'), while it won't with |
| 3058 | # `rm'. |
| 3059 | for ac_file in conftest.exe conftest conftest.*; do |
| 3060 | test -f "$ac_file" || continue |
| 3061 | case $ac_file in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3062 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3063 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 3064 | break;; |
| 3065 | * ) break;; |
| 3066 | esac |
| 3067 | done |
| 3068 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3069 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3070 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3071 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
| 3072 | See \`config.log' for more details" "$LINENO" 5; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3073 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3074 | rm -f conftest conftest$ac_cv_exeext |
| 3075 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
| 3076 | $as_echo "$ac_cv_exeext" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3077 | |
| 3078 | rm -f conftest.$ac_ext |
| 3079 | EXEEXT=$ac_cv_exeext |
| 3080 | ac_exeext=$EXEEXT |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3081 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3082 | /* end confdefs.h. */ |
| 3083 | #include <stdio.h> |
| 3084 | int |
| 3085 | main () |
| 3086 | { |
| 3087 | FILE *f = fopen ("conftest.out", "w"); |
| 3088 | return ferror (f) || fclose (f) != 0; |
| 3089 | |
| 3090 | ; |
| 3091 | return 0; |
| 3092 | } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3093 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3094 | ac_clean_files="$ac_clean_files conftest.out" |
| 3095 | # Check that the compiler produces executables we can run. If not, either |
| 3096 | # the compiler is broken, or we cross compile. |
| 3097 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
| 3098 | $as_echo_n "checking whether we are cross compiling... " >&6; } |
| 3099 | if test "$cross_compiling" != yes; then |
| 3100 | { { ac_try="$ac_link" |
| 3101 | case "(($ac_try" in |
| 3102 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3103 | *) ac_try_echo=$ac_try;; |
| 3104 | esac |
| 3105 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3106 | $as_echo "$ac_try_echo"; } >&5 |
| 3107 | (eval "$ac_link") 2>&5 |
| 3108 | ac_status=$? |
| 3109 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3110 | test $ac_status = 0; } |
| 3111 | if { ac_try='./conftest$ac_cv_exeext' |
| 3112 | { { case "(($ac_try" in |
| 3113 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3114 | *) ac_try_echo=$ac_try;; |
| 3115 | esac |
| 3116 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3117 | $as_echo "$ac_try_echo"; } >&5 |
| 3118 | (eval "$ac_try") 2>&5 |
| 3119 | ac_status=$? |
| 3120 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3121 | test $ac_status = 0; }; }; then |
| 3122 | cross_compiling=no |
| 3123 | else |
| 3124 | if test "$cross_compiling" = maybe; then |
| 3125 | cross_compiling=yes |
| 3126 | else |
| 3127 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3128 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3129 | as_fn_error $? "cannot run C compiled programs. |
| 3130 | If you meant to cross compile, use \`--host'. |
| 3131 | See \`config.log' for more details" "$LINENO" 5; } |
| 3132 | fi |
| 3133 | fi |
| 3134 | fi |
| 3135 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 |
| 3136 | $as_echo "$cross_compiling" >&6; } |
| 3137 | |
| 3138 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out |
| 3139 | ac_clean_files=$ac_clean_files_save |
| 3140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
| 3141 | $as_echo_n "checking for suffix of object files... " >&6; } |
| 3142 | if ${ac_cv_objext+:} false; then : |
| 3143 | $as_echo_n "(cached) " >&6 |
| 3144 | else |
| 3145 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3146 | /* end confdefs.h. */ |
| 3147 | |
| 3148 | int |
| 3149 | main () |
| 3150 | { |
| 3151 | |
| 3152 | ; |
| 3153 | return 0; |
| 3154 | } |
| 3155 | _ACEOF |
| 3156 | rm -f conftest.o conftest.obj |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3157 | if { { ac_try="$ac_compile" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3158 | case "(($ac_try" in |
| 3159 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3160 | *) ac_try_echo=$ac_try;; |
| 3161 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3162 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3163 | $as_echo "$ac_try_echo"; } >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3164 | (eval "$ac_compile") 2>&5 |
| 3165 | ac_status=$? |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3166 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3167 | test $ac_status = 0; }; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3168 | for ac_file in conftest.o conftest.obj conftest.*; do |
| 3169 | test -f "$ac_file" || continue; |
| 3170 | case $ac_file in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3171 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3172 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
| 3173 | break;; |
| 3174 | esac |
| 3175 | done |
| 3176 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3177 | $as_echo "$as_me: failed program was:" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3178 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 3179 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3180 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3181 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3182 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
| 3183 | See \`config.log' for more details" "$LINENO" 5; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3184 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3185 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
| 3186 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3187 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
| 3188 | $as_echo "$ac_cv_objext" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3189 | OBJEXT=$ac_cv_objext |
| 3190 | ac_objext=$OBJEXT |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
| 3192 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } |
| 3193 | if ${ac_cv_c_compiler_gnu+:} false; then : |
| 3194 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3195 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3197 | /* end confdefs.h. */ |
| 3198 | |
| 3199 | int |
| 3200 | main () |
| 3201 | { |
| 3202 | #ifndef __GNUC__ |
| 3203 | choke me |
| 3204 | #endif |
| 3205 | |
| 3206 | ; |
| 3207 | return 0; |
| 3208 | } |
| 3209 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3210 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3211 | ac_compiler_gnu=yes |
| 3212 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3213 | ac_compiler_gnu=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3214 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3215 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3216 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
| 3217 | |
| 3218 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3219 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
| 3220 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } |
| 3221 | if test $ac_compiler_gnu = yes; then |
| 3222 | GCC=yes |
| 3223 | else |
| 3224 | GCC= |
| 3225 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3226 | ac_test_CFLAGS=${CFLAGS+set} |
| 3227 | ac_save_CFLAGS=$CFLAGS |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3228 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
| 3229 | $as_echo_n "checking whether $CC accepts -g... " >&6; } |
| 3230 | if ${ac_cv_prog_cc_g+:} false; then : |
| 3231 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3232 | else |
| 3233 | ac_save_c_werror_flag=$ac_c_werror_flag |
| 3234 | ac_c_werror_flag=yes |
| 3235 | ac_cv_prog_cc_g=no |
| 3236 | CFLAGS="-g" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3237 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3238 | /* end confdefs.h. */ |
| 3239 | |
| 3240 | int |
| 3241 | main () |
| 3242 | { |
| 3243 | |
| 3244 | ; |
| 3245 | return 0; |
| 3246 | } |
| 3247 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3248 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3249 | ac_cv_prog_cc_g=yes |
| 3250 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3251 | CFLAGS="" |
| 3252 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3253 | /* end confdefs.h. */ |
| 3254 | |
| 3255 | int |
| 3256 | main () |
| 3257 | { |
| 3258 | |
| 3259 | ; |
| 3260 | return 0; |
| 3261 | } |
| 3262 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3263 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3264 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3265 | else |
| 3266 | ac_c_werror_flag=$ac_save_c_werror_flag |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3267 | CFLAGS="-g" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3268 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3269 | /* end confdefs.h. */ |
| 3270 | |
| 3271 | int |
| 3272 | main () |
| 3273 | { |
| 3274 | |
| 3275 | ; |
| 3276 | return 0; |
| 3277 | } |
| 3278 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3279 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3280 | ac_cv_prog_cc_g=yes |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3281 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3282 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3283 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3284 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3285 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3286 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3287 | ac_c_werror_flag=$ac_save_c_werror_flag |
| 3288 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3289 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
| 3290 | $as_echo "$ac_cv_prog_cc_g" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3291 | if test "$ac_test_CFLAGS" = set; then |
| 3292 | CFLAGS=$ac_save_CFLAGS |
| 3293 | elif test $ac_cv_prog_cc_g = yes; then |
| 3294 | if test "$GCC" = yes; then |
| 3295 | CFLAGS="-g -O2" |
| 3296 | else |
| 3297 | CFLAGS="-g" |
| 3298 | fi |
| 3299 | else |
| 3300 | if test "$GCC" = yes; then |
| 3301 | CFLAGS="-O2" |
| 3302 | else |
| 3303 | CFLAGS= |
| 3304 | fi |
| 3305 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
| 3307 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } |
| 3308 | if ${ac_cv_prog_cc_c89+:} false; then : |
| 3309 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3310 | else |
| 3311 | ac_cv_prog_cc_c89=no |
| 3312 | ac_save_CC=$CC |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3313 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3314 | /* end confdefs.h. */ |
| 3315 | #include <stdarg.h> |
| 3316 | #include <stdio.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3317 | struct stat; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3318 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
| 3319 | struct buf { int x; }; |
| 3320 | FILE * (*rcsopen) (struct buf *, struct stat *, int); |
| 3321 | static char *e (p, i) |
| 3322 | char **p; |
| 3323 | int i; |
| 3324 | { |
| 3325 | return p[i]; |
| 3326 | } |
| 3327 | static char *f (char * (*g) (char **, int), char **p, ...) |
| 3328 | { |
| 3329 | char *s; |
| 3330 | va_list v; |
| 3331 | va_start (v,p); |
| 3332 | s = g (p, va_arg (v,int)); |
| 3333 | va_end (v); |
| 3334 | return s; |
| 3335 | } |
| 3336 | |
| 3337 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has |
| 3338 | function prototypes and stuff, but not '\xHH' hex character constants. |
| 3339 | These don't provoke an error unfortunately, instead are silently treated |
| 3340 | as 'x'. The following induces an error, until -std is added to get |
| 3341 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
| 3342 | array size at least. It's necessary to write '\x00'==0 to get something |
| 3343 | that's true only with -std. */ |
| 3344 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
| 3345 | |
| 3346 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
| 3347 | inside strings and character constants. */ |
| 3348 | #define FOO(x) 'x' |
| 3349 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; |
| 3350 | |
| 3351 | int test (int i, double x); |
| 3352 | struct s1 {int (*f) (int a);}; |
| 3353 | struct s2 {int (*f) (double a);}; |
| 3354 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); |
| 3355 | int argc; |
| 3356 | char **argv; |
| 3357 | int |
| 3358 | main () |
| 3359 | { |
| 3360 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
| 3361 | ; |
| 3362 | return 0; |
| 3363 | } |
| 3364 | _ACEOF |
| 3365 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
| 3366 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
| 3367 | do |
| 3368 | CC="$ac_save_CC $ac_arg" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3369 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3370 | ac_cv_prog_cc_c89=$ac_arg |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3371 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3372 | rm -f core conftest.err conftest.$ac_objext |
| 3373 | test "x$ac_cv_prog_cc_c89" != "xno" && break |
| 3374 | done |
| 3375 | rm -f conftest.$ac_ext |
| 3376 | CC=$ac_save_CC |
| 3377 | |
| 3378 | fi |
| 3379 | # AC_CACHE_VAL |
| 3380 | case "x$ac_cv_prog_cc_c89" in |
| 3381 | x) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
| 3383 | $as_echo "none needed" >&6; } ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3384 | xno) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3385 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 |
| 3386 | $as_echo "unsupported" >&6; } ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3387 | *) |
| 3388 | CC="$CC $ac_cv_prog_cc_c89" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3389 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 |
| 3390 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3391 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3392 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3393 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3394 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3395 | |
| 3396 | ac_ext=c |
| 3397 | ac_cpp='$CPP $CPPFLAGS' |
| 3398 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 3399 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 3400 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 3401 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3402 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 |
| 3403 | $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } |
| 3404 | if ${ac_cv_prog_cc_c99+:} false; then : |
| 3405 | $as_echo_n "(cached) " >&6 |
| 3406 | else |
| 3407 | ac_cv_prog_cc_c99=no |
| 3408 | ac_save_CC=$CC |
| 3409 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3410 | /* end confdefs.h. */ |
| 3411 | #include <stdarg.h> |
| 3412 | #include <stdbool.h> |
| 3413 | #include <stdlib.h> |
| 3414 | #include <wchar.h> |
| 3415 | #include <stdio.h> |
| 3416 | |
| 3417 | // Check varargs macros. These examples are taken from C99 6.10.3.5. |
| 3418 | #define debug(...) fprintf (stderr, __VA_ARGS__) |
| 3419 | #define showlist(...) puts (#__VA_ARGS__) |
| 3420 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) |
| 3421 | static void |
| 3422 | test_varargs_macros (void) |
| 3423 | { |
| 3424 | int x = 1234; |
| 3425 | int y = 5678; |
| 3426 | debug ("Flag"); |
| 3427 | debug ("X = %d\n", x); |
| 3428 | showlist (The first, second, and third items.); |
| 3429 | report (x>y, "x is %d but y is %d", x, y); |
| 3430 | } |
| 3431 | |
| 3432 | // Check long long types. |
| 3433 | #define BIG64 18446744073709551615ull |
| 3434 | #define BIG32 4294967295ul |
| 3435 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) |
| 3436 | #if !BIG_OK |
| 3437 | your preprocessor is broken; |
| 3438 | #endif |
| 3439 | #if BIG_OK |
| 3440 | #else |
| 3441 | your preprocessor is broken; |
| 3442 | #endif |
| 3443 | static long long int bignum = -9223372036854775807LL; |
| 3444 | static unsigned long long int ubignum = BIG64; |
| 3445 | |
| 3446 | struct incomplete_array |
| 3447 | { |
| 3448 | int datasize; |
| 3449 | double data[]; |
| 3450 | }; |
| 3451 | |
| 3452 | struct named_init { |
| 3453 | int number; |
| 3454 | const wchar_t *name; |
| 3455 | double average; |
| 3456 | }; |
| 3457 | |
| 3458 | typedef const char *ccp; |
| 3459 | |
| 3460 | static inline int |
| 3461 | test_restrict (ccp restrict text) |
| 3462 | { |
| 3463 | // See if C++-style comments work. |
| 3464 | // Iterate through items via the restricted pointer. |
| 3465 | // Also check for declarations in for loops. |
| 3466 | for (unsigned int i = 0; *(text+i) != '\0'; ++i) |
| 3467 | continue; |
| 3468 | return 0; |
| 3469 | } |
| 3470 | |
| 3471 | // Check varargs and va_copy. |
| 3472 | static void |
| 3473 | test_varargs (const char *format, ...) |
| 3474 | { |
| 3475 | va_list args; |
| 3476 | va_start (args, format); |
| 3477 | va_list args_copy; |
| 3478 | va_copy (args_copy, args); |
| 3479 | |
| 3480 | const char *str; |
| 3481 | int number; |
| 3482 | float fnumber; |
| 3483 | |
| 3484 | while (*format) |
| 3485 | { |
| 3486 | switch (*format++) |
| 3487 | { |
| 3488 | case 's': // string |
| 3489 | str = va_arg (args_copy, const char *); |
| 3490 | break; |
| 3491 | case 'd': // int |
| 3492 | number = va_arg (args_copy, int); |
| 3493 | break; |
| 3494 | case 'f': // float |
| 3495 | fnumber = va_arg (args_copy, double); |
| 3496 | break; |
| 3497 | default: |
| 3498 | break; |
| 3499 | } |
| 3500 | } |
| 3501 | va_end (args_copy); |
| 3502 | va_end (args); |
| 3503 | } |
| 3504 | |
| 3505 | int |
| 3506 | main () |
| 3507 | { |
| 3508 | |
| 3509 | // Check bool. |
| 3510 | _Bool success = false; |
| 3511 | |
| 3512 | // Check restrict. |
| 3513 | if (test_restrict ("String literal") == 0) |
| 3514 | success = true; |
| 3515 | char *restrict newvar = "Another string"; |
| 3516 | |
| 3517 | // Check varargs. |
| 3518 | test_varargs ("s, d' f .", "string", 65, 34.234); |
| 3519 | test_varargs_macros (); |
| 3520 | |
| 3521 | // Check flexible array members. |
| 3522 | struct incomplete_array *ia = |
| 3523 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); |
| 3524 | ia->datasize = 10; |
| 3525 | for (int i = 0; i < ia->datasize; ++i) |
| 3526 | ia->data[i] = i * 1.234; |
| 3527 | |
| 3528 | // Check named initializers. |
| 3529 | struct named_init ni = { |
| 3530 | .number = 34, |
| 3531 | .name = L"Test wide string", |
| 3532 | .average = 543.34343, |
| 3533 | }; |
| 3534 | |
| 3535 | ni.number = 58; |
| 3536 | |
| 3537 | int dynamic_array[ni.number]; |
| 3538 | dynamic_array[ni.number - 1] = 543; |
| 3539 | |
| 3540 | // work around unused variable warnings |
| 3541 | return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' |
| 3542 | || dynamic_array[ni.number - 1] != 543); |
| 3543 | |
| 3544 | ; |
| 3545 | return 0; |
| 3546 | } |
| 3547 | _ACEOF |
| 3548 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 |
| 3549 | do |
| 3550 | CC="$ac_save_CC $ac_arg" |
| 3551 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3552 | ac_cv_prog_cc_c99=$ac_arg |
| 3553 | fi |
| 3554 | rm -f core conftest.err conftest.$ac_objext |
| 3555 | test "x$ac_cv_prog_cc_c99" != "xno" && break |
| 3556 | done |
| 3557 | rm -f conftest.$ac_ext |
| 3558 | CC=$ac_save_CC |
| 3559 | |
| 3560 | fi |
| 3561 | # AC_CACHE_VAL |
| 3562 | case "x$ac_cv_prog_cc_c99" in |
| 3563 | x) |
| 3564 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
| 3565 | $as_echo "none needed" >&6; } ;; |
| 3566 | xno) |
| 3567 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 |
| 3568 | $as_echo "unsupported" >&6; } ;; |
| 3569 | *) |
| 3570 | CC="$CC $ac_cv_prog_cc_c99" |
| 3571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 |
| 3572 | $as_echo "$ac_cv_prog_cc_c99" >&6; } ;; |
| 3573 | esac |
| 3574 | if test "x$ac_cv_prog_cc_c99" != xno; then : |
| 3575 | |
| 3576 | fi |
| 3577 | |
| 3578 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3579 | |
| 3580 | |
| 3581 | |
| 3582 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3583 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3584 | if test "$GCC" = yes ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3585 | # |
| 3586 | # -Werror forces warnings to be errors. |
| 3587 | # |
| 3588 | ac_lbl_cc_force_warning_errors=-Werror |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3589 | |
| 3590 | # |
| 3591 | # Try to have the compiler default to hiding symbols, |
| 3592 | # so that only symbols explicitly exported with |
| 3593 | # PCAP_API will be visible outside (shared) libraries. |
| 3594 | # |
| 3595 | |
| 3596 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5 |
| 3597 | $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; } |
| 3598 | save_CFLAGS="$CFLAGS" |
| 3599 | if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null |
| 3600 | then |
| 3601 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden" |
| 3602 | elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null |
| 3603 | then |
| 3604 | CFLAGS="$CFLAGS -Werror -fvisibility=hidden" |
| 3605 | elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null |
| 3606 | then |
| 3607 | CFLAGS="$CFLAGS -Werror -fvisibility=hidden" |
| 3608 | else |
| 3609 | CFLAGS="$CFLAGS -fvisibility=hidden" |
| 3610 | fi |
| 3611 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3612 | /* end confdefs.h. */ |
| 3613 | |
| 3614 | int |
| 3615 | main () |
| 3616 | { |
| 3617 | return 0 |
| 3618 | ; |
| 3619 | return 0; |
| 3620 | } |
| 3621 | _ACEOF |
| 3622 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3623 | |
| 3624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3625 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3626 | can_add_to_cflags=yes |
| 3627 | # |
| 3628 | # The compile supports this; do we have some C code for |
| 3629 | # which the warning should *not* appear? |
| 3630 | # We test the fourth argument because the third argument |
| 3631 | # could contain quotes, breaking the test. |
| 3632 | # |
| 3633 | if test "x" != "x" |
| 3634 | then |
| 3635 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 3636 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5 |
| 3637 | $as_echo_n "checking whether -fvisibility=hidden ... " >&6; } |
| 3638 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3639 | /* end confdefs.h. */ |
| 3640 | |
| 3641 | _ACEOF |
| 3642 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3643 | |
| 3644 | # |
| 3645 | # Not a problem. |
| 3646 | # |
| 3647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3648 | $as_echo "no" >&6; } |
| 3649 | |
| 3650 | else |
| 3651 | |
| 3652 | # |
| 3653 | # A problem. |
| 3654 | # |
| 3655 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3656 | $as_echo "yes" >&6; } |
| 3657 | can_add_to_cflags=no |
| 3658 | |
| 3659 | fi |
| 3660 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3661 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3662 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3663 | if test x"$can_add_to_cflags" = "xyes" |
| 3664 | then |
| 3665 | V_CCOPT="$V_CCOPT -fvisibility=hidden" |
| 3666 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3667 | |
| 3668 | else |
| 3669 | |
| 3670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3671 | $as_echo "no" >&6; } |
| 3672 | CFLAGS="$save_CFLAGS" |
| 3673 | |
| 3674 | fi |
| 3675 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3676 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3677 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3678 | V_INCLS="$V_INCLS -I/usr/local/include" |
| 3679 | LDFLAGS="$LDFLAGS -L/usr/local/lib" |
| 3680 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3681 | case "$host_os" in |
| 3682 | |
| 3683 | darwin*) |
| 3684 | # |
| 3685 | # This is assumed either to be GCC or clang, both |
| 3686 | # of which use -Werror to force warnings to be errors. |
| 3687 | # |
| 3688 | ac_lbl_cc_force_warning_errors=-Werror |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3689 | |
| 3690 | # |
| 3691 | # Try to have the compiler default to hiding symbols, |
| 3692 | # so that only symbols explicitly exported with |
| 3693 | # PCAP_API will be visible outside (shared) libraries. |
| 3694 | # |
| 3695 | |
| 3696 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5 |
| 3697 | $as_echo_n "checking whether the compiler supports the -fvisibility=hidden option... " >&6; } |
| 3698 | save_CFLAGS="$CFLAGS" |
| 3699 | if expr "x-fvisibility=hidden" : "x-W.*" >/dev/null |
| 3700 | then |
| 3701 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -fvisibility=hidden" |
| 3702 | elif expr "x-fvisibility=hidden" : "x-f.*" >/dev/null |
| 3703 | then |
| 3704 | CFLAGS="$CFLAGS -Werror -fvisibility=hidden" |
| 3705 | elif expr "x-fvisibility=hidden" : "x-m.*" >/dev/null |
| 3706 | then |
| 3707 | CFLAGS="$CFLAGS -Werror -fvisibility=hidden" |
| 3708 | else |
| 3709 | CFLAGS="$CFLAGS -fvisibility=hidden" |
| 3710 | fi |
| 3711 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3712 | /* end confdefs.h. */ |
| 3713 | |
| 3714 | int |
| 3715 | main () |
| 3716 | { |
| 3717 | return 0 |
| 3718 | ; |
| 3719 | return 0; |
| 3720 | } |
| 3721 | _ACEOF |
| 3722 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3723 | |
| 3724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3725 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3726 | can_add_to_cflags=yes |
| 3727 | # |
| 3728 | # The compile supports this; do we have some C code for |
| 3729 | # which the warning should *not* appear? |
| 3730 | # We test the fourth argument because the third argument |
| 3731 | # could contain quotes, breaking the test. |
| 3732 | # |
| 3733 | if test "x" != "x" |
| 3734 | then |
| 3735 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 3736 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5 |
| 3737 | $as_echo_n "checking whether -fvisibility=hidden ... " >&6; } |
| 3738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3739 | /* end confdefs.h. */ |
| 3740 | |
| 3741 | _ACEOF |
| 3742 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3743 | |
| 3744 | # |
| 3745 | # Not a problem. |
| 3746 | # |
| 3747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3748 | $as_echo "no" >&6; } |
| 3749 | |
| 3750 | else |
| 3751 | |
| 3752 | # |
| 3753 | # A problem. |
| 3754 | # |
| 3755 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3756 | $as_echo "yes" >&6; } |
| 3757 | can_add_to_cflags=no |
| 3758 | |
| 3759 | fi |
| 3760 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3761 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3762 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3763 | if test x"$can_add_to_cflags" = "xyes" |
| 3764 | then |
| 3765 | V_CCOPT="$V_CCOPT -fvisibility=hidden" |
| 3766 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3767 | |
| 3768 | else |
| 3769 | |
| 3770 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3771 | $as_echo "no" >&6; } |
| 3772 | CFLAGS="$save_CFLAGS" |
| 3773 | |
| 3774 | fi |
| 3775 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3776 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3777 | ;; |
| 3778 | |
| 3779 | hpux*) |
| 3780 | # |
| 3781 | # HP C, which is what we presume we're using, doesn't |
| 3782 | # exit with a non-zero exit status if we hand it an |
| 3783 | # invalid -W flag, can't be forced to do so even with |
| 3784 | # +We, and doesn't handle GCC-style -W flags, so we |
| 3785 | # don't want to try using GCC-style -W flags. |
| 3786 | # |
| 3787 | ac_lbl_cc_dont_try_gcc_dashW=yes |
| 3788 | ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3789 | |
| 3790 | irix*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3791 | # |
| 3792 | # MIPS C, which is what we presume we're using, doesn't |
| 3793 | # necessarily exit with a non-zero exit status if we |
| 3794 | # hand it an invalid -W flag, can't be forced to do |
| 3795 | # so, and doesn't handle GCC-style -W flags, so we |
| 3796 | # don't want to try using GCC-style -W flags. |
| 3797 | # |
| 3798 | ac_lbl_cc_dont_try_gcc_dashW=yes |
| 3799 | # |
| 3800 | # It also, apparently, defaults to "char" being |
| 3801 | # unsigned, unlike most other C implementations; |
| 3802 | # I suppose we could say "signed char" whenever |
| 3803 | # we want to guarantee a signed "char", but let's |
| 3804 | # just force signed chars. |
| 3805 | # |
| 3806 | # -xansi is normally the default, but the |
| 3807 | # configure script was setting it; perhaps -cckr |
| 3808 | # was the default in the Old Days. (Then again, |
| 3809 | # that would probably be for backwards compatibility |
| 3810 | # in the days when ANSI C was Shiny and New, i.e. |
| 3811 | # 1989 and the early '90's, so maybe we can just |
| 3812 | # drop support for those compilers.) |
| 3813 | # |
| 3814 | # -g is equivalent to -g2, which turns off |
| 3815 | # optimization; we choose -g3, which generates |
| 3816 | # debugging information but doesn't turn off |
| 3817 | # optimization (even if the optimization would |
| 3818 | # cause inaccuracies in debugging). |
| 3819 | # |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3820 | V_CCOPT="$V_CCOPT -xansi -signed -g3" |
| 3821 | ;; |
| 3822 | |
| 3823 | osf*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3824 | # |
| 3825 | # Presumed to be DEC OSF/1, Digital UNIX, or |
| 3826 | # Tru64 UNIX. |
| 3827 | # |
| 3828 | # The DEC C compiler, which is what we presume we're |
| 3829 | # using, doesn't exit with a non-zero exit status if we |
| 3830 | # hand it an invalid -W flag, can't be forced to do |
| 3831 | # so, and doesn't handle GCC-style -W flags, so we |
| 3832 | # don't want to try using GCC-style -W flags. |
| 3833 | # |
| 3834 | ac_lbl_cc_dont_try_gcc_dashW=yes |
| 3835 | # |
| 3836 | # -g is equivalent to -g2, which turns off |
| 3837 | # optimization; we choose -g3, which generates |
| 3838 | # debugging information but doesn't turn off |
| 3839 | # optimization (even if the optimization would |
| 3840 | # cause inaccuracies in debugging). |
| 3841 | # |
| 3842 | V_CCOPT="$V_CCOPT -g3" |
| 3843 | ;; |
| 3844 | |
| 3845 | solaris*) |
| 3846 | # |
| 3847 | # Assumed to be Sun C, which requires -errwarn to force |
| 3848 | # warnings to be treated as errors. |
| 3849 | # |
| 3850 | ac_lbl_cc_force_warning_errors=-errwarn |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3851 | |
| 3852 | # |
| 3853 | # Try to have the compiler default to hiding symbols, |
| 3854 | # so that only symbols explicitly exported with |
| 3855 | # PCAP_API will be visible outside (shared) libraries. |
| 3856 | # |
| 3857 | |
| 3858 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5 |
| 3859 | $as_echo_n "checking whether the compiler supports the -xldscope=hidden option... " >&6; } |
| 3860 | save_CFLAGS="$CFLAGS" |
| 3861 | if expr "x-xldscope=hidden" : "x-W.*" >/dev/null |
| 3862 | then |
| 3863 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -xldscope=hidden" |
| 3864 | elif expr "x-xldscope=hidden" : "x-f.*" >/dev/null |
| 3865 | then |
| 3866 | CFLAGS="$CFLAGS -Werror -xldscope=hidden" |
| 3867 | elif expr "x-xldscope=hidden" : "x-m.*" >/dev/null |
| 3868 | then |
| 3869 | CFLAGS="$CFLAGS -Werror -xldscope=hidden" |
| 3870 | else |
| 3871 | CFLAGS="$CFLAGS -xldscope=hidden" |
| 3872 | fi |
| 3873 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3874 | /* end confdefs.h. */ |
| 3875 | |
| 3876 | int |
| 3877 | main () |
| 3878 | { |
| 3879 | return 0 |
| 3880 | ; |
| 3881 | return 0; |
| 3882 | } |
| 3883 | _ACEOF |
| 3884 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3885 | |
| 3886 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3887 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3888 | can_add_to_cflags=yes |
| 3889 | # |
| 3890 | # The compile supports this; do we have some C code for |
| 3891 | # which the warning should *not* appear? |
| 3892 | # We test the fourth argument because the third argument |
| 3893 | # could contain quotes, breaking the test. |
| 3894 | # |
| 3895 | if test "x" != "x" |
| 3896 | then |
| 3897 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 3898 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5 |
| 3899 | $as_echo_n "checking whether -xldscope=hidden ... " >&6; } |
| 3900 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3901 | /* end confdefs.h. */ |
| 3902 | |
| 3903 | _ACEOF |
| 3904 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3905 | |
| 3906 | # |
| 3907 | # Not a problem. |
| 3908 | # |
| 3909 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3910 | $as_echo "no" >&6; } |
| 3911 | |
| 3912 | else |
| 3913 | |
| 3914 | # |
| 3915 | # A problem. |
| 3916 | # |
| 3917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3918 | $as_echo "yes" >&6; } |
| 3919 | can_add_to_cflags=no |
| 3920 | |
| 3921 | fi |
| 3922 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3923 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3924 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3925 | if test x"$can_add_to_cflags" = "xyes" |
| 3926 | then |
| 3927 | V_CCOPT="$V_CCOPT -xldscope=hidden" |
| 3928 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3929 | |
| 3930 | else |
| 3931 | |
| 3932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3933 | $as_echo "no" >&6; } |
| 3934 | CFLAGS="$save_CFLAGS" |
| 3935 | |
| 3936 | fi |
| 3937 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3938 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3939 | ;; |
| 3940 | |
| 3941 | ultrix*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3942 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5 |
| 3943 | $as_echo_n "checking that Ultrix $CC hacks const in prototypes... " >&6; } |
| 3944 | if ${ac_cv_lbl_cc_const_proto+:} false; then : |
| 3945 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3946 | else |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 3947 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3948 | /* end confdefs.h. */ |
| 3949 | #include <sys/types.h> |
| 3950 | int |
| 3951 | main () |
| 3952 | { |
| 3953 | struct a { int b; }; |
| 3954 | void c(const struct a *) |
| 3955 | ; |
| 3956 | return 0; |
| 3957 | } |
| 3958 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3959 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3960 | ac_cv_lbl_cc_const_proto=yes |
| 3961 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3962 | ac_cv_lbl_cc_const_proto=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3963 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3964 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3965 | fi |
| 3966 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3967 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5 |
| 3968 | $as_echo "$ac_cv_lbl_cc_const_proto" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3969 | if test $ac_cv_lbl_cc_const_proto = no ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3970 | |
| 3971 | $as_echo "#define const /**/" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3972 | |
| 3973 | fi |
| 3974 | ;; |
| 3975 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3976 | V_CCOPT="$V_CCOPT -O" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 3977 | fi |
| 3978 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3979 | |
| 3980 | if test "$GCC" = yes ; then |
| 3981 | # |
| 3982 | # On platforms where we build a shared library: |
| 3983 | # |
| 3984 | # add options to generate position-independent code, |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 3985 | # if necessary (it's the default in AIX and Darwin/macOS); |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 3986 | # |
| 3987 | # define option to set the soname of the shared library, |
| 3988 | # if the OS supports that; |
| 3989 | # |
| 3990 | # add options to specify, at link time, a directory to |
| 3991 | # add to the run-time search path, if that's necessary. |
| 3992 | # |
| 3993 | V_SHLIB_CMD="\$(CC)" |
| 3994 | V_SHLIB_OPT="-shared" |
| 3995 | case "$host_os" in |
| 3996 | |
| 3997 | aix*) |
| 3998 | ;; |
| 3999 | |
| 4000 | freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*) |
| 4001 | # |
| 4002 | # Platforms where the linker is the GNU linker |
| 4003 | # or accepts command-line arguments like |
| 4004 | # those the GNU linker accepts. |
| 4005 | # |
| 4006 | # Some instruction sets require -fPIC on some |
| 4007 | # operating systems. Check for them. If you |
| 4008 | # have a combination that requires it, add it |
| 4009 | # here. |
| 4010 | # |
| 4011 | PIC_OPT=-fpic |
| 4012 | case "$host_cpu" in |
| 4013 | |
| 4014 | sparc64*) |
| 4015 | case "$host_os" in |
| 4016 | |
| 4017 | freebsd*|openbsd*) |
| 4018 | PIC_OPT=-fPIC |
| 4019 | ;; |
| 4020 | esac |
| 4021 | ;; |
| 4022 | esac |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4023 | V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4024 | V_SONAME_OPT="-Wl,-soname," |
| 4025 | V_RPATH_OPT="-Wl,-rpath," |
| 4026 | ;; |
| 4027 | |
| 4028 | hpux*) |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4029 | V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4030 | # |
| 4031 | # XXX - this assumes GCC is using the HP linker, |
| 4032 | # rather than the GNU linker, and that the "+h" |
| 4033 | # option is used on all HP-UX platforms, both .sl |
| 4034 | # and .so. |
| 4035 | # |
| 4036 | V_SONAME_OPT="-Wl,+h," |
| 4037 | # |
| 4038 | # By default, directories specifed with -L |
| 4039 | # are added to the run-time search path, so |
| 4040 | # we don't add them in pcap-config. |
| 4041 | # |
| 4042 | ;; |
| 4043 | |
| 4044 | solaris*) |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4045 | V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4046 | # |
| 4047 | # XXX - this assumes GCC is using the Sun linker, |
| 4048 | # rather than the GNU linker. |
| 4049 | # |
| 4050 | V_SONAME_OPT="-Wl,-h," |
| 4051 | V_RPATH_OPT="-Wl,-R," |
| 4052 | ;; |
| 4053 | esac |
| 4054 | else |
| 4055 | # |
| 4056 | # Set the appropriate compiler flags and, on platforms |
| 4057 | # where we build a shared library: |
| 4058 | # |
| 4059 | # add options to generate position-independent code, |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4060 | # if necessary (it's the default in Darwin/macOS); |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4061 | # |
| 4062 | # if we generate ".so" shared libraries, define the |
| 4063 | # appropriate options for building the shared library; |
| 4064 | # |
| 4065 | # add options to specify, at link time, a directory to |
| 4066 | # add to the run-time search path, if that's necessary. |
| 4067 | # |
| 4068 | # Note: spaces after V_SONAME_OPT are significant; on |
| 4069 | # some platforms the soname is passed with a GCC-like |
| 4070 | # "-Wl,-soname,{soname}" option, with the soname part |
| 4071 | # of the option, while on other platforms the C compiler |
| 4072 | # driver takes it as a regular option with the soname |
| 4073 | # following the option. The same applies to V_RPATH_OPT. |
| 4074 | # |
| 4075 | case "$host_os" in |
| 4076 | |
| 4077 | aix*) |
| 4078 | V_SHLIB_CMD="\$(CC)" |
| 4079 | V_SHLIB_OPT="-G -bnoentry -bexpall" |
| 4080 | ;; |
| 4081 | |
| 4082 | freebsd*|netbsd*|openbsd*|dragonfly*|linux*) |
| 4083 | # |
| 4084 | # "cc" is GCC. |
| 4085 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4086 | V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4087 | V_SHLIB_CMD="\$(CC)" |
| 4088 | V_SHLIB_OPT="-shared" |
| 4089 | V_SONAME_OPT="-Wl,-soname," |
| 4090 | V_RPATH_OPT="-Wl,-rpath," |
| 4091 | ;; |
| 4092 | |
| 4093 | hpux*) |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4094 | V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4095 | V_SHLIB_CMD="\$(LD)" |
| 4096 | V_SHLIB_OPT="-b" |
| 4097 | V_SONAME_OPT="+h " |
| 4098 | # |
| 4099 | # By default, directories specifed with -L |
| 4100 | # are added to the run-time search path, so |
| 4101 | # we don't add them in pcap-config. |
| 4102 | # |
| 4103 | ;; |
| 4104 | |
| 4105 | osf*) |
| 4106 | # |
| 4107 | # Presumed to be DEC OSF/1, Digital UNIX, or |
| 4108 | # Tru64 UNIX. |
| 4109 | # |
| 4110 | V_SHLIB_CMD="\$(CC)" |
| 4111 | V_SHLIB_OPT="-shared" |
| 4112 | V_SONAME_OPT="-soname " |
| 4113 | V_RPATH_OPT="-rpath " |
| 4114 | ;; |
| 4115 | |
| 4116 | solaris*) |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4117 | V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4118 | V_SHLIB_CMD="\$(CC)" |
| 4119 | V_SHLIB_OPT="-G" |
| 4120 | V_SONAME_OPT="-h " |
| 4121 | V_RPATH_OPT="-R" |
| 4122 | ;; |
| 4123 | esac |
| 4124 | fi |
| 4125 | |
| 4126 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
| 4127 | $as_echo_n "checking for inline... " >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4128 | save_CFLAGS="$CFLAGS" |
| 4129 | CFLAGS="$V_CCOPT" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4130 | if ${ac_cv_lbl_inline+:} false; then : |
| 4131 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4132 | else |
| 4133 | |
| 4134 | ac_cv_lbl_inline="" |
| 4135 | ac_lbl_cc_inline=no |
| 4136 | for ac_lbl_inline in inline __inline__ __inline |
| 4137 | do |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4138 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4139 | /* end confdefs.h. */ |
| 4140 | #define inline $ac_lbl_inline |
| 4141 | static inline struct iltest *foo(void); |
| 4142 | struct iltest { |
| 4143 | int iltest1; |
| 4144 | int iltest2; |
| 4145 | }; |
| 4146 | |
| 4147 | static inline struct iltest * |
| 4148 | foo() |
| 4149 | { |
| 4150 | static struct iltest xxx; |
| 4151 | |
| 4152 | return &xxx; |
| 4153 | } |
| 4154 | int |
| 4155 | main () |
| 4156 | { |
| 4157 | |
| 4158 | ; |
| 4159 | return 0; |
| 4160 | } |
| 4161 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4162 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4163 | ac_lbl_cc_inline=yes |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4164 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4165 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4166 | if test "$ac_lbl_cc_inline" = yes ; then |
| 4167 | break; |
| 4168 | fi |
| 4169 | done |
| 4170 | if test "$ac_lbl_cc_inline" = yes ; then |
| 4171 | ac_cv_lbl_inline=$ac_lbl_inline |
| 4172 | fi |
| 4173 | fi |
| 4174 | |
| 4175 | CFLAGS="$save_CFLAGS" |
| 4176 | if test ! -z "$ac_cv_lbl_inline" ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4177 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5 |
| 4178 | $as_echo "$ac_cv_lbl_inline" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4179 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4180 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4181 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4182 | fi |
| 4183 | |
| 4184 | cat >>confdefs.h <<_ACEOF |
| 4185 | #define inline $ac_cv_lbl_inline |
| 4186 | _ACEOF |
| 4187 | |
| 4188 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4189 | # |
| 4190 | # Try to arrange for large file support. |
| 4191 | # |
| 4192 | # Check whether --enable-largefile was given. |
| 4193 | if test "${enable_largefile+set}" = set; then : |
| 4194 | enableval=$enable_largefile; |
| 4195 | fi |
| 4196 | |
| 4197 | if test "$enable_largefile" != no; then |
| 4198 | |
| 4199 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 |
| 4200 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } |
| 4201 | if ${ac_cv_sys_largefile_CC+:} false; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4202 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4203 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4204 | ac_cv_sys_largefile_CC=no |
| 4205 | if test "$GCC" != yes; then |
| 4206 | ac_save_CC=$CC |
| 4207 | while :; do |
| 4208 | # IRIX 6.2 and later do not support large files by default, |
| 4209 | # so use the C compiler's -n32 option if that helps. |
| 4210 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4211 | /* end confdefs.h. */ |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4212 | #include <sys/types.h> |
| 4213 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4214 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4215 | since some C++ compilers masquerading as C compilers |
| 4216 | incorrectly reject 9223372036854775807. */ |
| 4217 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4218 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4219 | && LARGE_OFF_T % 2147483647 == 1) |
| 4220 | ? 1 : -1]; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4221 | int |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4222 | main () |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4223 | { |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4224 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4225 | ; |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4226 | return 0; |
| 4227 | } |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4228 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4229 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4230 | break |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4231 | fi |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4232 | rm -f core conftest.err conftest.$ac_objext |
| 4233 | CC="$CC -n32" |
| 4234 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4235 | ac_cv_sys_largefile_CC=' -n32'; break |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4236 | fi |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4237 | rm -f core conftest.err conftest.$ac_objext |
| 4238 | break |
| 4239 | done |
| 4240 | CC=$ac_save_CC |
| 4241 | rm -f conftest.$ac_ext |
| 4242 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4243 | fi |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 |
| 4245 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } |
| 4246 | if test "$ac_cv_sys_largefile_CC" != no; then |
| 4247 | CC=$CC$ac_cv_sys_largefile_CC |
| 4248 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4249 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4250 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 |
| 4251 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } |
| 4252 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4253 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4254 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4255 | while :; do |
| 4256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4257 | /* end confdefs.h. */ |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4258 | #include <sys/types.h> |
| 4259 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4260 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4261 | since some C++ compilers masquerading as C compilers |
| 4262 | incorrectly reject 9223372036854775807. */ |
| 4263 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4264 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4265 | && LARGE_OFF_T % 2147483647 == 1) |
| 4266 | ? 1 : -1]; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4267 | int |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4268 | main () |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4269 | { |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4270 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4271 | ; |
| 4272 | return 0; |
| 4273 | } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4274 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4275 | if ac_fn_c_try_compile "$LINENO"; then : |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4276 | ac_cv_sys_file_offset_bits=no; break |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4277 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4278 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4279 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4280 | /* end confdefs.h. */ |
| 4281 | #define _FILE_OFFSET_BITS 64 |
| 4282 | #include <sys/types.h> |
| 4283 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4284 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4285 | since some C++ compilers masquerading as C compilers |
| 4286 | incorrectly reject 9223372036854775807. */ |
| 4287 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4288 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4289 | && LARGE_OFF_T % 2147483647 == 1) |
| 4290 | ? 1 : -1]; |
| 4291 | int |
| 4292 | main () |
| 4293 | { |
| 4294 | |
| 4295 | ; |
| 4296 | return 0; |
| 4297 | } |
| 4298 | _ACEOF |
| 4299 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4300 | ac_cv_sys_file_offset_bits=64; break |
| 4301 | fi |
| 4302 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4303 | ac_cv_sys_file_offset_bits=unknown |
| 4304 | break |
| 4305 | done |
| 4306 | fi |
| 4307 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 |
| 4308 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } |
| 4309 | case $ac_cv_sys_file_offset_bits in #( |
| 4310 | no | unknown) ;; |
| 4311 | *) |
| 4312 | cat >>confdefs.h <<_ACEOF |
| 4313 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits |
| 4314 | _ACEOF |
| 4315 | ;; |
| 4316 | esac |
| 4317 | rm -rf conftest* |
| 4318 | if test $ac_cv_sys_file_offset_bits = unknown; then |
| 4319 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 |
| 4320 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } |
| 4321 | if ${ac_cv_sys_large_files+:} false; then : |
| 4322 | $as_echo_n "(cached) " >&6 |
| 4323 | else |
| 4324 | while :; do |
| 4325 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4326 | /* end confdefs.h. */ |
| 4327 | #include <sys/types.h> |
| 4328 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4329 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4330 | since some C++ compilers masquerading as C compilers |
| 4331 | incorrectly reject 9223372036854775807. */ |
| 4332 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4333 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4334 | && LARGE_OFF_T % 2147483647 == 1) |
| 4335 | ? 1 : -1]; |
| 4336 | int |
| 4337 | main () |
| 4338 | { |
| 4339 | |
| 4340 | ; |
| 4341 | return 0; |
| 4342 | } |
| 4343 | _ACEOF |
| 4344 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4345 | ac_cv_sys_large_files=no; break |
| 4346 | fi |
| 4347 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4348 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4349 | /* end confdefs.h. */ |
| 4350 | #define _LARGE_FILES 1 |
| 4351 | #include <sys/types.h> |
| 4352 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4353 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4354 | since some C++ compilers masquerading as C compilers |
| 4355 | incorrectly reject 9223372036854775807. */ |
| 4356 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4357 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4358 | && LARGE_OFF_T % 2147483647 == 1) |
| 4359 | ? 1 : -1]; |
| 4360 | int |
| 4361 | main () |
| 4362 | { |
| 4363 | |
| 4364 | ; |
| 4365 | return 0; |
| 4366 | } |
| 4367 | _ACEOF |
| 4368 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4369 | ac_cv_sys_large_files=1; break |
| 4370 | fi |
| 4371 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4372 | ac_cv_sys_large_files=unknown |
| 4373 | break |
| 4374 | done |
| 4375 | fi |
| 4376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
| 4377 | $as_echo "$ac_cv_sys_large_files" >&6; } |
| 4378 | case $ac_cv_sys_large_files in #( |
| 4379 | no | unknown) ;; |
| 4380 | *) |
| 4381 | cat >>confdefs.h <<_ACEOF |
| 4382 | #define _LARGE_FILES $ac_cv_sys_large_files |
| 4383 | _ACEOF |
| 4384 | ;; |
| 4385 | esac |
| 4386 | rm -rf conftest* |
| 4387 | fi |
| 4388 | |
| 4389 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4390 | fi |
| 4391 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 |
| 4393 | $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } |
| 4394 | if ${ac_cv_sys_largefile_source+:} false; then : |
| 4395 | $as_echo_n "(cached) " >&6 |
| 4396 | else |
| 4397 | while :; do |
| 4398 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4399 | /* end confdefs.h. */ |
| 4400 | #include <sys/types.h> /* for off_t */ |
| 4401 | #include <stdio.h> |
| 4402 | int |
| 4403 | main () |
| 4404 | { |
| 4405 | int (*fp) (FILE *, off_t, int) = fseeko; |
| 4406 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); |
| 4407 | ; |
| 4408 | return 0; |
| 4409 | } |
| 4410 | _ACEOF |
| 4411 | if ac_fn_c_try_link "$LINENO"; then : |
| 4412 | ac_cv_sys_largefile_source=no; break |
| 4413 | fi |
| 4414 | rm -f core conftest.err conftest.$ac_objext \ |
| 4415 | conftest$ac_exeext conftest.$ac_ext |
| 4416 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4417 | /* end confdefs.h. */ |
| 4418 | #define _LARGEFILE_SOURCE 1 |
| 4419 | #include <sys/types.h> /* for off_t */ |
| 4420 | #include <stdio.h> |
| 4421 | int |
| 4422 | main () |
| 4423 | { |
| 4424 | int (*fp) (FILE *, off_t, int) = fseeko; |
| 4425 | return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); |
| 4426 | ; |
| 4427 | return 0; |
| 4428 | } |
| 4429 | _ACEOF |
| 4430 | if ac_fn_c_try_link "$LINENO"; then : |
| 4431 | ac_cv_sys_largefile_source=1; break |
| 4432 | fi |
| 4433 | rm -f core conftest.err conftest.$ac_objext \ |
| 4434 | conftest$ac_exeext conftest.$ac_ext |
| 4435 | ac_cv_sys_largefile_source=unknown |
| 4436 | break |
| 4437 | done |
| 4438 | fi |
| 4439 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 |
| 4440 | $as_echo "$ac_cv_sys_largefile_source" >&6; } |
| 4441 | case $ac_cv_sys_largefile_source in #( |
| 4442 | no | unknown) ;; |
| 4443 | *) |
| 4444 | cat >>confdefs.h <<_ACEOF |
| 4445 | #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source |
| 4446 | _ACEOF |
| 4447 | ;; |
| 4448 | esac |
| 4449 | rm -rf conftest* |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4450 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4451 | # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug |
| 4452 | # in glibc 2.1.3, but that breaks too many other things. |
| 4453 | # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. |
| 4454 | if test $ac_cv_sys_largefile_source != unknown; then |
| 4455 | |
| 4456 | $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4457 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4458 | fi |
| 4459 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4460 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4461 | ac_ext=c |
| 4462 | ac_cpp='$CPP $CPPFLAGS' |
| 4463 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4464 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4465 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
| 4467 | $as_echo_n "checking how to run the C preprocessor... " >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4468 | # On Suns, sometimes $CPP names a directory. |
| 4469 | if test -n "$CPP" && test -d "$CPP"; then |
| 4470 | CPP= |
| 4471 | fi |
| 4472 | if test -z "$CPP"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4473 | if ${ac_cv_prog_CPP+:} false; then : |
| 4474 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4475 | else |
| 4476 | # Double quotes because CPP needs to be expanded |
| 4477 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" |
| 4478 | do |
| 4479 | ac_preproc_ok=false |
| 4480 | for ac_c_preproc_warn_flag in '' yes |
| 4481 | do |
| 4482 | # Use a header file that comes with gcc, so configuring glibc |
| 4483 | # with a fresh cross-compiler works. |
| 4484 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4485 | # <limits.h> exists even on freestanding compilers. |
| 4486 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4487 | # not just through cpp. "Syntax error" is here to catch this case. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4488 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4489 | /* end confdefs.h. */ |
| 4490 | #ifdef __STDC__ |
| 4491 | # include <limits.h> |
| 4492 | #else |
| 4493 | # include <assert.h> |
| 4494 | #endif |
| 4495 | Syntax error |
| 4496 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4497 | if ac_fn_c_try_cpp "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4498 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4499 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4500 | # Broken: fails on valid input. |
| 4501 | continue |
| 4502 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4503 | rm -f conftest.err conftest.i conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4504 | |
| 4505 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4506 | # can be detected and how. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4507 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4508 | /* end confdefs.h. */ |
| 4509 | #include <ac_nonexistent.h> |
| 4510 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4511 | if ac_fn_c_try_cpp "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4512 | # Broken: success on invalid input. |
| 4513 | continue |
| 4514 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4515 | # Passes both tests. |
| 4516 | ac_preproc_ok=: |
| 4517 | break |
| 4518 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4519 | rm -f conftest.err conftest.i conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4520 | |
| 4521 | done |
| 4522 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4523 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4524 | if $ac_preproc_ok; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4525 | break |
| 4526 | fi |
| 4527 | |
| 4528 | done |
| 4529 | ac_cv_prog_CPP=$CPP |
| 4530 | |
| 4531 | fi |
| 4532 | CPP=$ac_cv_prog_CPP |
| 4533 | else |
| 4534 | ac_cv_prog_CPP=$CPP |
| 4535 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4536 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
| 4537 | $as_echo "$CPP" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4538 | ac_preproc_ok=false |
| 4539 | for ac_c_preproc_warn_flag in '' yes |
| 4540 | do |
| 4541 | # Use a header file that comes with gcc, so configuring glibc |
| 4542 | # with a fresh cross-compiler works. |
| 4543 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4544 | # <limits.h> exists even on freestanding compilers. |
| 4545 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4546 | # not just through cpp. "Syntax error" is here to catch this case. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4547 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4548 | /* end confdefs.h. */ |
| 4549 | #ifdef __STDC__ |
| 4550 | # include <limits.h> |
| 4551 | #else |
| 4552 | # include <assert.h> |
| 4553 | #endif |
| 4554 | Syntax error |
| 4555 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4556 | if ac_fn_c_try_cpp "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4557 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4558 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4559 | # Broken: fails on valid input. |
| 4560 | continue |
| 4561 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4562 | rm -f conftest.err conftest.i conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4563 | |
| 4564 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4565 | # can be detected and how. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4566 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4567 | /* end confdefs.h. */ |
| 4568 | #include <ac_nonexistent.h> |
| 4569 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4570 | if ac_fn_c_try_cpp "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4571 | # Broken: success on invalid input. |
| 4572 | continue |
| 4573 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4574 | # Passes both tests. |
| 4575 | ac_preproc_ok=: |
| 4576 | break |
| 4577 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4578 | rm -f conftest.err conftest.i conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4579 | |
| 4580 | done |
| 4581 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4582 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4583 | if $ac_preproc_ok; then : |
| 4584 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4585 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4586 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4587 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 4588 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
| 4589 | See \`config.log' for more details" "$LINENO" 5; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4590 | fi |
| 4591 | |
| 4592 | ac_ext=c |
| 4593 | ac_cpp='$CPP $CPPFLAGS' |
| 4594 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4595 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4596 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4597 | |
| 4598 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4599 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
| 4600 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } |
| 4601 | if ${ac_cv_path_GREP+:} false; then : |
| 4602 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4603 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4604 | if test -z "$GREP"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4605 | ac_path_GREP_found=false |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4606 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4607 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4608 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 4609 | do |
| 4610 | IFS=$as_save_IFS |
| 4611 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4612 | for ac_prog in grep ggrep; do |
| 4613 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4614 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" |
| 4615 | as_fn_executable_p "$ac_path_GREP" || continue |
| 4616 | # Check for GNU ac_path_GREP and select it if it is found. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4617 | # Check for GNU $ac_path_GREP |
| 4618 | case `"$ac_path_GREP" --version 2>&1` in |
| 4619 | *GNU*) |
| 4620 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; |
| 4621 | *) |
| 4622 | ac_count=0 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4623 | $as_echo_n 0123456789 >"conftest.in" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4624 | while : |
| 4625 | do |
| 4626 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4627 | mv "conftest.tmp" "conftest.in" |
| 4628 | cp "conftest.in" "conftest.nl" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4629 | $as_echo 'GREP' >> "conftest.nl" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4630 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4631 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4632 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4633 | if test $ac_count -gt ${ac_path_GREP_max-0}; then |
| 4634 | # Best one so far, save it but keep looking for a better one |
| 4635 | ac_cv_path_GREP="$ac_path_GREP" |
| 4636 | ac_path_GREP_max=$ac_count |
| 4637 | fi |
| 4638 | # 10*(2^10) chars as input seems more than enough |
| 4639 | test $ac_count -gt 10 && break |
| 4640 | done |
| 4641 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4642 | esac |
| 4643 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4644 | $ac_path_GREP_found && break 3 |
| 4645 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4646 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4647 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4648 | IFS=$as_save_IFS |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4649 | if test -z "$ac_cv_path_GREP"; then |
| 4650 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
| 4651 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4652 | else |
| 4653 | ac_cv_path_GREP=$GREP |
| 4654 | fi |
| 4655 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4656 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4657 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
| 4658 | $as_echo "$ac_cv_path_GREP" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4659 | GREP="$ac_cv_path_GREP" |
| 4660 | |
| 4661 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4662 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
| 4663 | $as_echo_n "checking for egrep... " >&6; } |
| 4664 | if ${ac_cv_path_EGREP+:} false; then : |
| 4665 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4666 | else |
| 4667 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
| 4668 | then ac_cv_path_EGREP="$GREP -E" |
| 4669 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4670 | if test -z "$EGREP"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4671 | ac_path_EGREP_found=false |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4672 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4673 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4674 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 4675 | do |
| 4676 | IFS=$as_save_IFS |
| 4677 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4678 | for ac_prog in egrep; do |
| 4679 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4680 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" |
| 4681 | as_fn_executable_p "$ac_path_EGREP" || continue |
| 4682 | # Check for GNU ac_path_EGREP and select it if it is found. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4683 | # Check for GNU $ac_path_EGREP |
| 4684 | case `"$ac_path_EGREP" --version 2>&1` in |
| 4685 | *GNU*) |
| 4686 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; |
| 4687 | *) |
| 4688 | ac_count=0 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4689 | $as_echo_n 0123456789 >"conftest.in" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4690 | while : |
| 4691 | do |
| 4692 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4693 | mv "conftest.tmp" "conftest.in" |
| 4694 | cp "conftest.in" "conftest.nl" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4695 | $as_echo 'EGREP' >> "conftest.nl" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4696 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4697 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4698 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4699 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then |
| 4700 | # Best one so far, save it but keep looking for a better one |
| 4701 | ac_cv_path_EGREP="$ac_path_EGREP" |
| 4702 | ac_path_EGREP_max=$ac_count |
| 4703 | fi |
| 4704 | # 10*(2^10) chars as input seems more than enough |
| 4705 | test $ac_count -gt 10 && break |
| 4706 | done |
| 4707 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4708 | esac |
| 4709 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4710 | $ac_path_EGREP_found && break 3 |
| 4711 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4712 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4713 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4714 | IFS=$as_save_IFS |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4715 | if test -z "$ac_cv_path_EGREP"; then |
| 4716 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
| 4717 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4718 | else |
| 4719 | ac_cv_path_EGREP=$EGREP |
| 4720 | fi |
| 4721 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4722 | fi |
| 4723 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4724 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
| 4725 | $as_echo "$ac_cv_path_EGREP" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4726 | EGREP="$ac_cv_path_EGREP" |
| 4727 | |
| 4728 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 4730 | $as_echo_n "checking for ANSI C header files... " >&6; } |
| 4731 | if ${ac_cv_header_stdc+:} false; then : |
| 4732 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4733 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4734 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4735 | /* end confdefs.h. */ |
| 4736 | #include <stdlib.h> |
| 4737 | #include <stdarg.h> |
| 4738 | #include <string.h> |
| 4739 | #include <float.h> |
| 4740 | |
| 4741 | int |
| 4742 | main () |
| 4743 | { |
| 4744 | |
| 4745 | ; |
| 4746 | return 0; |
| 4747 | } |
| 4748 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4749 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4750 | ac_cv_header_stdc=yes |
| 4751 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4752 | ac_cv_header_stdc=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4753 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4754 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4755 | |
| 4756 | if test $ac_cv_header_stdc = yes; then |
| 4757 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4758 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4759 | /* end confdefs.h. */ |
| 4760 | #include <string.h> |
| 4761 | |
| 4762 | _ACEOF |
| 4763 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4764 | $EGREP "memchr" >/dev/null 2>&1; then : |
| 4765 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4766 | else |
| 4767 | ac_cv_header_stdc=no |
| 4768 | fi |
| 4769 | rm -f conftest* |
| 4770 | |
| 4771 | fi |
| 4772 | |
| 4773 | if test $ac_cv_header_stdc = yes; then |
| 4774 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4775 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4776 | /* end confdefs.h. */ |
| 4777 | #include <stdlib.h> |
| 4778 | |
| 4779 | _ACEOF |
| 4780 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4781 | $EGREP "free" >/dev/null 2>&1; then : |
| 4782 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4783 | else |
| 4784 | ac_cv_header_stdc=no |
| 4785 | fi |
| 4786 | rm -f conftest* |
| 4787 | |
| 4788 | fi |
| 4789 | |
| 4790 | if test $ac_cv_header_stdc = yes; then |
| 4791 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4792 | if test "$cross_compiling" = yes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4793 | : |
| 4794 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4795 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4796 | /* end confdefs.h. */ |
| 4797 | #include <ctype.h> |
| 4798 | #include <stdlib.h> |
| 4799 | #if ((' ' & 0x0FF) == 0x020) |
| 4800 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 4801 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 4802 | #else |
| 4803 | # define ISLOWER(c) \ |
| 4804 | (('a' <= (c) && (c) <= 'i') \ |
| 4805 | || ('j' <= (c) && (c) <= 'r') \ |
| 4806 | || ('s' <= (c) && (c) <= 'z')) |
| 4807 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 4808 | #endif |
| 4809 | |
| 4810 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 4811 | int |
| 4812 | main () |
| 4813 | { |
| 4814 | int i; |
| 4815 | for (i = 0; i < 256; i++) |
| 4816 | if (XOR (islower (i), ISLOWER (i)) |
| 4817 | || toupper (i) != TOUPPER (i)) |
| 4818 | return 2; |
| 4819 | return 0; |
| 4820 | } |
| 4821 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4822 | if ac_fn_c_try_run "$LINENO"; then : |
| 4823 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4824 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4825 | ac_cv_header_stdc=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4826 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4827 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 4828 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4829 | fi |
| 4830 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4831 | fi |
| 4832 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4833 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 4834 | $as_echo "$ac_cv_header_stdc" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4835 | if test $ac_cv_header_stdc = yes; then |
| 4836 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4837 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4838 | |
| 4839 | fi |
| 4840 | |
| 4841 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4842 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
| 4843 | inttypes.h stdint.h unistd.h |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4844 | do : |
| 4845 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 4846 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default |
| 4847 | " |
| 4848 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4849 | cat >>confdefs.h <<_ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4850 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4851 | _ACEOF |
| 4852 | |
| 4853 | fi |
| 4854 | |
| 4855 | done |
| 4856 | |
| 4857 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4858 | for ac_header in sys/ioccom.h sys/sockio.h limits.h |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4859 | do : |
| 4860 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 4861 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 4862 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4863 | cat >>confdefs.h <<_ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4864 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4865 | _ACEOF |
| 4866 | |
| 4867 | fi |
| 4868 | |
| 4869 | done |
| 4870 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4871 | for ac_header in netpacket/packet.h |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4872 | do : |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4873 | ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default" |
| 4874 | if test "x$ac_cv_header_netpacket_packet_h" = xyes; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4875 | cat >>confdefs.h <<_ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 4876 | #define HAVE_NETPACKET_PACKET_H 1 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4877 | _ACEOF |
| 4878 | |
| 4879 | fi |
| 4880 | |
| 4881 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4882 | |
| 4883 | for ac_header in net/pfvar.h |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4884 | do : |
| 4885 | ac_fn_c_check_header_compile "$LINENO" "net/pfvar.h" "ac_cv_header_net_pfvar_h" "#include <sys/types.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4886 | #include <sys/socket.h> |
| 4887 | #include <net/if.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4888 | " |
| 4889 | if test "x$ac_cv_header_net_pfvar_h" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4890 | cat >>confdefs.h <<_ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4891 | #define HAVE_NET_PFVAR_H 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4892 | _ACEOF |
| 4893 | |
| 4894 | fi |
| 4895 | |
| 4896 | done |
| 4897 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4898 | if test "$ac_cv_header_net_pfvar_h" = yes; then |
| 4899 | # |
| 4900 | # Check for various PF actions. |
| 4901 | # |
| 4902 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether net/pfvar.h defines PF_NAT through PF_NORDR" >&5 |
| 4903 | $as_echo_n "checking whether net/pfvar.h defines PF_NAT through PF_NORDR... " >&6; } |
| 4904 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4905 | /* end confdefs.h. */ |
| 4906 | #include <sys/types.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4907 | #include <sys/socket.h> |
| 4908 | #include <net/if.h> |
| 4909 | #include <net/pfvar.h> |
| 4910 | int |
| 4911 | main () |
| 4912 | { |
| 4913 | return PF_NAT+PF_NONAT+PF_BINAT+PF_NOBINAT+PF_RDR+PF_NORDR; |
| 4914 | ; |
| 4915 | return 0; |
| 4916 | } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4917 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4918 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4919 | |
| 4920 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 4921 | $as_echo "yes" >&6; } |
| 4922 | |
| 4923 | $as_echo "#define HAVE_PF_NAT_THROUGH_PF_NORDR 1" >>confdefs.h |
| 4924 | |
| 4925 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4926 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 4928 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4929 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4930 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4931 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4932 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 4933 | case "$host_os" in |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 4934 | linux*|uclinux*) |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 4935 | for ac_header in linux/sockios.h linux/if_bonding.h |
| 4936 | do : |
| 4937 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 4938 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" " |
| 4939 | #include <sys/socket.h> |
| 4940 | #include <linux/if.h> |
| 4941 | |
| 4942 | " |
| 4943 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 4944 | cat >>confdefs.h <<_ACEOF |
| 4945 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 4946 | _ACEOF |
| 4947 | |
| 4948 | fi |
| 4949 | |
| 4950 | done |
| 4951 | |
| 4952 | ;; |
| 4953 | esac |
| 4954 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4955 | if test "$GCC" = yes ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4956 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5 |
| 4957 | $as_echo_n "checking for ANSI ioctl definitions... " >&6; } |
| 4958 | if ${ac_cv_lbl_gcc_fixincludes+:} false; then : |
| 4959 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4960 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4962 | /* end confdefs.h. */ |
| 4963 | /* |
| 4964 | * This generates a "duplicate case value" when fixincludes |
| 4965 | * has not be run. |
| 4966 | */ |
| 4967 | # include <sys/types.h> |
| 4968 | # include <sys/time.h> |
| 4969 | # include <sys/ioctl.h> |
| 4970 | # ifdef HAVE_SYS_IOCCOM_H |
| 4971 | # include <sys/ioccom.h> |
| 4972 | # endif |
| 4973 | int |
| 4974 | main () |
| 4975 | { |
| 4976 | switch (0) { |
| 4977 | case _IO('A', 1):; |
| 4978 | case _IO('B', 1):; |
| 4979 | } |
| 4980 | ; |
| 4981 | return 0; |
| 4982 | } |
| 4983 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4984 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4985 | ac_cv_lbl_gcc_fixincludes=yes |
| 4986 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4987 | ac_cv_lbl_gcc_fixincludes=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4988 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4989 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4990 | fi |
| 4991 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4992 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5 |
| 4993 | $as_echo "$ac_cv_lbl_gcc_fixincludes" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4994 | if test $ac_cv_lbl_gcc_fixincludes = no ; then |
| 4995 | # Don't cache failure |
| 4996 | unset ac_cv_lbl_gcc_fixincludes |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 4997 | as_fn_error $? "see the INSTALL for more info" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 4998 | fi |
| 4999 | fi |
| 5000 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5001 | for ac_func in strerror strerror_r strerror_s strlcpy strlcat |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5002 | do : |
| 5003 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 5004 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 5005 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5006 | cat >>confdefs.h <<_ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5007 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5008 | _ACEOF |
| 5009 | |
| 5010 | fi |
| 5011 | done |
| 5012 | |
| 5013 | |
| 5014 | needsnprintf=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5015 | for ac_func in vsnprintf snprintf |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5016 | do : |
| 5017 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 5018 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 5019 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5020 | cat >>confdefs.h <<_ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5021 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5022 | _ACEOF |
| 5023 | |
| 5024 | else |
| 5025 | needsnprintf=yes |
| 5026 | fi |
| 5027 | done |
| 5028 | |
| 5029 | if test $needsnprintf = yes; then |
| 5030 | case " $LIBOBJS " in |
| 5031 | *" snprintf.$ac_objext "* ) ;; |
| 5032 | *) LIBOBJS="$LIBOBJS snprintf.$ac_objext" |
| 5033 | ;; |
| 5034 | esac |
| 5035 | |
| 5036 | fi |
| 5037 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 5038 | needstrtok_r=no |
| 5039 | for ac_func in strtok_r |
| 5040 | do : |
| 5041 | ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" |
| 5042 | if test "x$ac_cv_func_strtok_r" = xyes; then : |
| 5043 | cat >>confdefs.h <<_ACEOF |
| 5044 | #define HAVE_STRTOK_R 1 |
| 5045 | _ACEOF |
| 5046 | |
| 5047 | else |
| 5048 | needstrtok_r=yes |
| 5049 | fi |
| 5050 | done |
| 5051 | |
| 5052 | if test $needstrtok_r = yes; then |
| 5053 | case " $LIBOBJS " in |
| 5054 | *" strtok_r.$ac_objext "* ) ;; |
| 5055 | *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext" |
| 5056 | ;; |
| 5057 | esac |
| 5058 | |
| 5059 | fi |
| 5060 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5061 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5062 | # Do we have ffs(), and is it declared in <strings.h>? |
| 5063 | # |
| 5064 | for ac_func in ffs |
| 5065 | do : |
| 5066 | ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs" |
| 5067 | if test "x$ac_cv_func_ffs" = xyes; then : |
| 5068 | cat >>confdefs.h <<_ACEOF |
| 5069 | #define HAVE_FFS 1 |
| 5070 | _ACEOF |
| 5071 | |
| 5072 | fi |
| 5073 | done |
| 5074 | |
| 5075 | if test "$ac_cv_func_ffs" = yes; then |
| 5076 | # |
| 5077 | # We have ffs(); is it declared in <strings.h>? |
| 5078 | # |
| 5079 | # This test fails if we don't have <strings.h> or if we do |
| 5080 | # but it doesn't declare ffs(). |
| 5081 | # |
| 5082 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" " |
| 5083 | #include <strings.h> |
| 5084 | |
| 5085 | " |
| 5086 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
| 5087 | |
| 5088 | |
| 5089 | $as_echo "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h |
| 5090 | |
| 5091 | |
| 5092 | fi |
| 5093 | |
| 5094 | fi |
| 5095 | |
| 5096 | # |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5097 | # Do this before checking for ether_hostton(), as it's a |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5098 | # "getaddrinfo()-ish function". |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5099 | # |
| 5100 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5101 | # |
| 5102 | # Most operating systems have getaddrinfo() in the default searched |
| 5103 | # libraries (i.e. libc). Check there first. |
| 5104 | # |
| 5105 | ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" |
| 5106 | if test "x$ac_cv_func_getaddrinfo" = xyes; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5107 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5108 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5109 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5110 | # |
| 5111 | # Not found in the standard system libraries. |
| 5112 | # Try libsocket, which requires libnsl. |
| 5113 | # |
| 5114 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5 |
| 5115 | $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; } |
| 5116 | if ${ac_cv_lib_socket_getaddrinfo+:} false; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5117 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5118 | else |
| 5119 | ac_check_lib_save_LIBS=$LIBS |
| 5120 | LIBS="-lsocket -lnsl $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5121 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5122 | /* end confdefs.h. */ |
| 5123 | |
| 5124 | /* Override any GCC internal prototype to avoid an error. |
| 5125 | Use char because int might match the return type of a GCC |
| 5126 | builtin and then its argument prototype would still apply. */ |
| 5127 | #ifdef __cplusplus |
| 5128 | extern "C" |
| 5129 | #endif |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5130 | char getaddrinfo (); |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5131 | int |
| 5132 | main () |
| 5133 | { |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5134 | return getaddrinfo (); |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5135 | ; |
| 5136 | return 0; |
| 5137 | } |
| 5138 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5139 | if ac_fn_c_try_link "$LINENO"; then : |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5140 | ac_cv_lib_socket_getaddrinfo=yes |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5141 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5142 | ac_cv_lib_socket_getaddrinfo=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5143 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5144 | rm -f core conftest.err conftest.$ac_objext \ |
| 5145 | conftest$ac_exeext conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5146 | LIBS=$ac_check_lib_save_LIBS |
| 5147 | fi |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5148 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5 |
| 5149 | $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; } |
| 5150 | if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5151 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5152 | # |
| 5153 | # OK, we found it in libsocket. |
| 5154 | # |
| 5155 | LIBS="-lsocket -lnsl $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5156 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5157 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5158 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5159 | # |
| 5160 | # We didn't find it. |
| 5161 | # |
| 5162 | as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5 |
| 5163 | |
| 5164 | fi |
| 5165 | |
| 5166 | |
| 5167 | # |
| 5168 | # OK, do we have recvmsg() in libxnet? |
| 5169 | # We also link with libsocket and libnsl. |
| 5170 | # |
| 5171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5 |
| 5172 | $as_echo_n "checking for recvmsg in -lxnet... " >&6; } |
| 5173 | if ${ac_cv_lib_xnet_recvmsg+:} false; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5174 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5175 | else |
| 5176 | ac_check_lib_save_LIBS=$LIBS |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5177 | LIBS="-lxnet -lsocket -lnsl $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5178 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5179 | /* end confdefs.h. */ |
| 5180 | |
| 5181 | /* Override any GCC internal prototype to avoid an error. |
| 5182 | Use char because int might match the return type of a GCC |
| 5183 | builtin and then its argument prototype would still apply. */ |
| 5184 | #ifdef __cplusplus |
| 5185 | extern "C" |
| 5186 | #endif |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5187 | char recvmsg (); |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5188 | int |
| 5189 | main () |
| 5190 | { |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5191 | return recvmsg (); |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5192 | ; |
| 5193 | return 0; |
| 5194 | } |
| 5195 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5196 | if ac_fn_c_try_link "$LINENO"; then : |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5197 | ac_cv_lib_xnet_recvmsg=yes |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5198 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5199 | ac_cv_lib_xnet_recvmsg=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5200 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5201 | rm -f core conftest.err conftest.$ac_objext \ |
| 5202 | conftest$ac_exeext conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5203 | LIBS=$ac_check_lib_save_LIBS |
| 5204 | fi |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5 |
| 5206 | $as_echo "$ac_cv_lib_xnet_recvmsg" >&6; } |
| 5207 | if test "x$ac_cv_lib_xnet_recvmsg" = xyes; then : |
| 5208 | |
| 5209 | # |
| 5210 | # Yes - link with it as well. |
| 5211 | # |
| 5212 | LIBS="-lxnet $LIBS" |
| 5213 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5214 | fi |
| 5215 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5216 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5217 | fi |
| 5218 | |
| 5219 | # DLPI needs putmsg under HPUX so test for -lstr while we're at it |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5220 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5 |
| 5221 | $as_echo_n "checking for library containing putmsg... " >&6; } |
| 5222 | if ${ac_cv_search_putmsg+:} false; then : |
| 5223 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5224 | else |
| 5225 | ac_func_search_save_LIBS=$LIBS |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5226 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5227 | /* end confdefs.h. */ |
| 5228 | |
| 5229 | /* Override any GCC internal prototype to avoid an error. |
| 5230 | Use char because int might match the return type of a GCC |
| 5231 | builtin and then its argument prototype would still apply. */ |
| 5232 | #ifdef __cplusplus |
| 5233 | extern "C" |
| 5234 | #endif |
| 5235 | char putmsg (); |
| 5236 | int |
| 5237 | main () |
| 5238 | { |
| 5239 | return putmsg (); |
| 5240 | ; |
| 5241 | return 0; |
| 5242 | } |
| 5243 | _ACEOF |
| 5244 | for ac_lib in '' str; do |
| 5245 | if test -z "$ac_lib"; then |
| 5246 | ac_res="none required" |
| 5247 | else |
| 5248 | ac_res=-l$ac_lib |
| 5249 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 5250 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5251 | if ac_fn_c_try_link "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5252 | ac_cv_search_putmsg=$ac_res |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5253 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5254 | rm -f core conftest.err conftest.$ac_objext \ |
| 5255 | conftest$ac_exeext |
| 5256 | if ${ac_cv_search_putmsg+:} false; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5257 | break |
| 5258 | fi |
| 5259 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5260 | if ${ac_cv_search_putmsg+:} false; then : |
| 5261 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5262 | else |
| 5263 | ac_cv_search_putmsg=no |
| 5264 | fi |
| 5265 | rm conftest.$ac_ext |
| 5266 | LIBS=$ac_func_search_save_LIBS |
| 5267 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5268 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5 |
| 5269 | $as_echo "$ac_cv_search_putmsg" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5270 | ac_res=$ac_cv_search_putmsg |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5271 | if test "$ac_res" != no; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5272 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 5273 | |
| 5274 | fi |
| 5275 | |
| 5276 | |
| 5277 | |
| 5278 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5279 | # Check for reentrant versions of getnetbyname_r(), as provided by |
| 5280 | # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!). |
| 5281 | # If we don't find one, we just use getnetbyname(), which uses |
| 5282 | # thread-specific data on many platforms, but doesn't use it on |
| 5283 | # NetBSD or OpenBSD, and may not use it on older versions of other |
| 5284 | # platforms. |
| 5285 | # |
| 5286 | # Only do the check if we have a declaration of getnetbyname_r(); |
| 5287 | # without it, we can't check which API it has. (We assume that |
| 5288 | # if there's a declaration, it has a prototype, so that the API |
| 5289 | # can be checked.) |
| 5290 | # |
| 5291 | ac_fn_c_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h> |
| 5292 | " |
| 5293 | if test "x$ac_cv_have_decl_getnetbyname_r" = xyes; then : |
| 5294 | |
| 5295 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5 |
| 5296 | $as_echo_n "checking for the Linux getnetbyname_r()... " >&6; } |
| 5297 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5298 | /* end confdefs.h. */ |
| 5299 | #include <netdb.h> |
| 5300 | int |
| 5301 | main () |
| 5302 | { |
| 5303 | |
| 5304 | struct netent netent_buf; |
| 5305 | char buf[1024]; |
| 5306 | struct netent *resultp; |
| 5307 | int h_errnoval; |
| 5308 | |
| 5309 | return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval); |
| 5310 | |
| 5311 | ; |
| 5312 | return 0; |
| 5313 | } |
| 5314 | _ACEOF |
| 5315 | if ac_fn_c_try_link "$LINENO"; then : |
| 5316 | |
| 5317 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5318 | $as_echo "yes" >&6; } |
| 5319 | |
| 5320 | $as_echo "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h |
| 5321 | |
| 5322 | |
| 5323 | else |
| 5324 | |
| 5325 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5326 | $as_echo "no" >&6; } |
| 5327 | |
| 5328 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5 |
| 5329 | $as_echo_n "checking for Solaris/IRIX getnetbyname_r()... " >&6; } |
| 5330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5331 | /* end confdefs.h. */ |
| 5332 | #include <netdb.h> |
| 5333 | int |
| 5334 | main () |
| 5335 | { |
| 5336 | |
| 5337 | struct netent netent_buf; |
| 5338 | char buf[1024]; |
| 5339 | |
| 5340 | return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL; |
| 5341 | |
| 5342 | ; |
| 5343 | return 0; |
| 5344 | } |
| 5345 | _ACEOF |
| 5346 | if ac_fn_c_try_link "$LINENO"; then : |
| 5347 | |
| 5348 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5349 | $as_echo "yes" >&6; } |
| 5350 | |
| 5351 | $as_echo "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h |
| 5352 | |
| 5353 | |
| 5354 | else |
| 5355 | |
| 5356 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5357 | $as_echo "no" >&6; } |
| 5358 | |
| 5359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5 |
| 5360 | $as_echo_n "checking for AIX getnetbyname_r()... " >&6; } |
| 5361 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5362 | /* end confdefs.h. */ |
| 5363 | #include <netdb.h> |
| 5364 | int |
| 5365 | main () |
| 5366 | { |
| 5367 | |
| 5368 | struct netent netent_buf; |
| 5369 | struct netent_data net_data; |
| 5370 | |
| 5371 | return getnetbyname_r((const char *)0, &netent_buf, &net_data); |
| 5372 | |
| 5373 | ; |
| 5374 | return 0; |
| 5375 | } |
| 5376 | _ACEOF |
| 5377 | if ac_fn_c_try_link "$LINENO"; then : |
| 5378 | |
| 5379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5380 | $as_echo "yes" >&6; } |
| 5381 | |
| 5382 | $as_echo "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h |
| 5383 | |
| 5384 | |
| 5385 | else |
| 5386 | |
| 5387 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5388 | $as_echo "no" >&6; } |
| 5389 | |
| 5390 | fi |
| 5391 | rm -f core conftest.err conftest.$ac_objext \ |
| 5392 | conftest$ac_exeext conftest.$ac_ext |
| 5393 | |
| 5394 | fi |
| 5395 | rm -f core conftest.err conftest.$ac_objext \ |
| 5396 | conftest$ac_exeext conftest.$ac_ext |
| 5397 | |
| 5398 | fi |
| 5399 | rm -f core conftest.err conftest.$ac_objext \ |
| 5400 | conftest$ac_exeext conftest.$ac_ext |
| 5401 | |
| 5402 | fi |
| 5403 | |
| 5404 | |
| 5405 | # |
| 5406 | # Check for reentrant versions of getprotobyname_r(), as provided by |
| 5407 | # Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!). |
| 5408 | # If we don't find one, we just use getprotobyname(), which uses |
| 5409 | # thread-specific data on many platforms, but doesn't use it on |
| 5410 | # NetBSD or OpenBSD, and may not use it on older versions of other |
| 5411 | # platforms. |
| 5412 | # |
| 5413 | # Only do the check if we have a declaration of getprotobyname_r(); |
| 5414 | # without it, we can't check which API it has. (We assume that |
| 5415 | # if there's a declaration, it has a prototype, so that the API |
| 5416 | # can be checked.) |
| 5417 | # |
| 5418 | ac_fn_c_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h> |
| 5419 | " |
| 5420 | if test "x$ac_cv_have_decl_getprotobyname_r" = xyes; then : |
| 5421 | |
| 5422 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5 |
| 5423 | $as_echo_n "checking for the Linux getprotobyname_r()... " >&6; } |
| 5424 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5425 | /* end confdefs.h. */ |
| 5426 | #include <netdb.h> |
| 5427 | int |
| 5428 | main () |
| 5429 | { |
| 5430 | |
| 5431 | struct protoent protoent_buf; |
| 5432 | char buf[1024]; |
| 5433 | struct protoent *resultp; |
| 5434 | |
| 5435 | return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp); |
| 5436 | |
| 5437 | ; |
| 5438 | return 0; |
| 5439 | } |
| 5440 | _ACEOF |
| 5441 | if ac_fn_c_try_link "$LINENO"; then : |
| 5442 | |
| 5443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5444 | $as_echo "yes" >&6; } |
| 5445 | |
| 5446 | $as_echo "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h |
| 5447 | |
| 5448 | |
| 5449 | else |
| 5450 | |
| 5451 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5452 | $as_echo "no" >&6; } |
| 5453 | |
| 5454 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5 |
| 5455 | $as_echo_n "checking for Solaris/IRIX getprotobyname_r()... " >&6; } |
| 5456 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5457 | /* end confdefs.h. */ |
| 5458 | #include <netdb.h> |
| 5459 | int |
| 5460 | main () |
| 5461 | { |
| 5462 | |
| 5463 | struct protoent protoent_buf; |
| 5464 | char buf[1024]; |
| 5465 | |
| 5466 | return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL; |
| 5467 | |
| 5468 | ; |
| 5469 | return 0; |
| 5470 | } |
| 5471 | _ACEOF |
| 5472 | if ac_fn_c_try_link "$LINENO"; then : |
| 5473 | |
| 5474 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5475 | $as_echo "yes" >&6; } |
| 5476 | |
| 5477 | $as_echo "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h |
| 5478 | |
| 5479 | |
| 5480 | else |
| 5481 | |
| 5482 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5483 | $as_echo "no" >&6; } |
| 5484 | |
| 5485 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5 |
| 5486 | $as_echo_n "checking for AIX getprotobyname_r()... " >&6; } |
| 5487 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5488 | /* end confdefs.h. */ |
| 5489 | #include <netdb.h> |
| 5490 | int |
| 5491 | main () |
| 5492 | { |
| 5493 | |
| 5494 | struct protoent protoent_buf; |
| 5495 | struct protoent_data proto_data; |
| 5496 | |
| 5497 | return getprotobyname_r((const char *)0, &protoent_buf, &proto_data); |
| 5498 | |
| 5499 | ; |
| 5500 | return 0; |
| 5501 | } |
| 5502 | _ACEOF |
| 5503 | if ac_fn_c_try_link "$LINENO"; then : |
| 5504 | |
| 5505 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 5506 | $as_echo "yes" >&6; } |
| 5507 | |
| 5508 | $as_echo "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h |
| 5509 | |
| 5510 | |
| 5511 | else |
| 5512 | |
| 5513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5514 | $as_echo "no" >&6; } |
| 5515 | |
| 5516 | fi |
| 5517 | rm -f core conftest.err conftest.$ac_objext \ |
| 5518 | conftest$ac_exeext conftest.$ac_ext |
| 5519 | |
| 5520 | fi |
| 5521 | rm -f core conftest.err conftest.$ac_objext \ |
| 5522 | conftest$ac_exeext conftest.$ac_ext |
| 5523 | |
| 5524 | fi |
| 5525 | rm -f core conftest.err conftest.$ac_objext \ |
| 5526 | conftest$ac_exeext conftest.$ac_ext |
| 5527 | |
| 5528 | fi |
| 5529 | |
| 5530 | |
| 5531 | # |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5532 | # You are in a twisty little maze of UN*Xes, all different. |
| 5533 | # Some might not have ether_hostton(). |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5534 | # Some might have it and declare it in <net/ethernet.h>. |
| 5535 | # Some might have it and declare it in <netinet/ether.h> |
| 5536 | # Some might have it and declare it in <sys/ethernet.h>. |
| 5537 | # Some might have it and declare it in <arpa/inet.h>. |
| 5538 | # Some might have it and declare it in <netinet/if_ether.h>. |
| 5539 | # Some might have it and not declare it in any header file. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5540 | # |
| 5541 | # Before you is a C compiler. |
| 5542 | # |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5543 | for ac_func in ether_hostton |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5544 | do : |
| 5545 | ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton" |
| 5546 | if test "x$ac_cv_func_ether_hostton" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5547 | cat >>confdefs.h <<_ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5548 | #define HAVE_ETHER_HOSTTON 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5549 | _ACEOF |
| 5550 | |
| 5551 | fi |
| 5552 | done |
| 5553 | |
| 5554 | if test "$ac_cv_func_ether_hostton" = yes; then |
| 5555 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5556 | # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>? |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5557 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5558 | # This test fails if we don't have <net/ethernet.h> or if we do |
| 5559 | # but it doesn't declare ether_hostton(). |
| 5560 | # |
| 5561 | ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " |
| 5562 | #include <net/ethernet.h> |
| 5563 | |
| 5564 | " |
| 5565 | if test "x$ac_cv_have_decl_ether_hostton" = xyes; then : |
| 5566 | |
| 5567 | |
| 5568 | $as_echo "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h |
| 5569 | |
| 5570 | |
| 5571 | fi |
| 5572 | |
| 5573 | # |
| 5574 | # Did that succeed? |
| 5575 | # |
| 5576 | if test "$ac_cv_have_decl_ether_hostton" != yes; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5577 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5578 | # No, how about <netinet/ether.h>, as on Linux? |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5579 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5580 | # This test fails if we don't have <netinet/ether.h> |
| 5581 | # or if we do but it doesn't declare ether_hostton(). |
| 5582 | # |
| 5583 | # Unset ac_cv_have_decl_ether_hostton so we don't |
| 5584 | # treat the previous failure as a cached value and |
| 5585 | # suppress the next test. |
| 5586 | # |
| 5587 | unset ac_cv_have_decl_ether_hostton |
| 5588 | ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " |
| 5589 | #include <netinet/ether.h> |
| 5590 | |
| 5591 | " |
| 5592 | if test "x$ac_cv_have_decl_ether_hostton" = xyes; then : |
| 5593 | |
| 5594 | |
| 5595 | $as_echo "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h |
| 5596 | |
| 5597 | |
| 5598 | fi |
| 5599 | |
| 5600 | fi |
| 5601 | # |
| 5602 | # Did that succeed? |
| 5603 | # |
| 5604 | if test "$ac_cv_have_decl_ether_hostton" != yes; then |
| 5605 | # |
| 5606 | # No, how about <sys/ethernet.h>, as on Solaris 10 |
| 5607 | # and later? |
| 5608 | # |
| 5609 | # This test fails if we don't have <sys/ethernet.h> |
| 5610 | # or if we do but it doesn't declare ether_hostton(). |
| 5611 | # |
| 5612 | # Unset ac_cv_have_decl_ether_hostton so we don't |
| 5613 | # treat the previous failure as a cached value and |
| 5614 | # suppress the next test. |
| 5615 | # |
| 5616 | unset ac_cv_have_decl_ether_hostton |
| 5617 | ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " |
| 5618 | #include <sys/ethernet.h> |
| 5619 | |
| 5620 | " |
| 5621 | if test "x$ac_cv_have_decl_ether_hostton" = xyes; then : |
| 5622 | |
| 5623 | |
| 5624 | $as_echo "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h |
| 5625 | |
| 5626 | |
| 5627 | fi |
| 5628 | |
| 5629 | fi |
| 5630 | # |
| 5631 | # Did that succeed? |
| 5632 | # |
| 5633 | if test "$ac_cv_have_decl_ether_hostton" != yes; then |
| 5634 | # |
| 5635 | # No, how about <arpa/inet.h>, as in AIX? |
| 5636 | # |
| 5637 | # This test fails if we don't have <arpa/inet.h> |
| 5638 | # (if we have ether_hostton(), we should have |
| 5639 | # networking, and if we have networking, we should |
| 5640 | # have <arapa/inet.h>) or if we do but it doesn't |
| 5641 | # declare ether_hostton(). |
| 5642 | # |
| 5643 | # Unset ac_cv_have_decl_ether_hostton so we don't |
| 5644 | # treat the previous failure as a cached value and |
| 5645 | # suppress the next test. |
| 5646 | # |
| 5647 | unset ac_cv_have_decl_ether_hostton |
| 5648 | ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " |
| 5649 | #include <arpa/inet.h> |
| 5650 | |
| 5651 | " |
| 5652 | if test "x$ac_cv_have_decl_ether_hostton" = xyes; then : |
| 5653 | |
| 5654 | |
| 5655 | $as_echo "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h |
| 5656 | |
| 5657 | |
| 5658 | fi |
| 5659 | |
| 5660 | fi |
| 5661 | # |
| 5662 | # Did that succeed? |
| 5663 | # |
| 5664 | if test "$ac_cv_have_decl_ether_hostton" != yes; then |
| 5665 | # |
| 5666 | # No, how about <netinet/if_ether.h>? |
| 5667 | # On some platforms, it requires <net/if.h> and |
| 5668 | # <netinet/in.h>, and we always include it with |
| 5669 | # both of them, so test it with both of them. |
| 5670 | # |
| 5671 | # This test fails if we don't have <netinet/if_ether.h> |
| 5672 | # and the headers we include before it, or if we do but |
| 5673 | # <netinet/if_ether.h> doesn't declare ether_hostton(). |
| 5674 | # |
| 5675 | # Unset ac_cv_have_decl_ether_hostton so we don't |
| 5676 | # treat the previous failure as a cached value and |
| 5677 | # suppress the next test. |
| 5678 | # |
| 5679 | unset ac_cv_have_decl_ether_hostton |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5680 | ac_fn_c_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5681 | #include <sys/types.h> |
| 5682 | #include <sys/socket.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5683 | #include <net/if.h> |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5684 | #include <netinet/in.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5685 | #include <netinet/if_ether.h> |
| 5686 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5687 | " |
| 5688 | if test "x$ac_cv_have_decl_ether_hostton" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5689 | |
| 5690 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5691 | $as_echo "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5692 | |
| 5693 | |
| 5694 | fi |
| 5695 | |
| 5696 | fi |
| 5697 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5698 | # After all that, is ether_hostton() declared? |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5699 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5700 | if test "$ac_cv_have_decl_ether_hostton" = yes; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5701 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5702 | # Yes. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5703 | # |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5704 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5705 | $as_echo "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5706 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5707 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5708 | # |
| 5709 | # No, we'll have to declare it ourselves. |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5710 | # Do we have "struct ether_addr" if we include |
| 5711 | # <netinet/if_ether.h>? |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5712 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5713 | ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" " |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5714 | #include <sys/types.h> |
| 5715 | #include <sys/socket.h> |
| 5716 | #include <net/if.h> |
| 5717 | #include <netinet/in.h> |
| 5718 | #include <netinet/if_ether.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5719 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5720 | " |
| 5721 | if test "x$ac_cv_type_struct_ether_addr" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5722 | |
| 5723 | cat >>confdefs.h <<_ACEOF |
| 5724 | #define HAVE_STRUCT_ETHER_ADDR 1 |
| 5725 | _ACEOF |
| 5726 | |
| 5727 | |
| 5728 | fi |
| 5729 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5730 | fi |
| 5731 | fi |
| 5732 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5733 | # |
| 5734 | # For various things that might use pthreads. |
| 5735 | # |
| 5736 | ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" |
| 5737 | if test "x$ac_cv_header_pthread_h" = xyes; then : |
| 5738 | |
| 5739 | # |
| 5740 | # OK, we have pthread.h. Do we have pthread_create in the |
| 5741 | # system libraries? |
| 5742 | # |
| 5743 | ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" |
| 5744 | if test "x$ac_cv_func_pthread_create" = xyes; then : |
| 5745 | |
| 5746 | # |
| 5747 | # Yes. |
| 5748 | # |
| 5749 | ac_lbl_have_pthreads="found" |
| 5750 | |
| 5751 | else |
| 5752 | |
| 5753 | # |
| 5754 | # No - do we have it in -lpthreads? |
| 5755 | # |
| 5756 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 |
| 5757 | $as_echo_n "checking for pthread_create in -lpthreads... " >&6; } |
| 5758 | if ${ac_cv_lib_pthreads_pthread_create+:} false; then : |
| 5759 | $as_echo_n "(cached) " >&6 |
| 5760 | else |
| 5761 | ac_check_lib_save_LIBS=$LIBS |
| 5762 | LIBS="-lpthreads $LIBS" |
| 5763 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5764 | /* end confdefs.h. */ |
| 5765 | |
| 5766 | /* Override any GCC internal prototype to avoid an error. |
| 5767 | Use char because int might match the return type of a GCC |
| 5768 | builtin and then its argument prototype would still apply. */ |
| 5769 | #ifdef __cplusplus |
| 5770 | extern "C" |
| 5771 | #endif |
| 5772 | char pthread_create (); |
| 5773 | int |
| 5774 | main () |
| 5775 | { |
| 5776 | return pthread_create (); |
| 5777 | ; |
| 5778 | return 0; |
| 5779 | } |
| 5780 | _ACEOF |
| 5781 | if ac_fn_c_try_link "$LINENO"; then : |
| 5782 | ac_cv_lib_pthreads_pthread_create=yes |
| 5783 | else |
| 5784 | ac_cv_lib_pthreads_pthread_create=no |
| 5785 | fi |
| 5786 | rm -f core conftest.err conftest.$ac_objext \ |
| 5787 | conftest$ac_exeext conftest.$ac_ext |
| 5788 | LIBS=$ac_check_lib_save_LIBS |
| 5789 | fi |
| 5790 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 |
| 5791 | $as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; } |
| 5792 | if test "x$ac_cv_lib_pthreads_pthread_create" = xyes; then : |
| 5793 | |
| 5794 | # |
| 5795 | # Yes - add -lpthreads. |
| 5796 | # |
| 5797 | ac_lbl_have_pthreads="found" |
| 5798 | PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads" |
| 5799 | |
| 5800 | else |
| 5801 | |
| 5802 | # |
| 5803 | # No - do we have it in -lpthread? |
| 5804 | # |
| 5805 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 |
| 5806 | $as_echo_n "checking for pthread_create in -lpthread... " >&6; } |
| 5807 | if ${ac_cv_lib_pthread_pthread_create+:} false; then : |
| 5808 | $as_echo_n "(cached) " >&6 |
| 5809 | else |
| 5810 | ac_check_lib_save_LIBS=$LIBS |
| 5811 | LIBS="-lpthread $LIBS" |
| 5812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5813 | /* end confdefs.h. */ |
| 5814 | |
| 5815 | /* Override any GCC internal prototype to avoid an error. |
| 5816 | Use char because int might match the return type of a GCC |
| 5817 | builtin and then its argument prototype would still apply. */ |
| 5818 | #ifdef __cplusplus |
| 5819 | extern "C" |
| 5820 | #endif |
| 5821 | char pthread_create (); |
| 5822 | int |
| 5823 | main () |
| 5824 | { |
| 5825 | return pthread_create (); |
| 5826 | ; |
| 5827 | return 0; |
| 5828 | } |
| 5829 | _ACEOF |
| 5830 | if ac_fn_c_try_link "$LINENO"; then : |
| 5831 | ac_cv_lib_pthread_pthread_create=yes |
| 5832 | else |
| 5833 | ac_cv_lib_pthread_pthread_create=no |
| 5834 | fi |
| 5835 | rm -f core conftest.err conftest.$ac_objext \ |
| 5836 | conftest$ac_exeext conftest.$ac_ext |
| 5837 | LIBS=$ac_check_lib_save_LIBS |
| 5838 | fi |
| 5839 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 |
| 5840 | $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } |
| 5841 | if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : |
| 5842 | |
| 5843 | # |
| 5844 | # Yes - add -lpthread. |
| 5845 | # |
| 5846 | ac_lbl_have_pthreads="found" |
| 5847 | PTHREAD_LIBS="$PTHREAD_LIBS -lpthread" |
| 5848 | |
| 5849 | else |
| 5850 | |
| 5851 | # |
| 5852 | # No. |
| 5853 | # |
| 5854 | ac_lbl_have_pthreads="not found" |
| 5855 | |
| 5856 | fi |
| 5857 | |
| 5858 | |
| 5859 | fi |
| 5860 | |
| 5861 | |
| 5862 | fi |
| 5863 | |
| 5864 | |
| 5865 | else |
| 5866 | |
| 5867 | # |
| 5868 | # We didn't find pthread.h. |
| 5869 | # |
| 5870 | ac_lbl_have_pthreads="not found" |
| 5871 | |
| 5872 | |
| 5873 | fi |
| 5874 | |
| 5875 | |
| 5876 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5877 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5 |
| 5878 | $as_echo_n "checking if --disable-protochain option is specified... " >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5879 | # Check whether --enable-protochain was given. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5880 | if test "${enable_protochain+set}" = set; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5881 | enableval=$enable_protochain; |
| 5882 | fi |
| 5883 | |
| 5884 | case "x$enable_protochain" in |
| 5885 | xyes) enable_protochain=enabled ;; |
| 5886 | xno) enable_protochain=disabled ;; |
| 5887 | x) enable_protochain=enabled ;; |
| 5888 | esac |
| 5889 | |
| 5890 | if test "$enable_protochain" = "disabled"; then |
| 5891 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5892 | $as_echo "#define NO_PROTOCHAIN 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5893 | |
| 5894 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5895 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5 |
| 5896 | $as_echo "${enable_protochain}" >&6; } |
| 5897 | |
| 5898 | # |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 5899 | # valgrindtest directly uses the native capture mechanism, but |
| 5900 | # only tests with BPF and PF_PACKET sockets; only enable it if |
| 5901 | # we have BPF or PF_PACKET sockets. |
| 5902 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5903 | VALGRINDTEST_SRC= |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 5904 | |
| 5905 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5906 | # SITA support is mutually exclusive with native capture support; |
| 5907 | # "--with-sita" selects SITA support. |
| 5908 | # |
| 5909 | |
| 5910 | # Check whether --with-sita was given. |
| 5911 | if test "${with_sita+set}" = set; then : |
| 5912 | withval=$with_sita; |
| 5913 | if test ! "x$withval" = "xno" ; then |
| 5914 | |
| 5915 | $as_echo "#define SITA 1" >>confdefs.h |
| 5916 | |
| 5917 | { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling SITA ACN support" >&5 |
| 5918 | $as_echo "$as_me: Enabling SITA ACN support" >&6;} |
| 5919 | V_PCAP=sita |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5920 | fi |
| 5921 | |
| 5922 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5923 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5924 | |
| 5925 | # Check whether --with-pcap was given. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 5926 | if test "${with_pcap+set}" = set; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5927 | withval=$with_pcap; |
| 5928 | fi |
| 5929 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5930 | if test ! -z "$with_pcap" ; then |
| 5931 | V_PCAP="$withval" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5932 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5933 | # |
| 5934 | # Check for a bunch of headers for various packet |
| 5935 | # capture mechanisms. |
| 5936 | # |
| 5937 | for ac_header in net/bpf.h |
| 5938 | do : |
| 5939 | ac_fn_c_check_header_mongrel "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default" |
| 5940 | if test "x$ac_cv_header_net_bpf_h" = xyes; then : |
| 5941 | cat >>confdefs.h <<_ACEOF |
| 5942 | #define HAVE_NET_BPF_H 1 |
| 5943 | _ACEOF |
| 5944 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 5945 | fi |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 5946 | |
| 5947 | done |
| 5948 | |
| 5949 | if test "$ac_cv_header_net_bpf_h" = yes; then |
| 5950 | # |
| 5951 | # Does it define BIOCSETIF? |
| 5952 | # I.e., is it a header for an LBL/BSD-style capture |
| 5953 | # mechanism, or is it just a header for a BPF filter |
| 5954 | # engine? Some versions of Arch Linux, for example, |
| 5955 | # have a net/bpf.h that doesn't define BIOCSETIF; |
| 5956 | # as it's a Linux, it should use packet sockets, |
| 5957 | # instead. |
| 5958 | # |
| 5959 | # We need: |
| 5960 | # |
| 5961 | # sys/types.h, because FreeBSD 10's net/bpf.h |
| 5962 | # requires that various BSD-style integer types |
| 5963 | # be defined; |
| 5964 | # |
| 5965 | # sys/ioctl.h and, if we have it, sys/ioccom.h, |
| 5966 | # because net/bpf.h defines ioctls; |
| 5967 | # |
| 5968 | # net/if.h, because it defines some structures |
| 5969 | # used in ioctls defined by net/bpf.h; |
| 5970 | # |
| 5971 | # sys/socket.h, because OpenBSD 5.9's net/bpf.h |
| 5972 | # defines some structure fields as being |
| 5973 | # struct sockaddrs; |
| 5974 | # |
| 5975 | # and net/bpf.h doesn't necessarily include all |
| 5976 | # of those headers itself. |
| 5977 | # |
| 5978 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5 |
| 5979 | $as_echo_n "checking if net/bpf.h defines BIOCSETIF... " >&6; } |
| 5980 | if ${ac_cv_lbl_bpf_h_defines_biocsetif+:} false; then : |
| 5981 | $as_echo_n "(cached) " >&6 |
| 5982 | else |
| 5983 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5984 | /* end confdefs.h. */ |
| 5985 | |
| 5986 | #include <sys/types.h> |
| 5987 | #include <sys/ioctl.h> |
| 5988 | #include <sys/socket.h> |
| 5989 | #ifdef HAVE_SYS_IOCCOM_H |
| 5990 | #include <sys/ioccom.h> |
| 5991 | #endif |
| 5992 | #include <net/bpf.h> |
| 5993 | #include <net/if.h> |
| 5994 | |
| 5995 | int |
| 5996 | main () |
| 5997 | { |
| 5998 | u_int i = BIOCSETIF; |
| 5999 | ; |
| 6000 | return 0; |
| 6001 | } |
| 6002 | _ACEOF |
| 6003 | if ac_fn_c_try_compile "$LINENO"; then : |
| 6004 | ac_cv_lbl_bpf_h_defines_biocsetif=yes |
| 6005 | else |
| 6006 | ac_cv_lbl_bpf_h_defines_biocsetif=no |
| 6007 | fi |
| 6008 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 6009 | fi |
| 6010 | |
| 6011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5 |
| 6012 | $as_echo "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; } |
| 6013 | fi |
| 6014 | for ac_header in net/pfilt.h net/enet.h |
| 6015 | do : |
| 6016 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 6017 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 6018 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 6019 | cat >>confdefs.h <<_ACEOF |
| 6020 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 6021 | _ACEOF |
| 6022 | |
| 6023 | fi |
| 6024 | |
| 6025 | done |
| 6026 | |
| 6027 | for ac_header in net/nit.h sys/net/nit.h |
| 6028 | do : |
| 6029 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 6030 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 6031 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 6032 | cat >>confdefs.h <<_ACEOF |
| 6033 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 6034 | _ACEOF |
| 6035 | |
| 6036 | fi |
| 6037 | |
| 6038 | done |
| 6039 | |
| 6040 | for ac_header in linux/socket.h net/raw.h sys/dlpi.h |
| 6041 | do : |
| 6042 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 6043 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 6044 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 6045 | cat >>confdefs.h <<_ACEOF |
| 6046 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 6047 | _ACEOF |
| 6048 | |
| 6049 | fi |
| 6050 | |
| 6051 | done |
| 6052 | |
| 6053 | |
| 6054 | if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then |
| 6055 | # |
| 6056 | # BPF. |
| 6057 | # Check this before DLPI, so that we pick BPF on |
| 6058 | # Solaris 11 and later. |
| 6059 | # |
| 6060 | V_PCAP=bpf |
| 6061 | |
| 6062 | # |
| 6063 | # We have BPF, so build valgrindtest with "make test" |
| 6064 | # on macOS and FreeBSD (add your OS once there's a |
| 6065 | # valgrind for it). |
| 6066 | # |
| 6067 | case "$host_os" in |
| 6068 | |
| 6069 | freebsd*|darwin*|linux*) |
| 6070 | VALGRINDTEST_SRC=valgrindtest.c |
| 6071 | ;; |
| 6072 | esac |
| 6073 | elif test "$ac_cv_header_linux_socket_h" = yes; then |
| 6074 | # |
| 6075 | # No prizes for guessing this one. |
| 6076 | # |
| 6077 | V_PCAP=linux |
| 6078 | |
| 6079 | # |
| 6080 | # XXX - this won't work with older kernels that have |
| 6081 | # SOCK_PACKET sockets but not PF_PACKET sockets. |
| 6082 | # |
| 6083 | VALGRINDTEST_SRC=valgrindtest.c |
| 6084 | elif test "$ac_cv_header_net_pfilt_h" = yes; then |
| 6085 | # |
| 6086 | # DEC OSF/1, Digital UNIX, Tru64 UNIX |
| 6087 | # |
| 6088 | V_PCAP=pf |
| 6089 | elif test "$ac_cv_header_net_enet_h" = yes; then |
| 6090 | # |
| 6091 | # Stanford Enetfilter. |
| 6092 | # |
| 6093 | V_PCAP=enet |
| 6094 | elif test "$ac_cv_header_net_nit_h" = yes; then |
| 6095 | # |
| 6096 | # SunOS 4.x STREAMS NIT. |
| 6097 | # |
| 6098 | V_PCAP=snit |
| 6099 | elif test "$ac_cv_header_sys_net_nit_h" = yes; then |
| 6100 | # |
| 6101 | # Pre-SunOS 4.x non-STREAMS NIT. |
| 6102 | # |
| 6103 | V_PCAP=nit |
| 6104 | elif test "$ac_cv_header_net_raw_h" = yes; then |
| 6105 | # |
| 6106 | # IRIX snoop. |
| 6107 | # |
| 6108 | V_PCAP=snoop |
| 6109 | elif test "$ac_cv_header_sys_dlpi_h" = yes; then |
| 6110 | # |
| 6111 | # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others. |
| 6112 | # |
| 6113 | V_PCAP=dlpi |
| 6114 | else |
| 6115 | # |
| 6116 | # Nothing we support. |
| 6117 | # |
| 6118 | V_PCAP=null |
| 6119 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot determine packet capture interface" >&5 |
| 6120 | $as_echo "$as_me: WARNING: cannot determine packet capture interface" >&2;} |
| 6121 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: (see the INSTALL doc for more info)" >&5 |
| 6122 | $as_echo "$as_me: WARNING: (see the INSTALL doc for more info)" >&2;} |
| 6123 | fi |
| 6124 | fi |
| 6125 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5 |
| 6126 | $as_echo_n "checking packet capture type... " >&6; } |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5 |
| 6128 | $as_echo "$V_PCAP" >&6; } |
| 6129 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6130 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6131 | # |
| 6132 | # Do capture-mechanism-dependent tests. |
| 6133 | # |
| 6134 | case "$V_PCAP" in |
| 6135 | dlpi) |
| 6136 | # |
| 6137 | # Needed for common functions used by pcap-[dlpi,libdlpi].c |
| 6138 | # |
| 6139 | SSRC="dlpisubs.c" |
| 6140 | |
| 6141 | # |
| 6142 | # Checks for some header files. |
| 6143 | # |
| 6144 | for ac_header in sys/bufmod.h sys/dlpi_ext.h |
| 6145 | do : |
| 6146 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 6147 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 6148 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 6149 | cat >>confdefs.h <<_ACEOF |
| 6150 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 6151 | _ACEOF |
| 6152 | |
| 6153 | fi |
| 6154 | |
| 6155 | done |
| 6156 | |
| 6157 | |
| 6158 | # |
| 6159 | # Checks to see if Solaris has the public libdlpi(3LIB) library. |
| 6160 | # Note: The existence of /usr/include/libdlpi.h does not mean it is the |
| 6161 | # public libdlpi(3LIB) version. Before libdlpi was made public, a |
| 6162 | # private version also existed, which did not have the same APIs. |
| 6163 | # Due to a gcc bug, the default search path for 32-bit libraries does |
| 6164 | # not include /lib, we add it explicitly here. |
| 6165 | # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485]. |
| 6166 | # Also, due to the bug above applications that link to libpcap with |
| 6167 | # libdlpi will have to add "-L/lib" option to "configure". |
| 6168 | # |
| 6169 | saved_ldflags=$LDFLAGS |
| 6170 | LDFLAGS="$LIBS -L/lib" |
| 6171 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5 |
| 6172 | $as_echo_n "checking for dlpi_walk in -ldlpi... " >&6; } |
| 6173 | if ${ac_cv_lib_dlpi_dlpi_walk+:} false; then : |
| 6174 | $as_echo_n "(cached) " >&6 |
| 6175 | else |
| 6176 | ac_check_lib_save_LIBS=$LIBS |
| 6177 | LIBS="-ldlpi $LIBS" |
| 6178 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6179 | /* end confdefs.h. */ |
| 6180 | |
| 6181 | /* Override any GCC internal prototype to avoid an error. |
| 6182 | Use char because int might match the return type of a GCC |
| 6183 | builtin and then its argument prototype would still apply. */ |
| 6184 | #ifdef __cplusplus |
| 6185 | extern "C" |
| 6186 | #endif |
| 6187 | char dlpi_walk (); |
| 6188 | int |
| 6189 | main () |
| 6190 | { |
| 6191 | return dlpi_walk (); |
| 6192 | ; |
| 6193 | return 0; |
| 6194 | } |
| 6195 | _ACEOF |
| 6196 | if ac_fn_c_try_link "$LINENO"; then : |
| 6197 | ac_cv_lib_dlpi_dlpi_walk=yes |
| 6198 | else |
| 6199 | ac_cv_lib_dlpi_dlpi_walk=no |
| 6200 | fi |
| 6201 | rm -f core conftest.err conftest.$ac_objext \ |
| 6202 | conftest$ac_exeext conftest.$ac_ext |
| 6203 | LIBS=$ac_check_lib_save_LIBS |
| 6204 | fi |
| 6205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5 |
| 6206 | $as_echo "$ac_cv_lib_dlpi_dlpi_walk" >&6; } |
| 6207 | if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes; then : |
| 6208 | |
| 6209 | LIBS="-ldlpi $LIBS" |
| 6210 | V_PCAP=libdlpi |
| 6211 | |
| 6212 | $as_echo "#define HAVE_LIBDLPI 1" >>confdefs.h |
| 6213 | |
| 6214 | |
| 6215 | else |
| 6216 | V_PCAP=dlpi |
| 6217 | fi |
| 6218 | |
| 6219 | LDFLAGS=$saved_ldflags |
| 6220 | |
| 6221 | # |
| 6222 | # Checks whether <sys/dlpi.h> is usable, to catch weird SCO |
| 6223 | # versions of DLPI. |
| 6224 | # |
| 6225 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5 |
| 6226 | $as_echo_n "checking whether <sys/dlpi.h> is usable... " >&6; } |
| 6227 | if ${ac_cv_sys_dlpi_usable+:} false; then : |
| 6228 | $as_echo_n "(cached) " >&6 |
| 6229 | else |
| 6230 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6231 | /* end confdefs.h. */ |
| 6232 | |
| 6233 | #include <sys/types.h> |
| 6234 | #include <sys/time.h> |
| 6235 | #include <sys/dlpi.h> |
| 6236 | |
| 6237 | int |
| 6238 | main () |
| 6239 | { |
| 6240 | int i = DL_PROMISC_PHYS; |
| 6241 | ; |
| 6242 | return 0; |
| 6243 | } |
| 6244 | _ACEOF |
| 6245 | if ac_fn_c_try_compile "$LINENO"; then : |
| 6246 | ac_cv_sys_dlpi_usable=yes |
| 6247 | else |
| 6248 | ac_cv_sys_dlpi_usable=no |
| 6249 | fi |
| 6250 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 6251 | fi |
| 6252 | |
| 6253 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5 |
| 6254 | $as_echo "$ac_cv_sys_dlpi_usable" >&6; } |
| 6255 | if test $ac_cv_sys_dlpi_usable = no ; then |
| 6256 | as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5 |
| 6257 | fi |
| 6258 | |
| 6259 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6260 | # Check to see if Solaris has the dl_passive_req_t struct defined |
| 6261 | # in <sys/dlpi.h>. |
| 6262 | # This check is for DLPI support for passive modes. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6263 | # See dlpi(7P) for more details. |
| 6264 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6265 | ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" " |
| 6266 | #include <sys/types.h> |
| 6267 | #include <sys/dlpi.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6268 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6269 | " |
| 6270 | if test "x$ac_cv_type_dl_passive_req_t" = xyes; then : |
| 6271 | |
| 6272 | cat >>confdefs.h <<_ACEOF |
| 6273 | #define HAVE_DL_PASSIVE_REQ_T 1 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6274 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6275 | |
| 6276 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6277 | fi |
| 6278 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6279 | ;; |
| 6280 | |
| 6281 | linux) |
| 6282 | # |
| 6283 | # Do we have the wireless extensions? |
| 6284 | # |
| 6285 | for ac_header in linux/wireless.h |
| 6286 | do : |
| 6287 | ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" " |
| 6288 | #include <sys/socket.h> |
| 6289 | #include <linux/if.h> |
| 6290 | #include <linux/types.h> |
| 6291 | |
| 6292 | " |
| 6293 | if test "x$ac_cv_header_linux_wireless_h" = xyes; then : |
| 6294 | cat >>confdefs.h <<_ACEOF |
| 6295 | #define HAVE_LINUX_WIRELESS_H 1 |
| 6296 | _ACEOF |
| 6297 | |
| 6298 | fi |
| 6299 | |
| 6300 | done |
| 6301 | |
| 6302 | |
| 6303 | # |
| 6304 | # Do we have libnl? |
| 6305 | # |
| 6306 | |
| 6307 | # Check whether --with-libnl was given. |
| 6308 | if test "${with_libnl+set}" = set; then : |
| 6309 | withval=$with_libnl; with_libnl=$withval |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6310 | else |
| 6311 | with_libnl=if_available |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6312 | fi |
| 6313 | |
| 6314 | |
| 6315 | if test x$with_libnl != xno ; then |
| 6316 | have_any_nl="no" |
| 6317 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 6318 | incdir=-I/usr/include/libnl3 |
| 6319 | libnldir= |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6320 | case "$with_libnl" in |
| 6321 | |
| 6322 | yes|if_available) |
| 6323 | ;; |
| 6324 | |
| 6325 | *) |
| 6326 | if test -d $withval; then |
| 6327 | libnldir=-L${withval}/lib/.libs |
| 6328 | incdir=-I${withval}/include |
| 6329 | fi |
| 6330 | ;; |
| 6331 | esac |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 6332 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6333 | # |
| 6334 | # Try libnl 3.x first. |
| 6335 | # |
| 6336 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5 |
| 6337 | $as_echo_n "checking for nl_socket_alloc in -lnl-3... " >&6; } |
| 6338 | if ${ac_cv_lib_nl_3_nl_socket_alloc+:} false; then : |
| 6339 | $as_echo_n "(cached) " >&6 |
| 6340 | else |
| 6341 | ac_check_lib_save_LIBS=$LIBS |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 6342 | LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6343 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6344 | /* end confdefs.h. */ |
| 6345 | |
| 6346 | /* Override any GCC internal prototype to avoid an error. |
| 6347 | Use char because int might match the return type of a GCC |
| 6348 | builtin and then its argument prototype would still apply. */ |
| 6349 | #ifdef __cplusplus |
| 6350 | extern "C" |
| 6351 | #endif |
| 6352 | char nl_socket_alloc (); |
| 6353 | int |
| 6354 | main () |
| 6355 | { |
| 6356 | return nl_socket_alloc (); |
| 6357 | ; |
| 6358 | return 0; |
| 6359 | } |
| 6360 | _ACEOF |
| 6361 | if ac_fn_c_try_link "$LINENO"; then : |
| 6362 | ac_cv_lib_nl_3_nl_socket_alloc=yes |
| 6363 | else |
| 6364 | ac_cv_lib_nl_3_nl_socket_alloc=no |
| 6365 | fi |
| 6366 | rm -f core conftest.err conftest.$ac_objext \ |
| 6367 | conftest$ac_exeext conftest.$ac_ext |
| 6368 | LIBS=$ac_check_lib_save_LIBS |
| 6369 | fi |
| 6370 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5 |
| 6371 | $as_echo "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; } |
| 6372 | if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes; then : |
| 6373 | |
| 6374 | # |
| 6375 | # Yes, we have libnl 3.x. |
| 6376 | # |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 6377 | LIBS="${libnldir} -lnl-genl-3 -lnl-3 $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6378 | |
| 6379 | $as_echo "#define HAVE_LIBNL 1" >>confdefs.h |
| 6380 | |
| 6381 | |
| 6382 | $as_echo "#define HAVE_LIBNL_3_x 1" >>confdefs.h |
| 6383 | |
| 6384 | |
| 6385 | $as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h |
| 6386 | |
| 6387 | |
| 6388 | $as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h |
| 6389 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 6390 | V_INCLS="$V_INCLS ${incdir}" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6391 | have_any_nl="yes" |
| 6392 | |
| 6393 | fi |
| 6394 | |
| 6395 | |
| 6396 | if test x$have_any_nl = xno ; then |
| 6397 | # |
| 6398 | # Try libnl 2.x |
| 6399 | # |
| 6400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl" >&5 |
| 6401 | $as_echo_n "checking for nl_socket_alloc in -lnl... " >&6; } |
| 6402 | if ${ac_cv_lib_nl_nl_socket_alloc+:} false; then : |
| 6403 | $as_echo_n "(cached) " >&6 |
| 6404 | else |
| 6405 | ac_check_lib_save_LIBS=$LIBS |
| 6406 | LIBS="-lnl $LIBS" |
| 6407 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6408 | /* end confdefs.h. */ |
| 6409 | |
| 6410 | /* Override any GCC internal prototype to avoid an error. |
| 6411 | Use char because int might match the return type of a GCC |
| 6412 | builtin and then its argument prototype would still apply. */ |
| 6413 | #ifdef __cplusplus |
| 6414 | extern "C" |
| 6415 | #endif |
| 6416 | char nl_socket_alloc (); |
| 6417 | int |
| 6418 | main () |
| 6419 | { |
| 6420 | return nl_socket_alloc (); |
| 6421 | ; |
| 6422 | return 0; |
| 6423 | } |
| 6424 | _ACEOF |
| 6425 | if ac_fn_c_try_link "$LINENO"; then : |
| 6426 | ac_cv_lib_nl_nl_socket_alloc=yes |
| 6427 | else |
| 6428 | ac_cv_lib_nl_nl_socket_alloc=no |
| 6429 | fi |
| 6430 | rm -f core conftest.err conftest.$ac_objext \ |
| 6431 | conftest$ac_exeext conftest.$ac_ext |
| 6432 | LIBS=$ac_check_lib_save_LIBS |
| 6433 | fi |
| 6434 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_socket_alloc" >&5 |
| 6435 | $as_echo "$ac_cv_lib_nl_nl_socket_alloc" >&6; } |
| 6436 | if test "x$ac_cv_lib_nl_nl_socket_alloc" = xyes; then : |
| 6437 | |
| 6438 | # |
| 6439 | # Yes, we have libnl 2.x. |
| 6440 | # |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 6441 | LIBS="${libnldir} -lnl-genl -lnl $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6442 | |
| 6443 | $as_echo "#define HAVE_LIBNL 1" >>confdefs.h |
| 6444 | |
| 6445 | |
| 6446 | $as_echo "#define HAVE_LIBNL_2_x 1" >>confdefs.h |
| 6447 | |
| 6448 | |
| 6449 | $as_echo "#define HAVE_LIBNL_NLE 1" >>confdefs.h |
| 6450 | |
| 6451 | |
| 6452 | $as_echo "#define HAVE_LIBNL_SOCKETS 1" >>confdefs.h |
| 6453 | |
| 6454 | have_any_nl="yes" |
| 6455 | |
| 6456 | fi |
| 6457 | |
| 6458 | fi |
| 6459 | |
| 6460 | if test x$have_any_nl = xno ; then |
| 6461 | # |
| 6462 | # No, we don't; do we have libnl 1.x? |
| 6463 | # |
| 6464 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_handle_alloc in -lnl" >&5 |
| 6465 | $as_echo_n "checking for nl_handle_alloc in -lnl... " >&6; } |
| 6466 | if ${ac_cv_lib_nl_nl_handle_alloc+:} false; then : |
| 6467 | $as_echo_n "(cached) " >&6 |
| 6468 | else |
| 6469 | ac_check_lib_save_LIBS=$LIBS |
| 6470 | LIBS="-lnl $LIBS" |
| 6471 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6472 | /* end confdefs.h. */ |
| 6473 | |
| 6474 | /* Override any GCC internal prototype to avoid an error. |
| 6475 | Use char because int might match the return type of a GCC |
| 6476 | builtin and then its argument prototype would still apply. */ |
| 6477 | #ifdef __cplusplus |
| 6478 | extern "C" |
| 6479 | #endif |
| 6480 | char nl_handle_alloc (); |
| 6481 | int |
| 6482 | main () |
| 6483 | { |
| 6484 | return nl_handle_alloc (); |
| 6485 | ; |
| 6486 | return 0; |
| 6487 | } |
| 6488 | _ACEOF |
| 6489 | if ac_fn_c_try_link "$LINENO"; then : |
| 6490 | ac_cv_lib_nl_nl_handle_alloc=yes |
| 6491 | else |
| 6492 | ac_cv_lib_nl_nl_handle_alloc=no |
| 6493 | fi |
| 6494 | rm -f core conftest.err conftest.$ac_objext \ |
| 6495 | conftest$ac_exeext conftest.$ac_ext |
| 6496 | LIBS=$ac_check_lib_save_LIBS |
| 6497 | fi |
| 6498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_nl_handle_alloc" >&5 |
| 6499 | $as_echo "$ac_cv_lib_nl_nl_handle_alloc" >&6; } |
| 6500 | if test "x$ac_cv_lib_nl_nl_handle_alloc" = xyes; then : |
| 6501 | |
| 6502 | # |
| 6503 | # Yes. |
| 6504 | # |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 6505 | LIBS="${libnldir} -lnl $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6506 | |
| 6507 | $as_echo "#define HAVE_LIBNL 1" >>confdefs.h |
| 6508 | |
| 6509 | have_any_nl="yes" |
| 6510 | |
| 6511 | fi |
| 6512 | |
| 6513 | fi |
| 6514 | |
| 6515 | if test x$have_any_nl = xno ; then |
| 6516 | # |
| 6517 | # No, we don't have libnl at all. |
| 6518 | # |
| 6519 | if test x$with_libnl = xyes ; then |
| 6520 | as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5 |
| 6521 | fi |
| 6522 | fi |
| 6523 | fi |
| 6524 | |
| 6525 | for ac_header in linux/ethtool.h |
| 6526 | do : |
| 6527 | ac_fn_c_check_header_compile "$LINENO" "linux/ethtool.h" "ac_cv_header_linux_ethtool_h" " |
| 6528 | $ac_includes_default |
| 6529 | #include <linux/types.h> |
| 6530 | |
| 6531 | " |
| 6532 | if test "x$ac_cv_header_linux_ethtool_h" = xyes; then : |
| 6533 | cat >>confdefs.h <<_ACEOF |
| 6534 | #define HAVE_LINUX_ETHTOOL_H 1 |
| 6535 | _ACEOF |
| 6536 | |
| 6537 | fi |
| 6538 | |
| 6539 | done |
| 6540 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6541 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6542 | # |
| 6543 | # Check to see if struct tpacket_stats is defined in |
| 6544 | # <linux/if_packet.h>. If so, then pcap-linux.c can use this |
| 6545 | # to report proper statistics. |
| 6546 | # |
| 6547 | # -Scott Barron |
| 6548 | # |
| 6549 | ac_fn_c_check_type "$LINENO" "struct tpacket_stats" "ac_cv_type_struct_tpacket_stats" " |
| 6550 | #include <linux/if_packet.h> |
| 6551 | |
| 6552 | " |
| 6553 | if test "x$ac_cv_type_struct_tpacket_stats" = xyes; then : |
| 6554 | |
| 6555 | cat >>confdefs.h <<_ACEOF |
| 6556 | #define HAVE_STRUCT_TPACKET_STATS 1 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6557 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6558 | |
| 6559 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6560 | fi |
| 6561 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6562 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6563 | # |
| 6564 | # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member. |
| 6565 | # |
| 6566 | # NOTE: any failure means we conclude that it doesn't have that |
| 6567 | # member, so if we don't have tpacket_auxdata, we conclude it |
| 6568 | # doesn't have that member (which is OK, as either we won't be |
| 6569 | # using code that would use that member, or we wouldn't compile |
| 6570 | # in any case). |
| 6571 | ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" " |
| 6572 | #include <sys/types.h> |
| 6573 | #include <linux/if_packet.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6574 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6575 | " |
| 6576 | if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6577 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6578 | cat >>confdefs.h <<_ACEOF |
| 6579 | #define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6580 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6581 | |
| 6582 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6583 | fi |
| 6584 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6585 | ;; |
| 6586 | |
| 6587 | bpf) |
| 6588 | # |
| 6589 | # Check whether we have the *BSD-style ioctls. |
| 6590 | # |
| 6591 | for ac_header in net/if_media.h |
| 6592 | do : |
| 6593 | ac_fn_c_check_header_mongrel "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default" |
| 6594 | if test "x$ac_cv_header_net_if_media_h" = xyes; then : |
| 6595 | cat >>confdefs.h <<_ACEOF |
| 6596 | #define HAVE_NET_IF_MEDIA_H 1 |
| 6597 | _ACEOF |
| 6598 | |
| 6599 | fi |
| 6600 | |
| 6601 | done |
| 6602 | |
| 6603 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6604 | # |
| 6605 | # Check whether we have struct BPF_TIMEVAL. |
| 6606 | # |
| 6607 | ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" " |
| 6608 | #include <sys/types.h> |
| 6609 | #include <sys/ioctl.h> |
| 6610 | #ifdef HAVE_SYS_IOCCOM_H |
| 6611 | #include <sys/ioccom.h> |
| 6612 | #endif |
| 6613 | #include <net/bpf.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6614 | |
| 6615 | " |
| 6616 | if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes; then : |
| 6617 | |
| 6618 | cat >>confdefs.h <<_ACEOF |
| 6619 | #define HAVE_STRUCT_BPF_TIMEVAL 1 |
| 6620 | _ACEOF |
| 6621 | |
| 6622 | |
| 6623 | fi |
| 6624 | |
| 6625 | ;; |
| 6626 | |
| 6627 | dag) |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6628 | # |
| 6629 | # --with-pcap=dag is the only way to get here, and it means |
| 6630 | # "DAG support but nothing else" |
| 6631 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6632 | V_DEFS="$V_DEFS -DDAG_ONLY" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6633 | xxx_only=yes |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6634 | ;; |
| 6635 | |
| 6636 | septel) |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6637 | # |
| 6638 | # --with-pcap=septel is the only way to get here, and it means |
| 6639 | # "Septel support but nothing else" |
| 6640 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6641 | V_DEFS="$V_DEFS -DSEPTEL_ONLY" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6642 | xxx_only=yes |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6643 | ;; |
| 6644 | |
| 6645 | snf) |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6646 | # |
| 6647 | # --with-pcap=snf is the only way to get here, and it means |
| 6648 | # "SNF support but nothing else" |
| 6649 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6650 | V_DEFS="$V_DEFS -DSNF_ONLY" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6651 | xxx_only=yes |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6652 | ;; |
| 6653 | |
| 6654 | null) |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6655 | ;; |
| 6656 | |
| 6657 | *) |
| 6658 | as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6659 | ;; |
| 6660 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6661 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6662 | if test "$V_PCAP" != null |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6663 | then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6664 | ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" |
| 6665 | if test "x$ac_cv_func_getifaddrs" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6666 | |
| 6667 | # |
| 6668 | # We have "getifaddrs()"; make sure we have <ifaddrs.h> |
| 6669 | # as well, just in case some platform is really weird. |
| 6670 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6671 | ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" |
| 6672 | if test "x$ac_cv_header_ifaddrs_h" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6673 | |
| 6674 | # |
| 6675 | # We have the header, so we use "getifaddrs()" to |
| 6676 | # get the list of interfaces. |
| 6677 | # |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6678 | V_FINDALLDEVS=fad-getad.c |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6679 | |
| 6680 | else |
| 6681 | |
| 6682 | # |
| 6683 | # We don't have the header - give up. |
| 6684 | # XXX - we could also fall back on some other |
| 6685 | # mechanism, but, for now, this'll catch this |
| 6686 | # problem so that we can at least try to figure |
| 6687 | # out something to do on systems with "getifaddrs()" |
| 6688 | # but without "ifaddrs.h", if there is something |
| 6689 | # we can do on those systems. |
| 6690 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6691 | as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6692 | |
| 6693 | fi |
| 6694 | |
| 6695 | |
| 6696 | |
| 6697 | else |
| 6698 | |
| 6699 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6700 | # Well, we don't have "getifaddrs()", at least not with the |
| 6701 | # libraries with which we've decided we need to link |
| 6702 | # libpcap with, so we have to use some other mechanism. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6703 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6704 | # Note that this may happen on Solaris, which has |
| 6705 | # getifaddrs(), but in -lsocket, not in -lxnet, so we |
| 6706 | # won't find it if we link with -lxnet, which we want |
| 6707 | # to do for other reasons. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6708 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6709 | # For now, we use either the SIOCGIFCONF ioctl or the |
| 6710 | # SIOCGLIFCONF ioctl, preferring the latter if we have |
| 6711 | # it; the latter is a Solarisism that first appeared |
| 6712 | # in Solaris 8. (Solaris's getifaddrs() appears to |
| 6713 | # be built atop SIOCGLIFCONF; using it directly |
| 6714 | # avoids a not-all-that-useful middleman.) |
| 6715 | # |
| 6716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6717 | $as_echo_n "checking whether we have SIOCGLIFCONF... " >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6718 | if ${ac_cv_lbl_have_siocglifconf+:} false; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6719 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6720 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6722 | /* end confdefs.h. */ |
| 6723 | #include <sys/param.h> |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6724 | #include <sys/file.h> |
| 6725 | #include <sys/ioctl.h> |
| 6726 | #include <sys/socket.h> |
| 6727 | #include <sys/sockio.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6728 | int |
| 6729 | main () |
| 6730 | { |
| 6731 | ioctl(0, SIOCGLIFCONF, (char *)0); |
| 6732 | ; |
| 6733 | return 0; |
| 6734 | } |
| 6735 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6736 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6737 | ac_cv_lbl_have_siocglifconf=yes |
| 6738 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6739 | ac_cv_lbl_have_siocglifconf=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6740 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6741 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 6742 | fi |
| 6743 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6745 | $as_echo "$ac_cv_lbl_have_siocglifconf" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6746 | if test $ac_cv_lbl_have_siocglifconf = yes ; then |
| 6747 | V_FINDALLDEVS=fad-glifc.c |
| 6748 | else |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6749 | V_FINDALLDEVS=fad-gifc.c |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6750 | fi |
| 6751 | |
| 6752 | fi |
| 6753 | |
| 6754 | fi |
| 6755 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6756 | fi |
| 6757 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6758 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6759 | case "$host_os" in |
| 6760 | linux*) |
| 6761 | for ac_header in linux/net_tstamp.h |
| 6762 | do : |
| 6763 | ac_fn_c_check_header_mongrel "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default" |
| 6764 | if test "x$ac_cv_header_linux_net_tstamp_h" = xyes; then : |
| 6765 | cat >>confdefs.h <<_ACEOF |
| 6766 | #define HAVE_LINUX_NET_TSTAMP_H 1 |
| 6767 | _ACEOF |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6768 | |
| 6769 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6770 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6771 | done |
| 6772 | |
| 6773 | ;; |
| 6774 | *) |
| 6775 | { $as_echo "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5 |
| 6776 | $as_echo "$as_me: no hardware timestamp support implemented for $host_os" >&6;} |
| 6777 | ;; |
| 6778 | esac |
| 6779 | |
| 6780 | # Check whether --enable-packet-ring was given. |
| 6781 | if test "${enable_packet_ring+set}" = set; then : |
| 6782 | enableval=$enable_packet_ring; |
| 6783 | else |
| 6784 | enable_packet_ring=yes |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6785 | fi |
| 6786 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6787 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6788 | if test "x$enable_packet_ring" != "xno" ; then |
| 6789 | |
| 6790 | $as_echo "#define PCAP_SUPPORT_PACKET_RING 1" >>confdefs.h |
| 6791 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6792 | |
| 6793 | fi |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6794 | |
| 6795 | # |
| 6796 | # Check for socklen_t. |
| 6797 | # |
| 6798 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " |
| 6799 | #include <sys/types.h> |
| 6800 | #include <sys/socket.h> |
| 6801 | |
| 6802 | " |
| 6803 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
| 6804 | |
| 6805 | cat >>confdefs.h <<_ACEOF |
| 6806 | #define HAVE_SOCKLEN_T 1 |
| 6807 | _ACEOF |
| 6808 | |
| 6809 | |
| 6810 | fi |
| 6811 | |
| 6812 | |
| 6813 | # Check whether --enable-ipv6 was given. |
| 6814 | if test "${enable_ipv6+set}" = set; then : |
| 6815 | enableval=$enable_ipv6; |
| 6816 | else |
| 6817 | enable_ipv6=yes |
| 6818 | fi |
| 6819 | |
| 6820 | if test "$enable_ipv6" != "no"; then |
| 6821 | # |
| 6822 | # We've already made sure we have getaddrinfo above in |
| 6823 | # AC_LBL_LIBRARY_NET. |
| 6824 | # |
| 6825 | |
| 6826 | $as_echo "#define INET6 1" >>confdefs.h |
| 6827 | |
| 6828 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6829 | |
| 6830 | # Check for Endace DAG card support. |
| 6831 | |
| 6832 | # Check whether --with-dag was given. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6833 | if test "${with_dag+set}" = set; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6834 | withval=$with_dag; |
| 6835 | if test "$withval" = no |
| 6836 | then |
| 6837 | # User doesn't want DAG support. |
| 6838 | want_dag=no |
| 6839 | elif test "$withval" = yes |
| 6840 | then |
| 6841 | # User wants DAG support but hasn't specified a directory. |
| 6842 | want_dag=yes |
| 6843 | else |
| 6844 | # User wants DAG support and has specified a directory, so use the provided value. |
| 6845 | want_dag=yes |
| 6846 | dag_root=$withval |
| 6847 | fi |
| 6848 | |
| 6849 | else |
| 6850 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6851 | if test "$V_PCAP" = dag; then |
| 6852 | # User requested DAG-only libpcap, so we'd better have |
| 6853 | # the DAG API. |
| 6854 | want_dag=yes |
| 6855 | elif test "xxx_only" = yes; then |
| 6856 | # User requested something-else-only pcap, so they don't |
| 6857 | # want DAG support. |
| 6858 | want_dag=no |
| 6859 | else |
| 6860 | # |
| 6861 | # Use DAG API if present, otherwise don't |
| 6862 | # |
| 6863 | want_dag=ifpresent |
| 6864 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6865 | |
| 6866 | fi |
| 6867 | |
| 6868 | |
| 6869 | |
| 6870 | # Check whether --with-dag-includes was given. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6871 | if test "${with_dag_includes+set}" = set; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6872 | withval=$with_dag_includes; |
| 6873 | # User wants DAG support and has specified a header directory, so use the provided value. |
| 6874 | want_dag=yes |
| 6875 | dag_include_dir=$withval |
| 6876 | |
| 6877 | fi |
| 6878 | |
| 6879 | |
| 6880 | |
| 6881 | # Check whether --with-dag-libraries was given. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6882 | if test "${with_dag_libraries+set}" = set; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6883 | withval=$with_dag_libraries; |
| 6884 | # User wants DAG support and has specified a library directory, so use the provided value. |
| 6885 | want_dag=yes |
| 6886 | dag_lib_dir=$withval |
| 6887 | |
| 6888 | fi |
| 6889 | |
| 6890 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6891 | if test "$want_dag" != no; then |
| 6892 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6893 | # If necessary, set default paths for DAG API headers and libraries. |
| 6894 | if test -z "$dag_root"; then |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6895 | dag_root=/usr/local |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6896 | fi |
| 6897 | |
| 6898 | if test -z "$dag_include_dir"; then |
| 6899 | dag_include_dir="$dag_root/include" |
| 6900 | fi |
| 6901 | |
| 6902 | if test -z "$dag_lib_dir"; then |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6903 | dag_lib_dir="$dag_root/lib" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6904 | fi |
| 6905 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6906 | V_INCLS="$V_INCLS -I$dag_include_dir" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6907 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6908 | for ac_header in dagapi.h |
| 6909 | do : |
| 6910 | ac_fn_c_check_header_mongrel "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default" |
| 6911 | if test "x$ac_cv_header_dagapi_h" = xyes; then : |
| 6912 | cat >>confdefs.h <<_ACEOF |
| 6913 | #define HAVE_DAGAPI_H 1 |
| 6914 | _ACEOF |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6915 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6916 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6917 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6918 | done |
| 6919 | |
| 6920 | |
| 6921 | if test "$ac_cv_header_dagapi_h" = yes; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6922 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6923 | if test $V_PCAP != dag ; then |
| 6924 | SSRC="$SSRC pcap-dag.c" |
| 6925 | fi |
| 6926 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6927 | # Check for various DAG API functions. |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 6928 | # Don't need to save and restore LIBS to prevent -ldag being |
| 6929 | # included if there's a found-action (arg 3). |
| 6930 | saved_ldflags=$LDFLAGS |
| 6931 | LDFLAGS="-L$dag_lib_dir" |
| 6932 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6933 | $as_echo_n "checking for dag_attach_stream in -ldag... " >&6; } |
| 6934 | if ${ac_cv_lib_dag_dag_attach_stream+:} false; then : |
| 6935 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6936 | else |
| 6937 | ac_check_lib_save_LIBS=$LIBS |
| 6938 | LIBS="-ldag $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6939 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6940 | /* end confdefs.h. */ |
| 6941 | |
| 6942 | /* Override any GCC internal prototype to avoid an error. |
| 6943 | Use char because int might match the return type of a GCC |
| 6944 | builtin and then its argument prototype would still apply. */ |
| 6945 | #ifdef __cplusplus |
| 6946 | extern "C" |
| 6947 | #endif |
| 6948 | char dag_attach_stream (); |
| 6949 | int |
| 6950 | main () |
| 6951 | { |
| 6952 | return dag_attach_stream (); |
| 6953 | ; |
| 6954 | return 0; |
| 6955 | } |
| 6956 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6957 | if ac_fn_c_try_link "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6958 | ac_cv_lib_dag_dag_attach_stream=yes |
| 6959 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6960 | ac_cv_lib_dag_dag_attach_stream=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6961 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6962 | rm -f core conftest.err conftest.$ac_objext \ |
| 6963 | conftest$ac_exeext conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6964 | LIBS=$ac_check_lib_save_LIBS |
| 6965 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 6966 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5 |
| 6967 | $as_echo "$ac_cv_lib_dag_dag_attach_stream" >&6; } |
| 6968 | if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes; then : |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6969 | cat >>confdefs.h <<_ACEOF |
| 6970 | #define HAVE_LIBDAG 1 |
| 6971 | _ACEOF |
| 6972 | |
| 6973 | LIBS="-ldag $LIBS" |
| 6974 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 6975 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 6976 | as_fn_error $? "DAG library lacks streams support" "$LINENO" 5 |
| 6977 | fi |
| 6978 | |
| 6979 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5 |
| 6980 | $as_echo_n "checking for dag_attach_stream64 in -ldag... " >&6; } |
| 6981 | if ${ac_cv_lib_dag_dag_attach_stream64+:} false; then : |
| 6982 | $as_echo_n "(cached) " >&6 |
| 6983 | else |
| 6984 | ac_check_lib_save_LIBS=$LIBS |
| 6985 | LIBS="-ldag $LIBS" |
| 6986 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6987 | /* end confdefs.h. */ |
| 6988 | |
| 6989 | /* Override any GCC internal prototype to avoid an error. |
| 6990 | Use char because int might match the return type of a GCC |
| 6991 | builtin and then its argument prototype would still apply. */ |
| 6992 | #ifdef __cplusplus |
| 6993 | extern "C" |
| 6994 | #endif |
| 6995 | char dag_attach_stream64 (); |
| 6996 | int |
| 6997 | main () |
| 6998 | { |
| 6999 | return dag_attach_stream64 (); |
| 7000 | ; |
| 7001 | return 0; |
| 7002 | } |
| 7003 | _ACEOF |
| 7004 | if ac_fn_c_try_link "$LINENO"; then : |
| 7005 | ac_cv_lib_dag_dag_attach_stream64=yes |
| 7006 | else |
| 7007 | ac_cv_lib_dag_dag_attach_stream64=no |
| 7008 | fi |
| 7009 | rm -f core conftest.err conftest.$ac_objext \ |
| 7010 | conftest$ac_exeext conftest.$ac_ext |
| 7011 | LIBS=$ac_check_lib_save_LIBS |
| 7012 | fi |
| 7013 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5 |
| 7014 | $as_echo "$ac_cv_lib_dag_dag_attach_stream64" >&6; } |
| 7015 | if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes; then : |
| 7016 | dag_large_streams="1" |
| 7017 | else |
| 7018 | dag_large_streams="0" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7019 | fi |
| 7020 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7021 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7022 | $as_echo_n "checking for dag_get_erf_types in -ldag... " >&6; } |
| 7023 | if ${ac_cv_lib_dag_dag_get_erf_types+:} false; then : |
| 7024 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7025 | else |
| 7026 | ac_check_lib_save_LIBS=$LIBS |
| 7027 | LIBS="-ldag $LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7029 | /* end confdefs.h. */ |
| 7030 | |
| 7031 | /* Override any GCC internal prototype to avoid an error. |
| 7032 | Use char because int might match the return type of a GCC |
| 7033 | builtin and then its argument prototype would still apply. */ |
| 7034 | #ifdef __cplusplus |
| 7035 | extern "C" |
| 7036 | #endif |
| 7037 | char dag_get_erf_types (); |
| 7038 | int |
| 7039 | main () |
| 7040 | { |
| 7041 | return dag_get_erf_types (); |
| 7042 | ; |
| 7043 | return 0; |
| 7044 | } |
| 7045 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7046 | if ac_fn_c_try_link "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7047 | ac_cv_lib_dag_dag_get_erf_types=yes |
| 7048 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7049 | ac_cv_lib_dag_dag_get_erf_types=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7050 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7051 | rm -f core conftest.err conftest.$ac_objext \ |
| 7052 | conftest$ac_exeext conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7053 | LIBS=$ac_check_lib_save_LIBS |
| 7054 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7055 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5 |
| 7056 | $as_echo "$ac_cv_lib_dag_dag_get_erf_types" >&6; } |
| 7057 | if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7058 | |
| 7059 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7060 | $as_echo "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7061 | |
| 7062 | fi |
| 7063 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7065 | $as_echo_n "checking for dag_get_stream_erf_types in -ldag... " >&6; } |
| 7066 | if ${ac_cv_lib_dag_dag_get_stream_erf_types+:} false; then : |
| 7067 | $as_echo_n "(cached) " >&6 |
| 7068 | else |
| 7069 | ac_check_lib_save_LIBS=$LIBS |
| 7070 | LIBS="-ldag $LIBS" |
| 7071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7072 | /* end confdefs.h. */ |
| 7073 | |
| 7074 | /* Override any GCC internal prototype to avoid an error. |
| 7075 | Use char because int might match the return type of a GCC |
| 7076 | builtin and then its argument prototype would still apply. */ |
| 7077 | #ifdef __cplusplus |
| 7078 | extern "C" |
| 7079 | #endif |
| 7080 | char dag_get_stream_erf_types (); |
| 7081 | int |
| 7082 | main () |
| 7083 | { |
| 7084 | return dag_get_stream_erf_types (); |
| 7085 | ; |
| 7086 | return 0; |
| 7087 | } |
| 7088 | _ACEOF |
| 7089 | if ac_fn_c_try_link "$LINENO"; then : |
| 7090 | ac_cv_lib_dag_dag_get_stream_erf_types=yes |
| 7091 | else |
| 7092 | ac_cv_lib_dag_dag_get_stream_erf_types=no |
| 7093 | fi |
| 7094 | rm -f core conftest.err conftest.$ac_objext \ |
| 7095 | conftest$ac_exeext conftest.$ac_ext |
| 7096 | LIBS=$ac_check_lib_save_LIBS |
| 7097 | fi |
| 7098 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5 |
| 7099 | $as_echo "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; } |
| 7100 | if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes; then : |
| 7101 | |
| 7102 | |
| 7103 | $as_echo "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h |
| 7104 | |
| 7105 | fi |
| 7106 | |
| 7107 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7108 | LDFLAGS=$saved_ldflags |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7109 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7110 | # |
| 7111 | # We assume that if we have libdag we have libdagconf, |
| 7112 | # as they're installed at the same time from the same |
| 7113 | # package. |
| 7114 | # |
| 7115 | LIBS="$LIBS -ldag -ldagconf" |
| 7116 | LDFLAGS="$LDFLAGS -L$dag_lib_dir" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7117 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7118 | if test "$dag_large_streams" = 1; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7119 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7120 | $as_echo "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7121 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7122 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7123 | $as_echo_n "checking for vdag_set_device_info in -lvdag... " >&6; } |
| 7124 | if ${ac_cv_lib_vdag_vdag_set_device_info+:} false; then : |
| 7125 | $as_echo_n "(cached) " >&6 |
| 7126 | else |
| 7127 | ac_check_lib_save_LIBS=$LIBS |
| 7128 | LIBS="-lvdag $LIBS" |
| 7129 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7130 | /* end confdefs.h. */ |
| 7131 | |
| 7132 | /* Override any GCC internal prototype to avoid an error. |
| 7133 | Use char because int might match the return type of a GCC |
| 7134 | builtin and then its argument prototype would still apply. */ |
| 7135 | #ifdef __cplusplus |
| 7136 | extern "C" |
| 7137 | #endif |
| 7138 | char vdag_set_device_info (); |
| 7139 | int |
| 7140 | main () |
| 7141 | { |
| 7142 | return vdag_set_device_info (); |
| 7143 | ; |
| 7144 | return 0; |
| 7145 | } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7146 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7147 | if ac_fn_c_try_link "$LINENO"; then : |
| 7148 | ac_cv_lib_vdag_vdag_set_device_info=yes |
| 7149 | else |
| 7150 | ac_cv_lib_vdag_vdag_set_device_info=no |
| 7151 | fi |
| 7152 | rm -f core conftest.err conftest.$ac_objext \ |
| 7153 | conftest$ac_exeext conftest.$ac_ext |
| 7154 | LIBS=$ac_check_lib_save_LIBS |
| 7155 | fi |
| 7156 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5 |
| 7157 | $as_echo "$ac_cv_lib_vdag_vdag_set_device_info" >&6; } |
| 7158 | if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes; then : |
| 7159 | ac_dag_have_vdag="1" |
| 7160 | else |
| 7161 | ac_dag_have_vdag="0" |
| 7162 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7163 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7164 | if test "$ac_dag_have_vdag" = 1; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7165 | |
| 7166 | $as_echo "#define HAVE_DAG_VDAG 1" >>confdefs.h |
| 7167 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7168 | if test "$ac_lbl_have_pthreads" != "found"; then |
| 7169 | as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5 |
| 7170 | fi |
| 7171 | LIBS="$LIBS $PTHREAD_LIBS" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7172 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7173 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7174 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7175 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7176 | $as_echo "#define HAVE_DAG_API 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7177 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7178 | else |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7179 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7180 | if test "$V_PCAP" = dag; then |
| 7181 | # User requested "dag" capture type but we couldn't |
| 7182 | # find the DAG API support. |
| 7183 | as_fn_error $? "DAG support requested with --with-pcap=dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5 |
| 7184 | fi |
| 7185 | |
| 7186 | if test "$want_dag" = yes; then |
| 7187 | # User wanted DAG support but we couldn't find it. |
| 7188 | as_fn_error $? "DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5 |
| 7189 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7190 | fi |
| 7191 | fi |
| 7192 | |
| 7193 | |
| 7194 | # Check whether --with-septel was given. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7195 | if test "${with_septel+set}" = set; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7196 | withval=$with_septel; |
| 7197 | if test "$withval" = no |
| 7198 | then |
| 7199 | want_septel=no |
| 7200 | elif test "$withval" = yes |
| 7201 | then |
| 7202 | want_septel=yes |
| 7203 | septel_root= |
| 7204 | else |
| 7205 | want_septel=yes |
| 7206 | septel_root=$withval |
| 7207 | fi |
| 7208 | |
| 7209 | else |
| 7210 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7211 | if test "$V_PCAP" = septel; then |
| 7212 | # User requested Septel-only libpcap, so we'd better have |
| 7213 | # the Septel API. |
| 7214 | want_septel=yes |
| 7215 | elif test "xxx_only" = yes; then |
| 7216 | # User requested something-else-only pcap, so they don't |
| 7217 | # want Septel support. |
| 7218 | want_septel=no |
| 7219 | else |
| 7220 | # |
| 7221 | # Use Septel API if present, otherwise don't |
| 7222 | # |
| 7223 | want_septel=ifpresent |
| 7224 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7225 | |
| 7226 | fi |
| 7227 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7228 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7229 | ac_cv_lbl_septel_api=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7230 | if test "$with_septel" != no; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7231 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5 |
| 7233 | $as_echo_n "checking whether we have Septel API headers... " >&6; } |
| 7234 | |
| 7235 | # If necessary, set default paths for Septel API headers and libraries. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7236 | if test -z "$septel_root"; then |
| 7237 | septel_root=$srcdir/../septel |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7238 | fi |
| 7239 | |
| 7240 | septel_tools_dir="$septel_root" |
| 7241 | septel_include_dir="$septel_root/INC" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7242 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7243 | if test -r "$septel_include_dir/msg.h"; then |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7244 | ac_cv_lbl_septel_api=yes |
| 7245 | fi |
| 7246 | |
| 7247 | if test "$ac_cv_lbl_septel_api" = yes; then |
| 7248 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5 |
| 7249 | $as_echo "yes ($septel_include_dir)" >&6; } |
| 7250 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7251 | V_INCLS="$V_INCLS -I$septel_include_dir" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7252 | ADDLOBJS="$ADDLOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o" |
| 7253 | ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7254 | |
| 7255 | if test "$V_PCAP" != septel ; then |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7256 | SSRC="$SSRC pcap-septel.c" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7257 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7258 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7259 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7260 | $as_echo "#define HAVE_SEPTEL_API 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7261 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7262 | else |
| 7263 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7264 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7265 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7266 | if test "$V_PCAP" = septel; then |
| 7267 | # User requested "septel" capture type but |
| 7268 | # we couldn't find the Septel API support. |
| 7269 | as_fn_error $? "Septel support requested with --with-pcap=septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5 |
| 7270 | fi |
| 7271 | |
| 7272 | if test "$want_septel" = yes; then |
| 7273 | # User wanted Septel support but we couldn't find it. |
| 7274 | as_fn_error $? "Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5 |
| 7275 | fi |
| 7276 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7277 | fi |
| 7278 | |
| 7279 | # Check for Myricom SNF support. |
| 7280 | |
| 7281 | # Check whether --with-snf was given. |
| 7282 | if test "${with_snf+set}" = set; then : |
| 7283 | withval=$with_snf; |
| 7284 | if test "$withval" = no |
| 7285 | then |
| 7286 | # User explicitly doesn't want SNF |
| 7287 | want_snf=no |
| 7288 | elif test "$withval" = yes |
| 7289 | then |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7290 | # User wants SNF support but hasn't specified a directory. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7291 | want_snf=yes |
| 7292 | else |
| 7293 | # User wants SNF support with a specified directory. |
| 7294 | want_snf=yes |
| 7295 | snf_root=$withval |
| 7296 | fi |
| 7297 | |
| 7298 | else |
| 7299 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7300 | if test "$V_PCAP" = snf; then |
| 7301 | # User requested Sniffer-only libpcap, so we'd better have |
| 7302 | # the Sniffer API. |
| 7303 | want_snf=yes |
| 7304 | elif test "xxx_only" = yes; then |
| 7305 | # User requested something-else-only pcap, so they don't |
| 7306 | # want SNF support. |
| 7307 | want_snf=no |
| 7308 | else |
| 7309 | # |
| 7310 | # Use Sniffer API if present, otherwise don't |
| 7311 | # |
| 7312 | want_snf=ifpresent |
| 7313 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7314 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7315 | fi |
| 7316 | |
| 7317 | |
| 7318 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7319 | # Check whether --with-snf-includes was given. |
| 7320 | if test "${with_snf_includes+set}" = set; then : |
| 7321 | withval=$with_snf_includes; |
| 7322 | # User wants SNF with specific header directory |
| 7323 | want_snf=yes |
| 7324 | snf_include_dir=$withval |
| 7325 | |
| 7326 | fi |
| 7327 | |
| 7328 | |
| 7329 | |
| 7330 | # Check whether --with-snf-libraries was given. |
| 7331 | if test "${with_snf_libraries+set}" = set; then : |
| 7332 | withval=$with_snf_libraries; |
| 7333 | # User wants SNF with specific lib directory |
| 7334 | want_snf=yes |
| 7335 | snf_lib_dir=$withval |
| 7336 | |
| 7337 | fi |
| 7338 | |
| 7339 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7340 | ac_cv_lbl_snf_api=no |
| 7341 | if test "$with_snf" != no; then |
| 7342 | |
| 7343 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5 |
| 7344 | $as_echo_n "checking whether we have Myricom Sniffer API... " >&6; } |
| 7345 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7346 | # If necessary, set default paths for Sniffer headers and libraries. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7347 | if test -z "$snf_root"; then |
| 7348 | snf_root=/opt/snf |
| 7349 | fi |
| 7350 | |
| 7351 | if test -z "$snf_include_dir"; then |
| 7352 | snf_include_dir="$snf_root/include" |
| 7353 | fi |
| 7354 | |
| 7355 | if test -z "$snf_lib_dir"; then |
| 7356 | snf_lib_dir="$snf_root/lib" |
| 7357 | fi |
| 7358 | |
| 7359 | if test -f "$snf_include_dir/snf.h"; then |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7360 | # We found a header; make sure we can link with the library |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7361 | saved_ldflags=$LDFLAGS |
| 7362 | LDFLAGS="$LDFLAGS -L$snf_lib_dir" |
| 7363 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5 |
| 7364 | $as_echo_n "checking for snf_init in -lsnf... " >&6; } |
| 7365 | if ${ac_cv_lib_snf_snf_init+:} false; then : |
| 7366 | $as_echo_n "(cached) " >&6 |
| 7367 | else |
| 7368 | ac_check_lib_save_LIBS=$LIBS |
| 7369 | LIBS="-lsnf $LIBS" |
| 7370 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7371 | /* end confdefs.h. */ |
| 7372 | |
| 7373 | /* Override any GCC internal prototype to avoid an error. |
| 7374 | Use char because int might match the return type of a GCC |
| 7375 | builtin and then its argument prototype would still apply. */ |
| 7376 | #ifdef __cplusplus |
| 7377 | extern "C" |
| 7378 | #endif |
| 7379 | char snf_init (); |
| 7380 | int |
| 7381 | main () |
| 7382 | { |
| 7383 | return snf_init (); |
| 7384 | ; |
| 7385 | return 0; |
| 7386 | } |
| 7387 | _ACEOF |
| 7388 | if ac_fn_c_try_link "$LINENO"; then : |
| 7389 | ac_cv_lib_snf_snf_init=yes |
| 7390 | else |
| 7391 | ac_cv_lib_snf_snf_init=no |
| 7392 | fi |
| 7393 | rm -f core conftest.err conftest.$ac_objext \ |
| 7394 | conftest$ac_exeext conftest.$ac_ext |
| 7395 | LIBS=$ac_check_lib_save_LIBS |
| 7396 | fi |
| 7397 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5 |
| 7398 | $as_echo "$ac_cv_lib_snf_snf_init" >&6; } |
| 7399 | if test "x$ac_cv_lib_snf_snf_init" = xyes; then : |
| 7400 | ac_cv_lbl_snf_api="yes" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7401 | fi |
| 7402 | |
| 7403 | LDFLAGS="$saved_ldflags" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7404 | if test "$ac_cv_lbl_snf_api" = no; then |
| 7405 | as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5 |
| 7406 | fi |
| 7407 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7408 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7409 | if test "$ac_cv_lbl_snf_api" = yes; then |
| 7410 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5 |
| 7411 | $as_echo "yes ($snf_root)" >&6; } |
| 7412 | |
| 7413 | V_INCLS="$V_INCLS -I$snf_include_dir" |
| 7414 | LIBS="$LIBS -lsnf" |
| 7415 | LDFLAGS="$LDFLAGS -L$snf_lib_dir" |
| 7416 | |
| 7417 | if test "$V_PCAP" != snf ; then |
| 7418 | SSRC="$SSRC pcap-snf.c" |
| 7419 | fi |
| 7420 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7421 | |
| 7422 | $as_echo "#define HAVE_SNF_API 1" >>confdefs.h |
| 7423 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7424 | else |
| 7425 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7426 | $as_echo "no" >&6; } |
| 7427 | |
| 7428 | if test "$want_snf" = yes; then |
| 7429 | # User requested "snf" capture type but |
| 7430 | # we couldn't find the Sniffer API support. |
| 7431 | as_fn_error $? "Myricom Sniffer support requested with --with-pcap=snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5 |
| 7432 | fi |
| 7433 | |
| 7434 | if test "$want_snf" = yes; then |
| 7435 | as_fn_error $? "Myricom Sniffer support requested with --with-snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7436 | fi |
| 7437 | fi |
| 7438 | fi |
| 7439 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7440 | # Check for Riverbed TurboCap support. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7441 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7442 | # Check whether --with-turbocap was given. |
| 7443 | if test "${with_turbocap+set}" = set; then : |
| 7444 | withval=$with_turbocap; |
| 7445 | if test "$withval" = no |
| 7446 | then |
| 7447 | # User explicitly doesn't want TurboCap |
| 7448 | want_turbocap=no |
| 7449 | elif test "$withval" = yes |
| 7450 | then |
| 7451 | # User wants TurboCap support but hasn't specified a directory. |
| 7452 | want_turbocap=yes |
| 7453 | else |
| 7454 | # User wants TurboCap support with a specified directory. |
| 7455 | want_turbocap=yes |
| 7456 | turbocap_root=$withval |
| 7457 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7458 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7459 | else |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7460 | |
| 7461 | if test "xxx_only" = yes; then |
| 7462 | # User requested something-else-only pcap, so they don't |
| 7463 | # want TurboCap support. |
| 7464 | want_turbocap=no |
| 7465 | else |
| 7466 | # |
| 7467 | # Use TurboCap API if present, otherwise don't |
| 7468 | # |
| 7469 | want_turbocap=ifpresent |
| 7470 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7471 | |
| 7472 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7473 | |
| 7474 | |
| 7475 | ac_cv_lbl_turbocap_api=no |
| 7476 | if test "$want_turbocap" != no; then |
| 7477 | |
| 7478 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5 |
| 7479 | $as_echo_n "checking whether TurboCap is supported... " >&6; } |
| 7480 | |
| 7481 | save_CFLAGS="$CFLAGS" |
| 7482 | save_LIBS="$LIBS" |
| 7483 | if test ! -z "$turbocap_root"; then |
| 7484 | TURBOCAP_CFLAGS="-I$turbocap_root/include" |
| 7485 | TURBOCAP_LIBS="-L$turbocap_root/lib" |
| 7486 | CFLAGS="$CFLAGS $TURBOCAP_CFLAGS" |
| 7487 | fi |
| 7488 | |
| 7489 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7490 | /* end confdefs.h. */ |
| 7491 | |
| 7492 | #include <TcApi.h> |
| 7493 | |
| 7494 | int |
| 7495 | main () |
| 7496 | { |
| 7497 | |
| 7498 | TC_INSTANCE a; TC_PORT b; TC_BOARD c; |
| 7499 | TC_INSTANCE i; |
| 7500 | (void)TcInstanceCreateByName("foo", &i); |
| 7501 | |
| 7502 | ; |
| 7503 | return 0; |
| 7504 | } |
| 7505 | _ACEOF |
| 7506 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7507 | ac_cv_lbl_turbocap_api=yes |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7508 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7509 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7510 | |
| 7511 | CFLAGS="$save_CFLAGS" |
| 7512 | if test $ac_cv_lbl_turbocap_api = yes; then |
| 7513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 7514 | $as_echo "yes" >&6; } |
| 7515 | |
| 7516 | SSRC="$SSRC pcap-tc.c" |
| 7517 | V_INCLS="$V_INCLS $TURBOCAP_CFLAGS" |
| 7518 | LIBS="$LIBS $TURBOCAP_LIBS -lTcApi -lpthread -lstdc++" |
| 7519 | |
| 7520 | |
| 7521 | $as_echo "#define HAVE_TC_API 1" >>confdefs.h |
| 7522 | |
| 7523 | else |
| 7524 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7525 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7526 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7527 | if test "$want_turbocap" = yes; then |
| 7528 | # User wanted Turbo support but we couldn't find it. |
| 7529 | as_fn_error $? "TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7530 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7531 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7532 | fi |
| 7533 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7534 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5 |
| 7535 | $as_echo_n "checking whether to enable remote packet capture... " >&6; } |
| 7536 | # Check whether --enable-remote was given. |
| 7537 | if test "${enable_remote+set}" = set; then : |
| 7538 | enableval=$enable_remote; |
| 7539 | else |
| 7540 | enableval=no |
| 7541 | fi |
| 7542 | |
| 7543 | case "$enableval" in |
| 7544 | yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 7545 | $as_echo "yes" >&6; } |
| 7546 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5 |
| 7547 | $as_echo "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;} |
| 7548 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5 |
| 7549 | $as_echo "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;} |
| 7550 | # |
| 7551 | # rpcapd requires pthreads on UN*X. |
| 7552 | # |
| 7553 | if test "$ac_lbl_have_pthreads" != "found"; then |
| 7554 | as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5 |
| 7555 | fi |
| 7556 | # |
| 7557 | # It also requires crypt(). |
| 7558 | # Do we have it in the system libraries? |
| 7559 | # |
| 7560 | ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" |
| 7561 | if test "x$ac_cv_func_crypt" = xyes; then : |
| 7562 | |
| 7563 | else |
| 7564 | |
| 7565 | # |
| 7566 | # No. Do we have it in -lcrypt? |
| 7567 | # |
| 7568 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 |
| 7569 | $as_echo_n "checking for crypt in -lcrypt... " >&6; } |
| 7570 | if ${ac_cv_lib_crypt_crypt+:} false; then : |
| 7571 | $as_echo_n "(cached) " >&6 |
| 7572 | else |
| 7573 | ac_check_lib_save_LIBS=$LIBS |
| 7574 | LIBS="-lcrypt $LIBS" |
| 7575 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7576 | /* end confdefs.h. */ |
| 7577 | |
| 7578 | /* Override any GCC internal prototype to avoid an error. |
| 7579 | Use char because int might match the return type of a GCC |
| 7580 | builtin and then its argument prototype would still apply. */ |
| 7581 | #ifdef __cplusplus |
| 7582 | extern "C" |
| 7583 | #endif |
| 7584 | char crypt (); |
| 7585 | int |
| 7586 | main () |
| 7587 | { |
| 7588 | return crypt (); |
| 7589 | ; |
| 7590 | return 0; |
| 7591 | } |
| 7592 | _ACEOF |
| 7593 | if ac_fn_c_try_link "$LINENO"; then : |
| 7594 | ac_cv_lib_crypt_crypt=yes |
| 7595 | else |
| 7596 | ac_cv_lib_crypt_crypt=no |
| 7597 | fi |
| 7598 | rm -f core conftest.err conftest.$ac_objext \ |
| 7599 | conftest$ac_exeext conftest.$ac_ext |
| 7600 | LIBS=$ac_check_lib_save_LIBS |
| 7601 | fi |
| 7602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 |
| 7603 | $as_echo "$ac_cv_lib_crypt_crypt" >&6; } |
| 7604 | if test "x$ac_cv_lib_crypt_crypt" = xyes; then : |
| 7605 | |
| 7606 | # |
| 7607 | # Yes; add -lcrypt to the libraries for rpcapd. |
| 7608 | # |
| 7609 | RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt" |
| 7610 | |
| 7611 | else |
| 7612 | |
| 7613 | as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5 |
| 7614 | |
| 7615 | fi |
| 7616 | |
| 7617 | |
| 7618 | fi |
| 7619 | |
| 7620 | |
| 7621 | # |
| 7622 | # OK, we have crypt(). Do we have getspnam()? |
| 7623 | # |
| 7624 | for ac_func in getspnam |
| 7625 | do : |
| 7626 | ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam" |
| 7627 | if test "x$ac_cv_func_getspnam" = xyes; then : |
| 7628 | cat >>confdefs.h <<_ACEOF |
| 7629 | #define HAVE_GETSPNAM 1 |
| 7630 | _ACEOF |
| 7631 | |
| 7632 | fi |
| 7633 | done |
| 7634 | |
| 7635 | |
| 7636 | # |
| 7637 | # Check for various members of struct msghdr. |
| 7638 | # |
| 7639 | ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " |
| 7640 | #include \"ftmacros.h\" |
| 7641 | #include <sys/socket.h> |
| 7642 | |
| 7643 | " |
| 7644 | if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes; then : |
| 7645 | |
| 7646 | cat >>confdefs.h <<_ACEOF |
| 7647 | #define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1 |
| 7648 | _ACEOF |
| 7649 | |
| 7650 | |
| 7651 | fi |
| 7652 | |
| 7653 | ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" " |
| 7654 | #include \"ftmacros.h\" |
| 7655 | #include <sys/socket.h> |
| 7656 | |
| 7657 | " |
| 7658 | if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes; then : |
| 7659 | |
| 7660 | cat >>confdefs.h <<_ACEOF |
| 7661 | #define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1 |
| 7662 | _ACEOF |
| 7663 | |
| 7664 | |
| 7665 | fi |
| 7666 | |
| 7667 | |
| 7668 | |
| 7669 | $as_echo "#define ENABLE_REMOTE /**/" >>confdefs.h |
| 7670 | |
| 7671 | SSRC="$SSRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c" |
| 7672 | BUILD_RPCAPD=build-rpcapd |
| 7673 | INSTALL_RPCAPD=install-rpcapd |
| 7674 | ;; |
| 7675 | *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7676 | $as_echo "no" >&6; } |
| 7677 | ;; |
| 7678 | esac |
| 7679 | |
| 7680 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5 |
| 7681 | $as_echo_n "checking whether to build optimizer debugging code... " >&6; } |
| 7682 | # Check whether --enable-optimizer-dbg was given. |
| 7683 | if test "${enable_optimizer_dbg+set}" = set; then : |
| 7684 | enableval=$enable_optimizer_dbg; |
| 7685 | fi |
| 7686 | |
| 7687 | if test "$enable_optimizer_dbg" = "yes"; then |
| 7688 | |
| 7689 | $as_echo "#define BDEBUG 1" >>confdefs.h |
| 7690 | |
| 7691 | fi |
| 7692 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5 |
| 7693 | $as_echo "${enable_optimizer_dbg-no}" >&6; } |
| 7694 | |
| 7695 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5 |
| 7696 | $as_echo_n "checking whether to build parser debugging code... " >&6; } |
| 7697 | # Check whether --enable-yydebug was given. |
| 7698 | if test "${enable_yydebug+set}" = set; then : |
| 7699 | enableval=$enable_yydebug; |
| 7700 | fi |
| 7701 | |
| 7702 | if test "$enable_yydebug" = "yes"; then |
| 7703 | |
| 7704 | $as_echo "#define YYDEBUG 1" >>confdefs.h |
| 7705 | |
| 7706 | fi |
| 7707 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5 |
| 7708 | $as_echo "${enable_yydebug-no}" >&6; } |
| 7709 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7710 | # |
| 7711 | # Look for {f}lex. |
| 7712 | # |
| 7713 | for ac_prog in flex lex |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7714 | do |
| 7715 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 7716 | set dummy $ac_prog; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7718 | $as_echo_n "checking for $ac_word... " >&6; } |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7719 | if ${ac_cv_prog_LEX+:} false; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7720 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7721 | else |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7722 | if test -n "$LEX"; then |
| 7723 | ac_cv_prog_LEX="$LEX" # Let the user override the test. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7724 | else |
| 7725 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7726 | for as_dir in $PATH |
| 7727 | do |
| 7728 | IFS=$as_save_IFS |
| 7729 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7730 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7731 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7732 | ac_cv_prog_LEX="$ac_prog" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7733 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7734 | break 2 |
| 7735 | fi |
| 7736 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7737 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7738 | IFS=$as_save_IFS |
| 7739 | |
| 7740 | fi |
| 7741 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7742 | LEX=$ac_cv_prog_LEX |
| 7743 | if test -n "$LEX"; then |
| 7744 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 |
| 7745 | $as_echo "$LEX" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7746 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7747 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7748 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7749 | fi |
| 7750 | |
| 7751 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7752 | test -n "$LEX" && break |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7753 | done |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7754 | test -n "$LEX" || LEX=":" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7755 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7756 | if test "x$LEX" != "x:"; then |
| 7757 | cat >conftest.l <<_ACEOF |
| 7758 | %% |
| 7759 | a { ECHO; } |
| 7760 | b { REJECT; } |
| 7761 | c { yymore (); } |
| 7762 | d { yyless (1); } |
| 7763 | e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ |
| 7764 | yyless ((input () != 0)); } |
| 7765 | f { unput (yytext[0]); } |
| 7766 | . { BEGIN INITIAL; } |
| 7767 | %% |
| 7768 | #ifdef YYTEXT_POINTER |
| 7769 | extern char *yytext; |
| 7770 | #endif |
| 7771 | int |
| 7772 | main (void) |
| 7773 | { |
| 7774 | return ! yylex () + ! yywrap (); |
| 7775 | } |
| 7776 | _ACEOF |
| 7777 | { { ac_try="$LEX conftest.l" |
| 7778 | case "(($ac_try" in |
| 7779 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 7780 | *) ac_try_echo=$ac_try;; |
| 7781 | esac |
| 7782 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 7783 | $as_echo "$ac_try_echo"; } >&5 |
| 7784 | (eval "$LEX conftest.l") 2>&5 |
| 7785 | ac_status=$? |
| 7786 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 7787 | test $ac_status = 0; } |
| 7788 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 |
| 7789 | $as_echo_n "checking lex output file root... " >&6; } |
| 7790 | if ${ac_cv_prog_lex_root+:} false; then : |
| 7791 | $as_echo_n "(cached) " >&6 |
| 7792 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7793 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7794 | if test -f lex.yy.c; then |
| 7795 | ac_cv_prog_lex_root=lex.yy |
| 7796 | elif test -f lexyy.c; then |
| 7797 | ac_cv_prog_lex_root=lexyy |
| 7798 | else |
| 7799 | as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 |
| 7800 | fi |
| 7801 | fi |
| 7802 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 |
| 7803 | $as_echo "$ac_cv_prog_lex_root" >&6; } |
| 7804 | LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7805 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7806 | if test -z "${LEXLIB+set}"; then |
| 7807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 |
| 7808 | $as_echo_n "checking lex library... " >&6; } |
| 7809 | if ${ac_cv_lib_lex+:} false; then : |
| 7810 | $as_echo_n "(cached) " >&6 |
| 7811 | else |
| 7812 | |
| 7813 | ac_save_LIBS=$LIBS |
| 7814 | ac_cv_lib_lex='none needed' |
| 7815 | for ac_lib in '' -lfl -ll; do |
| 7816 | LIBS="$ac_lib $ac_save_LIBS" |
| 7817 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7818 | /* end confdefs.h. */ |
| 7819 | `cat $LEX_OUTPUT_ROOT.c` |
| 7820 | _ACEOF |
| 7821 | if ac_fn_c_try_link "$LINENO"; then : |
| 7822 | ac_cv_lib_lex=$ac_lib |
| 7823 | fi |
| 7824 | rm -f core conftest.err conftest.$ac_objext \ |
| 7825 | conftest$ac_exeext conftest.$ac_ext |
| 7826 | test "$ac_cv_lib_lex" != 'none needed' && break |
| 7827 | done |
| 7828 | LIBS=$ac_save_LIBS |
| 7829 | |
| 7830 | fi |
| 7831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 |
| 7832 | $as_echo "$ac_cv_lib_lex" >&6; } |
| 7833 | test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex |
| 7834 | fi |
| 7835 | |
| 7836 | |
| 7837 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 |
| 7838 | $as_echo_n "checking whether yytext is a pointer... " >&6; } |
| 7839 | if ${ac_cv_prog_lex_yytext_pointer+:} false; then : |
| 7840 | $as_echo_n "(cached) " >&6 |
| 7841 | else |
| 7842 | # POSIX says lex can declare yytext either as a pointer or an array; the |
| 7843 | # default is implementation-dependent. Figure out which it is, since |
| 7844 | # not all implementations provide the %pointer and %array declarations. |
| 7845 | ac_cv_prog_lex_yytext_pointer=no |
| 7846 | ac_save_LIBS=$LIBS |
| 7847 | LIBS="$LEXLIB $ac_save_LIBS" |
| 7848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7849 | /* end confdefs.h. */ |
| 7850 | |
| 7851 | #define YYTEXT_POINTER 1 |
| 7852 | `cat $LEX_OUTPUT_ROOT.c` |
| 7853 | _ACEOF |
| 7854 | if ac_fn_c_try_link "$LINENO"; then : |
| 7855 | ac_cv_prog_lex_yytext_pointer=yes |
| 7856 | fi |
| 7857 | rm -f core conftest.err conftest.$ac_objext \ |
| 7858 | conftest$ac_exeext conftest.$ac_ext |
| 7859 | LIBS=$ac_save_LIBS |
| 7860 | |
| 7861 | fi |
| 7862 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 |
| 7863 | $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } |
| 7864 | if test $ac_cv_prog_lex_yytext_pointer = yes; then |
| 7865 | |
| 7866 | $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h |
| 7867 | |
| 7868 | fi |
| 7869 | rm -f conftest.l $LEX_OUTPUT_ROOT.c |
| 7870 | |
| 7871 | fi |
| 7872 | if test "$LEX" = ":"; then |
| 7873 | as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5 |
| 7874 | fi |
| 7875 | |
| 7876 | # |
| 7877 | # Make sure {f}lex supports the -P, --header-file, and --nounput flags |
| 7878 | # and supports processing our scanner.l. |
| 7879 | # |
| 7880 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7881 | $as_echo_n "checking for capable lex... " >&6; } |
| 7882 | if ${tcpdump_cv_capable_lex+:} false; then : |
| 7883 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7884 | else |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7885 | if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then |
| 7886 | tcpdump_cv_capable_lex=yes |
| 7887 | else |
| 7888 | tcpdump_cv_capable_lex=insufficient |
| 7889 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7890 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7891 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5 |
| 7892 | $as_echo "$tcpdump_cv_capable_lex" >&6; } |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7893 | if test $tcpdump_cv_capable_lex = insufficient ; then |
| 7894 | as_fn_error $? "$LEX is insufficient to compile libpcap. |
| 7895 | libpcap requires Flex 2.5.31 or later, or a compatible version of lex." "$LINENO" 5 |
| 7896 | fi |
| 7897 | |
| 7898 | # |
| 7899 | # Look for yacc/bison/byacc. |
| 7900 | # |
| 7901 | for ac_prog in 'bison -y' byacc |
| 7902 | do |
| 7903 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 7904 | set dummy $ac_prog; ac_word=$2 |
| 7905 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7906 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7907 | if ${ac_cv_prog_YACC+:} false; then : |
| 7908 | $as_echo_n "(cached) " >&6 |
| 7909 | else |
| 7910 | if test -n "$YACC"; then |
| 7911 | ac_cv_prog_YACC="$YACC" # Let the user override the test. |
| 7912 | else |
| 7913 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7914 | for as_dir in $PATH |
| 7915 | do |
| 7916 | IFS=$as_save_IFS |
| 7917 | test -z "$as_dir" && as_dir=. |
| 7918 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7919 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7920 | ac_cv_prog_YACC="$ac_prog" |
| 7921 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7922 | break 2 |
| 7923 | fi |
| 7924 | done |
| 7925 | done |
| 7926 | IFS=$as_save_IFS |
| 7927 | |
| 7928 | fi |
| 7929 | fi |
| 7930 | YACC=$ac_cv_prog_YACC |
| 7931 | if test -n "$YACC"; then |
| 7932 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
| 7933 | $as_echo "$YACC" >&6; } |
| 7934 | else |
| 7935 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7936 | $as_echo "no" >&6; } |
| 7937 | fi |
| 7938 | |
| 7939 | |
| 7940 | test -n "$YACC" && break |
| 7941 | done |
| 7942 | test -n "$YACC" || YACC="yacc" |
| 7943 | |
| 7944 | |
| 7945 | # |
| 7946 | # Make sure it supports the -p flag and supports processing our |
| 7947 | # grammar.y. |
| 7948 | # |
| 7949 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for capable yacc/bison" >&5 |
| 7950 | $as_echo_n "checking for capable yacc/bison... " >&6; } |
| 7951 | if ${tcpdump_cv_capable_yacc+:} false; then : |
| 7952 | $as_echo_n "(cached) " >&6 |
| 7953 | else |
| 7954 | if $YACC -p pcap_ -o /dev/null $srcdir/grammar.y >/dev/null 2>&1; then |
| 7955 | tcpdump_cv_capable_yacc=yes |
| 7956 | else |
| 7957 | tcpdump_cv_capable_yacc=insufficient |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7958 | fi |
| 7959 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7960 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5 |
| 7961 | $as_echo "$tcpdump_cv_capable_yacc" >&6; } |
| 7962 | if test $tcpdump_cv_capable_yacc = insufficient ; then |
| 7963 | as_fn_error $? "$YACC is insufficient to compile libpcap. |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7964 | libpcap requires Bison, a newer version of Berkeley YACC with support |
| 7965 | for reentrant parsers, or another YACC compatible with them." "$LINENO" 5 |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 7966 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7967 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7968 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7969 | # Do various checks for various OSes and versions of those OSes. |
| 7970 | # |
| 7971 | # Assume, by default, no support for shared libraries and V7/BSD |
| 7972 | # convention for man pages (file formats in section 5, miscellaneous |
| 7973 | # info in section 7, administrative commands and daemons in section 8). |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7974 | # Individual cases can override this. |
| 7975 | # |
| 7976 | DYEXT="none" |
| 7977 | MAN_FILE_FORMATS=5 |
| 7978 | MAN_MISC_INFO=7 |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 7979 | MAN_ADMIN_COMMANDS=8 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7980 | case "$host_os" in |
| 7981 | |
| 7982 | aix*) |
| 7983 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7984 | $as_echo "#define _SUN 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 7985 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 7986 | |
| 7987 | # |
| 7988 | # AIX makes it fun to build shared and static libraries, |
| 7989 | # because they're *both* ".a" archive libraries. We |
| 7990 | # build the static library for the benefit of the traditional |
| 7991 | # scheme of building libpcap and tcpdump in subdirectories of |
| 7992 | # the same directory, with tcpdump statically linked with the |
| 7993 | # libpcap in question, but we also build a shared library as |
| 7994 | # "libpcap.shareda" and install *it*, rather than the static |
| 7995 | # library, as "libpcap.a". |
| 7996 | # |
| 7997 | DYEXT="shareda" |
| 7998 | |
| 7999 | case "$V_PCAP" in |
| 8000 | |
| 8001 | dlpi) |
| 8002 | # |
| 8003 | # If we're using DLPI, applications will need to |
| 8004 | # use /lib/pse.exp if present, as we use the |
| 8005 | # STREAMS routines. |
| 8006 | # |
| 8007 | pseexe="/lib/pse.exp" |
| 8008 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5 |
| 8009 | $as_echo_n "checking for $pseexe... " >&6; } |
| 8010 | if test -f $pseexe ; then |
| 8011 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8012 | $as_echo "yes" >&6; } |
| 8013 | LIBS="-I:$pseexe" |
| 8014 | fi |
| 8015 | ;; |
| 8016 | |
| 8017 | bpf) |
| 8018 | # |
| 8019 | # If we're using BPF, we need "-lodm" and "-lcfg", as |
| 8020 | # we use them to load the BPF module. |
| 8021 | # |
| 8022 | LIBS="-lodm -lcfg" |
| 8023 | ;; |
| 8024 | esac |
| 8025 | ;; |
| 8026 | |
| 8027 | darwin*) |
| 8028 | DYEXT="dylib" |
| 8029 | V_CCOPT="$V_CCOPT -fno-common" |
| 8030 | # Check whether --enable-universal was given. |
| 8031 | if test "${enable_universal+set}" = set; then : |
| 8032 | enableval=$enable_universal; |
| 8033 | fi |
| 8034 | |
| 8035 | if test "$enable_universal" != "no"; then |
| 8036 | case "$host_os" in |
| 8037 | |
| 8038 | darwin0-7.*) |
| 8039 | # |
| 8040 | # Pre-Tiger. Build only for 32-bit PowerPC; no |
| 8041 | # need for any special compiler or linker flags. |
| 8042 | # |
| 8043 | ;; |
| 8044 | |
| 8045 | darwin8.0123*) |
| 8046 | # |
| 8047 | # Tiger, prior to Intel support. Build for 32-bit |
| 8048 | # PowerPC and 64-bit PowerPC, with 32-bit PowerPC |
| 8049 | # first. (I'm guessing that's what Apple does.) |
| 8050 | # |
| 8051 | V_CCOPT="$V_CCOPT -arch ppc -arch ppc64" |
| 8052 | LDFLAGS="$LDFLAGS -arch ppc -arch ppc64" |
| 8053 | ;; |
| 8054 | |
| 8055 | darwin8.456*) |
| 8056 | # |
| 8057 | # Tiger, subsequent to Intel support but prior to |
| 8058 | # x86-64 support. Build for 32-bit PowerPC, 64-bit |
| 8059 | # PowerPC, and x86, with 32-bit PowerPC first. |
| 8060 | # (I'm guessing that's what Apple does.) |
| 8061 | # |
| 8062 | V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386" |
| 8063 | LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386" |
| 8064 | ;; |
| 8065 | |
| 8066 | darwin8.*) |
| 8067 | # |
| 8068 | # All other Tiger, so subsequent to x86-64 |
| 8069 | # support. Build for 32-bit PowerPC, 64-bit |
| 8070 | # PowerPC, x86, and x86-64, and with 32-bit PowerPC |
| 8071 | # first. (I'm guessing that's what Apple does.) |
| 8072 | # |
| 8073 | V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64" |
| 8074 | LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64" |
| 8075 | ;; |
| 8076 | |
| 8077 | darwin9.*) |
| 8078 | # |
| 8079 | # Leopard. Build for 32-bit PowerPC, 64-bit |
| 8080 | # PowerPC, x86, and x86-64, with 32-bit PowerPC |
| 8081 | # first. (That's what Apple does.) |
| 8082 | # |
| 8083 | V_CCOPT="$V_CCOPT -arch ppc -arch ppc64 -arch i386 -arch x86_64" |
| 8084 | LDFLAGS="$LDFLAGS -arch ppc -arch ppc64 -arch i386 -arch x86_64" |
| 8085 | ;; |
| 8086 | |
| 8087 | darwin10.*) |
| 8088 | # |
| 8089 | # Snow Leopard. Build for x86-64, x86, and |
| 8090 | # 32-bit PowerPC, with x86-64 first. (That's |
| 8091 | # what Apple does, even though Snow Leopard |
| 8092 | # doesn't run on PPC, so PPC libpcap runs under |
| 8093 | # Rosetta, and Rosetta doesn't support BPF |
| 8094 | # ioctls, so PPC programs can't do live |
| 8095 | # captures.) |
| 8096 | # |
| 8097 | V_CCOPT="$V_CCOPT -arch x86_64 -arch i386 -arch ppc" |
| 8098 | LDFLAGS="$LDFLAGS -arch x86_64 -arch i386 -arch ppc" |
| 8099 | ;; |
| 8100 | |
| 8101 | darwin*) |
| 8102 | # |
| 8103 | # Post-Snow Leopard. Build for x86-64 and |
| 8104 | # x86, with x86-64 first. (That's probably what |
| 8105 | # Apple does, given that Rosetta is gone.) |
| 8106 | # XXX - update if and when Apple drops support |
| 8107 | # for 32-bit x86 code. |
| 8108 | # |
| 8109 | V_CCOPT="$V_CCOPT -arch x86_64 -arch i386" |
| 8110 | LDFLAGS="$LDFLAGS -arch x86_64 -arch i386" |
| 8111 | ;; |
| 8112 | esac |
| 8113 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8114 | ;; |
| 8115 | |
| 8116 | hpux9*) |
| 8117 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8118 | $as_echo "#define HAVE_HPUX9 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8119 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8120 | |
| 8121 | # |
| 8122 | # Use System V conventions for man pages. |
| 8123 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8124 | MAN_ADMIN_COMMANDS=1m |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8125 | MAN_FILE_FORMATS=4 |
| 8126 | MAN_MISC_INFO=5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8127 | ;; |
| 8128 | |
| 8129 | hpux10.0*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8130 | |
| 8131 | # |
| 8132 | # Use System V conventions for man pages. |
| 8133 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8134 | MAN_ADMIN_COMMANDS=1m |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8135 | MAN_FILE_FORMATS=4 |
| 8136 | MAN_MISC_INFO=5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8137 | ;; |
| 8138 | |
| 8139 | hpux10.1*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8140 | |
| 8141 | # |
| 8142 | # Use System V conventions for man pages. |
| 8143 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8144 | MAN_ADMIN_COMMANDS=1m |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8145 | MAN_FILE_FORMATS=4 |
| 8146 | MAN_MISC_INFO=5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8147 | ;; |
| 8148 | |
| 8149 | hpux*) |
| 8150 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8151 | $as_echo "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8152 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8153 | if test "`uname -m`" = "ia64"; then |
| 8154 | DYEXT="so" |
| 8155 | else |
| 8156 | DYEXT="sl" |
| 8157 | fi |
| 8158 | |
| 8159 | # |
| 8160 | # "-b" builds a shared library; "+h" sets the soname. |
| 8161 | # |
| 8162 | SHLIB_OPT="-b" |
| 8163 | SONAME_OPT="+h" |
| 8164 | |
| 8165 | # |
| 8166 | # Use System V conventions for man pages. |
| 8167 | # |
| 8168 | MAN_FILE_FORMATS=4 |
| 8169 | MAN_MISC_INFO=5 |
| 8170 | ;; |
| 8171 | |
| 8172 | irix*) |
| 8173 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8174 | # Use IRIX conventions for man pages; they're the same as the |
| 8175 | # System V conventions, except that they use section 8 for |
| 8176 | # administrative commands and daemons. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8177 | # |
| 8178 | MAN_FILE_FORMATS=4 |
| 8179 | MAN_MISC_INFO=5 |
| 8180 | ;; |
| 8181 | |
| 8182 | linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*) |
| 8183 | DYEXT="so" |
| 8184 | |
| 8185 | # |
| 8186 | # Compiler assumed to be GCC; run-time linker may require a -R |
| 8187 | # flag. |
| 8188 | # |
| 8189 | if test "$libdir" != "/usr/lib"; then |
| 8190 | V_RFLAGS=-Wl,-R$libdir |
| 8191 | fi |
| 8192 | ;; |
| 8193 | |
| 8194 | osf*) |
| 8195 | DYEXT="so" |
| 8196 | |
| 8197 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8198 | # DEC OSF/1, a/k/a Digial UNIX, a/k/a Tru64 UNIX. |
| 8199 | # Use Tru64 UNIX conventions for man pages; they're the same as |
| 8200 | # the System V conventions except that they use section 8 for |
| 8201 | # administrative commands and daemons. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8202 | # |
| 8203 | MAN_FILE_FORMATS=4 |
| 8204 | MAN_MISC_INFO=5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8205 | ;; |
| 8206 | |
| 8207 | sinix*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8208 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5 |
| 8209 | $as_echo_n "checking if SINIX compiler defines sinix... " >&6; } |
| 8210 | if ${ac_cv_cc_sinix_defined+:} false; then : |
| 8211 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8212 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8214 | /* end confdefs.h. */ |
| 8215 | |
| 8216 | int |
| 8217 | main () |
| 8218 | { |
| 8219 | int i = sinix; |
| 8220 | ; |
| 8221 | return 0; |
| 8222 | } |
| 8223 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8224 | if ac_fn_c_try_compile "$LINENO"; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8225 | ac_cv_cc_sinix_defined=yes |
| 8226 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8227 | ac_cv_cc_sinix_defined=no |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8228 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8229 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8230 | fi |
| 8231 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5 |
| 8233 | $as_echo "$ac_cv_cc_sinix_defined" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8234 | if test $ac_cv_cc_sinix_defined = no ; then |
| 8235 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8236 | $as_echo "#define sinix 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8237 | |
| 8238 | fi |
| 8239 | ;; |
| 8240 | |
| 8241 | solaris*) |
| 8242 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8243 | $as_echo "#define HAVE_SOLARIS 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8244 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8245 | |
| 8246 | DYEXT="so" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8247 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8248 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8249 | # Make sure errno is thread-safe, in case we're called in |
| 8250 | # a multithreaded program. We don't guarantee that two |
| 8251 | # threads can use the *same* pcap_t safely, but the |
| 8252 | # current version does guarantee that you can use different |
| 8253 | # pcap_t's in different threads, and even that pcap_compile() |
| 8254 | # is thread-safe (it wasn't thread-safe in some older versions). |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8255 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8256 | V_CCOPT="$V_CCOPT -D_TS_ERRNO" |
| 8257 | |
| 8258 | case "`uname -r`" in |
| 8259 | |
| 8260 | 5.12) |
| 8261 | ;; |
| 8262 | |
| 8263 | *) |
| 8264 | # |
| 8265 | # Use System V conventions for man pages. |
| 8266 | # |
| 8267 | MAN_ADMIN_COMMANDS=1m |
| 8268 | MAN_FILE_FORMATS=4 |
| 8269 | MAN_MISC_INFO=5 |
| 8270 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8271 | ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8272 | esac |
| 8273 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8274 | # Check whether --enable-shared was given. |
| 8275 | if test "${enable_shared+set}" = set; then : |
| 8276 | enableval=$enable_shared; |
| 8277 | fi |
| 8278 | |
| 8279 | test "x$enable_shared" = "xno" && DYEXT="none" |
| 8280 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8281 | if test -n "$ac_tool_prefix"; then |
| 8282 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. |
| 8283 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8284 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 8285 | $as_echo_n "checking for $ac_word... " >&6; } |
| 8286 | if ${ac_cv_prog_RANLIB+:} false; then : |
| 8287 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8288 | else |
| 8289 | if test -n "$RANLIB"; then |
| 8290 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 8291 | else |
| 8292 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 8293 | for as_dir in $PATH |
| 8294 | do |
| 8295 | IFS=$as_save_IFS |
| 8296 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8297 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 8298 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8299 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8300 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8301 | break 2 |
| 8302 | fi |
| 8303 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8304 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8305 | IFS=$as_save_IFS |
| 8306 | |
| 8307 | fi |
| 8308 | fi |
| 8309 | RANLIB=$ac_cv_prog_RANLIB |
| 8310 | if test -n "$RANLIB"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
| 8312 | $as_echo "$RANLIB" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8313 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8315 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8316 | fi |
| 8317 | |
| 8318 | |
| 8319 | fi |
| 8320 | if test -z "$ac_cv_prog_RANLIB"; then |
| 8321 | ac_ct_RANLIB=$RANLIB |
| 8322 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 8323 | set dummy ranlib; ac_word=$2 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8324 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 8325 | $as_echo_n "checking for $ac_word... " >&6; } |
| 8326 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
| 8327 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8328 | else |
| 8329 | if test -n "$ac_ct_RANLIB"; then |
| 8330 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. |
| 8331 | else |
| 8332 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 8333 | for as_dir in $PATH |
| 8334 | do |
| 8335 | IFS=$as_save_IFS |
| 8336 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8337 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 8338 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8339 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8340 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8341 | break 2 |
| 8342 | fi |
| 8343 | done |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8344 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8345 | IFS=$as_save_IFS |
| 8346 | |
| 8347 | fi |
| 8348 | fi |
| 8349 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
| 8350 | if test -n "$ac_ct_RANLIB"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8351 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
| 8352 | $as_echo "$ac_ct_RANLIB" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8353 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8354 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8355 | $as_echo "no" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8356 | fi |
| 8357 | |
| 8358 | if test "x$ac_ct_RANLIB" = x; then |
| 8359 | RANLIB=":" |
| 8360 | else |
| 8361 | case $cross_compiling:$ac_tool_warned in |
| 8362 | yes:) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8363 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 8364 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8365 | ac_tool_warned=yes ;; |
| 8366 | esac |
| 8367 | RANLIB=$ac_ct_RANLIB |
| 8368 | fi |
| 8369 | else |
| 8370 | RANLIB="$ac_cv_prog_RANLIB" |
| 8371 | fi |
| 8372 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8373 | if test -n "$ac_tool_prefix"; then |
| 8374 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. |
| 8375 | set dummy ${ac_tool_prefix}ar; ac_word=$2 |
| 8376 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 8377 | $as_echo_n "checking for $ac_word... " >&6; } |
| 8378 | if ${ac_cv_prog_AR+:} false; then : |
| 8379 | $as_echo_n "(cached) " >&6 |
| 8380 | else |
| 8381 | if test -n "$AR"; then |
| 8382 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 8383 | else |
| 8384 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 8385 | for as_dir in $PATH |
| 8386 | do |
| 8387 | IFS=$as_save_IFS |
| 8388 | test -z "$as_dir" && as_dir=. |
| 8389 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 8390 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 8391 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
| 8392 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 8393 | break 2 |
| 8394 | fi |
| 8395 | done |
| 8396 | done |
| 8397 | IFS=$as_save_IFS |
| 8398 | |
| 8399 | fi |
| 8400 | fi |
| 8401 | AR=$ac_cv_prog_AR |
| 8402 | if test -n "$AR"; then |
| 8403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
| 8404 | $as_echo "$AR" >&6; } |
| 8405 | else |
| 8406 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8407 | $as_echo "no" >&6; } |
| 8408 | fi |
| 8409 | |
| 8410 | |
| 8411 | fi |
| 8412 | if test -z "$ac_cv_prog_AR"; then |
| 8413 | ac_ct_AR=$AR |
| 8414 | # Extract the first word of "ar", so it can be a program name with args. |
| 8415 | set dummy ar; ac_word=$2 |
| 8416 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 8417 | $as_echo_n "checking for $ac_word... " >&6; } |
| 8418 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
| 8419 | $as_echo_n "(cached) " >&6 |
| 8420 | else |
| 8421 | if test -n "$ac_ct_AR"; then |
| 8422 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. |
| 8423 | else |
| 8424 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 8425 | for as_dir in $PATH |
| 8426 | do |
| 8427 | IFS=$as_save_IFS |
| 8428 | test -z "$as_dir" && as_dir=. |
| 8429 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 8430 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 8431 | ac_cv_prog_ac_ct_AR="ar" |
| 8432 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 8433 | break 2 |
| 8434 | fi |
| 8435 | done |
| 8436 | done |
| 8437 | IFS=$as_save_IFS |
| 8438 | |
| 8439 | fi |
| 8440 | fi |
| 8441 | ac_ct_AR=$ac_cv_prog_ac_ct_AR |
| 8442 | if test -n "$ac_ct_AR"; then |
| 8443 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
| 8444 | $as_echo "$ac_ct_AR" >&6; } |
| 8445 | else |
| 8446 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8447 | $as_echo "no" >&6; } |
| 8448 | fi |
| 8449 | |
| 8450 | if test "x$ac_ct_AR" = x; then |
| 8451 | AR="" |
| 8452 | else |
| 8453 | case $cross_compiling:$ac_tool_warned in |
| 8454 | yes:) |
| 8455 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 8456 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 8457 | ac_tool_warned=yes ;; |
| 8458 | esac |
| 8459 | AR=$ac_ct_AR |
| 8460 | fi |
| 8461 | else |
| 8462 | AR="$ac_cv_prog_AR" |
| 8463 | fi |
| 8464 | |
| 8465 | |
| 8466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
| 8467 | $as_echo_n "checking whether ln -s works... " >&6; } |
| 8468 | LN_S=$as_ln_s |
| 8469 | if test "$LN_S" = "ln -s"; then |
| 8470 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8471 | $as_echo "yes" >&6; } |
| 8472 | else |
| 8473 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
| 8474 | $as_echo "no, using $LN_S" >&6; } |
| 8475 | fi |
| 8476 | |
| 8477 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8478 | |
| 8479 | rm -f os-proto.h |
| 8480 | if test "${LBL_CFLAGS+set}" = set; then |
| 8481 | V_CCOPT="$V_CCOPT ${LBL_CFLAGS}" |
| 8482 | fi |
| 8483 | if test -f .devel ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8484 | # |
| 8485 | # Skip all the warning option stuff on some compilers. |
| 8486 | # |
| 8487 | if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8488 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8489 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler fails when given an unknown warning option" >&5 |
| 8490 | $as_echo_n "checking whether the compiler fails when given an unknown warning option... " >&6; } |
| 8491 | save_CFLAGS="$CFLAGS" |
| 8492 | CFLAGS="$CFLAGS -Wxyzzy-this-will-never-succeed-xyzzy" |
| 8493 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8494 | /* end confdefs.h. */ |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 8495 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8496 | int |
| 8497 | main () |
| 8498 | { |
| 8499 | return 0 |
| 8500 | ; |
| 8501 | return 0; |
| 8502 | } |
| 8503 | _ACEOF |
| 8504 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8505 | |
| 8506 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8507 | $as_echo "no" >&6; } |
| 8508 | # |
| 8509 | # We're assuming this is clang, where |
| 8510 | # -Werror=unknown-warning-option is the appropriate |
| 8511 | # option to force the compiler to fail. |
| 8512 | # |
| 8513 | ac_lbl_unknown_warning_option_error="-Werror=unknown-warning-option" |
| 8514 | |
| 8515 | else |
| 8516 | |
| 8517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8518 | $as_echo "yes" >&6; } |
| 8519 | |
| 8520 | fi |
| 8521 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8522 | CFLAGS="$save_CFLAGS" |
| 8523 | |
| 8524 | |
| 8525 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5 |
| 8526 | $as_echo_n "checking whether the compiler supports the -Wall option... " >&6; } |
| 8527 | save_CFLAGS="$CFLAGS" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8528 | if expr "x-Wall" : "x-W.*" >/dev/null |
| 8529 | then |
| 8530 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wall" |
| 8531 | elif expr "x-Wall" : "x-f.*" >/dev/null |
| 8532 | then |
| 8533 | CFLAGS="$CFLAGS -Werror -Wall" |
| 8534 | elif expr "x-Wall" : "x-m.*" >/dev/null |
| 8535 | then |
| 8536 | CFLAGS="$CFLAGS -Werror -Wall" |
| 8537 | else |
| 8538 | CFLAGS="$CFLAGS -Wall" |
| 8539 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8540 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8541 | /* end confdefs.h. */ |
| 8542 | |
| 8543 | int |
| 8544 | main () |
| 8545 | { |
| 8546 | return 0 |
| 8547 | ; |
| 8548 | return 0; |
| 8549 | } |
| 8550 | _ACEOF |
| 8551 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8552 | |
| 8553 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8554 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8555 | can_add_to_cflags=yes |
| 8556 | # |
| 8557 | # The compile supports this; do we have some C code for |
| 8558 | # which the warning should *not* appear? |
| 8559 | # We test the fourth argument because the third argument |
| 8560 | # could contain quotes, breaking the test. |
| 8561 | # |
| 8562 | if test "x" != "x" |
| 8563 | then |
| 8564 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 8565 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5 |
| 8566 | $as_echo_n "checking whether -Wall ... " >&6; } |
| 8567 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8568 | /* end confdefs.h. */ |
| 8569 | |
| 8570 | _ACEOF |
| 8571 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8572 | |
| 8573 | # |
| 8574 | # Not a problem. |
| 8575 | # |
| 8576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8577 | $as_echo "no" >&6; } |
| 8578 | |
| 8579 | else |
| 8580 | |
| 8581 | # |
| 8582 | # A problem. |
| 8583 | # |
| 8584 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8585 | $as_echo "yes" >&6; } |
| 8586 | can_add_to_cflags=no |
| 8587 | |
| 8588 | fi |
| 8589 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8590 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8591 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8592 | if test x"$can_add_to_cflags" = "xyes" |
| 8593 | then |
| 8594 | V_CCOPT="$V_CCOPT -Wall" |
| 8595 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8596 | |
| 8597 | else |
| 8598 | |
| 8599 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8600 | $as_echo "no" >&6; } |
| 8601 | CFLAGS="$save_CFLAGS" |
| 8602 | |
| 8603 | fi |
| 8604 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8605 | |
| 8606 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8607 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5 |
| 8608 | $as_echo_n "checking whether the compiler supports the -Wsign-compare option... " >&6; } |
| 8609 | save_CFLAGS="$CFLAGS" |
| 8610 | if expr "x-Wsign-compare" : "x-W.*" >/dev/null |
| 8611 | then |
| 8612 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wsign-compare" |
| 8613 | elif expr "x-Wsign-compare" : "x-f.*" >/dev/null |
| 8614 | then |
| 8615 | CFLAGS="$CFLAGS -Werror -Wsign-compare" |
| 8616 | elif expr "x-Wsign-compare" : "x-m.*" >/dev/null |
| 8617 | then |
| 8618 | CFLAGS="$CFLAGS -Werror -Wsign-compare" |
| 8619 | else |
| 8620 | CFLAGS="$CFLAGS -Wsign-compare" |
| 8621 | fi |
| 8622 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8623 | /* end confdefs.h. */ |
| 8624 | |
| 8625 | int |
| 8626 | main () |
| 8627 | { |
| 8628 | return 0 |
| 8629 | ; |
| 8630 | return 0; |
| 8631 | } |
| 8632 | _ACEOF |
| 8633 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8634 | |
| 8635 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8636 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8637 | can_add_to_cflags=yes |
| 8638 | # |
| 8639 | # The compile supports this; do we have some C code for |
| 8640 | # which the warning should *not* appear? |
| 8641 | # We test the fourth argument because the third argument |
| 8642 | # could contain quotes, breaking the test. |
| 8643 | # |
| 8644 | if test "x" != "x" |
| 8645 | then |
| 8646 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 8647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5 |
| 8648 | $as_echo_n "checking whether -Wsign-compare ... " >&6; } |
| 8649 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8650 | /* end confdefs.h. */ |
| 8651 | |
| 8652 | _ACEOF |
| 8653 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8654 | |
| 8655 | # |
| 8656 | # Not a problem. |
| 8657 | # |
| 8658 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8659 | $as_echo "no" >&6; } |
| 8660 | |
| 8661 | else |
| 8662 | |
| 8663 | # |
| 8664 | # A problem. |
| 8665 | # |
| 8666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8667 | $as_echo "yes" >&6; } |
| 8668 | can_add_to_cflags=no |
| 8669 | |
| 8670 | fi |
| 8671 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8672 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8673 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8674 | if test x"$can_add_to_cflags" = "xyes" |
| 8675 | then |
| 8676 | V_CCOPT="$V_CCOPT -Wsign-compare" |
| 8677 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8678 | |
| 8679 | else |
| 8680 | |
| 8681 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8682 | $as_echo "no" >&6; } |
| 8683 | CFLAGS="$save_CFLAGS" |
| 8684 | |
| 8685 | fi |
| 8686 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8687 | |
| 8688 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5 |
| 8690 | $as_echo_n "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; } |
| 8691 | save_CFLAGS="$CFLAGS" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8692 | if expr "x-Wmissing-prototypes" : "x-W.*" >/dev/null |
| 8693 | then |
| 8694 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-prototypes" |
| 8695 | elif expr "x-Wmissing-prototypes" : "x-f.*" >/dev/null |
| 8696 | then |
| 8697 | CFLAGS="$CFLAGS -Werror -Wmissing-prototypes" |
| 8698 | elif expr "x-Wmissing-prototypes" : "x-m.*" >/dev/null |
| 8699 | then |
| 8700 | CFLAGS="$CFLAGS -Werror -Wmissing-prototypes" |
| 8701 | else |
| 8702 | CFLAGS="$CFLAGS -Wmissing-prototypes" |
| 8703 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8704 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8705 | /* end confdefs.h. */ |
| 8706 | |
| 8707 | int |
| 8708 | main () |
| 8709 | { |
| 8710 | return 0 |
| 8711 | ; |
| 8712 | return 0; |
| 8713 | } |
| 8714 | _ACEOF |
| 8715 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8716 | |
| 8717 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8718 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8719 | can_add_to_cflags=yes |
| 8720 | # |
| 8721 | # The compile supports this; do we have some C code for |
| 8722 | # which the warning should *not* appear? |
| 8723 | # We test the fourth argument because the third argument |
| 8724 | # could contain quotes, breaking the test. |
| 8725 | # |
| 8726 | if test "x" != "x" |
| 8727 | then |
| 8728 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 8729 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5 |
| 8730 | $as_echo_n "checking whether -Wmissing-prototypes ... " >&6; } |
| 8731 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8732 | /* end confdefs.h. */ |
| 8733 | |
| 8734 | _ACEOF |
| 8735 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8736 | |
| 8737 | # |
| 8738 | # Not a problem. |
| 8739 | # |
| 8740 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8741 | $as_echo "no" >&6; } |
| 8742 | |
| 8743 | else |
| 8744 | |
| 8745 | # |
| 8746 | # A problem. |
| 8747 | # |
| 8748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8749 | $as_echo "yes" >&6; } |
| 8750 | can_add_to_cflags=no |
| 8751 | |
| 8752 | fi |
| 8753 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8754 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8755 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8756 | if test x"$can_add_to_cflags" = "xyes" |
| 8757 | then |
| 8758 | V_CCOPT="$V_CCOPT -Wmissing-prototypes" |
| 8759 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8760 | |
| 8761 | else |
| 8762 | |
| 8763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8764 | $as_echo "no" >&6; } |
| 8765 | CFLAGS="$save_CFLAGS" |
| 8766 | |
| 8767 | fi |
| 8768 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8769 | |
| 8770 | |
| 8771 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5 |
| 8772 | $as_echo_n "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; } |
| 8773 | save_CFLAGS="$CFLAGS" |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8774 | if expr "x-Wstrict-prototypes" : "x-W.*" >/dev/null |
| 8775 | then |
| 8776 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wstrict-prototypes" |
| 8777 | elif expr "x-Wstrict-prototypes" : "x-f.*" >/dev/null |
| 8778 | then |
| 8779 | CFLAGS="$CFLAGS -Werror -Wstrict-prototypes" |
| 8780 | elif expr "x-Wstrict-prototypes" : "x-m.*" >/dev/null |
| 8781 | then |
| 8782 | CFLAGS="$CFLAGS -Werror -Wstrict-prototypes" |
| 8783 | else |
| 8784 | CFLAGS="$CFLAGS -Wstrict-prototypes" |
| 8785 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8787 | /* end confdefs.h. */ |
| 8788 | |
| 8789 | int |
| 8790 | main () |
| 8791 | { |
| 8792 | return 0 |
| 8793 | ; |
| 8794 | return 0; |
| 8795 | } |
| 8796 | _ACEOF |
| 8797 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8798 | |
| 8799 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8800 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8801 | can_add_to_cflags=yes |
| 8802 | # |
| 8803 | # The compile supports this; do we have some C code for |
| 8804 | # which the warning should *not* appear? |
| 8805 | # We test the fourth argument because the third argument |
| 8806 | # could contain quotes, breaking the test. |
| 8807 | # |
| 8808 | if test "x" != "x" |
| 8809 | then |
| 8810 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 8811 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5 |
| 8812 | $as_echo_n "checking whether -Wstrict-prototypes ... " >&6; } |
| 8813 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8814 | /* end confdefs.h. */ |
| 8815 | |
| 8816 | _ACEOF |
| 8817 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8818 | |
| 8819 | # |
| 8820 | # Not a problem. |
| 8821 | # |
| 8822 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8823 | $as_echo "no" >&6; } |
| 8824 | |
| 8825 | else |
| 8826 | |
| 8827 | # |
| 8828 | # A problem. |
| 8829 | # |
| 8830 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8831 | $as_echo "yes" >&6; } |
| 8832 | can_add_to_cflags=no |
| 8833 | |
| 8834 | fi |
| 8835 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8836 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8837 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8838 | if test x"$can_add_to_cflags" = "xyes" |
| 8839 | then |
| 8840 | V_CCOPT="$V_CCOPT -Wstrict-prototypes" |
| 8841 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 8842 | |
| 8843 | else |
| 8844 | |
| 8845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8846 | $as_echo "no" >&6; } |
| 8847 | CFLAGS="$save_CFLAGS" |
| 8848 | |
| 8849 | fi |
| 8850 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8851 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8852 | |
| 8853 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5 |
| 8854 | $as_echo_n "checking whether the compiler supports the -Wshadow option... " >&6; } |
| 8855 | save_CFLAGS="$CFLAGS" |
| 8856 | if expr "x-Wshadow" : "x-W.*" >/dev/null |
| 8857 | then |
| 8858 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wshadow" |
| 8859 | elif expr "x-Wshadow" : "x-f.*" >/dev/null |
| 8860 | then |
| 8861 | CFLAGS="$CFLAGS -Werror -Wshadow" |
| 8862 | elif expr "x-Wshadow" : "x-m.*" >/dev/null |
| 8863 | then |
| 8864 | CFLAGS="$CFLAGS -Werror -Wshadow" |
| 8865 | else |
| 8866 | CFLAGS="$CFLAGS -Wshadow" |
| 8867 | fi |
| 8868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8869 | /* end confdefs.h. */ |
| 8870 | |
| 8871 | int |
| 8872 | main () |
| 8873 | { |
| 8874 | return 0 |
| 8875 | ; |
| 8876 | return 0; |
| 8877 | } |
| 8878 | _ACEOF |
| 8879 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8880 | |
| 8881 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8882 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8883 | can_add_to_cflags=yes |
| 8884 | # |
| 8885 | # The compile supports this; do we have some C code for |
| 8886 | # which the warning should *not* appear? |
| 8887 | # We test the fourth argument because the third argument |
| 8888 | # could contain quotes, breaking the test. |
| 8889 | # |
| 8890 | if test "x" != "x" |
| 8891 | then |
| 8892 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 8893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5 |
| 8894 | $as_echo_n "checking whether -Wshadow ... " >&6; } |
| 8895 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8896 | /* end confdefs.h. */ |
| 8897 | |
| 8898 | _ACEOF |
| 8899 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8900 | |
| 8901 | # |
| 8902 | # Not a problem. |
| 8903 | # |
| 8904 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8905 | $as_echo "no" >&6; } |
| 8906 | |
| 8907 | else |
| 8908 | |
| 8909 | # |
| 8910 | # A problem. |
| 8911 | # |
| 8912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8913 | $as_echo "yes" >&6; } |
| 8914 | can_add_to_cflags=no |
| 8915 | |
| 8916 | fi |
| 8917 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8918 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8919 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8920 | if test x"$can_add_to_cflags" = "xyes" |
| 8921 | then |
| 8922 | V_CCOPT="$V_CCOPT -Wshadow" |
| 8923 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 8924 | |
| 8925 | else |
| 8926 | |
| 8927 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8928 | $as_echo "no" >&6; } |
| 8929 | CFLAGS="$save_CFLAGS" |
| 8930 | |
| 8931 | fi |
| 8932 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8933 | |
| 8934 | |
| 8935 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdeclaration-after-statement option" >&5 |
| 8936 | $as_echo_n "checking whether the compiler supports the -Wdeclaration-after-statement option... " >&6; } |
| 8937 | save_CFLAGS="$CFLAGS" |
| 8938 | if expr "x-Wdeclaration-after-statement" : "x-W.*" >/dev/null |
| 8939 | then |
| 8940 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdeclaration-after-statement" |
| 8941 | elif expr "x-Wdeclaration-after-statement" : "x-f.*" >/dev/null |
| 8942 | then |
| 8943 | CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement" |
| 8944 | elif expr "x-Wdeclaration-after-statement" : "x-m.*" >/dev/null |
| 8945 | then |
| 8946 | CFLAGS="$CFLAGS -Werror -Wdeclaration-after-statement" |
| 8947 | else |
| 8948 | CFLAGS="$CFLAGS -Wdeclaration-after-statement" |
| 8949 | fi |
| 8950 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8951 | /* end confdefs.h. */ |
| 8952 | |
| 8953 | int |
| 8954 | main () |
| 8955 | { |
| 8956 | return 0 |
| 8957 | ; |
| 8958 | return 0; |
| 8959 | } |
| 8960 | _ACEOF |
| 8961 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8962 | |
| 8963 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8964 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 8965 | can_add_to_cflags=yes |
| 8966 | # |
| 8967 | # The compile supports this; do we have some C code for |
| 8968 | # which the warning should *not* appear? |
| 8969 | # We test the fourth argument because the third argument |
| 8970 | # could contain quotes, breaking the test. |
| 8971 | # |
| 8972 | if test "x" != "x" |
| 8973 | then |
| 8974 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 8975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdeclaration-after-statement " >&5 |
| 8976 | $as_echo_n "checking whether -Wdeclaration-after-statement ... " >&6; } |
| 8977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8978 | /* end confdefs.h. */ |
| 8979 | |
| 8980 | _ACEOF |
| 8981 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8982 | |
| 8983 | # |
| 8984 | # Not a problem. |
| 8985 | # |
| 8986 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8987 | $as_echo "no" >&6; } |
| 8988 | |
| 8989 | else |
| 8990 | |
| 8991 | # |
| 8992 | # A problem. |
| 8993 | # |
| 8994 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 8995 | $as_echo "yes" >&6; } |
| 8996 | can_add_to_cflags=no |
| 8997 | |
| 8998 | fi |
| 8999 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9000 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 9001 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9002 | if test x"$can_add_to_cflags" = "xyes" |
| 9003 | then |
| 9004 | V_CCOPT="$V_CCOPT -Wdeclaration-after-statement" |
| 9005 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 9006 | |
| 9007 | else |
| 9008 | |
| 9009 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9010 | $as_echo "no" >&6; } |
| 9011 | CFLAGS="$save_CFLAGS" |
| 9012 | |
| 9013 | fi |
| 9014 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9015 | |
| 9016 | |
| 9017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5 |
| 9018 | $as_echo_n "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; } |
| 9019 | save_CFLAGS="$CFLAGS" |
| 9020 | if expr "x-Wused-but-marked-unused" : "x-W.*" >/dev/null |
| 9021 | then |
| 9022 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wused-but-marked-unused" |
| 9023 | elif expr "x-Wused-but-marked-unused" : "x-f.*" >/dev/null |
| 9024 | then |
| 9025 | CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused" |
| 9026 | elif expr "x-Wused-but-marked-unused" : "x-m.*" >/dev/null |
| 9027 | then |
| 9028 | CFLAGS="$CFLAGS -Werror -Wused-but-marked-unused" |
| 9029 | else |
| 9030 | CFLAGS="$CFLAGS -Wused-but-marked-unused" |
| 9031 | fi |
| 9032 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9033 | /* end confdefs.h. */ |
| 9034 | |
| 9035 | int |
| 9036 | main () |
| 9037 | { |
| 9038 | return 0 |
| 9039 | ; |
| 9040 | return 0; |
| 9041 | } |
| 9042 | _ACEOF |
| 9043 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9044 | |
| 9045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9046 | $as_echo "yes" >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9047 | can_add_to_cflags=yes |
| 9048 | # |
| 9049 | # The compile supports this; do we have some C code for |
| 9050 | # which the warning should *not* appear? |
| 9051 | # We test the fourth argument because the third argument |
| 9052 | # could contain quotes, breaking the test. |
| 9053 | # |
| 9054 | if test "x" != "x" |
| 9055 | then |
| 9056 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9057 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5 |
| 9058 | $as_echo_n "checking whether -Wused-but-marked-unused ... " >&6; } |
| 9059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9060 | /* end confdefs.h. */ |
| 9061 | |
| 9062 | _ACEOF |
| 9063 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9064 | |
| 9065 | # |
| 9066 | # Not a problem. |
| 9067 | # |
| 9068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9069 | $as_echo "no" >&6; } |
| 9070 | |
| 9071 | else |
| 9072 | |
| 9073 | # |
| 9074 | # A problem. |
| 9075 | # |
| 9076 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9077 | $as_echo "yes" >&6; } |
| 9078 | can_add_to_cflags=no |
| 9079 | |
| 9080 | fi |
| 9081 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9082 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 9083 | CFLAGS="$save_CFLAGS" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9084 | if test x"$can_add_to_cflags" = "xyes" |
| 9085 | then |
| 9086 | V_CCOPT="$V_CCOPT -Wused-but-marked-unused" |
| 9087 | fi |
| 9088 | |
| 9089 | else |
| 9090 | |
| 9091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9092 | $as_echo "no" >&6; } |
| 9093 | CFLAGS="$save_CFLAGS" |
| 9094 | |
| 9095 | fi |
| 9096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9097 | |
| 9098 | |
| 9099 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5 |
| 9100 | $as_echo_n "checking whether the compiler supports the -Wdocumentation option... " >&6; } |
| 9101 | save_CFLAGS="$CFLAGS" |
| 9102 | if expr "x-Wdocumentation" : "x-W.*" >/dev/null |
| 9103 | then |
| 9104 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wdocumentation" |
| 9105 | elif expr "x-Wdocumentation" : "x-f.*" >/dev/null |
| 9106 | then |
| 9107 | CFLAGS="$CFLAGS -Werror -Wdocumentation" |
| 9108 | elif expr "x-Wdocumentation" : "x-m.*" >/dev/null |
| 9109 | then |
| 9110 | CFLAGS="$CFLAGS -Werror -Wdocumentation" |
| 9111 | else |
| 9112 | CFLAGS="$CFLAGS -Wdocumentation" |
| 9113 | fi |
| 9114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9115 | /* end confdefs.h. */ |
| 9116 | |
| 9117 | int |
| 9118 | main () |
| 9119 | { |
| 9120 | return 0 |
| 9121 | ; |
| 9122 | return 0; |
| 9123 | } |
| 9124 | _ACEOF |
| 9125 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9126 | |
| 9127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9128 | $as_echo "yes" >&6; } |
| 9129 | can_add_to_cflags=yes |
| 9130 | # |
| 9131 | # The compile supports this; do we have some C code for |
| 9132 | # which the warning should *not* appear? |
| 9133 | # We test the fourth argument because the third argument |
| 9134 | # could contain quotes, breaking the test. |
| 9135 | # |
| 9136 | if test "x" != "x" |
| 9137 | then |
| 9138 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9139 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5 |
| 9140 | $as_echo_n "checking whether -Wdocumentation ... " >&6; } |
| 9141 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9142 | /* end confdefs.h. */ |
| 9143 | |
| 9144 | _ACEOF |
| 9145 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9146 | |
| 9147 | # |
| 9148 | # Not a problem. |
| 9149 | # |
| 9150 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9151 | $as_echo "no" >&6; } |
| 9152 | |
| 9153 | else |
| 9154 | |
| 9155 | # |
| 9156 | # A problem. |
| 9157 | # |
| 9158 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9159 | $as_echo "yes" >&6; } |
| 9160 | can_add_to_cflags=no |
| 9161 | |
| 9162 | fi |
| 9163 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9164 | fi |
| 9165 | CFLAGS="$save_CFLAGS" |
| 9166 | if test x"$can_add_to_cflags" = "xyes" |
| 9167 | then |
| 9168 | V_CCOPT="$V_CCOPT -Wdocumentation" |
| 9169 | fi |
| 9170 | |
| 9171 | else |
| 9172 | |
| 9173 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9174 | $as_echo "no" >&6; } |
| 9175 | CFLAGS="$save_CFLAGS" |
| 9176 | |
| 9177 | fi |
| 9178 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9179 | |
| 9180 | |
| 9181 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5 |
| 9182 | $as_echo_n "checking whether the compiler supports the -Wcomma option... " >&6; } |
| 9183 | save_CFLAGS="$CFLAGS" |
| 9184 | if expr "x-Wcomma" : "x-W.*" >/dev/null |
| 9185 | then |
| 9186 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wcomma" |
| 9187 | elif expr "x-Wcomma" : "x-f.*" >/dev/null |
| 9188 | then |
| 9189 | CFLAGS="$CFLAGS -Werror -Wcomma" |
| 9190 | elif expr "x-Wcomma" : "x-m.*" >/dev/null |
| 9191 | then |
| 9192 | CFLAGS="$CFLAGS -Werror -Wcomma" |
| 9193 | else |
| 9194 | CFLAGS="$CFLAGS -Wcomma" |
| 9195 | fi |
| 9196 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9197 | /* end confdefs.h. */ |
| 9198 | |
| 9199 | int |
| 9200 | main () |
| 9201 | { |
| 9202 | return 0 |
| 9203 | ; |
| 9204 | return 0; |
| 9205 | } |
| 9206 | _ACEOF |
| 9207 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9208 | |
| 9209 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9210 | $as_echo "yes" >&6; } |
| 9211 | can_add_to_cflags=yes |
| 9212 | # |
| 9213 | # The compile supports this; do we have some C code for |
| 9214 | # which the warning should *not* appear? |
| 9215 | # We test the fourth argument because the third argument |
| 9216 | # could contain quotes, breaking the test. |
| 9217 | # |
| 9218 | if test "x" != "x" |
| 9219 | then |
| 9220 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9221 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5 |
| 9222 | $as_echo_n "checking whether -Wcomma ... " >&6; } |
| 9223 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9224 | /* end confdefs.h. */ |
| 9225 | |
| 9226 | _ACEOF |
| 9227 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9228 | |
| 9229 | # |
| 9230 | # Not a problem. |
| 9231 | # |
| 9232 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9233 | $as_echo "no" >&6; } |
| 9234 | |
| 9235 | else |
| 9236 | |
| 9237 | # |
| 9238 | # A problem. |
| 9239 | # |
| 9240 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9241 | $as_echo "yes" >&6; } |
| 9242 | can_add_to_cflags=no |
| 9243 | |
| 9244 | fi |
| 9245 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9246 | fi |
| 9247 | CFLAGS="$save_CFLAGS" |
| 9248 | if test x"$can_add_to_cflags" = "xyes" |
| 9249 | then |
| 9250 | V_CCOPT="$V_CCOPT -Wcomma" |
| 9251 | fi |
| 9252 | |
| 9253 | else |
| 9254 | |
| 9255 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9256 | $as_echo "no" >&6; } |
| 9257 | CFLAGS="$save_CFLAGS" |
| 9258 | |
| 9259 | fi |
| 9260 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9261 | |
| 9262 | |
| 9263 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5 |
| 9264 | $as_echo_n "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; } |
| 9265 | save_CFLAGS="$CFLAGS" |
| 9266 | if expr "x-Wmissing-noreturn" : "x-W.*" >/dev/null |
| 9267 | then |
| 9268 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-noreturn" |
| 9269 | elif expr "x-Wmissing-noreturn" : "x-f.*" >/dev/null |
| 9270 | then |
| 9271 | CFLAGS="$CFLAGS -Werror -Wmissing-noreturn" |
| 9272 | elif expr "x-Wmissing-noreturn" : "x-m.*" >/dev/null |
| 9273 | then |
| 9274 | CFLAGS="$CFLAGS -Werror -Wmissing-noreturn" |
| 9275 | else |
| 9276 | CFLAGS="$CFLAGS -Wmissing-noreturn" |
| 9277 | fi |
| 9278 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9279 | /* end confdefs.h. */ |
| 9280 | |
| 9281 | int |
| 9282 | main () |
| 9283 | { |
| 9284 | return 0 |
| 9285 | ; |
| 9286 | return 0; |
| 9287 | } |
| 9288 | _ACEOF |
| 9289 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9290 | |
| 9291 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9292 | $as_echo "yes" >&6; } |
| 9293 | can_add_to_cflags=yes |
| 9294 | # |
| 9295 | # The compile supports this; do we have some C code for |
| 9296 | # which the warning should *not* appear? |
| 9297 | # We test the fourth argument because the third argument |
| 9298 | # could contain quotes, breaking the test. |
| 9299 | # |
| 9300 | if test "x" != "x" |
| 9301 | then |
| 9302 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9303 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5 |
| 9304 | $as_echo_n "checking whether -Wmissing-noreturn ... " >&6; } |
| 9305 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9306 | /* end confdefs.h. */ |
| 9307 | |
| 9308 | _ACEOF |
| 9309 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9310 | |
| 9311 | # |
| 9312 | # Not a problem. |
| 9313 | # |
| 9314 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9315 | $as_echo "no" >&6; } |
| 9316 | |
| 9317 | else |
| 9318 | |
| 9319 | # |
| 9320 | # A problem. |
| 9321 | # |
| 9322 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9323 | $as_echo "yes" >&6; } |
| 9324 | can_add_to_cflags=no |
| 9325 | |
| 9326 | fi |
| 9327 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9328 | fi |
| 9329 | CFLAGS="$save_CFLAGS" |
| 9330 | if test x"$can_add_to_cflags" = "xyes" |
| 9331 | then |
| 9332 | V_CCOPT="$V_CCOPT -Wmissing-noreturn" |
| 9333 | fi |
| 9334 | |
| 9335 | else |
| 9336 | |
| 9337 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9338 | $as_echo "no" >&6; } |
| 9339 | CFLAGS="$save_CFLAGS" |
| 9340 | |
| 9341 | fi |
| 9342 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9343 | |
| 9344 | # Warns about safeguards added in case the enums are |
| 9345 | # extended |
| 9346 | # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default) |
| 9347 | |
| 9348 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5 |
| 9349 | $as_echo_n "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; } |
| 9350 | save_CFLAGS="$CFLAGS" |
| 9351 | if expr "x-Wmissing-variable-declarations" : "x-W.*" >/dev/null |
| 9352 | then |
| 9353 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wmissing-variable-declarations" |
| 9354 | elif expr "x-Wmissing-variable-declarations" : "x-f.*" >/dev/null |
| 9355 | then |
| 9356 | CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations" |
| 9357 | elif expr "x-Wmissing-variable-declarations" : "x-m.*" >/dev/null |
| 9358 | then |
| 9359 | CFLAGS="$CFLAGS -Werror -Wmissing-variable-declarations" |
| 9360 | else |
| 9361 | CFLAGS="$CFLAGS -Wmissing-variable-declarations" |
| 9362 | fi |
| 9363 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9364 | /* end confdefs.h. */ |
| 9365 | |
| 9366 | int |
| 9367 | main () |
| 9368 | { |
| 9369 | return 0 |
| 9370 | ; |
| 9371 | return 0; |
| 9372 | } |
| 9373 | _ACEOF |
| 9374 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9375 | |
| 9376 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9377 | $as_echo "yes" >&6; } |
| 9378 | can_add_to_cflags=yes |
| 9379 | # |
| 9380 | # The compile supports this; do we have some C code for |
| 9381 | # which the warning should *not* appear? |
| 9382 | # We test the fourth argument because the third argument |
| 9383 | # could contain quotes, breaking the test. |
| 9384 | # |
| 9385 | if test "x" != "x" |
| 9386 | then |
| 9387 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9388 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5 |
| 9389 | $as_echo_n "checking whether -Wmissing-variable-declarations ... " >&6; } |
| 9390 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9391 | /* end confdefs.h. */ |
| 9392 | |
| 9393 | _ACEOF |
| 9394 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9395 | |
| 9396 | # |
| 9397 | # Not a problem. |
| 9398 | # |
| 9399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9400 | $as_echo "no" >&6; } |
| 9401 | |
| 9402 | else |
| 9403 | |
| 9404 | # |
| 9405 | # A problem. |
| 9406 | # |
| 9407 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9408 | $as_echo "yes" >&6; } |
| 9409 | can_add_to_cflags=no |
| 9410 | |
| 9411 | fi |
| 9412 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9413 | fi |
| 9414 | CFLAGS="$save_CFLAGS" |
| 9415 | if test x"$can_add_to_cflags" = "xyes" |
| 9416 | then |
| 9417 | V_CCOPT="$V_CCOPT -Wmissing-variable-declarations" |
| 9418 | fi |
| 9419 | |
| 9420 | else |
| 9421 | |
| 9422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9423 | $as_echo "no" >&6; } |
| 9424 | CFLAGS="$save_CFLAGS" |
| 9425 | |
| 9426 | fi |
| 9427 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9428 | |
| 9429 | |
| 9430 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5 |
| 9431 | $as_echo_n "checking whether the compiler supports the -Wunused-parameter option... " >&6; } |
| 9432 | save_CFLAGS="$CFLAGS" |
| 9433 | if expr "x-Wunused-parameter" : "x-W.*" >/dev/null |
| 9434 | then |
| 9435 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunused-parameter" |
| 9436 | elif expr "x-Wunused-parameter" : "x-f.*" >/dev/null |
| 9437 | then |
| 9438 | CFLAGS="$CFLAGS -Werror -Wunused-parameter" |
| 9439 | elif expr "x-Wunused-parameter" : "x-m.*" >/dev/null |
| 9440 | then |
| 9441 | CFLAGS="$CFLAGS -Werror -Wunused-parameter" |
| 9442 | else |
| 9443 | CFLAGS="$CFLAGS -Wunused-parameter" |
| 9444 | fi |
| 9445 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9446 | /* end confdefs.h. */ |
| 9447 | |
| 9448 | int |
| 9449 | main () |
| 9450 | { |
| 9451 | return 0 |
| 9452 | ; |
| 9453 | return 0; |
| 9454 | } |
| 9455 | _ACEOF |
| 9456 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9457 | |
| 9458 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9459 | $as_echo "yes" >&6; } |
| 9460 | can_add_to_cflags=yes |
| 9461 | # |
| 9462 | # The compile supports this; do we have some C code for |
| 9463 | # which the warning should *not* appear? |
| 9464 | # We test the fourth argument because the third argument |
| 9465 | # could contain quotes, breaking the test. |
| 9466 | # |
| 9467 | if test "x" != "x" |
| 9468 | then |
| 9469 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9470 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5 |
| 9471 | $as_echo_n "checking whether -Wunused-parameter ... " >&6; } |
| 9472 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9473 | /* end confdefs.h. */ |
| 9474 | |
| 9475 | _ACEOF |
| 9476 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9477 | |
| 9478 | # |
| 9479 | # Not a problem. |
| 9480 | # |
| 9481 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9482 | $as_echo "no" >&6; } |
| 9483 | |
| 9484 | else |
| 9485 | |
| 9486 | # |
| 9487 | # A problem. |
| 9488 | # |
| 9489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9490 | $as_echo "yes" >&6; } |
| 9491 | can_add_to_cflags=no |
| 9492 | |
| 9493 | fi |
| 9494 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9495 | fi |
| 9496 | CFLAGS="$save_CFLAGS" |
| 9497 | if test x"$can_add_to_cflags" = "xyes" |
| 9498 | then |
| 9499 | V_CCOPT="$V_CCOPT -Wunused-parameter" |
| 9500 | fi |
| 9501 | |
| 9502 | else |
| 9503 | |
| 9504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9505 | $as_echo "no" >&6; } |
| 9506 | CFLAGS="$save_CFLAGS" |
| 9507 | |
| 9508 | fi |
| 9509 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9510 | |
| 9511 | |
| 9512 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5 |
| 9513 | $as_echo_n "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; } |
| 9514 | save_CFLAGS="$CFLAGS" |
| 9515 | if expr "x-Wformat-nonliteral" : "x-W.*" >/dev/null |
| 9516 | then |
| 9517 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wformat-nonliteral" |
| 9518 | elif expr "x-Wformat-nonliteral" : "x-f.*" >/dev/null |
| 9519 | then |
| 9520 | CFLAGS="$CFLAGS -Werror -Wformat-nonliteral" |
| 9521 | elif expr "x-Wformat-nonliteral" : "x-m.*" >/dev/null |
| 9522 | then |
| 9523 | CFLAGS="$CFLAGS -Werror -Wformat-nonliteral" |
| 9524 | else |
| 9525 | CFLAGS="$CFLAGS -Wformat-nonliteral" |
| 9526 | fi |
| 9527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9528 | /* end confdefs.h. */ |
| 9529 | |
| 9530 | int |
| 9531 | main () |
| 9532 | { |
| 9533 | return 0 |
| 9534 | ; |
| 9535 | return 0; |
| 9536 | } |
| 9537 | _ACEOF |
| 9538 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9539 | |
| 9540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9541 | $as_echo "yes" >&6; } |
| 9542 | can_add_to_cflags=yes |
| 9543 | # |
| 9544 | # The compile supports this; do we have some C code for |
| 9545 | # which the warning should *not* appear? |
| 9546 | # We test the fourth argument because the third argument |
| 9547 | # could contain quotes, breaking the test. |
| 9548 | # |
| 9549 | if test "x" != "x" |
| 9550 | then |
| 9551 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5 |
| 9553 | $as_echo_n "checking whether -Wformat-nonliteral ... " >&6; } |
| 9554 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9555 | /* end confdefs.h. */ |
| 9556 | |
| 9557 | _ACEOF |
| 9558 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9559 | |
| 9560 | # |
| 9561 | # Not a problem. |
| 9562 | # |
| 9563 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9564 | $as_echo "no" >&6; } |
| 9565 | |
| 9566 | else |
| 9567 | |
| 9568 | # |
| 9569 | # A problem. |
| 9570 | # |
| 9571 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9572 | $as_echo "yes" >&6; } |
| 9573 | can_add_to_cflags=no |
| 9574 | |
| 9575 | fi |
| 9576 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9577 | fi |
| 9578 | CFLAGS="$save_CFLAGS" |
| 9579 | if test x"$can_add_to_cflags" = "xyes" |
| 9580 | then |
| 9581 | V_CCOPT="$V_CCOPT -Wformat-nonliteral" |
| 9582 | fi |
| 9583 | |
| 9584 | else |
| 9585 | |
| 9586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9587 | $as_echo "no" >&6; } |
| 9588 | CFLAGS="$save_CFLAGS" |
| 9589 | |
| 9590 | fi |
| 9591 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9592 | |
| 9593 | # |
| 9594 | # This can cause problems with ntohs(), ntohl(), |
| 9595 | # htons(), and htonl() on some platforms, such |
| 9596 | # as OpenBSD 6.3 with Clang 5.0.1. I guess the |
| 9597 | # problem is that the macro that ultimately does |
| 9598 | # the byte-swapping involves a conditional |
| 9599 | # expression that tests whether the value being |
| 9600 | # swapped is a compile-time constant or not, |
| 9601 | # using __builtin_constant_p(), and, depending |
| 9602 | # on whether it is, does a compile-time swap or |
| 9603 | # a run-time swap; perhaps the compiler always |
| 9604 | # considers one of the two results of the |
| 9605 | # conditional expressin is never evaluated, |
| 9606 | # because the conditional check is done at |
| 9607 | # compile time, and thus always says "that |
| 9608 | # expression is never executed". |
| 9609 | # |
| 9610 | # (Perhaps there should be a way of flagging |
| 9611 | # an expression that you *want* evaluated at |
| 9612 | # compile time, so that the compiler 1) warns |
| 9613 | # if it *can't* be evaluated at compile time |
| 9614 | # and 2) *doesn't* warn that the true or false |
| 9615 | # branch will never be reached.) |
| 9616 | # |
| 9617 | |
| 9618 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5 |
| 9619 | $as_echo_n "checking whether the compiler supports the -Wunreachable-code option... " >&6; } |
| 9620 | save_CFLAGS="$CFLAGS" |
| 9621 | if expr "x-Wunreachable-code" : "x-W.*" >/dev/null |
| 9622 | then |
| 9623 | CFLAGS="$CFLAGS $ac_lbl_unknown_warning_option_error -Wunreachable-code" |
| 9624 | elif expr "x-Wunreachable-code" : "x-f.*" >/dev/null |
| 9625 | then |
| 9626 | CFLAGS="$CFLAGS -Werror -Wunreachable-code" |
| 9627 | elif expr "x-Wunreachable-code" : "x-m.*" >/dev/null |
| 9628 | then |
| 9629 | CFLAGS="$CFLAGS -Werror -Wunreachable-code" |
| 9630 | else |
| 9631 | CFLAGS="$CFLAGS -Wunreachable-code" |
| 9632 | fi |
| 9633 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9634 | /* end confdefs.h. */ |
| 9635 | |
| 9636 | int |
| 9637 | main () |
| 9638 | { |
| 9639 | return 0 |
| 9640 | ; |
| 9641 | return 0; |
| 9642 | } |
| 9643 | _ACEOF |
| 9644 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9645 | |
| 9646 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9647 | $as_echo "yes" >&6; } |
| 9648 | can_add_to_cflags=yes |
| 9649 | # |
| 9650 | # The compile supports this; do we have some C code for |
| 9651 | # which the warning should *not* appear? |
| 9652 | # We test the fourth argument because the third argument |
| 9653 | # could contain quotes, breaking the test. |
| 9654 | # |
| 9655 | if test "xgenerates warnings from ntohs()" != "x" |
| 9656 | then |
| 9657 | CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" |
| 9658 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5 |
| 9659 | $as_echo_n "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; } |
| 9660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9661 | /* end confdefs.h. */ |
| 9662 | #include <arpa/inet.h> |
| 9663 | |
| 9664 | unsigned short |
| 9665 | testme(unsigned short a) |
| 9666 | { |
| 9667 | return ntohs(a); |
| 9668 | } |
| 9669 | |
| 9670 | _ACEOF |
| 9671 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9672 | |
| 9673 | # |
| 9674 | # Not a problem. |
| 9675 | # |
| 9676 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9677 | $as_echo "no" >&6; } |
| 9678 | |
| 9679 | else |
| 9680 | |
| 9681 | # |
| 9682 | # A problem. |
| 9683 | # |
| 9684 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 9685 | $as_echo "yes" >&6; } |
| 9686 | can_add_to_cflags=no |
| 9687 | |
| 9688 | fi |
| 9689 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9690 | fi |
| 9691 | CFLAGS="$save_CFLAGS" |
| 9692 | if test x"$can_add_to_cflags" = "xyes" |
| 9693 | then |
| 9694 | V_CCOPT="$V_CCOPT -Wunreachable-code" |
| 9695 | fi |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 9696 | |
| 9697 | else |
| 9698 | |
| 9699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9700 | $as_echo "no" >&6; } |
| 9701 | CFLAGS="$save_CFLAGS" |
| 9702 | |
| 9703 | fi |
| 9704 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9705 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9706 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9707 | |
| 9708 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5 |
| 9709 | $as_echo_n "checking whether the compiler supports generating dependencies... " >&6; } |
| 9710 | if test "$GCC" = yes ; then |
| 9711 | # |
| 9712 | # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even |
| 9713 | # though it's not); we assume that, in this case, the flag |
| 9714 | # would be -M. |
| 9715 | # |
| 9716 | ac_lbl_dependency_flag="-M" |
| 9717 | else |
| 9718 | # |
| 9719 | # Not GCC or a compiler deemed to be GCC; what platform is |
| 9720 | # this? (We're assuming that if the compiler isn't GCC |
| 9721 | # it's the compiler from the vendor of the OS; that won't |
| 9722 | # necessarily be true for x86 platforms, where it might be |
| 9723 | # the Intel C compiler.) |
| 9724 | # |
| 9725 | case "$host_os" in |
| 9726 | |
| 9727 | irix*|osf*|darwin*) |
| 9728 | # |
| 9729 | # MIPS C for IRIX, DEC C, and clang all use -M. |
| 9730 | # |
| 9731 | ac_lbl_dependency_flag="-M" |
| 9732 | ;; |
| 9733 | |
| 9734 | solaris*) |
| 9735 | # |
| 9736 | # Sun C uses -xM. |
| 9737 | # |
| 9738 | ac_lbl_dependency_flag="-xM" |
| 9739 | ;; |
| 9740 | |
| 9741 | hpux*) |
| 9742 | # |
| 9743 | # HP's older C compilers don't support this. |
| 9744 | # HP's newer C compilers support this with |
| 9745 | # either +M or +Make; the older compilers |
| 9746 | # interpret +M as something completely |
| 9747 | # different, so we use +Make so we don't |
| 9748 | # think it works with the older compilers. |
| 9749 | # |
| 9750 | ac_lbl_dependency_flag="+Make" |
| 9751 | ;; |
| 9752 | |
| 9753 | *) |
| 9754 | # |
| 9755 | # Not one of the above; assume no support for |
| 9756 | # generating dependencies. |
| 9757 | # |
| 9758 | ac_lbl_dependency_flag="" |
| 9759 | ;; |
| 9760 | esac |
| 9761 | fi |
| 9762 | |
| 9763 | # |
| 9764 | # Is ac_lbl_dependency_flag defined and, if so, does the compiler |
| 9765 | # complain about it? |
| 9766 | # |
| 9767 | # Note: clang doesn't seem to exit with an error status when handed |
| 9768 | # an unknown non-warning error, even if you pass it |
| 9769 | # -Werror=unknown-warning-option. However, it always supports |
| 9770 | # -M, so the fact that this test always succeeds with clang |
| 9771 | # isn't an issue. |
| 9772 | # |
| 9773 | if test ! -z "$ac_lbl_dependency_flag"; then |
| 9774 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9775 | /* end confdefs.h. */ |
| 9776 | int main(void) { return 0; } |
| 9777 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9778 | if { { $as_echo "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5 |
| 9779 | (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5 |
| 9780 | ac_status=$? |
| 9781 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 9782 | test $ac_status = 0; }; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9783 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5 |
| 9784 | $as_echo "yes, with $ac_lbl_dependency_flag" >&6; } |
| 9785 | DEPENDENCY_CFLAG="$ac_lbl_dependency_flag" |
| 9786 | MKDEP='${srcdir}/mkdep' |
| 9787 | else |
| 9788 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9789 | $as_echo "no" >&6; } |
| 9790 | # |
| 9791 | # We can't run mkdep, so have "make depend" do |
| 9792 | # nothing. |
| 9793 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9794 | MKDEP='${srcdir}/nomkdep' |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9795 | fi |
| 9796 | rm -rf conftest* |
| 9797 | else |
| 9798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 9799 | $as_echo "no" >&6; } |
| 9800 | # |
| 9801 | # We can't run mkdep, so have "make depend" do |
| 9802 | # nothing. |
| 9803 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9804 | MKDEP='${srcdir}/nomkdep' |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9805 | fi |
| 9806 | |
| 9807 | |
| 9808 | |
| 9809 | # |
| 9810 | # We used to set -n32 for IRIX 6 when not using GCC (presumed |
| 9811 | # to mean that we're using MIPS C or MIPSpro C); it specified |
| 9812 | # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm |
| 9813 | # not sure why that would be something to do *only* with a |
| 9814 | # .devel file; why should the ABI for which we produce code |
| 9815 | # depend on .devel? |
| 9816 | # |
| 9817 | os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9818 | name="lbl/os-$os.h" |
| 9819 | if test -f $name ; then |
| 9820 | ln -s $name os-proto.h |
| 9821 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9822 | $as_echo "#define HAVE_OS_PROTO_H 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9823 | |
| 9824 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9825 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5 |
| 9826 | $as_echo "$as_me: WARNING: can't find $name" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9827 | fi |
| 9828 | fi |
| 9829 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9830 | # |
| 9831 | # Check to see if the sockaddr struct has the 4.4 BSD sa_len member. |
| 9832 | # |
| 9833 | ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" " |
| 9834 | #include <sys/types.h> |
| 9835 | #include <sys/socket.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9836 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9837 | " |
| 9838 | if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : |
| 9839 | |
| 9840 | cat >>confdefs.h <<_ACEOF |
| 9841 | #define HAVE_STRUCT_SOCKADDR_SA_LEN 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9842 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9843 | |
| 9844 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9845 | fi |
| 9846 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9847 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9848 | # |
| 9849 | # Check to see if there's a sockaddr_storage structure. |
| 9850 | # |
| 9851 | ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " |
| 9852 | #include <sys/types.h> |
| 9853 | #include <sys/socket.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9854 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9855 | " |
| 9856 | if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9857 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9858 | cat >>confdefs.h <<_ACEOF |
| 9859 | #define HAVE_STRUCT_SOCKADDR_STORAGE 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9860 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9861 | |
| 9862 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9863 | fi |
| 9864 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9865 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9866 | # |
| 9867 | # Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00 |
| 9868 | # dl_module_id_1 member. |
| 9869 | # |
| 9870 | # NOTE: any failure means we conclude that it doesn't have that member, |
| 9871 | # so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or |
| 9872 | # have one that doesn't declare a dl_hp_ppa_info_t type, we conclude |
| 9873 | # it doesn't have that member (which is OK, as either we won't be |
| 9874 | # using code that would use that member, or we wouldn't compile in |
| 9875 | # any case). |
| 9876 | # |
| 9877 | ac_fn_c_check_member "$LINENO" "dl_hp_ppa_info_t" "dl_module_id_1" "ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" " |
| 9878 | #include <sys/types.h> |
| 9879 | #include <sys/dlpi.h> |
| 9880 | #include <sys/dlpi_ext.h> |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9881 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9882 | " |
| 9883 | if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9884 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9885 | cat >>confdefs.h <<_ACEOF |
| 9886 | #define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9887 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9888 | |
| 9889 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9890 | fi |
| 9891 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9892 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9893 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if unaligned accesses fail" >&5 |
| 9894 | $as_echo_n "checking if unaligned accesses fail... " >&6; } |
| 9895 | if ${ac_cv_lbl_unaligned_fail+:} false; then : |
| 9896 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9897 | else |
| 9898 | case "$host_cpu" in |
| 9899 | |
| 9900 | # |
| 9901 | # These are CPU types where: |
| 9902 | # |
| 9903 | # the CPU faults on an unaligned access, but at least some |
| 9904 | # OSes that support that CPU catch the fault and simulate |
| 9905 | # the unaligned access (e.g., Alpha/{Digital,Tru64} UNIX) - |
| 9906 | # the simulation is slow, so we don't want to use it; |
| 9907 | # |
| 9908 | # the CPU, I infer (from the old |
| 9909 | # |
| 9910 | # XXX: should also check that they don't do weird things (like on arm) |
| 9911 | # |
| 9912 | # comment) doesn't fault on unaligned accesses, but doesn't |
| 9913 | # do a normal unaligned fetch, either (e.g., presumably, ARM); |
| 9914 | # |
| 9915 | # for whatever reason, the test program doesn't work |
| 9916 | # (this has been claimed to be the case for several of those |
| 9917 | # CPUs - I don't know what the problem is; the problem |
| 9918 | # was reported as "the test program dumps core" for SuperH, |
| 9919 | # but that's what the test program is *supposed* to do - |
| 9920 | # it dumps core before it writes anything, so the test |
| 9921 | # for an empty output file should find an empty output |
| 9922 | # file and conclude that unaligned accesses don't work). |
| 9923 | # |
| 9924 | # This run-time test won't work if you're cross-compiling, so |
| 9925 | # in order to support cross-compiling for a particular CPU, |
| 9926 | # we have to wire in the list of CPU types anyway, as far as |
| 9927 | # I know, so perhaps we should just have a set of CPUs on |
| 9928 | # which we know it doesn't work, a set of CPUs on which we |
| 9929 | # know it does work, and have the script just fail on other |
| 9930 | # cpu types and update it when such a failure occurs. |
| 9931 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9932 | alpha*|arm*|bfin*|hp*|mips*|sh*|sparc*|ia64|nv1) |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9933 | ac_cv_lbl_unaligned_fail=yes |
| 9934 | ;; |
| 9935 | |
| 9936 | *) |
| 9937 | cat >conftest.c <<EOF |
| 9938 | # include <sys/types.h> |
| 9939 | # include <sys/wait.h> |
| 9940 | # include <stdio.h> |
| 9941 | unsigned char a[5] = { 1, 2, 3, 4, 5 }; |
| 9942 | main() { |
| 9943 | unsigned int i; |
| 9944 | pid_t pid; |
| 9945 | int status; |
| 9946 | /* avoid "core dumped" message */ |
| 9947 | pid = fork(); |
| 9948 | if (pid < 0) |
| 9949 | exit(2); |
| 9950 | if (pid > 0) { |
| 9951 | /* parent */ |
| 9952 | pid = waitpid(pid, &status, 0); |
| 9953 | if (pid < 0) |
| 9954 | exit(3); |
| 9955 | exit(!WIFEXITED(status)); |
| 9956 | } |
| 9957 | /* child */ |
| 9958 | i = *(unsigned int *)&a[1]; |
| 9959 | printf("%d\n", i); |
| 9960 | exit(0); |
| 9961 | } |
| 9962 | EOF |
| 9963 | ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \ |
| 9964 | conftest.c $LIBS >/dev/null 2>&1 |
| 9965 | if test ! -x conftest ; then |
| 9966 | ac_cv_lbl_unaligned_fail=yes |
| 9967 | else |
| 9968 | ./conftest >conftest.out |
| 9969 | if test ! -s conftest.out ; then |
| 9970 | ac_cv_lbl_unaligned_fail=yes |
| 9971 | else |
| 9972 | ac_cv_lbl_unaligned_fail=no |
| 9973 | fi |
| 9974 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9975 | rm -f -r conftest* core core.conftest |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9976 | ;; |
| 9977 | esac |
| 9978 | fi |
| 9979 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9980 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_unaligned_fail" >&5 |
| 9981 | $as_echo "$ac_cv_lbl_unaligned_fail" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9982 | if test $ac_cv_lbl_unaligned_fail = yes ; then |
| 9983 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 9984 | $as_echo "#define LBL_ALIGN 1" >>confdefs.h |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9985 | |
| 9986 | fi |
| 9987 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 9988 | |
| 9989 | |
| 9990 | |
| 9991 | |
| 9992 | |
| 9993 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 9994 | |
| 9995 | |
| 9996 | |
| 9997 | |
| 9998 | |
| 9999 | |
| 10000 | |
| 10001 | |
| 10002 | |
| 10003 | |
| 10004 | |
| 10005 | |
| 10006 | |
| 10007 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10008 | |
| 10009 | |
| 10010 | |
| 10011 | |
| 10012 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10013 | # Check whether --enable-usb was given. |
| 10014 | if test "${enable_usb+set}" = set; then : |
| 10015 | enableval=$enable_usb; |
| 10016 | else |
| 10017 | enable_usb=yes |
| 10018 | fi |
| 10019 | |
| 10020 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10021 | if test "xxx_only" = yes; then |
| 10022 | # User requested something-else-only pcap, so they don't |
| 10023 | # want USB support. |
| 10024 | enable_usb=no |
| 10025 | fi |
| 10026 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10027 | if test "x$enable_usb" != "xno" ; then |
| 10028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for USB sniffing support" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10029 | $as_echo_n "checking for USB sniffing support... " >&6; } |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10030 | case "$host_os" in |
| 10031 | linux*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10032 | |
| 10033 | $as_echo "#define PCAP_SUPPORT_USB 1" >>confdefs.h |
| 10034 | |
| 10035 | USB_SRC=pcap-usb-linux.c |
| 10036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10037 | $as_echo "yes" >&6; } |
| 10038 | ac_usb_dev_name=`udevinfo -q name -p /sys/class/usb_device/usbmon 2>/dev/null` |
| 10039 | if test $? -ne 0 ; then |
| 10040 | ac_usb_dev_name="usbmon" |
| 10041 | fi |
| 10042 | |
| 10043 | cat >>confdefs.h <<_ACEOF |
| 10044 | #define LINUX_USB_MON_DEV "/dev/$ac_usb_dev_name" |
| 10045 | _ACEOF |
| 10046 | |
| 10047 | { $as_echo "$as_me:${as_lineno-$LINENO}: Device for USB sniffing is /dev/$ac_usb_dev_name" >&5 |
| 10048 | $as_echo "$as_me: Device for USB sniffing is /dev/$ac_usb_dev_name" >&6;} |
| 10049 | # |
| 10050 | # Do we have a version of <linux/compiler.h> available? |
| 10051 | # If so, we might need it for <linux/usbdevice_fs.h>. |
| 10052 | # |
| 10053 | for ac_header in linux/compiler.h |
| 10054 | do : |
| 10055 | ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default" |
| 10056 | if test "x$ac_cv_header_linux_compiler_h" = xyes; then : |
| 10057 | cat >>confdefs.h <<_ACEOF |
| 10058 | #define HAVE_LINUX_COMPILER_H 1 |
| 10059 | _ACEOF |
| 10060 | |
| 10061 | fi |
| 10062 | |
| 10063 | done |
| 10064 | |
| 10065 | if test "$ac_cv_header_linux_compiler_h" = yes; then |
| 10066 | # |
| 10067 | # Yes - include it when testing for <linux/usbdevice_fs.h>. |
| 10068 | # |
| 10069 | for ac_header in linux/usbdevice_fs.h |
| 10070 | do : |
| 10071 | ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h> |
| 10072 | " |
| 10073 | if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then : |
| 10074 | cat >>confdefs.h <<_ACEOF |
| 10075 | #define HAVE_LINUX_USBDEVICE_FS_H 1 |
| 10076 | _ACEOF |
| 10077 | |
| 10078 | fi |
| 10079 | |
| 10080 | done |
| 10081 | |
| 10082 | else |
| 10083 | for ac_header in linux/usbdevice_fs.h |
| 10084 | do : |
| 10085 | ac_fn_c_check_header_mongrel "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default" |
| 10086 | if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes; then : |
| 10087 | cat >>confdefs.h <<_ACEOF |
| 10088 | #define HAVE_LINUX_USBDEVICE_FS_H 1 |
| 10089 | _ACEOF |
| 10090 | |
| 10091 | fi |
| 10092 | |
| 10093 | done |
| 10094 | |
| 10095 | fi |
| 10096 | if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then |
| 10097 | # |
| 10098 | # OK, does it define bRequestType? Older versions of the kernel |
| 10099 | # define fields with names like "requesttype, "request", and |
| 10100 | # "value", rather than "bRequestType", "bRequest", and |
| 10101 | # "wValue". |
| 10102 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10103 | ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" " |
| 10104 | $ac_includes_default |
| 10105 | #ifdef HAVE_LINUX_COMPILER_H |
| 10106 | #include <linux/compiler.h> |
| 10107 | #endif |
| 10108 | #include <linux/usbdevice_fs.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10109 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10110 | " |
| 10111 | if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes; then : |
| 10112 | |
| 10113 | cat >>confdefs.h <<_ACEOF |
| 10114 | #define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10115 | _ACEOF |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10116 | |
| 10117 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10118 | fi |
| 10119 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10120 | fi |
| 10121 | ;; |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10122 | freebsd*) |
| 10123 | # |
| 10124 | # This just uses BPF in FreeBSD 8.4 and later; we don't need |
| 10125 | # to check for anything special for capturing. |
| 10126 | # |
| 10127 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, in FreeBSD 8.4 and later" >&5 |
| 10128 | $as_echo "yes, in FreeBSD 8.4 and later" >&6; } |
| 10129 | ;; |
| 10130 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10131 | *) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10132 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10133 | $as_echo "no" >&6; } |
| 10134 | ;; |
| 10135 | esac |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10136 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10137 | |
| 10138 | |
| 10139 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10140 | if test "xxx_only" != yes; then |
| 10141 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the platform could support netfilter sniffing" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10142 | $as_echo_n "checking whether the platform could support netfilter sniffing... " >&6; } |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10143 | case "$host_os" in |
| 10144 | linux*) |
| 10145 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10146 | $as_echo "yes" >&6; } |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10147 | # |
| 10148 | # Life's too short to deal with trying to get this to compile |
| 10149 | # if you don't get the right types defined with |
| 10150 | # __KERNEL_STRICT_NAMES getting defined by some other include. |
| 10151 | # |
| 10152 | # Check whether the includes Just Work. If not, don't turn on |
| 10153 | # netfilter support. |
| 10154 | # |
| 10155 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10156 | $as_echo_n "checking whether we can compile the netfilter support... " >&6; } |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10157 | if ${ac_cv_netfilter_can_compile+:} false; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10158 | $as_echo_n "(cached) " >&6 |
| 10159 | else |
| 10160 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10161 | /* end confdefs.h. */ |
| 10162 | |
| 10163 | $ac_includes_default |
| 10164 | #include <sys/socket.h> |
| 10165 | #include <netinet/in.h> |
| 10166 | #include <linux/types.h> |
| 10167 | |
| 10168 | #include <linux/netlink.h> |
| 10169 | #include <linux/netfilter.h> |
| 10170 | #include <linux/netfilter/nfnetlink.h> |
| 10171 | #include <linux/netfilter/nfnetlink_log.h> |
| 10172 | #include <linux/netfilter/nfnetlink_queue.h> |
| 10173 | int |
| 10174 | main () |
| 10175 | { |
| 10176 | |
| 10177 | ; |
| 10178 | return 0; |
| 10179 | } |
| 10180 | _ACEOF |
| 10181 | if ac_fn_c_try_compile "$LINENO"; then : |
| 10182 | ac_cv_netfilter_can_compile=yes |
| 10183 | else |
| 10184 | ac_cv_netfilter_can_compile=no |
| 10185 | fi |
| 10186 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 10187 | fi |
| 10188 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10189 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10190 | $as_echo "$ac_cv_netfilter_can_compile" >&6; } |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10191 | if test $ac_cv_netfilter_can_compile = yes ; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10192 | |
| 10193 | $as_echo "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h |
| 10194 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10195 | NETFILTER_SRC=pcap-netfilter-linux.c |
| 10196 | fi |
| 10197 | ;; |
| 10198 | *) |
| 10199 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10200 | $as_echo "no" >&6; } |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10201 | ;; |
| 10202 | esac |
| 10203 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10204 | |
| 10205 | |
| 10206 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10207 | # Check whether --enable-netmap was given. |
| 10208 | if test "${enable_netmap+set}" = set; then : |
| 10209 | enableval=$enable_netmap; |
| 10210 | else |
| 10211 | enable_netmap=yes |
| 10212 | fi |
| 10213 | |
| 10214 | |
| 10215 | if test "x$enable_netmap" != "xno" ; then |
| 10216 | # |
| 10217 | # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is |
| 10218 | # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS |
| 10219 | # is defined, for example, as it includes a non-existent malloc.h |
| 10220 | # header. |
| 10221 | # |
| 10222 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5 |
| 10223 | $as_echo_n "checking whether we can compile the netmap support... " >&6; } |
| 10224 | if ${ac_cv_net_netmap_user_can_compile+:} false; then : |
| 10225 | $as_echo_n "(cached) " >&6 |
| 10226 | else |
| 10227 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10228 | /* end confdefs.h. */ |
| 10229 | |
| 10230 | $ac_includes_default |
| 10231 | #define NETMAP_WITH_LIBS |
| 10232 | #include <net/netmap_user.h> |
| 10233 | int |
| 10234 | main () |
| 10235 | { |
| 10236 | |
| 10237 | ; |
| 10238 | return 0; |
| 10239 | } |
| 10240 | _ACEOF |
| 10241 | if ac_fn_c_try_compile "$LINENO"; then : |
| 10242 | ac_cv_net_netmap_user_can_compile=yes |
| 10243 | else |
| 10244 | ac_cv_net_netmap_user_can_compile=no |
| 10245 | fi |
| 10246 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 10247 | fi |
| 10248 | |
| 10249 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5 |
| 10250 | $as_echo "$ac_cv_net_netmap_user_can_compile" >&6; } |
| 10251 | if test $ac_cv_net_netmap_user_can_compile = yes ; then |
| 10252 | |
| 10253 | $as_echo "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h |
| 10254 | |
| 10255 | NETMAP_SRC=pcap-netmap.c |
| 10256 | fi |
| 10257 | |
| 10258 | |
| 10259 | fi |
| 10260 | |
| 10261 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10262 | # Check whether --enable-bluetooth was given. |
| 10263 | if test "${enable_bluetooth+set}" = set; then : |
| 10264 | enableval=$enable_bluetooth; |
| 10265 | else |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10266 | enable_bluetooth=ifsupportavailable |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10267 | fi |
| 10268 | |
| 10269 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10270 | if test "xxx_only" = yes; then |
| 10271 | # User requested something-else-only pcap, so they don't |
| 10272 | # want Bluetooth support. |
| 10273 | enable_bluetooth=no |
| 10274 | fi |
| 10275 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10276 | if test "x$enable_bluetooth" != "xno" ; then |
| 10277 | case "$host_os" in |
| 10278 | linux*) |
| 10279 | ac_fn_c_check_header_mongrel "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" |
| 10280 | if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes; then : |
| 10281 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10282 | # |
| 10283 | # We have bluetooth.h, so we support Bluetooth |
| 10284 | # sniffing. |
| 10285 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10286 | |
| 10287 | $as_echo "#define PCAP_SUPPORT_BT 1" >>confdefs.h |
| 10288 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10289 | BT_SRC=pcap-bt-linux.c |
| 10290 | { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10291 | $as_echo "$as_me: Bluetooth sniffing is supported" >&6;} |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10292 | ac_lbl_bluetooth_available=yes |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10293 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10294 | # |
| 10295 | # OK, does struct sockaddr_hci have an hci_channel |
| 10296 | # member? |
| 10297 | # |
| 10298 | ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" " |
| 10299 | #include <bluetooth/bluetooth.h> |
| 10300 | #include <bluetooth/hci.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10301 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10302 | " |
| 10303 | if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes; then : |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10304 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10305 | cat >>confdefs.h <<_ACEOF |
| 10306 | #define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10307 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10308 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10309 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10310 | # |
| 10311 | # Yes; is HCI_CHANNEL_MONITOR defined? |
| 10312 | # |
| 10313 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5 |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10314 | $as_echo_n "checking if HCI_CHANNEL_MONITOR is defined... " >&6; } |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10315 | if ${ac_cv_lbl_hci_channel_monitor_is_defined+:} false; then : |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10316 | $as_echo_n "(cached) " >&6 |
| 10317 | else |
| 10318 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10319 | /* end confdefs.h. */ |
| 10320 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10321 | #include <bluetooth/bluetooth.h> |
| 10322 | #include <bluetooth/hci.h> |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10323 | |
| 10324 | int |
| 10325 | main () |
| 10326 | { |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10327 | |
| 10328 | u_int i = HCI_CHANNEL_MONITOR; |
| 10329 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10330 | ; |
| 10331 | return 0; |
| 10332 | } |
| 10333 | _ACEOF |
| 10334 | if ac_fn_c_try_compile "$LINENO"; then : |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10335 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10336 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10337 | $as_echo "yes" >&6; } |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10338 | |
| 10339 | $as_echo "#define PCAP_SUPPORT_BT_MONITOR /**/" >>confdefs.h |
| 10340 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10341 | BT_MONITOR_SRC=pcap-bt-monitor-linux.c |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10342 | |
| 10343 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10344 | |
| 10345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10346 | $as_echo "no" >&6; } |
| 10347 | |
| 10348 | fi |
| 10349 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 10350 | fi |
| 10351 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10352 | |
| 10353 | fi |
| 10354 | |
| 10355 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10356 | else |
| 10357 | |
| 10358 | # |
| 10359 | # We don't have bluetooth.h, so we don't support |
| 10360 | # Bluetooth sniffing. |
| 10361 | # |
| 10362 | if test "x$enable_bluetooth" = "xyes" ; then |
| 10363 | as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5 |
| 10364 | else |
| 10365 | { $as_echo "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5 |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10366 | $as_echo "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;} |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10367 | fi |
| 10368 | |
| 10369 | fi |
| 10370 | |
| 10371 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10372 | ;; |
| 10373 | *) |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10374 | if test "x$enable_bluetooth" = "xyes" ; then |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10375 | as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5 |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10376 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10377 | { $as_echo "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10378 | $as_echo "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;} |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10379 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10380 | ;; |
| 10381 | esac |
| 10382 | |
| 10383 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10384 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10385 | fi |
| 10386 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10387 | # Check whether --enable-dbus was given. |
| 10388 | if test "${enable_dbus+set}" = set; then : |
| 10389 | enableval=$enable_dbus; |
| 10390 | else |
| 10391 | enable_dbus=ifavailable |
| 10392 | fi |
| 10393 | |
| 10394 | |
Elliott Hughes | 965a4b5 | 2017-05-15 10:37:39 -0700 | [diff] [blame] | 10395 | if test "xxx_only" = yes; then |
| 10396 | # User requested something-else-only pcap, so they don't |
| 10397 | # want D-Bus support. |
| 10398 | enable_dbus=no |
| 10399 | fi |
| 10400 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10401 | if test "x$enable_dbus" != "xno"; then |
| 10402 | if test "x$enable_dbus" = "xyes"; then |
| 10403 | case "$host_os" in |
| 10404 | |
| 10405 | darwin*) |
| 10406 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10407 | # We don't support D-Bus sniffing on macOS; see |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10408 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10409 | # https://bugs.freedesktop.org/show_bug.cgi?id=74029 |
| 10410 | # |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10411 | # The user requested it, so fail. |
| 10412 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10413 | as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10414 | esac |
| 10415 | else |
| 10416 | case "$host_os" in |
| 10417 | |
| 10418 | darwin*) |
| 10419 | # |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10420 | # We don't support D-Bus sniffing on macOS; see |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10421 | # |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10422 | # https://bugs.freedesktop.org/show_bug.cgi?id=74029 |
| 10423 | # |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10424 | # The user dind't explicitly request it, so just |
| 10425 | # silently refuse to enable it. |
| 10426 | # |
| 10427 | enable_dbus="no" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10428 | ;; |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10429 | esac |
| 10430 | fi |
| 10431 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10432 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10433 | if test "x$enable_dbus" != "xno"; then |
| 10434 | # Extract the first word of "pkg-config", so it can be a program name with args. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10435 | set dummy pkg-config; ac_word=$2 |
| 10436 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 10437 | $as_echo_n "checking for $ac_word... " >&6; } |
| 10438 | if ${ac_cv_prog_PKGCONFIG+:} false; then : |
| 10439 | $as_echo_n "(cached) " >&6 |
| 10440 | else |
| 10441 | if test -n "$PKGCONFIG"; then |
| 10442 | ac_cv_prog_PKGCONFIG="$PKGCONFIG" # Let the user override the test. |
| 10443 | else |
| 10444 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10445 | for as_dir in $PATH |
| 10446 | do |
| 10447 | IFS=$as_save_IFS |
| 10448 | test -z "$as_dir" && as_dir=. |
| 10449 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10450 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 10451 | ac_cv_prog_PKGCONFIG="pkg-config" |
| 10452 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 10453 | break 2 |
| 10454 | fi |
| 10455 | done |
| 10456 | done |
| 10457 | IFS=$as_save_IFS |
| 10458 | |
| 10459 | test -z "$ac_cv_prog_PKGCONFIG" && ac_cv_prog_PKGCONFIG="no" |
| 10460 | fi |
| 10461 | fi |
| 10462 | PKGCONFIG=$ac_cv_prog_PKGCONFIG |
| 10463 | if test -n "$PKGCONFIG"; then |
| 10464 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5 |
| 10465 | $as_echo "$PKGCONFIG" >&6; } |
| 10466 | else |
| 10467 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10468 | $as_echo "no" >&6; } |
| 10469 | fi |
| 10470 | |
| 10471 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10472 | if test "x$PKGCONFIG" != "xno"; then |
| 10473 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for D-Bus" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10474 | $as_echo_n "checking for D-Bus... " >&6; } |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10475 | if "$PKGCONFIG" dbus-1; then |
| 10476 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10477 | $as_echo "yes" >&6; } |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10478 | DBUS_CFLAGS=`"$PKGCONFIG" --cflags dbus-1` |
| 10479 | DBUS_LIBS=`"$PKGCONFIG" --libs dbus-1` |
| 10480 | save_CFLAGS="$CFLAGS" |
| 10481 | save_LIBS="$LIBS" |
| 10482 | CFLAGS="$CFLAGS $DBUS_CFLAGS" |
| 10483 | LIBS="$LIBS $DBUS_LIBS" |
| 10484 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10485 | $as_echo_n "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; } |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10487 | /* end confdefs.h. */ |
| 10488 | #include <string.h> |
| 10489 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10490 | #include <time.h> |
| 10491 | #include <sys/time.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10492 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10493 | #include <dbus/dbus.h> |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10494 | int |
| 10495 | main () |
| 10496 | { |
| 10497 | return dbus_connection_read_write(NULL, 0); |
| 10498 | ; |
| 10499 | return 0; |
| 10500 | } |
| 10501 | _ACEOF |
| 10502 | if ac_fn_c_try_link "$LINENO"; then : |
| 10503 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10504 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10505 | $as_echo "yes" >&6; } |
| 10506 | |
| 10507 | $as_echo "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h |
| 10508 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10509 | DBUS_SRC=pcap-dbus.c |
| 10510 | V_INCLS="$V_INCLS $DBUS_CFLAGS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10511 | |
| 10512 | else |
| 10513 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10514 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10515 | $as_echo "no" >&6; } |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10516 | if test "x$enable_dbus" = "xyes"; then |
| 10517 | as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5 |
| 10518 | fi |
| 10519 | LIBS="$save_LIBS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10520 | |
| 10521 | fi |
| 10522 | rm -f core conftest.err conftest.$ac_objext \ |
| 10523 | conftest$ac_exeext conftest.$ac_ext |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10524 | CFLAGS="$save_CFLAGS" |
| 10525 | else |
| 10526 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10527 | $as_echo "no" >&6; } |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10528 | if test "x$enable_dbus" = "xyes"; then |
| 10529 | as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5 |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10530 | fi |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10531 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10532 | fi |
| 10533 | |
| 10534 | |
| 10535 | fi |
| 10536 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10537 | # Check whether --enable-rdma was given. |
| 10538 | if test "${enable_rdma+set}" = set; then : |
| 10539 | enableval=$enable_rdma; |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10540 | else |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10541 | enable_rdmasniff=ifavailable |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10542 | fi |
| 10543 | |
| 10544 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10545 | if test "xxx_only" = yes; then |
| 10546 | # User requested something-else-only pcap, so they don't |
| 10547 | # want RDMA support. |
| 10548 | enable_rdmasniff=no |
| 10549 | fi |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10550 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10551 | if test "x$enable_rdmasniff" != "xno"; then |
| 10552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5 |
| 10553 | $as_echo_n "checking for ibv_get_device_list in -libverbs... " >&6; } |
| 10554 | if ${ac_cv_lib_ibverbs_ibv_get_device_list+:} false; then : |
| 10555 | $as_echo_n "(cached) " >&6 |
| 10556 | else |
| 10557 | ac_check_lib_save_LIBS=$LIBS |
| 10558 | LIBS="-libverbs $LIBS" |
| 10559 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10560 | /* end confdefs.h. */ |
| 10561 | |
| 10562 | /* Override any GCC internal prototype to avoid an error. |
| 10563 | Use char because int might match the return type of a GCC |
| 10564 | builtin and then its argument prototype would still apply. */ |
| 10565 | #ifdef __cplusplus |
| 10566 | extern "C" |
| 10567 | #endif |
| 10568 | char ibv_get_device_list (); |
| 10569 | int |
| 10570 | main () |
| 10571 | { |
| 10572 | return ibv_get_device_list (); |
| 10573 | ; |
| 10574 | return 0; |
| 10575 | } |
| 10576 | _ACEOF |
| 10577 | if ac_fn_c_try_link "$LINENO"; then : |
| 10578 | ac_cv_lib_ibverbs_ibv_get_device_list=yes |
| 10579 | else |
| 10580 | ac_cv_lib_ibverbs_ibv_get_device_list=no |
| 10581 | fi |
| 10582 | rm -f core conftest.err conftest.$ac_objext \ |
| 10583 | conftest$ac_exeext conftest.$ac_ext |
| 10584 | LIBS=$ac_check_lib_save_LIBS |
| 10585 | fi |
| 10586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5 |
| 10587 | $as_echo "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; } |
| 10588 | if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes; then : |
| 10589 | |
| 10590 | ac_fn_c_check_header_mongrel "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" |
| 10591 | if test "x$ac_cv_header_infiniband_verbs_h" = xyes; then : |
| 10592 | |
| 10593 | # |
| 10594 | # ibv_create_flow may be defined as a static inline |
| 10595 | # function in infiniband/verbs.h, so we can't |
| 10596 | # use AC_CHECK_LIB. |
| 10597 | # |
| 10598 | # Too bad autoconf has no AC_SYMBOL_EXISTS() |
| 10599 | # macro that works like CMake's check_symbol_exists() |
| 10600 | # function, to check do a compile check like |
| 10601 | # this (they do a clever trick to avoid having |
| 10602 | # to know the function's signature). |
| 10603 | # |
| 10604 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5 |
| 10605 | $as_echo_n "checking whether libibverbs defines ibv_create_flow... " >&6; } |
| 10606 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10607 | /* end confdefs.h. */ |
| 10608 | |
| 10609 | #include <infiniband/verbs.h> |
| 10610 | |
| 10611 | int |
| 10612 | main () |
| 10613 | { |
| 10614 | |
| 10615 | (void) ibv_create_flow((struct ibv_qp *) NULL, |
| 10616 | (struct ibv_flow_attr *) NULL); |
| 10617 | |
| 10618 | ; |
| 10619 | return 0; |
| 10620 | } |
| 10621 | _ACEOF |
| 10622 | if ac_fn_c_try_link "$LINENO"; then : |
| 10623 | |
| 10624 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 10625 | $as_echo "yes" >&6; } |
| 10626 | |
| 10627 | $as_echo "#define PCAP_SUPPORT_RDMASNIFF /**/" >>confdefs.h |
| 10628 | |
| 10629 | RDMA_SRC=pcap-rdmasniff.c |
| 10630 | LIBS="-libverbs $LIBS" |
| 10631 | |
| 10632 | else |
| 10633 | |
| 10634 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10635 | $as_echo "no" >&6; } |
| 10636 | |
| 10637 | |
| 10638 | fi |
| 10639 | rm -f core conftest.err conftest.$ac_objext \ |
| 10640 | conftest$ac_exeext conftest.$ac_ext |
| 10641 | |
| 10642 | fi |
| 10643 | |
| 10644 | |
| 10645 | |
| 10646 | fi |
| 10647 | |
Elliott Hughes | d8845d7 | 2015-10-19 18:07:04 -0700 | [diff] [blame] | 10648 | |
| 10649 | |
| 10650 | fi |
| 10651 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10652 | # Find a good install program. We prefer a C program (faster), |
| 10653 | # so one script is as good as another. But avoid the broken or |
| 10654 | # incompatible versions: |
| 10655 | # SysV /etc/install, /usr/sbin/install |
| 10656 | # SunOS /usr/etc/install |
| 10657 | # IRIX /sbin/install |
| 10658 | # AIX /bin/install |
| 10659 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
| 10660 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 10661 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 10662 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 10663 | # OS/2's system install, which has a completely different semantic |
| 10664 | # ./install, which can be erroneously created by make from ./install.sh. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10665 | # Reject install programs that cannot install multiple files. |
| 10666 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
| 10667 | $as_echo_n "checking for a BSD-compatible install... " >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10668 | if test -z "$INSTALL"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10669 | if ${ac_cv_path_install+:} false; then : |
| 10670 | $as_echo_n "(cached) " >&6 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10671 | else |
| 10672 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10673 | for as_dir in $PATH |
| 10674 | do |
| 10675 | IFS=$as_save_IFS |
| 10676 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10677 | # Account for people who put trailing slashes in PATH elements. |
| 10678 | case $as_dir/ in #(( |
| 10679 | ./ | .// | /[cC]/* | \ |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10680 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10681 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10682 | /usr/ucb/* ) ;; |
| 10683 | *) |
| 10684 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 10685 | # Don't use installbsd from OSF since it installs stuff as root |
| 10686 | # by default. |
| 10687 | for ac_prog in ginstall scoinst install; do |
| 10688 | for ac_exec_ext in '' $ac_executable_extensions; do |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10689 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10690 | if test $ac_prog = install && |
| 10691 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 10692 | # AIX install. It has an incompatible calling convention. |
| 10693 | : |
| 10694 | elif test $ac_prog = install && |
| 10695 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 10696 | # program-specific install script used by HP pwplus--don't use. |
| 10697 | : |
| 10698 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10699 | rm -rf conftest.one conftest.two conftest.dir |
| 10700 | echo one > conftest.one |
| 10701 | echo two > conftest.two |
| 10702 | mkdir conftest.dir |
| 10703 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && |
| 10704 | test -s conftest.one && test -s conftest.two && |
| 10705 | test -s conftest.dir/conftest.one && |
| 10706 | test -s conftest.dir/conftest.two |
| 10707 | then |
| 10708 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" |
| 10709 | break 3 |
| 10710 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10711 | fi |
| 10712 | fi |
| 10713 | done |
| 10714 | done |
| 10715 | ;; |
| 10716 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10717 | |
| 10718 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10719 | IFS=$as_save_IFS |
| 10720 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10721 | rm -rf conftest.one conftest.two conftest.dir |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10722 | |
| 10723 | fi |
| 10724 | if test "${ac_cv_path_install+set}" = set; then |
| 10725 | INSTALL=$ac_cv_path_install |
| 10726 | else |
| 10727 | # As a last resort, use the slow shell script. Don't cache a |
| 10728 | # value for INSTALL within a source directory, because that will |
| 10729 | # break other packages using the cache if that directory is |
| 10730 | # removed, or if the value is a relative name. |
| 10731 | INSTALL=$ac_install_sh |
| 10732 | fi |
| 10733 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10734 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
| 10735 | $as_echo "$INSTALL" >&6; } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10736 | |
| 10737 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 10738 | # It thinks the first close brace ends the variable substitution. |
| 10739 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 10740 | |
| 10741 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
| 10742 | |
| 10743 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 10744 | |
| 10745 | |
| 10746 | ac_config_headers="$ac_config_headers config.h" |
| 10747 | |
| 10748 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10749 | ac_config_commands="$ac_config_commands default-1" |
| 10750 | |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 10751 | ac_config_files="$ac_config_files Makefile pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin testprogs/Makefile" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10752 | |
| 10753 | cat >confcache <<\_ACEOF |
| 10754 | # This file is a shell script that caches the results of configure |
| 10755 | # tests run on this system so they can be shared between configure |
| 10756 | # scripts and configure runs, see configure's option --config-cache. |
| 10757 | # It is not useful on other systems. If it contains results you don't |
| 10758 | # want to keep, you may remove or edit it. |
| 10759 | # |
| 10760 | # config.status only pays attention to the cache file if you give it |
| 10761 | # the --recheck option to rerun configure. |
| 10762 | # |
| 10763 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
| 10764 | # loading this file, other *unset* `ac_cv_foo' will be assigned the |
| 10765 | # following values. |
| 10766 | |
| 10767 | _ACEOF |
| 10768 | |
| 10769 | # The following way of writing the cache mishandles newlines in values, |
| 10770 | # but we know of no workaround that is simple, portable, and efficient. |
| 10771 | # So, we kill variables containing newlines. |
| 10772 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 10773 | # and sets the high bit in the cache file unless we assign to the vars. |
| 10774 | ( |
| 10775 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do |
| 10776 | eval ac_val=\$$ac_var |
| 10777 | case $ac_val in #( |
| 10778 | *${as_nl}*) |
| 10779 | case $ac_var in #( |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10780 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 10781 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10782 | esac |
| 10783 | case $ac_var in #( |
| 10784 | _ | IFS | as_nl) ;; #( |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10785 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 10786 | *) { eval $ac_var=; unset $ac_var;} ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10787 | esac ;; |
| 10788 | esac |
| 10789 | done |
| 10790 | |
| 10791 | (set) 2>&1 | |
| 10792 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
| 10793 | *${as_nl}ac_space=\ *) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10794 | # `set' does not quote correctly, so add quotes: double-quote |
| 10795 | # substitution turns \\\\ into \\, and sed turns \\ into \. |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10796 | sed -n \ |
| 10797 | "s/'/'\\\\''/g; |
| 10798 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" |
| 10799 | ;; #( |
| 10800 | *) |
| 10801 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 10802 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
| 10803 | ;; |
| 10804 | esac | |
| 10805 | sort |
| 10806 | ) | |
| 10807 | sed ' |
| 10808 | /^ac_cv_env_/b end |
| 10809 | t clear |
| 10810 | :clear |
| 10811 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
| 10812 | t end |
| 10813 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
| 10814 | :end' >>confcache |
| 10815 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else |
| 10816 | if test -w "$cache_file"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10817 | if test "x$cache_file" != "x/dev/null"; then |
| 10818 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
| 10819 | $as_echo "$as_me: updating cache $cache_file" >&6;} |
| 10820 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
| 10821 | cat confcache >"$cache_file" |
| 10822 | else |
| 10823 | case $cache_file in #( |
| 10824 | */* | ?:*) |
| 10825 | mv -f confcache "$cache_file"$$ && |
| 10826 | mv -f "$cache_file"$$ "$cache_file" ;; #( |
| 10827 | *) |
| 10828 | mv -f confcache "$cache_file" ;; |
| 10829 | esac |
| 10830 | fi |
| 10831 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10832 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10833 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
| 10834 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10835 | fi |
| 10836 | fi |
| 10837 | rm -f confcache |
| 10838 | |
| 10839 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 10840 | # Let make expand exec_prefix. |
| 10841 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 10842 | |
| 10843 | DEFS=-DHAVE_CONFIG_H |
| 10844 | |
| 10845 | ac_libobjs= |
| 10846 | ac_ltlibobjs= |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10847 | U= |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10848 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
| 10849 | # 1. Remove the extension, and $U if already installed. |
| 10850 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10851 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10852 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR |
| 10853 | # will be set to the directory where LIBOBJS objects are built. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10854 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" |
| 10855 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10856 | done |
| 10857 | LIBOBJS=$ac_libobjs |
| 10858 | |
| 10859 | LTLIBOBJS=$ac_ltlibobjs |
| 10860 | |
| 10861 | |
| 10862 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10863 | : "${CONFIG_STATUS=./config.status}" |
| 10864 | ac_write_fail=0 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10865 | ac_clean_files_save=$ac_clean_files |
| 10866 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10867 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
| 10868 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} |
| 10869 | as_write_fail=0 |
| 10870 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10871 | #! $SHELL |
| 10872 | # Generated by $as_me. |
| 10873 | # Run this file to recreate the current configuration. |
| 10874 | # Compiler output produced by configure, useful for debugging |
| 10875 | # configure, is in config.log if it exists. |
| 10876 | |
| 10877 | debug=false |
| 10878 | ac_cs_recheck=false |
| 10879 | ac_cs_silent=false |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10880 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10881 | SHELL=\${CONFIG_SHELL-$SHELL} |
| 10882 | export SHELL |
| 10883 | _ASEOF |
| 10884 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 |
| 10885 | ## -------------------- ## |
| 10886 | ## M4sh Initialization. ## |
| 10887 | ## -------------------- ## |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10888 | |
| 10889 | # Be more Bourne compatible |
| 10890 | DUALCASE=1; export DUALCASE # for MKS sh |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10891 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10892 | emulate sh |
| 10893 | NULLCMD=: |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10894 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10895 | # is contrary to our usage. Disable this feature. |
| 10896 | alias -g '${1+"$@"}'='"$@"' |
| 10897 | setopt NO_GLOB_SUBST |
| 10898 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10899 | case `(set -o) 2>/dev/null` in #( |
| 10900 | *posix*) : |
| 10901 | set -o posix ;; #( |
| 10902 | *) : |
| 10903 | ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10904 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10905 | fi |
| 10906 | |
| 10907 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10908 | as_nl=' |
| 10909 | ' |
| 10910 | export as_nl |
| 10911 | # Printing a long string crashes Solaris 7 /usr/bin/printf. |
| 10912 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 10913 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo |
| 10914 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo |
| 10915 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
| 10916 | # but without wasting forks for bash or zsh. |
| 10917 | if test -z "$BASH_VERSION$ZSH_VERSION" \ |
| 10918 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 10919 | as_echo='print -r --' |
| 10920 | as_echo_n='print -rn --' |
| 10921 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 10922 | as_echo='printf %s\n' |
| 10923 | as_echo_n='printf %s' |
| 10924 | else |
| 10925 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
| 10926 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' |
| 10927 | as_echo_n='/usr/ucb/echo -n' |
| 10928 | else |
| 10929 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
| 10930 | as_echo_n_body='eval |
| 10931 | arg=$1; |
| 10932 | case $arg in #( |
| 10933 | *"$as_nl"*) |
| 10934 | expr "X$arg" : "X\\(.*\\)$as_nl"; |
| 10935 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; |
| 10936 | esac; |
| 10937 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" |
| 10938 | ' |
| 10939 | export as_echo_n_body |
| 10940 | as_echo_n='sh -c $as_echo_n_body as_echo' |
| 10941 | fi |
| 10942 | export as_echo_body |
| 10943 | as_echo='sh -c $as_echo_body as_echo' |
| 10944 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10945 | |
| 10946 | # The user is always right. |
| 10947 | if test "${PATH_SEPARATOR+set}" != set; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10948 | PATH_SEPARATOR=: |
| 10949 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { |
| 10950 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || |
| 10951 | PATH_SEPARATOR=';' |
| 10952 | } |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10953 | fi |
| 10954 | |
| 10955 | |
| 10956 | # IFS |
| 10957 | # We need space, tab and new line, in precisely that order. Quoting is |
| 10958 | # there to prevent editors from complaining about space-tab. |
| 10959 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word |
| 10960 | # splitting by setting IFS to empty value.) |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10961 | IFS=" "" $as_nl" |
| 10962 | |
| 10963 | # Find who we are. Look in the path if we contain no directory separator. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10964 | as_myself= |
| 10965 | case $0 in #(( |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10966 | *[\\/]* ) as_myself=$0 ;; |
| 10967 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10968 | for as_dir in $PATH |
| 10969 | do |
| 10970 | IFS=$as_save_IFS |
| 10971 | test -z "$as_dir" && as_dir=. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10972 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
| 10973 | done |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10974 | IFS=$as_save_IFS |
| 10975 | |
| 10976 | ;; |
| 10977 | esac |
| 10978 | # We did not find ourselves, most probably we were run as `sh COMMAND' |
| 10979 | # in which case we are not to be found in the path. |
| 10980 | if test "x$as_myself" = x; then |
| 10981 | as_myself=$0 |
| 10982 | fi |
| 10983 | if test ! -f "$as_myself"; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10984 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
| 10985 | exit 1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10986 | fi |
| 10987 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 10988 | # Unset variables that we do not need and which cause bugs (e.g. in |
| 10989 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" |
| 10990 | # suppresses any "Segmentation fault" message there. '((' could |
| 10991 | # trigger a bug in pdksh 5.2.14. |
| 10992 | for as_var in BASH_ENV ENV MAIL MAILPATH |
| 10993 | do eval test x\${$as_var+set} = xset \ |
| 10994 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10995 | done |
| 10996 | PS1='$ ' |
| 10997 | PS2='> ' |
| 10998 | PS4='+ ' |
| 10999 | |
| 11000 | # NLS nuisances. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11001 | LC_ALL=C |
| 11002 | export LC_ALL |
| 11003 | LANGUAGE=C |
| 11004 | export LANGUAGE |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11005 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11006 | # CDPATH. |
| 11007 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 11008 | |
| 11009 | |
| 11010 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
| 11011 | # ---------------------------------------- |
| 11012 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
| 11013 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the |
| 11014 | # script with STATUS, using 1 if that was 0. |
| 11015 | as_fn_error () |
| 11016 | { |
| 11017 | as_status=$1; test $as_status -eq 0 && as_status=1 |
| 11018 | if test "$4"; then |
| 11019 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 11020 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 |
| 11021 | fi |
| 11022 | $as_echo "$as_me: error: $2" >&2 |
| 11023 | as_fn_exit $as_status |
| 11024 | } # as_fn_error |
| 11025 | |
| 11026 | |
| 11027 | # as_fn_set_status STATUS |
| 11028 | # ----------------------- |
| 11029 | # Set $? to STATUS, without forking. |
| 11030 | as_fn_set_status () |
| 11031 | { |
| 11032 | return $1 |
| 11033 | } # as_fn_set_status |
| 11034 | |
| 11035 | # as_fn_exit STATUS |
| 11036 | # ----------------- |
| 11037 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. |
| 11038 | as_fn_exit () |
| 11039 | { |
| 11040 | set +e |
| 11041 | as_fn_set_status $1 |
| 11042 | exit $1 |
| 11043 | } # as_fn_exit |
| 11044 | |
| 11045 | # as_fn_unset VAR |
| 11046 | # --------------- |
| 11047 | # Portably unset VAR. |
| 11048 | as_fn_unset () |
| 11049 | { |
| 11050 | { eval $1=; unset $1;} |
| 11051 | } |
| 11052 | as_unset=as_fn_unset |
| 11053 | # as_fn_append VAR VALUE |
| 11054 | # ---------------------- |
| 11055 | # Append the text in VALUE to the end of the definition contained in VAR. Take |
| 11056 | # advantage of any shell optimizations that allow amortized linear growth over |
| 11057 | # repeated appends, instead of the typical quadratic growth present in naive |
| 11058 | # implementations. |
| 11059 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : |
| 11060 | eval 'as_fn_append () |
| 11061 | { |
| 11062 | eval $1+=\$2 |
| 11063 | }' |
| 11064 | else |
| 11065 | as_fn_append () |
| 11066 | { |
| 11067 | eval $1=\$$1\$2 |
| 11068 | } |
| 11069 | fi # as_fn_append |
| 11070 | |
| 11071 | # as_fn_arith ARG... |
| 11072 | # ------------------ |
| 11073 | # Perform arithmetic evaluation on the ARGs, and store the result in the |
| 11074 | # global $as_val. Take advantage of shells that can avoid forks. The arguments |
| 11075 | # must be portable across $(()) and expr. |
| 11076 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : |
| 11077 | eval 'as_fn_arith () |
| 11078 | { |
| 11079 | as_val=$(( $* )) |
| 11080 | }' |
| 11081 | else |
| 11082 | as_fn_arith () |
| 11083 | { |
| 11084 | as_val=`expr "$@" || test $? -eq 1` |
| 11085 | } |
| 11086 | fi # as_fn_arith |
| 11087 | |
| 11088 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11089 | if expr a : '\(a\)' >/dev/null 2>&1 && |
| 11090 | test "X`expr 00001 : '.*\(...\)'`" = X001; then |
| 11091 | as_expr=expr |
| 11092 | else |
| 11093 | as_expr=false |
| 11094 | fi |
| 11095 | |
| 11096 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
| 11097 | as_basename=basename |
| 11098 | else |
| 11099 | as_basename=false |
| 11100 | fi |
| 11101 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11102 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
| 11103 | as_dirname=dirname |
| 11104 | else |
| 11105 | as_dirname=false |
| 11106 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11107 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11108 | as_me=`$as_basename -- "$0" || |
| 11109 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
| 11110 | X"$0" : 'X\(//\)$' \| \ |
| 11111 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11112 | $as_echo X/"$0" | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11113 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
| 11114 | s//\1/ |
| 11115 | q |
| 11116 | } |
| 11117 | /^X\/\(\/\/\)$/{ |
| 11118 | s//\1/ |
| 11119 | q |
| 11120 | } |
| 11121 | /^X\/\(\/\).*/{ |
| 11122 | s//\1/ |
| 11123 | q |
| 11124 | } |
| 11125 | s/.*/./; q'` |
| 11126 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11127 | # Avoid depending upon Character Ranges. |
| 11128 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' |
| 11129 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
| 11130 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS |
| 11131 | as_cr_digits='0123456789' |
| 11132 | as_cr_alnum=$as_cr_Letters$as_cr_digits |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11133 | |
| 11134 | ECHO_C= ECHO_N= ECHO_T= |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11135 | case `echo -n x` in #((((( |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11136 | -n*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11137 | case `echo 'xy\c'` in |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11138 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11139 | xy) ECHO_C='\c';; |
| 11140 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null |
| 11141 | ECHO_T=' ';; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11142 | esac;; |
| 11143 | *) |
| 11144 | ECHO_N='-n';; |
| 11145 | esac |
| 11146 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11147 | rm -f conf$$ conf$$.exe conf$$.file |
| 11148 | if test -d conf$$.dir; then |
| 11149 | rm -f conf$$.dir/conf$$.file |
| 11150 | else |
| 11151 | rm -f conf$$.dir |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11152 | mkdir conf$$.dir 2>/dev/null |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11153 | fi |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11154 | if (echo >conf$$.file) 2>/dev/null; then |
| 11155 | if ln -s conf$$.file conf$$ 2>/dev/null; then |
| 11156 | as_ln_s='ln -s' |
| 11157 | # ... but there are two gotchas: |
| 11158 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. |
| 11159 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. |
| 11160 | # In both cases, we have to default to `cp -pR'. |
| 11161 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
| 11162 | as_ln_s='cp -pR' |
| 11163 | elif ln conf$$.file conf$$ 2>/dev/null; then |
| 11164 | as_ln_s=ln |
| 11165 | else |
| 11166 | as_ln_s='cp -pR' |
| 11167 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11168 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11169 | as_ln_s='cp -pR' |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11170 | fi |
| 11171 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
| 11172 | rmdir conf$$.dir 2>/dev/null |
| 11173 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11174 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11175 | # as_fn_mkdir_p |
| 11176 | # ------------- |
| 11177 | # Create "$as_dir" as a directory, including parents if necessary. |
| 11178 | as_fn_mkdir_p () |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11179 | { |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11180 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11181 | case $as_dir in #( |
| 11182 | -*) as_dir=./$as_dir;; |
| 11183 | esac |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11184 | test -d "$as_dir" || eval $as_mkdir_p || { |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11185 | as_dirs= |
| 11186 | while :; do |
| 11187 | case $as_dir in #( |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11188 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11189 | *) as_qdir=$as_dir;; |
| 11190 | esac |
| 11191 | as_dirs="'$as_qdir' $as_dirs" |
| 11192 | as_dir=`$as_dirname -- "$as_dir" || |
| 11193 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 11194 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
| 11195 | X"$as_dir" : 'X\(//\)$' \| \ |
| 11196 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11197 | $as_echo X"$as_dir" | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11198 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 11199 | s//\1/ |
| 11200 | q |
| 11201 | } |
| 11202 | /^X\(\/\/\)[^/].*/{ |
| 11203 | s//\1/ |
| 11204 | q |
| 11205 | } |
| 11206 | /^X\(\/\/\)$/{ |
| 11207 | s//\1/ |
| 11208 | q |
| 11209 | } |
| 11210 | /^X\(\/\).*/{ |
| 11211 | s//\1/ |
| 11212 | q |
| 11213 | } |
| 11214 | s/.*/./; q'` |
| 11215 | test -d "$as_dir" && break |
| 11216 | done |
| 11217 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11218 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
| 11219 | |
| 11220 | |
| 11221 | } # as_fn_mkdir_p |
| 11222 | if mkdir -p . 2>/dev/null; then |
| 11223 | as_mkdir_p='mkdir -p "$as_dir"' |
| 11224 | else |
| 11225 | test -d ./-p && rmdir ./-p |
| 11226 | as_mkdir_p=false |
| 11227 | fi |
| 11228 | |
| 11229 | |
| 11230 | # as_fn_executable_p FILE |
| 11231 | # ----------------------- |
| 11232 | # Test if FILE is an executable regular file. |
| 11233 | as_fn_executable_p () |
| 11234 | { |
| 11235 | test -f "$1" && test -x "$1" |
| 11236 | } # as_fn_executable_p |
| 11237 | as_test_x='test -x' |
| 11238 | as_executable_p=as_fn_executable_p |
| 11239 | |
| 11240 | # Sed expression to map a string onto a valid CPP name. |
| 11241 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
| 11242 | |
| 11243 | # Sed expression to map a string onto a valid variable name. |
| 11244 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
| 11245 | |
| 11246 | |
| 11247 | exec 6>&1 |
| 11248 | ## ----------------------------------- ## |
| 11249 | ## Main body of $CONFIG_STATUS script. ## |
| 11250 | ## ----------------------------------- ## |
| 11251 | _ASEOF |
| 11252 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 |
| 11253 | |
| 11254 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11255 | # Save the log message, to keep $0 and so on meaningful, and to |
| 11256 | # report actual input values of CONFIG_FILES etc. instead of their |
| 11257 | # values after options handling. |
| 11258 | ac_log=" |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 11259 | This file was extended by pcap $as_me 1.9.0-PRE-GIT, which was |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11260 | generated by GNU Autoconf 2.69. Invocation command line was |
| 11261 | |
| 11262 | CONFIG_FILES = $CONFIG_FILES |
| 11263 | CONFIG_HEADERS = $CONFIG_HEADERS |
| 11264 | CONFIG_LINKS = $CONFIG_LINKS |
| 11265 | CONFIG_COMMANDS = $CONFIG_COMMANDS |
| 11266 | $ $0 $@ |
| 11267 | |
| 11268 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 11269 | " |
| 11270 | |
| 11271 | _ACEOF |
| 11272 | |
| 11273 | case $ac_config_files in *" |
| 11274 | "*) set x $ac_config_files; shift; ac_config_files=$*;; |
| 11275 | esac |
| 11276 | |
| 11277 | case $ac_config_headers in *" |
| 11278 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; |
| 11279 | esac |
| 11280 | |
| 11281 | |
| 11282 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11283 | # Files that config.status was made for. |
| 11284 | config_files="$ac_config_files" |
| 11285 | config_headers="$ac_config_headers" |
| 11286 | config_commands="$ac_config_commands" |
| 11287 | |
| 11288 | _ACEOF |
| 11289 | |
| 11290 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11291 | ac_cs_usage="\ |
| 11292 | \`$as_me' instantiates files and other configuration actions |
| 11293 | from templates according to the current configuration. Unless the files |
| 11294 | and actions are specified as TAGs, all are instantiated by default. |
| 11295 | |
| 11296 | Usage: $0 [OPTION]... [TAG]... |
| 11297 | |
| 11298 | -h, --help print this help, then exit |
| 11299 | -V, --version print version number and configuration settings, then exit |
| 11300 | --config print configuration, then exit |
| 11301 | -q, --quiet, --silent |
| 11302 | do not print progress messages |
| 11303 | -d, --debug don't remove temporary files |
| 11304 | --recheck update $as_me by reconfiguring in the same conditions |
| 11305 | --file=FILE[:TEMPLATE] |
| 11306 | instantiate the configuration file FILE |
| 11307 | --header=FILE[:TEMPLATE] |
| 11308 | instantiate the configuration header FILE |
| 11309 | |
| 11310 | Configuration files: |
| 11311 | $config_files |
| 11312 | |
| 11313 | Configuration headers: |
| 11314 | $config_headers |
| 11315 | |
| 11316 | Configuration commands: |
| 11317 | $config_commands |
| 11318 | |
| 11319 | Report bugs to the package provider." |
| 11320 | |
| 11321 | _ACEOF |
| 11322 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11323 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
| 11324 | ac_cs_version="\\ |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 11325 | pcap config.status 1.9.0-PRE-GIT |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11326 | configured by $0, generated by GNU Autoconf 2.69, |
| 11327 | with options \\"\$ac_cs_config\\" |
| 11328 | |
| 11329 | Copyright (C) 2012 Free Software Foundation, Inc. |
| 11330 | This config.status script is free software; the Free Software Foundation |
| 11331 | gives unlimited permission to copy, distribute and modify it." |
| 11332 | |
| 11333 | ac_pwd='$ac_pwd' |
| 11334 | srcdir='$srcdir' |
| 11335 | INSTALL='$INSTALL' |
| 11336 | test -n "\$AWK" || AWK=awk |
| 11337 | _ACEOF |
| 11338 | |
| 11339 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11340 | # The default lists apply if the user does not specify any file. |
| 11341 | ac_need_defaults=: |
| 11342 | while test $# != 0 |
| 11343 | do |
| 11344 | case $1 in |
| 11345 | --*=?*) |
| 11346 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 11347 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` |
| 11348 | ac_shift=: |
| 11349 | ;; |
| 11350 | --*=) |
| 11351 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 11352 | ac_optarg= |
| 11353 | ac_shift=: |
| 11354 | ;; |
| 11355 | *) |
| 11356 | ac_option=$1 |
| 11357 | ac_optarg=$2 |
| 11358 | ac_shift=shift |
| 11359 | ;; |
| 11360 | esac |
| 11361 | |
| 11362 | case $ac_option in |
| 11363 | # Handling of the options. |
| 11364 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
| 11365 | ac_cs_recheck=: ;; |
| 11366 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
| 11367 | $as_echo "$ac_cs_version"; exit ;; |
| 11368 | --config | --confi | --conf | --con | --co | --c ) |
| 11369 | $as_echo "$ac_cs_config"; exit ;; |
| 11370 | --debug | --debu | --deb | --de | --d | -d ) |
| 11371 | debug=: ;; |
| 11372 | --file | --fil | --fi | --f ) |
| 11373 | $ac_shift |
| 11374 | case $ac_optarg in |
| 11375 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 11376 | '') as_fn_error $? "missing file argument" ;; |
| 11377 | esac |
| 11378 | as_fn_append CONFIG_FILES " '$ac_optarg'" |
| 11379 | ac_need_defaults=false;; |
| 11380 | --header | --heade | --head | --hea ) |
| 11381 | $ac_shift |
| 11382 | case $ac_optarg in |
| 11383 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 11384 | esac |
| 11385 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" |
| 11386 | ac_need_defaults=false;; |
| 11387 | --he | --h) |
| 11388 | # Conflict between --help and --header |
| 11389 | as_fn_error $? "ambiguous option: \`$1' |
| 11390 | Try \`$0 --help' for more information.";; |
| 11391 | --help | --hel | -h ) |
| 11392 | $as_echo "$ac_cs_usage"; exit ;; |
| 11393 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 11394 | | -silent | --silent | --silen | --sile | --sil | --si | --s) |
| 11395 | ac_cs_silent=: ;; |
| 11396 | |
| 11397 | # This is an error. |
| 11398 | -*) as_fn_error $? "unrecognized option: \`$1' |
| 11399 | Try \`$0 --help' for more information." ;; |
| 11400 | |
| 11401 | *) as_fn_append ac_config_targets " $1" |
| 11402 | ac_need_defaults=false ;; |
| 11403 | |
| 11404 | esac |
| 11405 | shift |
| 11406 | done |
| 11407 | |
| 11408 | ac_configure_extra_args= |
| 11409 | |
| 11410 | if $ac_cs_silent; then |
| 11411 | exec 6>/dev/null |
| 11412 | ac_configure_extra_args="$ac_configure_extra_args --silent" |
| 11413 | fi |
| 11414 | |
| 11415 | _ACEOF |
| 11416 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11417 | if \$ac_cs_recheck; then |
| 11418 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
| 11419 | shift |
| 11420 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 |
| 11421 | CONFIG_SHELL='$SHELL' |
| 11422 | export CONFIG_SHELL |
| 11423 | exec "\$@" |
| 11424 | fi |
| 11425 | |
| 11426 | _ACEOF |
| 11427 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11428 | exec 5>>config.log |
| 11429 | { |
| 11430 | echo |
| 11431 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX |
| 11432 | ## Running $as_me. ## |
| 11433 | _ASBOX |
| 11434 | $as_echo "$ac_log" |
| 11435 | } >&5 |
| 11436 | |
| 11437 | _ACEOF |
| 11438 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11439 | # |
| 11440 | # INIT-COMMANDS |
| 11441 | # |
| 11442 | |
| 11443 | |
| 11444 | _ACEOF |
| 11445 | |
| 11446 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11447 | |
| 11448 | # Handling of arguments. |
| 11449 | for ac_config_target in $ac_config_targets |
| 11450 | do |
| 11451 | case $ac_config_target in |
| 11452 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; |
| 11453 | "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; |
| 11454 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
| 11455 | "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;; |
| 11456 | "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;; |
| 11457 | "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;; |
| 11458 | "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;; |
| 11459 | "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;; |
| 11460 | "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;; |
| 11461 | "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;; |
| 11462 | "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;; |
| 11463 | "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;; |
| 11464 | "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;; |
| 11465 | "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;; |
| 11466 | "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;; |
| 11467 | "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;; |
| 11468 | "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;; |
| 11469 | "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;; |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 11470 | "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;; |
| 11471 | "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;; |
| 11472 | "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;; |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11473 | |
| 11474 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
| 11475 | esac |
| 11476 | done |
| 11477 | |
| 11478 | |
| 11479 | # If the user did not use the arguments to specify the items to instantiate, |
| 11480 | # then the envvar interface is used. Set only those that are not. |
| 11481 | # We use the long form for the default assignment because of an extremely |
| 11482 | # bizarre bug on SunOS 4.1.3. |
| 11483 | if $ac_need_defaults; then |
| 11484 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files |
| 11485 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers |
| 11486 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands |
| 11487 | fi |
| 11488 | |
| 11489 | # Have a temporary directory for convenience. Make it in the build tree |
| 11490 | # simply because there is no reason against having it here, and in addition, |
| 11491 | # creating and moving files from /tmp can sometimes cause problems. |
| 11492 | # Hook for its removal unless debugging. |
| 11493 | # Note that there is a small window in which the directory will not be cleaned: |
| 11494 | # after its creation but before its name has been assigned to `$tmp'. |
| 11495 | $debug || |
| 11496 | { |
| 11497 | tmp= ac_tmp= |
| 11498 | trap 'exit_status=$? |
| 11499 | : "${ac_tmp:=$tmp}" |
| 11500 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status |
| 11501 | ' 0 |
| 11502 | trap 'as_fn_exit 1' 1 2 13 15 |
| 11503 | } |
| 11504 | # Create a (secure) tmp directory for tmp files. |
| 11505 | |
| 11506 | { |
| 11507 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
| 11508 | test -d "$tmp" |
| 11509 | } || |
| 11510 | { |
| 11511 | tmp=./conf$$-$RANDOM |
| 11512 | (umask 077 && mkdir "$tmp") |
| 11513 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
| 11514 | ac_tmp=$tmp |
| 11515 | |
| 11516 | # Set up the scripts for CONFIG_FILES section. |
| 11517 | # No need to generate them if there are no CONFIG_FILES. |
| 11518 | # This happens for instance with `./config.status config.h'. |
| 11519 | if test -n "$CONFIG_FILES"; then |
| 11520 | |
| 11521 | |
| 11522 | ac_cr=`echo X | tr X '\015'` |
| 11523 | # On cygwin, bash can eat \r inside `` if the user requested igncr. |
| 11524 | # But we know of no other shell where ac_cr would be empty at this |
| 11525 | # point, so we can use a bashism as a fallback. |
| 11526 | if test "x$ac_cr" = x; then |
| 11527 | eval ac_cr=\$\'\\r\' |
| 11528 | fi |
| 11529 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` |
| 11530 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then |
| 11531 | ac_cs_awk_cr='\\r' |
| 11532 | else |
| 11533 | ac_cs_awk_cr=$ac_cr |
| 11534 | fi |
| 11535 | |
| 11536 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
| 11537 | _ACEOF |
| 11538 | |
| 11539 | |
| 11540 | { |
| 11541 | echo "cat >conf$$subs.awk <<_ACEOF" && |
| 11542 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && |
| 11543 | echo "_ACEOF" |
| 11544 | } >conf$$subs.sh || |
| 11545 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 11546 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` |
| 11547 | ac_delim='%!_!# ' |
| 11548 | for ac_last_try in false false false false false :; do |
| 11549 | . ./conf$$subs.sh || |
| 11550 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 11551 | |
| 11552 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` |
| 11553 | if test $ac_delim_n = $ac_delim_num; then |
| 11554 | break |
| 11555 | elif $ac_last_try; then |
| 11556 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 11557 | else |
| 11558 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
| 11559 | fi |
| 11560 | done |
| 11561 | rm -f conf$$subs.sh |
| 11562 | |
| 11563 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11564 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
| 11565 | _ACEOF |
| 11566 | sed -n ' |
| 11567 | h |
| 11568 | s/^/S["/; s/!.*/"]=/ |
| 11569 | p |
| 11570 | g |
| 11571 | s/^[^!]*!// |
| 11572 | :repl |
| 11573 | t repl |
| 11574 | s/'"$ac_delim"'$// |
| 11575 | t delim |
| 11576 | :nl |
| 11577 | h |
| 11578 | s/\(.\{148\}\)..*/\1/ |
| 11579 | t more1 |
| 11580 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ |
| 11581 | p |
| 11582 | n |
| 11583 | b repl |
| 11584 | :more1 |
| 11585 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 11586 | p |
| 11587 | g |
| 11588 | s/.\{148\}// |
| 11589 | t nl |
| 11590 | :delim |
| 11591 | h |
| 11592 | s/\(.\{148\}\)..*/\1/ |
| 11593 | t more2 |
| 11594 | s/["\\]/\\&/g; s/^/"/; s/$/"/ |
| 11595 | p |
| 11596 | b |
| 11597 | :more2 |
| 11598 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 11599 | p |
| 11600 | g |
| 11601 | s/.\{148\}// |
| 11602 | t delim |
| 11603 | ' <conf$$subs.awk | sed ' |
| 11604 | /^[^""]/{ |
| 11605 | N |
| 11606 | s/\n// |
| 11607 | } |
| 11608 | ' >>$CONFIG_STATUS || ac_write_fail=1 |
| 11609 | rm -f conf$$subs.awk |
| 11610 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11611 | _ACAWK |
| 11612 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
| 11613 | for (key in S) S_is_set[key] = 1 |
| 11614 | FS = "" |
| 11615 | |
| 11616 | } |
| 11617 | { |
| 11618 | line = $ 0 |
| 11619 | nfields = split(line, field, "@") |
| 11620 | substed = 0 |
| 11621 | len = length(field[1]) |
| 11622 | for (i = 2; i < nfields; i++) { |
| 11623 | key = field[i] |
| 11624 | keylen = length(key) |
| 11625 | if (S_is_set[key]) { |
| 11626 | value = S[key] |
| 11627 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) |
| 11628 | len += length(value) + length(field[++i]) |
| 11629 | substed = 1 |
| 11630 | } else |
| 11631 | len += 1 + keylen |
| 11632 | } |
| 11633 | |
| 11634 | print line |
| 11635 | } |
| 11636 | |
| 11637 | _ACAWK |
| 11638 | _ACEOF |
| 11639 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11640 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then |
| 11641 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" |
| 11642 | else |
| 11643 | cat |
| 11644 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
| 11645 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 |
| 11646 | _ACEOF |
| 11647 | |
| 11648 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
| 11649 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and |
| 11650 | # trailing colons and then remove the whole line if VPATH becomes empty |
| 11651 | # (actually we leave an empty line to preserve line numbers). |
| 11652 | if test "x$srcdir" = x.; then |
| 11653 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
| 11654 | h |
| 11655 | s/// |
| 11656 | s/^/:/ |
| 11657 | s/[ ]*$/:/ |
| 11658 | s/:\$(srcdir):/:/g |
| 11659 | s/:\${srcdir}:/:/g |
| 11660 | s/:@srcdir@:/:/g |
| 11661 | s/^:*// |
| 11662 | s/:*$// |
| 11663 | x |
| 11664 | s/\(=[ ]*\).*/\1/ |
| 11665 | G |
| 11666 | s/\n// |
| 11667 | s/^[^=]*=[ ]*$// |
| 11668 | }' |
| 11669 | fi |
| 11670 | |
| 11671 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11672 | fi # test -n "$CONFIG_FILES" |
| 11673 | |
| 11674 | # Set up the scripts for CONFIG_HEADERS section. |
| 11675 | # No need to generate them if there are no CONFIG_HEADERS. |
| 11676 | # This happens for instance with `./config.status Makefile'. |
| 11677 | if test -n "$CONFIG_HEADERS"; then |
| 11678 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
| 11679 | BEGIN { |
| 11680 | _ACEOF |
| 11681 | |
| 11682 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
| 11683 | # here-document in config.status, that substitutes the proper values into |
| 11684 | # config.h.in to produce config.h. |
| 11685 | |
| 11686 | # Create a delimiter string that does not exist in confdefs.h, to ease |
| 11687 | # handling of long lines. |
| 11688 | ac_delim='%!_!# ' |
| 11689 | for ac_last_try in false false :; do |
| 11690 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
| 11691 | if test -z "$ac_tt"; then |
| 11692 | break |
| 11693 | elif $ac_last_try; then |
| 11694 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
| 11695 | else |
| 11696 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
| 11697 | fi |
| 11698 | done |
| 11699 | |
| 11700 | # For the awk script, D is an array of macro values keyed by name, |
| 11701 | # likewise P contains macro parameters if any. Preserve backslash |
| 11702 | # newline sequences. |
| 11703 | |
| 11704 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* |
| 11705 | sed -n ' |
| 11706 | s/.\{148\}/&'"$ac_delim"'/g |
| 11707 | t rset |
| 11708 | :rset |
| 11709 | s/^[ ]*#[ ]*define[ ][ ]*/ / |
| 11710 | t def |
| 11711 | d |
| 11712 | :def |
| 11713 | s/\\$// |
| 11714 | t bsnl |
| 11715 | s/["\\]/\\&/g |
| 11716 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 11717 | D["\1"]=" \3"/p |
| 11718 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p |
| 11719 | d |
| 11720 | :bsnl |
| 11721 | s/["\\]/\\&/g |
| 11722 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 11723 | D["\1"]=" \3\\\\\\n"\\/p |
| 11724 | t cont |
| 11725 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p |
| 11726 | t cont |
| 11727 | d |
| 11728 | :cont |
| 11729 | n |
| 11730 | s/.\{148\}/&'"$ac_delim"'/g |
| 11731 | t clear |
| 11732 | :clear |
| 11733 | s/\\$// |
| 11734 | t bsnlc |
| 11735 | s/["\\]/\\&/g; s/^/"/; s/$/"/p |
| 11736 | d |
| 11737 | :bsnlc |
| 11738 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p |
| 11739 | b cont |
| 11740 | ' <confdefs.h | sed ' |
| 11741 | s/'"$ac_delim"'/"\\\ |
| 11742 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 |
| 11743 | |
| 11744 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11745 | for (key in D) D_is_set[key] = 1 |
| 11746 | FS = "" |
| 11747 | } |
| 11748 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { |
| 11749 | line = \$ 0 |
| 11750 | split(line, arg, " ") |
| 11751 | if (arg[1] == "#") { |
| 11752 | defundef = arg[2] |
| 11753 | mac1 = arg[3] |
| 11754 | } else { |
| 11755 | defundef = substr(arg[1], 2) |
| 11756 | mac1 = arg[2] |
| 11757 | } |
| 11758 | split(mac1, mac2, "(") #) |
| 11759 | macro = mac2[1] |
| 11760 | prefix = substr(line, 1, index(line, defundef) - 1) |
| 11761 | if (D_is_set[macro]) { |
| 11762 | # Preserve the white space surrounding the "#". |
| 11763 | print prefix "define", macro P[macro] D[macro] |
| 11764 | next |
| 11765 | } else { |
| 11766 | # Replace #undef with comments. This is necessary, for example, |
| 11767 | # in the case of _POSIX_SOURCE, which is predefined and required |
| 11768 | # on some systems where configure will not decide to define it. |
| 11769 | if (defundef == "undef") { |
| 11770 | print "/*", prefix defundef, macro, "*/" |
| 11771 | next |
| 11772 | } |
| 11773 | } |
| 11774 | } |
| 11775 | { print } |
| 11776 | _ACAWK |
| 11777 | _ACEOF |
| 11778 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 11779 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
| 11780 | fi # test -n "$CONFIG_HEADERS" |
| 11781 | |
| 11782 | |
| 11783 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" |
| 11784 | shift |
| 11785 | for ac_tag |
| 11786 | do |
| 11787 | case $ac_tag in |
| 11788 | :[FHLC]) ac_mode=$ac_tag; continue;; |
| 11789 | esac |
| 11790 | case $ac_mode$ac_tag in |
| 11791 | :[FHL]*:*);; |
| 11792 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
| 11793 | :[FH]-) ac_tag=-:-;; |
| 11794 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; |
| 11795 | esac |
| 11796 | ac_save_IFS=$IFS |
| 11797 | IFS=: |
| 11798 | set x $ac_tag |
| 11799 | IFS=$ac_save_IFS |
| 11800 | shift |
| 11801 | ac_file=$1 |
| 11802 | shift |
| 11803 | |
| 11804 | case $ac_mode in |
| 11805 | :L) ac_source=$1;; |
| 11806 | :[FH]) |
| 11807 | ac_file_inputs= |
| 11808 | for ac_f |
| 11809 | do |
| 11810 | case $ac_f in |
| 11811 | -) ac_f="$ac_tmp/stdin";; |
| 11812 | *) # Look for the file first in the build tree, then in the source tree |
| 11813 | # (if the path is not absolute). The absolute path cannot be DOS-style, |
| 11814 | # because $ac_f cannot contain `:'. |
| 11815 | test -f "$ac_f" || |
| 11816 | case $ac_f in |
| 11817 | [\\/$]*) false;; |
| 11818 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; |
| 11819 | esac || |
| 11820 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
| 11821 | esac |
| 11822 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac |
| 11823 | as_fn_append ac_file_inputs " '$ac_f'" |
| 11824 | done |
| 11825 | |
| 11826 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
| 11827 | # use $as_me), people would be surprised to read: |
| 11828 | # /* config.h. Generated by config.status. */ |
| 11829 | configure_input='Generated from '` |
| 11830 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' |
| 11831 | `' by configure.' |
| 11832 | if test x"$ac_file" != x-; then |
| 11833 | configure_input="$ac_file. $configure_input" |
| 11834 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 |
| 11835 | $as_echo "$as_me: creating $ac_file" >&6;} |
| 11836 | fi |
| 11837 | # Neutralize special characters interpreted by sed in replacement strings. |
| 11838 | case $configure_input in #( |
| 11839 | *\&* | *\|* | *\\* ) |
| 11840 | ac_sed_conf_input=`$as_echo "$configure_input" | |
| 11841 | sed 's/[\\\\&|]/\\\\&/g'`;; #( |
| 11842 | *) ac_sed_conf_input=$configure_input;; |
| 11843 | esac |
| 11844 | |
| 11845 | case $ac_tag in |
| 11846 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
| 11847 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; |
| 11848 | esac |
| 11849 | ;; |
| 11850 | esac |
| 11851 | |
| 11852 | ac_dir=`$as_dirname -- "$ac_file" || |
| 11853 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 11854 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
| 11855 | X"$ac_file" : 'X\(//\)$' \| \ |
| 11856 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
| 11857 | $as_echo X"$ac_file" | |
| 11858 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 11859 | s//\1/ |
| 11860 | q |
| 11861 | } |
| 11862 | /^X\(\/\/\)[^/].*/{ |
| 11863 | s//\1/ |
| 11864 | q |
| 11865 | } |
| 11866 | /^X\(\/\/\)$/{ |
| 11867 | s//\1/ |
| 11868 | q |
| 11869 | } |
| 11870 | /^X\(\/\).*/{ |
| 11871 | s//\1/ |
| 11872 | q |
| 11873 | } |
| 11874 | s/.*/./; q'` |
| 11875 | as_dir="$ac_dir"; as_fn_mkdir_p |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11876 | ac_builddir=. |
| 11877 | |
| 11878 | case "$ac_dir" in |
| 11879 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 11880 | *) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11881 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11882 | # A ".." for each directory in $ac_dir_suffix. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11883 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11884 | case $ac_top_builddir_sub in |
| 11885 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 11886 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 11887 | esac ;; |
| 11888 | esac |
| 11889 | ac_abs_top_builddir=$ac_pwd |
| 11890 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 11891 | # for backward compatibility: |
| 11892 | ac_top_builddir=$ac_top_build_prefix |
| 11893 | |
| 11894 | case $srcdir in |
| 11895 | .) # We are building in place. |
| 11896 | ac_srcdir=. |
| 11897 | ac_top_srcdir=$ac_top_builddir_sub |
| 11898 | ac_abs_top_srcdir=$ac_pwd ;; |
| 11899 | [\\/]* | ?:[\\/]* ) # Absolute name. |
| 11900 | ac_srcdir=$srcdir$ac_dir_suffix; |
| 11901 | ac_top_srcdir=$srcdir |
| 11902 | ac_abs_top_srcdir=$srcdir ;; |
| 11903 | *) # Relative name. |
| 11904 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 11905 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 11906 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
| 11907 | esac |
| 11908 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
| 11909 | |
| 11910 | |
| 11911 | case $ac_mode in |
| 11912 | :F) |
| 11913 | # |
| 11914 | # CONFIG_FILE |
| 11915 | # |
| 11916 | |
| 11917 | case $INSTALL in |
| 11918 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; |
| 11919 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
| 11920 | esac |
| 11921 | _ACEOF |
| 11922 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11923 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11924 | # If the template does not know about datarootdir, expand it. |
| 11925 | # FIXME: This hack should be removed a few years after 2.60. |
| 11926 | ac_datarootdir_hack=; ac_datarootdir_seen= |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11927 | ac_sed_dataroot=' |
| 11928 | /datarootdir/ { |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11929 | p |
| 11930 | q |
| 11931 | } |
| 11932 | /@datadir@/p |
| 11933 | /@docdir@/p |
| 11934 | /@infodir@/p |
| 11935 | /@localedir@/p |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11936 | /@mandir@/p' |
| 11937 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11938 | *datarootdir*) ac_datarootdir_seen=yes;; |
| 11939 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 |
| 11941 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11942 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11943 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11944 | ac_datarootdir_hack=' |
| 11945 | s&@datadir@&$datadir&g |
| 11946 | s&@docdir@&$docdir&g |
| 11947 | s&@infodir@&$infodir&g |
| 11948 | s&@localedir@&$localedir&g |
| 11949 | s&@mandir@&$mandir&g |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11950 | s&\\\${datarootdir}&$datarootdir&g' ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11951 | esac |
| 11952 | _ACEOF |
| 11953 | |
| 11954 | # Neutralize VPATH when `$srcdir' = `.'. |
| 11955 | # Shell code in configure.ac might set extrasub. |
| 11956 | # FIXME: do we really want to maintain this feature? |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11957 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 11958 | ac_sed_extra="$ac_vpsub |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11959 | $extrasub |
| 11960 | _ACEOF |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11961 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11962 | :t |
| 11963 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11964 | s|@configure_input@|$ac_sed_conf_input|;t t |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11965 | s&@top_builddir@&$ac_top_builddir_sub&;t t |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11966 | s&@top_build_prefix@&$ac_top_build_prefix&;t t |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11967 | s&@srcdir@&$ac_srcdir&;t t |
| 11968 | s&@abs_srcdir@&$ac_abs_srcdir&;t t |
| 11969 | s&@top_srcdir@&$ac_top_srcdir&;t t |
| 11970 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t |
| 11971 | s&@builddir@&$ac_builddir&;t t |
| 11972 | s&@abs_builddir@&$ac_abs_builddir&;t t |
| 11973 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t |
| 11974 | s&@INSTALL@&$ac_INSTALL&;t t |
| 11975 | $ac_datarootdir_hack |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11976 | " |
| 11977 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ |
| 11978 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11979 | |
| 11980 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11981 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
| 11982 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ |
| 11983 | "$ac_tmp/out"`; test -z "$ac_out"; } && |
| 11984 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
| 11985 | which seems to be undefined. Please make sure it is defined" >&5 |
| 11986 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
| 11987 | which seems to be undefined. Please make sure it is defined" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11988 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11989 | rm -f "$ac_tmp/stdin" |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11990 | case $ac_file in |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 11991 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
| 11992 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; |
| 11993 | esac \ |
| 11994 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11995 | ;; |
| 11996 | :H) |
| 11997 | # |
| 11998 | # CONFIG_HEADER |
| 11999 | # |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12000 | if test x"$ac_file" != x-; then |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12001 | { |
| 12002 | $as_echo "/* $configure_input */" \ |
| 12003 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
| 12004 | } >"$ac_tmp/config.h" \ |
| 12005 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
| 12006 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then |
| 12007 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
| 12008 | $as_echo "$as_me: $ac_file is unchanged" >&6;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12009 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12010 | rm -f "$ac_file" |
| 12011 | mv "$ac_tmp/config.h" "$ac_file" \ |
| 12012 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12013 | fi |
| 12014 | else |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12015 | $as_echo "/* $configure_input */" \ |
| 12016 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
| 12017 | || as_fn_error $? "could not create -" "$LINENO" 5 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12018 | fi |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12019 | ;; |
| 12020 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12021 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
| 12022 | $as_echo "$as_me: executing $ac_file commands" >&6;} |
| 12023 | ;; |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12024 | esac |
| 12025 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12026 | |
| 12027 | case $ac_file$ac_mode in |
| 12028 | "default-1":C) if test -f .devel; then |
| 12029 | echo timestamp > stamp-h |
Haibo Huang | 165065a | 2018-07-23 17:26:52 -0700 | [diff] [blame] | 12030 | cat $srcdir/Makefile-devel-adds >> Makefile |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12031 | make depend |
| 12032 | fi ;; |
| 12033 | |
| 12034 | esac |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12035 | done # for ac_tag |
| 12036 | |
| 12037 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12038 | as_fn_exit 0 |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12039 | _ACEOF |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12040 | ac_clean_files=$ac_clean_files_save |
| 12041 | |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12042 | test $ac_write_fail = 0 || |
| 12043 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
| 12044 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12045 | |
| 12046 | # configure is writing to config.log, and then calls config.status. |
| 12047 | # config.status does its own redirection, appending to config.log. |
| 12048 | # Unfortunately, on DOS this fails, as config.log is still kept open |
| 12049 | # by configure, so config.status won't be able to write to it; its |
| 12050 | # output is simply discarded. So we exec the FD to /dev/null, |
| 12051 | # effectively closing config.log, so it can be properly (re)opened and |
| 12052 | # appended to by config.status. When coming back to configure, we |
| 12053 | # need to make the FD available again. |
| 12054 | if test "$no_create" != yes; then |
| 12055 | ac_cs_success=: |
| 12056 | ac_config_status_args= |
| 12057 | test "$silent" = yes && |
| 12058 | ac_config_status_args="$ac_config_status_args --quiet" |
| 12059 | exec 5>/dev/null |
| 12060 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false |
| 12061 | exec 5>>config.log |
| 12062 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which |
| 12063 | # would make configure fail if this is the last instruction. |
JP Abgrall | 511eca3 | 2014-02-12 13:46:45 -0800 | [diff] [blame] | 12064 | $ac_cs_success || as_fn_exit 1 |
| 12065 | fi |
| 12066 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
| 12067 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 |
| 12068 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12069 | fi |
| 12070 | |
The Android Open Source Project | 478ab6c | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 12071 | exit 0 |