1#! /bin/sh 2# Guess values for system-dependent variables and create Makefiles. 3# Generated by GNU Autoconf 2.69. 4# 5# 6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 7# 8# 9# This configure script is free software; the Free Software Foundation 10# gives unlimited permission to copy, distribute and modify it. 11## -------------------- ## 12## M4sh Initialization. ## 13## -------------------- ## 14 15# Be more Bourne compatible 16DUALCASE=1; export DUALCASE # for MKS sh 17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 18 emulate sh 19 NULLCMD=: 20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 21 # is contrary to our usage. Disable this feature. 22 alias -g '${1+"$@"}'='"$@"' 23 setopt NO_GLOB_SUBST 24else 25 case `(set -o) 2>/dev/null` in #( 26 *posix*) : 27 set -o posix ;; #( 28 *) : 29 ;; 30esac 31fi 32 33 34as_nl=' 35' 36export as_nl 37# Printing a long string crashes Solaris 7 /usr/bin/printf. 38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 40as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 41# Prefer a ksh shell builtin over an external printf program on Solaris, 42# but without wasting forks for bash or zsh. 43if test -z "$BASH_VERSION$ZSH_VERSION" \ 44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 45 as_echo='print -r --' 46 as_echo_n='print -rn --' 47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 48 as_echo='printf %s\n' 49 as_echo_n='printf %s' 50else 51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 53 as_echo_n='/usr/ucb/echo -n' 54 else 55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 56 as_echo_n_body='eval 57 arg=$1; 58 case $arg in #( 59 *"$as_nl"*) 60 expr "X$arg" : "X\\(.*\\)$as_nl"; 61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 62 esac; 63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 64 ' 65 export as_echo_n_body 66 as_echo_n='sh -c $as_echo_n_body as_echo' 67 fi 68 export as_echo_body 69 as_echo='sh -c $as_echo_body as_echo' 70fi 71 72# The user is always right. 73if test "${PATH_SEPARATOR+set}" != set; then 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 } 79fi 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.) 87IFS=" "" $as_nl" 88 89# Find who we are. Look in the path if we contain no directory separator. 90as_myself= 91case $0 in #(( 92 *[\\/]* ) as_myself=$0 ;; 93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 94for as_dir in $PATH 95do 96 IFS=$as_save_IFS 97 test -z "$as_dir" && as_dir=. 98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 99 done 100IFS=$as_save_IFS 101 102 ;; 103esac 104# We did not find ourselves, most probably we were run as `sh COMMAND' 105# in which case we are not to be found in the path. 106if test "x$as_myself" = x; then 107 as_myself=$0 108fi 109if test ! -f "$as_myself"; then 110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 111 exit 1 112fi 113 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. 118for as_var in BASH_ENV ENV MAIL MAILPATH 119do eval test x\${$as_var+set} = xset \ 120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 121done 122PS1='$ ' 123PS2='> ' 124PS4='+ ' 125 126# NLS nuisances. 127LC_ALL=C 128export LC_ALL 129LANGUAGE=C 130export LANGUAGE 131 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. 143BASH_ENV=/dev/null 144ENV=/dev/null 145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 146case $- in # (((( 147 *v*x* | *x*v* ) as_opts=-vx ;; 148 *v* ) as_opts=-v ;; 149 *x* ) as_opts=-x ;; 150 * ) as_opts= ;; 151esac 152exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 153# Admittedly, this is quite paranoid, since all the known shells bail 154# out after a failed `exec'. 155$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 156as_fn_exit 255 157 fi 158 # We don't want this to propagate to other subprocesses. 159 { _as_can_reexec=; unset _as_can_reexec;} 160if test "x$CONFIG_SHELL" = x; then 161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 162 emulate sh 163 NULLCMD=: 164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 165 # is contrary to our usage. Disable this feature. 166 alias -g '\${1+\"\$@\"}'='\"\$@\"' 167 setopt NO_GLOB_SUBST 168else 169 case \`(set -o) 2>/dev/null\` in #( 170 *posix*) : 171 set -o posix ;; #( 172 *) : 173 ;; 174esac 175fi 176" 177 as_required="as_fn_return () { (exit \$1); } 178as_fn_success () { as_fn_return 0; } 179as_fn_failure () { as_fn_return 1; } 180as_fn_ret_success () { return 0; } 181as_fn_ret_failure () { return 1; } 182 183exitcode=0 184as_fn_success || { exitcode=1; echo as_fn_success failed.; } 185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 189 190else 191 exitcode=1; echo positional parameters were not saved. 192fi 193test x\$exitcode = x0 || exit 1 194test -x / || exit 1" 195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 199test \$(( 1 + 1 )) = 2 || exit 1" 200 if (eval "$as_required") 2>/dev/null; then : 201 as_have_required=yes 202else 203 as_have_required=no 204fi 205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 206 207else 208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 209as_found=false 210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 211do 212 IFS=$as_save_IFS 213 test -z "$as_dir" && as_dir=. 214 as_found=: 215 case $as_dir in #( 216 /*) 217 for as_base in sh bash ksh sh5; do 218 # Try only shells that exist, to save several forks. 219 as_shell=$as_dir/$as_base 220 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 221 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 222 CONFIG_SHELL=$as_shell as_have_required=yes 223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 224 break 2 225fi 226fi 227 done;; 228 esac 229 as_found=false 230done 231$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 232 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 233 CONFIG_SHELL=$SHELL as_have_required=yes 234fi; } 235IFS=$as_save_IFS 236 237 238 if test "x$CONFIG_SHELL" != x; then : 239 export CONFIG_SHELL 240 # We cannot yet assume a decent shell, so we have to provide a 241# neutralization value for shells without unset; and this also 242# works around shells that cannot unset nonexistent variables. 243# Preserve -v and -x to the replacement shell. 244BASH_ENV=/dev/null 245ENV=/dev/null 246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 247case $- in # (((( 248 *v*x* | *x*v* ) as_opts=-vx ;; 249 *v* ) as_opts=-v ;; 250 *x* ) as_opts=-x ;; 251 * ) as_opts= ;; 252esac 253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 254# Admittedly, this is quite paranoid, since all the known shells bail 255# out after a failed `exec'. 256$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 257exit 255 258fi 259 260 if test x$as_have_required = xno; then : 261 $as_echo "$0: This script requires a shell more modern than all" 262 $as_echo "$0: the shells that I found on your system." 263 if test x${ZSH_VERSION+set} = xset ; then 264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 265 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 266 else 267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, 268$0: including any error possibly output before this 269$0: message. Then install a modern shell, or manually run 270$0: the script under such a shell if you do have one." 271 fi 272 exit 1 273fi 274fi 275fi 276SHELL=${CONFIG_SHELL-/bin/sh} 277export SHELL 278# Unset more variables known to interfere with behavior of common tools. 279CLICOLOR_FORCE= GREP_OPTIONS= 280unset CLICOLOR_FORCE GREP_OPTIONS 281 282## --------------------- ## 283## M4sh Shell Functions. ## 284## --------------------- ## 285# as_fn_unset VAR 286# --------------- 287# Portably unset VAR. 288as_fn_unset () 289{ 290 { eval $1=; unset $1;} 291} 292as_unset=as_fn_unset 293 294# as_fn_set_status STATUS 295# ----------------------- 296# Set $? to STATUS, without forking. 297as_fn_set_status () 298{ 299 return $1 300} # as_fn_set_status 301 302# as_fn_exit STATUS 303# ----------------- 304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 305as_fn_exit () 306{ 307 set +e 308 as_fn_set_status $1 309 exit $1 310} # as_fn_exit 311 312# as_fn_mkdir_p 313# ------------- 314# Create "$as_dir" as a directory, including parents if necessary. 315as_fn_mkdir_p () 316{ 317 318 case $as_dir in #( 319 -*) as_dir=./$as_dir;; 320 esac 321 test -d "$as_dir" || eval $as_mkdir_p || { 322 as_dirs= 323 while :; do 324 case $as_dir in #( 325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 326 *) as_qdir=$as_dir;; 327 esac 328 as_dirs="'$as_qdir' $as_dirs" 329 as_dir=`$as_dirname -- "$as_dir" || 330$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 331 X"$as_dir" : 'X\(//\)[^/]' \| \ 332 X"$as_dir" : 'X\(//\)$' \| \ 333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 334$as_echo X"$as_dir" | 335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 336 s//\1/ 337 q 338 } 339 /^X\(\/\/\)[^/].*/{ 340 s//\1/ 341 q 342 } 343 /^X\(\/\/\)$/{ 344 s//\1/ 345 q 346 } 347 /^X\(\/\).*/{ 348 s//\1/ 349 q 350 } 351 s/.*/./; q'` 352 test -d "$as_dir" && break 353 done 354 test -z "$as_dirs" || eval "mkdir $as_dirs" 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 356 357 358} # as_fn_mkdir_p 359 360# as_fn_executable_p FILE 361# ----------------------- 362# Test if FILE is an executable regular file. 363as_fn_executable_p () 364{ 365 test -f "$1" && test -x "$1" 366} # as_fn_executable_p 367# as_fn_append VAR VALUE 368# ---------------------- 369# Append the text in VALUE to the end of the definition contained in VAR. Take 370# advantage of any shell optimizations that allow amortized linear growth over 371# repeated appends, instead of the typical quadratic growth present in naive 372# implementations. 373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 374 eval 'as_fn_append () 375 { 376 eval $1+=\$2 377 }' 378else 379 as_fn_append () 380 { 381 eval $1=\$$1\$2 382 } 383fi # as_fn_append 384 385# as_fn_arith ARG... 386# ------------------ 387# Perform arithmetic evaluation on the ARGs, and store the result in the 388# global $as_val. Take advantage of shells that can avoid forks. The arguments 389# must be portable across $(()) and expr. 390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 391 eval 'as_fn_arith () 392 { 393 as_val=$(( $* )) 394 }' 395else 396 as_fn_arith () 397 { 398 as_val=`expr "$@" || test $? -eq 1` 399 } 400fi # as_fn_arith 401 402 403# as_fn_error STATUS ERROR [LINENO LOG_FD] 404# ---------------------------------------- 405# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 406# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 407# script with STATUS, using 1 if that was 0. 408as_fn_error () 409{ 410 as_status=$1; test $as_status -eq 0 && as_status=1 411 if test "$4"; then 412 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 414 fi 415 $as_echo "$as_me: error: $2" >&2 416 as_fn_exit $as_status 417} # as_fn_error 418 419if expr a : '\(a\)' >/dev/null 2>&1 && 420 test "X`expr 00001 : '.*\(...\)'`" = X001; then 421 as_expr=expr 422else 423 as_expr=false 424fi 425 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 427 as_basename=basename 428else 429 as_basename=false 430fi 431 432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 433 as_dirname=dirname 434else 435 as_dirname=false 436fi 437 438as_me=`$as_basename -- "$0" || 439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 440 X"$0" : 'X\(//\)$' \| \ 441 X"$0" : 'X\(/\)' \| . 2>/dev/null || 442$as_echo X/"$0" | 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 457# Avoid depending upon Character Ranges. 458as_cr_letters='abcdefghijklmnopqrstuvwxyz' 459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 460as_cr_Letters=$as_cr_letters$as_cr_LETTERS 461as_cr_digits='0123456789' 462as_cr_alnum=$as_cr_Letters$as_cr_digits 463 464 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. :-) 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" || 486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 487 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 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 500ECHO_C= ECHO_N= ECHO_T= 501case `echo -n x` in #((((( 502-n*) 503 case `echo 'xy\c'` in 504 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 505 xy) ECHO_C='\c';; 506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 507 ECHO_T=' ';; 508 esac;; 509*) 510 ECHO_N='-n';; 511esac 512 513rm -f conf$$ conf$$.exe conf$$.file 514if test -d conf$$.dir; then 515 rm -f conf$$.dir/conf$$.file 516else 517 rm -f conf$$.dir 518 mkdir conf$$.dir 2>/dev/null 519fi 520if (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 534else 535 as_ln_s='cp -pR' 536fi 537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 538rmdir conf$$.dir 2>/dev/null 539 540if mkdir -p . 2>/dev/null; then 541 as_mkdir_p='mkdir -p "$as_dir"' 542else 543 test -d ./-p && rmdir ./-p 544 as_mkdir_p=false 545fi 546 547as_test_x='test -x' 548as_executable_p=as_fn_executable_p 549 550# Sed expression to map a string onto a valid CPP name. 551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 552 553# Sed expression to map a string onto a valid variable name. 554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 555 556 557test -n "$DJDIR" || exec 7<&0 </dev/null 558exec 6>&1 559 560# Name of the host. 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 562# so uname gets run too. 563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 564 565# 566# Initializations. 567# 568ac_default_prefix=/usr/local 569ac_clean_files= 570ac_config_libobj_dir=. 571LIBOBJS= 572cross_compiling=no 573subdirs= 574MFLAGS= 575MAKEFLAGS= 576 577# Identity of this package. 578PACKAGE_NAME= 579PACKAGE_TARNAME= 580PACKAGE_VERSION= 581PACKAGE_STRING= 582PACKAGE_BUGREPORT= 583PACKAGE_URL= 584 585ac_unique_file="vsn.mk" 586# Factoring default headers for most tests. 587ac_includes_default="\ 588#include <stdio.h> 589#ifdef HAVE_SYS_TYPES_H 590# include <sys/types.h> 591#endif 592#ifdef HAVE_SYS_STAT_H 593# include <sys/stat.h> 594#endif 595#ifdef STDC_HEADERS 596# include <stdlib.h> 597# include <stddef.h> 598#else 599# ifdef HAVE_STDLIB_H 600# include <stdlib.h> 601# endif 602#endif 603#ifdef HAVE_STRING_H 604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H 605# include <memory.h> 606# endif 607# include <string.h> 608#endif 609#ifdef HAVE_STRINGS_H 610# include <strings.h> 611#endif 612#ifdef HAVE_INTTYPES_H 613# include <inttypes.h> 614#endif 615#ifdef HAVE_STDINT_H 616# include <stdint.h> 617#endif 618#ifdef HAVE_UNISTD_H 619# include <unistd.h> 620#endif" 621 622ac_subst_vars='LTLIBOBJS 623LIBOBJS 624CFLAGS32 625CC32 626JAVAC 627CPU_SUP_LIBS 628os_mon_programs 629DTRACE_ENABLED_2STEP 630DTRACE_ENABLED 631DTRACE_CPP 632DTRACE 633EMU_CC 634ERTS_BUILD_FALLBACK_POLL 635FLAVORS 636PRIMARY_FLAVOR 637JIT_ARCH 638JIT_ENABLED 639ac_ct_CXX 640M4 641LIBRT 642BITS64 643HAVE_VALGRIND 644LIBSCTP 645SYSTEMD_DAEMON_LIBS 646SOCKET_LIBS 647USE_ESOCK 648Z_LIB 649TERMCAP_LIB 650THR_DEFS 651THR_LIBS 652EMU_LOCK_CHECKING 653EMU_THR_DEFS 654EMU_THR_LIBS 655EMU_THR_X_LIBS 656EMU_THR_LIB_NAME 657TYPES 658DIRTY_SCHEDULER_TEST 659ETHR_X86_SSE2_ASM 660ETHR_THR_LIB_BASE_DIR 661ETHR_THR_LIB_BASE 662ETHR_DEFS 663ETHR_LIB_NAME 664ETHR_LIBS 665ETHR_X_LIBS 666ERTS_INTERNAL_X_LIBS 667DEXPORT 668ERLANG_OSTYPE 669HCFLAGS 670HCC 671INSTALL_DIR 672INSTALL_DATA 673INSTALL_SCRIPT 674INSTALL_PROGRAM 675XMLLINT 676FOP 677XSLTPROC 678LN_S 679PERL 680YFLAGS 681YACC 682CP 683MKDIR 684LIBCARBON 685ARCH 686OPSYS 687EXTERNAL_WORD_SIZE 688EGREP 689GREP 690PROFILE_COMPILER 691USE_PGO 692XCRUN 693LLVM_PROFDATA 694WERRORFLAGS 695WFLAGS 696DEBUG_CFLAGS 697DEBUG_FLAGS 698ERTS_CONFIG_H_IDIR 699MIXED_MINGW 700MIXED_VC 701GCC 702STATIC_DRIVERS 703STATIC_NIFS 704OTP_VERSION 705SYSTEM_VSN 706OTP_RELEASE 707USE_VM_PROBES 708ENABLE_ALLOC_TYPE_VARS 709OBJEXT 710EXEEXT 711ac_ct_CC 712CROSS_COMPILING 713host_os 714host_vendor 715host_cpu 716host 717build_os 718build_vendor 719build_cpu 720build 721erl_xcomp_dlsym_brk_wrappers 722erl_xcomp_after_morecore_hook 723erl_xcomp_clock_gettime_cpu_time 724erl_xcomp_gethrvtime_procfs_ioctl 725erl_xcomp_getaddrinfo 726erl_xcomp_reliable_fpe 727erl_xcomp_putenv_copy 728erl_xcomp_kqueue 729erl_xcomp_poll 730erl_xcomp_linux_usable_sigaltstack 731erl_xcomp_linux_usable_sigusrx 732erl_xcomp_linux_nptl 733erl_xcomp_double_middle_endian 734erl_xcomp_bigendian 735erl_xcomp_isysroot 736erl_xcomp_sysroot 737GETCONF 738AR 739RANLIB 740LFS_LIBS 741LFS_LDFLAGS 742LFS_CFLAGS 743DED_LD_FLAG_RUNTIME_LIBRARY_PATH 744DED_LDFLAGS 745DED_LD 746LDFLAGS 747LD 748CXXFLAGS 749CXX 750CPPFLAGS 751CPP 752CFLAG_RUNTIME_LIBRARY_PATH 753STATIC_CFLAGS 754CFLAGS 755CC 756ERL_TOP 757target_alias 758host_alias 759build_alias 760LIBS 761ECHO_T 762ECHO_N 763ECHO_C 764DEFS 765mandir 766localedir 767libdir 768psdir 769pdfdir 770dvidir 771htmldir 772infodir 773docdir 774oldincludedir 775includedir 776runstatedir 777localstatedir 778sharedstatedir 779sysconfdir 780datadir 781datarootdir 782libexecdir 783sbindir 784bindir 785program_transform_name 786prefix 787exec_prefix 788PACKAGE_URL 789PACKAGE_BUGREPORT 790PACKAGE_STRING 791PACKAGE_VERSION 792PACKAGE_TARNAME 793PACKAGE_NAME 794PATH_SEPARATOR 795SHELL' 796ac_subst_files='' 797ac_user_opts=' 798enable_option_checking 799enable_bootstrap_only 800enable_dirty_schedulers_test 801enable_smp_require_native_atomics 802with_termcap 803enable_lock_checking 804enable_lock_counter 805enable_kernel_poll 806enable_sctp 807enable_jit 808enable_m64_build 809enable_m32_build 810with_dynamic_trace 811enable_vm_probes 812with_assumed_cache_line_size 813enable_systemd 814enable_saved_compile_time 815with_microstate_accounting 816enable_static_nifs 817enable_static_drivers 818with_ets_write_concurrency_locks 819with_spectre_mitigation 820enable_pgo 821enable_native_ethr_impls 822enable_x86_out_of_order 823enable_prefer_gcc_native_ethr_impls 824enable_trust_gcc_atomic_builtins_memory_barriers 825with_libatomic_ops 826with_with_sparc_memory_order 827enable_ppc_lwsync_instruction 828with_threadnames 829enable_builtin_zlib 830enable_esock 831enable_esock_use_rcvsndtimeo 832with_esock_counter_size 833enable_esock_socket_registry 834with_clock_resolution 835with_clock_gettime_realtime_id 836with_clock_gettime_monotonic_id 837enable_prefer_elapsed_monotonic_time_during_suspend 838enable_gettimeofday_as_os_system_time 839with_javac 840enable_sanitizers 841' 842 ac_precious_vars='build_alias 843host_alias 844target_alias 845ERL_TOP 846CC 847CFLAGS 848STATIC_CFLAGS 849CFLAG_RUNTIME_LIBRARY_PATH 850CPP 851CPPFLAGS 852CXX 853CXXFLAGS 854LD 855LDFLAGS 856LIBS 857DED_LD 858DED_LDFLAGS 859DED_LD_FLAG_RUNTIME_LIBRARY_PATH 860LFS_CFLAGS 861LFS_LDFLAGS 862LFS_LIBS 863RANLIB 864AR 865GETCONF 866erl_xcomp_sysroot 867erl_xcomp_isysroot 868erl_xcomp_bigendian 869erl_xcomp_double_middle_endian 870erl_xcomp_linux_nptl 871erl_xcomp_linux_usable_sigusrx 872erl_xcomp_linux_usable_sigaltstack 873erl_xcomp_poll 874erl_xcomp_kqueue 875erl_xcomp_putenv_copy 876erl_xcomp_reliable_fpe 877erl_xcomp_getaddrinfo 878erl_xcomp_gethrvtime_procfs_ioctl 879erl_xcomp_clock_gettime_cpu_time 880erl_xcomp_after_morecore_hook 881erl_xcomp_dlsym_brk_wrappers 882YACC 883YFLAGS 884CCC' 885 886 887# Initialize some variables set by options. 888ac_init_help= 889ac_init_version=false 890ac_unrecognized_opts= 891ac_unrecognized_sep= 892# The variables have the same names as the options, with 893# dashes changed to underlines. 894cache_file=/dev/null 895exec_prefix=NONE 896no_create= 897no_recursion= 898prefix=NONE 899program_prefix=NONE 900program_suffix=NONE 901program_transform_name=s,x,x, 902silent= 903site= 904srcdir= 905verbose= 906x_includes=NONE 907x_libraries=NONE 908 909# Installation directory options. 910# These are left unexpanded so users can "make install exec_prefix=/foo" 911# and all the variables that are supposed to be based on exec_prefix 912# by default will actually change. 913# Use braces instead of parens because sh, perl, etc. also accept them. 914# (The list follows the same order as the GNU Coding Standards.) 915bindir='${exec_prefix}/bin' 916sbindir='${exec_prefix}/sbin' 917libexecdir='${exec_prefix}/libexec' 918datarootdir='${prefix}/share' 919datadir='${datarootdir}' 920sysconfdir='${prefix}/etc' 921sharedstatedir='${prefix}/com' 922localstatedir='${prefix}/var' 923runstatedir='${localstatedir}/run' 924includedir='${prefix}/include' 925oldincludedir='/usr/include' 926docdir='${datarootdir}/doc/${PACKAGE}' 927infodir='${datarootdir}/info' 928htmldir='${docdir}' 929dvidir='${docdir}' 930pdfdir='${docdir}' 931psdir='${docdir}' 932libdir='${exec_prefix}/lib' 933localedir='${datarootdir}/locale' 934mandir='${datarootdir}/man' 935 936ac_prev= 937ac_dashdash= 938for ac_option 939do 940 # If the previous option needs an argument, assign it. 941 if test -n "$ac_prev"; then 942 eval $ac_prev=\$ac_option 943 ac_prev= 944 continue 945 fi 946 947 case $ac_option in 948 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 949 *=) ac_optarg= ;; 950 *) ac_optarg=yes ;; 951 esac 952 953 # Accept the important Cygnus configure options, so we can diagnose typos. 954 955 case $ac_dashdash$ac_option in 956 --) 957 ac_dashdash=yes ;; 958 959 -bindir | --bindir | --bindi | --bind | --bin | --bi) 960 ac_prev=bindir ;; 961 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 962 bindir=$ac_optarg ;; 963 964 -build | --build | --buil | --bui | --bu) 965 ac_prev=build_alias ;; 966 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 967 build_alias=$ac_optarg ;; 968 969 -cache-file | --cache-file | --cache-fil | --cache-fi \ 970 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 971 ac_prev=cache_file ;; 972 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 973 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 974 cache_file=$ac_optarg ;; 975 976 --config-cache | -C) 977 cache_file=config.cache ;; 978 979 -datadir | --datadir | --datadi | --datad) 980 ac_prev=datadir ;; 981 -datadir=* | --datadir=* | --datadi=* | --datad=*) 982 datadir=$ac_optarg ;; 983 984 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 985 | --dataroo | --dataro | --datar) 986 ac_prev=datarootdir ;; 987 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 988 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 989 datarootdir=$ac_optarg ;; 990 991 -disable-* | --disable-*) 992 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 993 # Reject names that are not valid shell variable names. 994 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 995 as_fn_error $? "invalid feature name: $ac_useropt" 996 ac_useropt_orig=$ac_useropt 997 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 998 case $ac_user_opts in 999 *" 1000"enable_$ac_useropt" 1001"*) ;; 1002 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 1003 ac_unrecognized_sep=', ';; 1004 esac 1005 eval enable_$ac_useropt=no ;; 1006 1007 -docdir | --docdir | --docdi | --doc | --do) 1008 ac_prev=docdir ;; 1009 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 1010 docdir=$ac_optarg ;; 1011 1012 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 1013 ac_prev=dvidir ;; 1014 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 1015 dvidir=$ac_optarg ;; 1016 1017 -enable-* | --enable-*) 1018 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1019 # Reject names that are not valid shell variable names. 1020 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1021 as_fn_error $? "invalid feature name: $ac_useropt" 1022 ac_useropt_orig=$ac_useropt 1023 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1024 case $ac_user_opts in 1025 *" 1026"enable_$ac_useropt" 1027"*) ;; 1028 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 1029 ac_unrecognized_sep=', ';; 1030 esac 1031 eval enable_$ac_useropt=\$ac_optarg ;; 1032 1033 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 1034 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 1035 | --exec | --exe | --ex) 1036 ac_prev=exec_prefix ;; 1037 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 1038 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 1039 | --exec=* | --exe=* | --ex=*) 1040 exec_prefix=$ac_optarg ;; 1041 1042 -gas | --gas | --ga | --g) 1043 # Obsolete; use --with-gas. 1044 with_gas=yes ;; 1045 1046 -help | --help | --hel | --he | -h) 1047 ac_init_help=long ;; 1048 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 1049 ac_init_help=recursive ;; 1050 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 1051 ac_init_help=short ;; 1052 1053 -host | --host | --hos | --ho) 1054 ac_prev=host_alias ;; 1055 -host=* | --host=* | --hos=* | --ho=*) 1056 host_alias=$ac_optarg ;; 1057 1058 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 1059 ac_prev=htmldir ;; 1060 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 1061 | --ht=*) 1062 htmldir=$ac_optarg ;; 1063 1064 -includedir | --includedir | --includedi | --included | --include \ 1065 | --includ | --inclu | --incl | --inc) 1066 ac_prev=includedir ;; 1067 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 1068 | --includ=* | --inclu=* | --incl=* | --inc=*) 1069 includedir=$ac_optarg ;; 1070 1071 -infodir | --infodir | --infodi | --infod | --info | --inf) 1072 ac_prev=infodir ;; 1073 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 1074 infodir=$ac_optarg ;; 1075 1076 -libdir | --libdir | --libdi | --libd) 1077 ac_prev=libdir ;; 1078 -libdir=* | --libdir=* | --libdi=* | --libd=*) 1079 libdir=$ac_optarg ;; 1080 1081 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 1082 | --libexe | --libex | --libe) 1083 ac_prev=libexecdir ;; 1084 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 1085 | --libexe=* | --libex=* | --libe=*) 1086 libexecdir=$ac_optarg ;; 1087 1088 -localedir | --localedir | --localedi | --localed | --locale) 1089 ac_prev=localedir ;; 1090 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 1091 localedir=$ac_optarg ;; 1092 1093 -localstatedir | --localstatedir | --localstatedi | --localstated \ 1094 | --localstate | --localstat | --localsta | --localst | --locals) 1095 ac_prev=localstatedir ;; 1096 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 1097 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 1098 localstatedir=$ac_optarg ;; 1099 1100 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 1101 ac_prev=mandir ;; 1102 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 1103 mandir=$ac_optarg ;; 1104 1105 -nfp | --nfp | --nf) 1106 # Obsolete; use --without-fp. 1107 with_fp=no ;; 1108 1109 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 1110 | --no-cr | --no-c | -n) 1111 no_create=yes ;; 1112 1113 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 1114 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 1115 no_recursion=yes ;; 1116 1117 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 1118 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 1119 | --oldin | --oldi | --old | --ol | --o) 1120 ac_prev=oldincludedir ;; 1121 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 1122 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 1123 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 1124 oldincludedir=$ac_optarg ;; 1125 1126 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 1127 ac_prev=prefix ;; 1128 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 1129 prefix=$ac_optarg ;; 1130 1131 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 1132 | --program-pre | --program-pr | --program-p) 1133 ac_prev=program_prefix ;; 1134 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 1135 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 1136 program_prefix=$ac_optarg ;; 1137 1138 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 1139 | --program-suf | --program-su | --program-s) 1140 ac_prev=program_suffix ;; 1141 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 1142 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 1143 program_suffix=$ac_optarg ;; 1144 1145 -program-transform-name | --program-transform-name \ 1146 | --program-transform-nam | --program-transform-na \ 1147 | --program-transform-n | --program-transform- \ 1148 | --program-transform | --program-transfor \ 1149 | --program-transfo | --program-transf \ 1150 | --program-trans | --program-tran \ 1151 | --progr-tra | --program-tr | --program-t) 1152 ac_prev=program_transform_name ;; 1153 -program-transform-name=* | --program-transform-name=* \ 1154 | --program-transform-nam=* | --program-transform-na=* \ 1155 | --program-transform-n=* | --program-transform-=* \ 1156 | --program-transform=* | --program-transfor=* \ 1157 | --program-transfo=* | --program-transf=* \ 1158 | --program-trans=* | --program-tran=* \ 1159 | --progr-tra=* | --program-tr=* | --program-t=*) 1160 program_transform_name=$ac_optarg ;; 1161 1162 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 1163 ac_prev=pdfdir ;; 1164 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 1165 pdfdir=$ac_optarg ;; 1166 1167 -psdir | --psdir | --psdi | --psd | --ps) 1168 ac_prev=psdir ;; 1169 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 1170 psdir=$ac_optarg ;; 1171 1172 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1173 | -silent | --silent | --silen | --sile | --sil) 1174 silent=yes ;; 1175 1176 -runstatedir | --runstatedir | --runstatedi | --runstated \ 1177 | --runstate | --runstat | --runsta | --runst | --runs \ 1178 | --run | --ru | --r) 1179 ac_prev=runstatedir ;; 1180 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 1181 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 1182 | --run=* | --ru=* | --r=*) 1183 runstatedir=$ac_optarg ;; 1184 1185 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1186 ac_prev=sbindir ;; 1187 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1188 | --sbi=* | --sb=*) 1189 sbindir=$ac_optarg ;; 1190 1191 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 1192 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 1193 | --sharedst | --shareds | --shared | --share | --shar \ 1194 | --sha | --sh) 1195 ac_prev=sharedstatedir ;; 1196 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 1197 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 1198 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 1199 | --sha=* | --sh=*) 1200 sharedstatedir=$ac_optarg ;; 1201 1202 -site | --site | --sit) 1203 ac_prev=site ;; 1204 -site=* | --site=* | --sit=*) 1205 site=$ac_optarg ;; 1206 1207 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 1208 ac_prev=srcdir ;; 1209 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 1210 srcdir=$ac_optarg ;; 1211 1212 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 1213 | --syscon | --sysco | --sysc | --sys | --sy) 1214 ac_prev=sysconfdir ;; 1215 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 1216 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 1217 sysconfdir=$ac_optarg ;; 1218 1219 -target | --target | --targe | --targ | --tar | --ta | --t) 1220 ac_prev=target_alias ;; 1221 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 1222 target_alias=$ac_optarg ;; 1223 1224 -v | -verbose | --verbose | --verbos | --verbo | --verb) 1225 verbose=yes ;; 1226 1227 -version | --version | --versio | --versi | --vers | -V) 1228 ac_init_version=: ;; 1229 1230 -with-* | --with-*) 1231 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1232 # Reject names that are not valid shell variable names. 1233 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1234 as_fn_error $? "invalid package name: $ac_useropt" 1235 ac_useropt_orig=$ac_useropt 1236 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1237 case $ac_user_opts in 1238 *" 1239"with_$ac_useropt" 1240"*) ;; 1241 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 1242 ac_unrecognized_sep=', ';; 1243 esac 1244 eval with_$ac_useropt=\$ac_optarg ;; 1245 1246 -without-* | --without-*) 1247 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1248 # Reject names that are not valid shell variable names. 1249 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1250 as_fn_error $? "invalid package name: $ac_useropt" 1251 ac_useropt_orig=$ac_useropt 1252 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1253 case $ac_user_opts in 1254 *" 1255"with_$ac_useropt" 1256"*) ;; 1257 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1258 ac_unrecognized_sep=', ';; 1259 esac 1260 eval with_$ac_useropt=no ;; 1261 1262 --x) 1263 # Obsolete; use --with-x. 1264 with_x=yes ;; 1265 1266 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1267 | --x-incl | --x-inc | --x-in | --x-i) 1268 ac_prev=x_includes ;; 1269 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1270 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1271 x_includes=$ac_optarg ;; 1272 1273 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1274 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1275 ac_prev=x_libraries ;; 1276 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1277 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1278 x_libraries=$ac_optarg ;; 1279 1280 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1281Try \`$0 --help' for more information" 1282 ;; 1283 1284 *=*) 1285 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1286 # Reject names that are not valid shell variable names. 1287 case $ac_envvar in #( 1288 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1289 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1290 esac 1291 eval $ac_envvar=\$ac_optarg 1292 export $ac_envvar ;; 1293 1294 *) 1295 # FIXME: should be removed in autoconf 3.0. 1296 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1297 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1298 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1299 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 1300 ;; 1301 1302 esac 1303done 1304 1305if test -n "$ac_prev"; then 1306 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1307 as_fn_error $? "missing argument to $ac_option" 1308fi 1309 1310if test -n "$ac_unrecognized_opts"; then 1311 case $enable_option_checking in 1312 no) ;; 1313 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1314 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1315 esac 1316fi 1317 1318# Check all directory arguments for consistency. 1319for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1320 datadir sysconfdir sharedstatedir localstatedir includedir \ 1321 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1322 libdir localedir mandir runstatedir 1323do 1324 eval ac_val=\$$ac_var 1325 # Remove trailing slashes. 1326 case $ac_val in 1327 */ ) 1328 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1329 eval $ac_var=\$ac_val;; 1330 esac 1331 # Be sure to have absolute directory names. 1332 case $ac_val in 1333 [\\/$]* | ?:[\\/]* ) continue;; 1334 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1335 esac 1336 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1337done 1338 1339# There might be people who depend on the old broken behavior: `$host' 1340# used to hold the argument of --host etc. 1341# FIXME: To remove some day. 1342build=$build_alias 1343host=$host_alias 1344target=$target_alias 1345 1346# FIXME: To remove some day. 1347if test "x$host_alias" != x; then 1348 if test "x$build_alias" = x; then 1349 cross_compiling=maybe 1350 elif test "x$build_alias" != "x$host_alias"; then 1351 cross_compiling=yes 1352 fi 1353fi 1354 1355ac_tool_prefix= 1356test -n "$host_alias" && ac_tool_prefix=$host_alias- 1357 1358test "$silent" = yes && exec 6>/dev/null 1359 1360 1361ac_pwd=`pwd` && test -n "$ac_pwd" && 1362ac_ls_di=`ls -di .` && 1363ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1364 as_fn_error $? "working directory cannot be determined" 1365test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1366 as_fn_error $? "pwd does not report name of working directory" 1367 1368 1369# Find the source files, if location was not specified. 1370if test -z "$srcdir"; then 1371 ac_srcdir_defaulted=yes 1372 # Try the directory containing this script, then the parent directory. 1373 ac_confdir=`$as_dirname -- "$as_myself" || 1374$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1375 X"$as_myself" : 'X\(//\)[^/]' \| \ 1376 X"$as_myself" : 'X\(//\)$' \| \ 1377 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1378$as_echo X"$as_myself" | 1379 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1380 s//\1/ 1381 q 1382 } 1383 /^X\(\/\/\)[^/].*/{ 1384 s//\1/ 1385 q 1386 } 1387 /^X\(\/\/\)$/{ 1388 s//\1/ 1389 q 1390 } 1391 /^X\(\/\).*/{ 1392 s//\1/ 1393 q 1394 } 1395 s/.*/./; q'` 1396 srcdir=$ac_confdir 1397 if test ! -r "$srcdir/$ac_unique_file"; then 1398 srcdir=.. 1399 fi 1400else 1401 ac_srcdir_defaulted=no 1402fi 1403if test ! -r "$srcdir/$ac_unique_file"; then 1404 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1405 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1406fi 1407ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1408ac_abs_confdir=`( 1409 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1410 pwd)` 1411# When building in place, set srcdir=. 1412if test "$ac_abs_confdir" = "$ac_pwd"; then 1413 srcdir=. 1414fi 1415# Remove unnecessary trailing slashes from srcdir. 1416# Double slashes in file names in object file debugging info 1417# mess up M-x gdb in Emacs. 1418case $srcdir in 1419*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1420esac 1421for ac_var in $ac_precious_vars; do 1422 eval ac_env_${ac_var}_set=\${${ac_var}+set} 1423 eval ac_env_${ac_var}_value=\$${ac_var} 1424 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1425 eval ac_cv_env_${ac_var}_value=\$${ac_var} 1426done 1427 1428# 1429# Report the --help message. 1430# 1431if test "$ac_init_help" = "long"; then 1432 # Omit some internal or obsolete options to make the list less imposing. 1433 # This message is too long to be a string in the A/UX 3.1 sh. 1434 cat <<_ACEOF 1435\`configure' configures this package to adapt to many kinds of systems. 1436 1437Usage: $0 [OPTION]... [VAR=VALUE]... 1438 1439To assign environment variables (e.g., CC, CFLAGS...), specify them as 1440VAR=VALUE. See below for descriptions of some of the useful variables. 1441 1442Defaults for the options are specified in brackets. 1443 1444Configuration: 1445 -h, --help display this help and exit 1446 --help=short display options specific to this package 1447 --help=recursive display the short help of all the included packages 1448 -V, --version display version information and exit 1449 -q, --quiet, --silent do not print \`checking ...' messages 1450 --cache-file=FILE cache test results in FILE [disabled] 1451 -C, --config-cache alias for \`--cache-file=config.cache' 1452 -n, --no-create do not create output files 1453 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1454 1455Installation directories: 1456 --prefix=PREFIX install architecture-independent files in PREFIX 1457 [$ac_default_prefix] 1458 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1459 [PREFIX] 1460 1461By default, \`make install' will install all the files in 1462\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1463an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1464for instance \`--prefix=\$HOME'. 1465 1466For better control, use the options below. 1467 1468Fine tuning of the installation directories: 1469 --bindir=DIR user executables [EPREFIX/bin] 1470 --sbindir=DIR system admin executables [EPREFIX/sbin] 1471 --libexecdir=DIR program executables [EPREFIX/libexec] 1472 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1473 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1474 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1475 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] 1476 --libdir=DIR object code libraries [EPREFIX/lib] 1477 --includedir=DIR C header files [PREFIX/include] 1478 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1479 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1480 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1481 --infodir=DIR info documentation [DATAROOTDIR/info] 1482 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1483 --mandir=DIR man documentation [DATAROOTDIR/man] 1484 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] 1485 --htmldir=DIR html documentation [DOCDIR] 1486 --dvidir=DIR dvi documentation [DOCDIR] 1487 --pdfdir=DIR pdf documentation [DOCDIR] 1488 --psdir=DIR ps documentation [DOCDIR] 1489_ACEOF 1490 1491 cat <<\_ACEOF 1492 1493System types: 1494 --build=BUILD configure for building on BUILD [guessed] 1495 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1496_ACEOF 1497fi 1498 1499if test -n "$ac_init_help"; then 1500 1501 cat <<\_ACEOF 1502 1503Optional Features: 1504 --disable-option-checking ignore unrecognized --enable/--with options 1505 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1506 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1507 --enable-bootstrap-only enable bootstrap only configuration 1508 --enable-dirty-schedulers-test 1509 enable dirty scheduler test (for debugging purposes) 1510 --disable-smp-require-native-atomics 1511 disable the SMP requirement of a native atomic 1512 implementation 1513 --enable-lock-checking enable lock checking 1514 --enable-lock-counter enable lock counters 1515 --enable-kernel-poll enable kernel poll support 1516 --disable-kernel-poll disable kernel poll support 1517 --enable-sctp enable sctp support (default) to on demand load the 1518 SCTP library in runtime if needed 1519 --enable-sctp=lib enable sctp support to link against the SCTP library 1520 --disable-sctp disable sctp support 1521 --enable-jit enable JIT support 1522 --disable-jit disable JIT support 1523 --enable-m64-build build 64bit binaries using the -m64 flag to (g)cc 1524 --enable-m32-build build 32bit binaries using the -m32 flag to (g)cc 1525 --enable-vm-probes add dynamic trace probes to the Beam VM (only 1526 possible if --with-dynamic-trace is enabled, and 1527 then default) 1528 --enable-systemd enable systemd support in epmd 1529 --disable-saved-compile-time 1530 disable saved compile time 1531 --enable-static-nifs link nifs statically. If yes then all nifs in all 1532 Erlang/OTP applications will be statically linked 1533 into the main binary. It is also possible to give a 1534 list of nifs that should be linked statically. The 1535 list should be a comma separated and contain the 1536 absolute path to a .a archive for each nif that is 1537 to be statically linked. The name of the .a archive 1538 has to be the same as the name of the nif. Note that 1539 you have to link any external dependencies that the 1540 nifs have to the main binary, so for the crypto nif 1541 you want to pass LIBS=-lcrypto to configure. 1542 --enable-static-drivers comma separated list of linked-in drivers to link 1543 statically with the main binary. The list should 1544 contain the absolute path to a .a archive for each 1545 driver that is to be statically linked. The name of 1546 the .a archive has to be the same as the name of the 1547 driver. 1548 --enable-pgo build erts using PGO (profile guided optimization) 1549 --disable-native-ethr-impls 1550 disable native ethread implementations 1551 --enable-x86-out-of-order 1552 enable x86/x84_64 out of order support (default 1553 disabled) 1554 --enable-prefer-gcc-native-ethr-impls 1555 prefer gcc native ethread implementations 1556 --enable-trust-gcc-atomic-builtins-memory-barriers 1557 trust gcc atomic builtins memory barriers 1558 --enable-ppc-lwsync-instruction 1559 enable use of powerpc lwsync instruction 1560 --disable-ppc-lwsync-instruction 1561 disable use of powerpc lwsync instruction 1562 --enable-builtin-zlib force use of our own built-in zlib 1563 --enable-esock enable builtin experimental socket (as a nif) 1564 support (default) 1565 --disable-esock disable builtin experimental socket (as a nif) 1566 support 1567 --enable-esock-rcvsndtimeo 1568 enable use of the option(s) rcvtimeo and sndtimeo 1569 --disable-esock-rcvsndtimeo 1570 disable use of the option(s) rcvtimeo and sndtimeo 1571 (default) 1572 --enable-esock-socket-registry 1573 enable use of the socket registry by default 1574 (default) 1575 --disable-esock-socket-registry 1576 disable use of the socket registry by default 1577 --enable-prefer-elapsed-monotonic-time-during-suspend 1578 Prefer an OS monotonic time source with elapsed time 1579 during suspend 1580 --disable-prefer-elapsed-monotonic-time-during-suspend 1581 Do not prefer an OS monotonic time source with 1582 elapsed time during suspend 1583 --enable-gettimeofday-as-os-system-time 1584 Force usage of gettimeofday() for OS system time 1585 --enable-sanitizers[=comma-separated list of sanitizers] 1586 Default=address,undefined 1587 1588Optional Packages: 1589 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1590 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1591 --with-termcap use termcap (default) 1592 --without-termcap do not use any termcap libraries 1593 (ncurses,curses,termcap,termlib) 1594 --with-dynamic-trace={dtrace|lttng|systemtap} 1595 specify use of dynamic trace framework, dtrace, 1596 lttng or systemtap 1597 --without-dynamic-trace don't enable any dynamic tracing (default) 1598 --with-assumed-cache-line-size=SIZE 1599 specify assumed cache line size in bytes (valid 1600 values are powers of two between and including 16 1601 and 8192; default is 64) 1602 --with-microstate-accounting={yes|extra} 1603 enable microstate account, possibly with extra 1604 detailed states 1605 --without-microstate-accounting 1606 don't enable microstate accounting 1607 --with-ets-write-concurrency-locks={8|16|32|64|128|256} 1608 specify how many locks the write_concurrency option 1609 for ets should use. 1610 --without-ets-write-concurrency-locks 1611 use the default number of write_concurrency locks 1612 (default) 1613 --with-spectre-mitigation={yes|incomplete} 1614 enable spectre mitigation, either fully or with 1615 mitigations disabled in a handful places like the 1616 interpreter 1617 --without-spectre-mitigation 1618 build without spectre mitigation 1619 --with-libatomic_ops=PATH 1620 specify and prefer usage of libatomic_ops in the 1621 ethread library 1622 --with-sparc-memory-order=TSO|PSO|RMO 1623 specify sparc memory order (defaults to RMO) 1624 --with-threadnames use pthread_setname to set the thread names 1625 (default) 1626 --without-threadnames do not set any thread names 1627 --with-esock-counter-size=SZ 1628 Size of the esock counters, in number of bits: 16 | 1629 24 | 32 | 48 | 64; default is 64 1630 --with-clock-resolution=high|low|default 1631 specify wanted clock resolution 1632 --with-clock-gettime-realtime-id=CLOCKID 1633 specify clock id to use with clock_gettime() for 1634 realtime time) 1635 --with-clock-gettime-monotonic-id=CLOCKID 1636 specify clock id to use with clock_gettime() for 1637 monotonic time) 1638 --with-javac=JAVAC specify Java compiler to use 1639 --with-javac use a Java compiler if found (default) 1640 --without-javac don't use any Java compiler 1641 1642Some influential environment variables: 1643 ERL_TOP Erlang/OTP top source directory 1644 CC C compiler 1645 CFLAGS C compiler flags 1646 STATIC_CFLAGS 1647 C compiler static flags 1648 CFLAG_RUNTIME_LIBRARY_PATH 1649 runtime library path linker flag passed via C compiler 1650 CPP C/C++ preprocessor 1651 CPPFLAGS C/C++ preprocessor flags 1652 CXX C++ compiler 1653 CXXFLAGS C++ compiler flags 1654 LD linker (is often overridden by configure) 1655 LDFLAGS linker flags (can be risky to set since LD may be overriden by 1656 configure) 1657 LIBS libraries 1658 DED_LD linker for Dynamic Erlang Drivers (set all DED_LD* variables or 1659 none) 1660 DED_LDFLAGS linker flags for Dynamic Erlang Drivers (set all DED_LD* 1661 variables or none) 1662 DED_LD_FLAG_RUNTIME_LIBRARY_PATH 1663 runtime library path linker flag for Dynamic Erlang Drivers (set 1664 all DED_LD* variables or none) 1665 LFS_CFLAGS large file support C compiler flags (set all LFS_* variables or 1666 none) 1667 LFS_LDFLAGS large file support linker flags (set all LFS_* variables or 1668 none) 1669 LFS_LIBS large file support libraries (set all LFS_* variables or none) 1670 RANLIB ranlib 1671 AR ar 1672 GETCONF getconf 1673 erl_xcomp_sysroot 1674 Absolute cross system root path (only used when cross compiling) 1675 erl_xcomp_isysroot 1676 Absolute cross system root include path (only used when cross 1677 compiling) 1678 erl_xcomp_bigendian 1679 big endian system: yes|no (only used when cross compiling) 1680 erl_xcomp_double_middle_endian 1681 double-middle-endian system: yes|no (only used when cross 1682 compiling) 1683 erl_xcomp_linux_nptl 1684 have Native POSIX Thread Library: yes|no (only used when cross 1685 compiling) 1686 erl_xcomp_linux_usable_sigusrx 1687 SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross 1688 compiling) 1689 erl_xcomp_linux_usable_sigaltstack 1690 have working sigaltstack(): yes|no (only used when cross 1691 compiling) 1692 erl_xcomp_poll 1693 have working poll(): yes|no (only used when cross compiling) 1694 erl_xcomp_kqueue 1695 have working kqueue(): yes|no (only used when cross compiling) 1696 erl_xcomp_putenv_copy 1697 putenv() stores key-value copy: yes|no (only used when cross 1698 compiling) 1699 erl_xcomp_reliable_fpe 1700 have reliable floating point exceptions: yes|no (only used when 1701 cross compiling) 1702 erl_xcomp_getaddrinfo 1703 have working getaddrinfo() for both IPv4 and IPv6: yes|no (only 1704 used when cross compiling) 1705 erl_xcomp_gethrvtime_procfs_ioctl 1706 have working gethrvtime() which can be used with procfs ioctl(): 1707 yes|no (only used when cross compiling) 1708 erl_xcomp_clock_gettime_cpu_time 1709 clock_gettime() can be used for retrieving process CPU time: 1710 yes|no (only used when cross compiling) 1711 erl_xcomp_after_morecore_hook 1712 __after_morecore_hook can track malloc()s core memory usage: 1713 yes|no (only used when cross compiling) 1714 erl_xcomp_dlsym_brk_wrappers 1715 dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory 1716 usage: yes|no (only used when cross compiling) 1717 YACC The `Yet Another Compiler Compiler' implementation to use. 1718 Defaults to the first program found out of: `bison -y', `byacc', 1719 `yacc'. 1720 YFLAGS The list of arguments that will be passed by default to $YACC. 1721 This script will default YFLAGS to the empty string to avoid a 1722 default value of `-d' given by some make applications. 1723 1724Use these variables to override the choices made by `configure' or to help 1725it to find libraries and programs with nonstandard names/locations. 1726 1727Report bugs to the package provider. 1728_ACEOF 1729ac_status=$? 1730fi 1731 1732if test "$ac_init_help" = "recursive"; then 1733 # If there are subdirs, report their specific --help. 1734 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1735 test -d "$ac_dir" || 1736 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1737 continue 1738 ac_builddir=. 1739 1740case "$ac_dir" in 1741.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1742*) 1743 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 1744 # A ".." for each directory in $ac_dir_suffix. 1745 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1746 case $ac_top_builddir_sub in 1747 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1748 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1749 esac ;; 1750esac 1751ac_abs_top_builddir=$ac_pwd 1752ac_abs_builddir=$ac_pwd$ac_dir_suffix 1753# for backward compatibility: 1754ac_top_builddir=$ac_top_build_prefix 1755 1756case $srcdir in 1757 .) # We are building in place. 1758 ac_srcdir=. 1759 ac_top_srcdir=$ac_top_builddir_sub 1760 ac_abs_top_srcdir=$ac_pwd ;; 1761 [\\/]* | ?:[\\/]* ) # Absolute name. 1762 ac_srcdir=$srcdir$ac_dir_suffix; 1763 ac_top_srcdir=$srcdir 1764 ac_abs_top_srcdir=$srcdir ;; 1765 *) # Relative name. 1766 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1767 ac_top_srcdir=$ac_top_build_prefix$srcdir 1768 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1769esac 1770ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1771 1772 cd "$ac_dir" || { ac_status=$?; continue; } 1773 # Check for guested configure. 1774 if test -f "$ac_srcdir/configure.gnu"; then 1775 echo && 1776 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1777 elif test -f "$ac_srcdir/configure"; then 1778 echo && 1779 $SHELL "$ac_srcdir/configure" --help=recursive 1780 else 1781 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1782 fi || ac_status=$? 1783 cd "$ac_pwd" || { ac_status=$?; break; } 1784 done 1785fi 1786 1787test -n "$ac_init_help" && exit $ac_status 1788if $ac_init_version; then 1789 cat <<\_ACEOF 1790configure 1791generated by GNU Autoconf 2.69 1792 1793Copyright (C) 2012 Free Software Foundation, Inc. 1794This configure script is free software; the Free Software Foundation 1795gives unlimited permission to copy, distribute and modify it. 1796_ACEOF 1797 exit 1798fi 1799 1800## ------------------------ ## 1801## Autoconf initialization. ## 1802## ------------------------ ## 1803 1804# ac_fn_c_try_compile LINENO 1805# -------------------------- 1806# Try to compile conftest.$ac_ext, and return whether this succeeded. 1807ac_fn_c_try_compile () 1808{ 1809 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1810 rm -f conftest.$ac_objext 1811 if { { ac_try="$ac_compile" 1812case "(($ac_try" in 1813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1814 *) ac_try_echo=$ac_try;; 1815esac 1816eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1817$as_echo "$ac_try_echo"; } >&5 1818 (eval "$ac_compile") 2>conftest.err 1819 ac_status=$? 1820 if test -s conftest.err; then 1821 grep -v '^ *+' conftest.err >conftest.er1 1822 cat conftest.er1 >&5 1823 mv -f conftest.er1 conftest.err 1824 fi 1825 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1826 test $ac_status = 0; } && { 1827 test -z "$ac_c_werror_flag" || 1828 test ! -s conftest.err 1829 } && test -s conftest.$ac_objext; then : 1830 ac_retval=0 1831else 1832 $as_echo "$as_me: failed program was:" >&5 1833sed 's/^/| /' conftest.$ac_ext >&5 1834 1835 ac_retval=1 1836fi 1837 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1838 as_fn_set_status $ac_retval 1839 1840} # ac_fn_c_try_compile 1841 1842# ac_fn_c_try_link LINENO 1843# ----------------------- 1844# Try to link conftest.$ac_ext, and return whether this succeeded. 1845ac_fn_c_try_link () 1846{ 1847 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1848 rm -f conftest.$ac_objext conftest$ac_exeext 1849 if { { ac_try="$ac_link" 1850case "(($ac_try" in 1851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1852 *) ac_try_echo=$ac_try;; 1853esac 1854eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1855$as_echo "$ac_try_echo"; } >&5 1856 (eval "$ac_link") 2>conftest.err 1857 ac_status=$? 1858 if test -s conftest.err; then 1859 grep -v '^ *+' conftest.err >conftest.er1 1860 cat conftest.er1 >&5 1861 mv -f conftest.er1 conftest.err 1862 fi 1863 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1864 test $ac_status = 0; } && { 1865 test -z "$ac_c_werror_flag" || 1866 test ! -s conftest.err 1867 } && test -s conftest$ac_exeext && { 1868 test "$cross_compiling" = yes || 1869 test -x conftest$ac_exeext 1870 }; then : 1871 ac_retval=0 1872else 1873 $as_echo "$as_me: failed program was:" >&5 1874sed 's/^/| /' conftest.$ac_ext >&5 1875 1876 ac_retval=1 1877fi 1878 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 1879 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 1880 # interfere with the next link command; also delete a directory that is 1881 # left behind by Apple's compiler. We do this before executing the actions. 1882 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1883 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1884 as_fn_set_status $ac_retval 1885 1886} # ac_fn_c_try_link 1887 1888# ac_fn_c_try_run LINENO 1889# ---------------------- 1890# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes 1891# that executables *can* be run. 1892ac_fn_c_try_run () 1893{ 1894 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1895 if { { ac_try="$ac_link" 1896case "(($ac_try" in 1897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1898 *) ac_try_echo=$ac_try;; 1899esac 1900eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1901$as_echo "$ac_try_echo"; } >&5 1902 (eval "$ac_link") 2>&5 1903 ac_status=$? 1904 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1905 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 1906 { { case "(($ac_try" in 1907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1908 *) ac_try_echo=$ac_try;; 1909esac 1910eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1911$as_echo "$ac_try_echo"; } >&5 1912 (eval "$ac_try") 2>&5 1913 ac_status=$? 1914 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1915 test $ac_status = 0; }; }; then : 1916 ac_retval=0 1917else 1918 $as_echo "$as_me: program exited with status $ac_status" >&5 1919 $as_echo "$as_me: failed program was:" >&5 1920sed 's/^/| /' conftest.$ac_ext >&5 1921 1922 ac_retval=$ac_status 1923fi 1924 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1925 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1926 as_fn_set_status $ac_retval 1927 1928} # ac_fn_c_try_run 1929 1930# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES 1931# -------------------------------------------- 1932# Tries to find the compile-time value of EXPR in a program that includes 1933# INCLUDES, setting VAR accordingly. Returns whether the value could be 1934# computed 1935ac_fn_c_compute_int () 1936{ 1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1938 if test "$cross_compiling" = yes; then 1939 # Depending upon the size, compute the lo and hi bounds. 1940cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1941/* end confdefs.h. */ 1942$4 1943int 1944main () 1945{ 1946static int test_array [1 - 2 * !(($2) >= 0)]; 1947test_array [0] = 0; 1948return test_array [0]; 1949 1950 ; 1951 return 0; 1952} 1953_ACEOF 1954if ac_fn_c_try_compile "$LINENO"; then : 1955 ac_lo=0 ac_mid=0 1956 while :; do 1957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1958/* end confdefs.h. */ 1959$4 1960int 1961main () 1962{ 1963static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 1964test_array [0] = 0; 1965return test_array [0]; 1966 1967 ; 1968 return 0; 1969} 1970_ACEOF 1971if ac_fn_c_try_compile "$LINENO"; then : 1972 ac_hi=$ac_mid; break 1973else 1974 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 1975 if test $ac_lo -le $ac_mid; then 1976 ac_lo= ac_hi= 1977 break 1978 fi 1979 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 1980fi 1981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 1982 done 1983else 1984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1985/* end confdefs.h. */ 1986$4 1987int 1988main () 1989{ 1990static int test_array [1 - 2 * !(($2) < 0)]; 1991test_array [0] = 0; 1992return test_array [0]; 1993 1994 ; 1995 return 0; 1996} 1997_ACEOF 1998if ac_fn_c_try_compile "$LINENO"; then : 1999 ac_hi=-1 ac_mid=-1 2000 while :; do 2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2002/* end confdefs.h. */ 2003$4 2004int 2005main () 2006{ 2007static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 2008test_array [0] = 0; 2009return test_array [0]; 2010 2011 ; 2012 return 0; 2013} 2014_ACEOF 2015if ac_fn_c_try_compile "$LINENO"; then : 2016 ac_lo=$ac_mid; break 2017else 2018 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 2019 if test $ac_mid -le $ac_hi; then 2020 ac_lo= ac_hi= 2021 break 2022 fi 2023 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 2024fi 2025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2026 done 2027else 2028 ac_lo= ac_hi= 2029fi 2030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2031fi 2032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2033# Binary search between lo and hi bounds. 2034while test "x$ac_lo" != "x$ac_hi"; do 2035 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 2036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2037/* end confdefs.h. */ 2038$4 2039int 2040main () 2041{ 2042static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 2043test_array [0] = 0; 2044return test_array [0]; 2045 2046 ; 2047 return 0; 2048} 2049_ACEOF 2050if ac_fn_c_try_compile "$LINENO"; then : 2051 ac_hi=$ac_mid 2052else 2053 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 2054fi 2055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2056done 2057case $ac_lo in #(( 2058?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 2059'') ac_retval=1 ;; 2060esac 2061 else 2062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2063/* end confdefs.h. */ 2064$4 2065static long int longval () { return $2; } 2066static unsigned long int ulongval () { return $2; } 2067#include <stdio.h> 2068#include <stdlib.h> 2069int 2070main () 2071{ 2072 2073 FILE *f = fopen ("conftest.val", "w"); 2074 if (! f) 2075 return 1; 2076 if (($2) < 0) 2077 { 2078 long int i = longval (); 2079 if (i != ($2)) 2080 return 1; 2081 fprintf (f, "%ld", i); 2082 } 2083 else 2084 { 2085 unsigned long int i = ulongval (); 2086 if (i != ($2)) 2087 return 1; 2088 fprintf (f, "%lu", i); 2089 } 2090 /* Do not output a trailing newline, as this causes \r\n confusion 2091 on some platforms. */ 2092 return ferror (f) || fclose (f) != 0; 2093 2094 ; 2095 return 0; 2096} 2097_ACEOF 2098if ac_fn_c_try_run "$LINENO"; then : 2099 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 2100else 2101 ac_retval=1 2102fi 2103rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 2104 conftest.$ac_objext conftest.beam conftest.$ac_ext 2105rm -f conftest.val 2106 2107 fi 2108 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2109 as_fn_set_status $ac_retval 2110 2111} # ac_fn_c_compute_int 2112 2113# ac_fn_c_try_cpp LINENO 2114# ---------------------- 2115# Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2116ac_fn_c_try_cpp () 2117{ 2118 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2119 if { { ac_try="$ac_cpp conftest.$ac_ext" 2120case "(($ac_try" in 2121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2122 *) ac_try_echo=$ac_try;; 2123esac 2124eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2125$as_echo "$ac_try_echo"; } >&5 2126 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2127 ac_status=$? 2128 if test -s conftest.err; then 2129 grep -v '^ *+' conftest.err >conftest.er1 2130 cat conftest.er1 >&5 2131 mv -f conftest.er1 conftest.err 2132 fi 2133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2134 test $ac_status = 0; } > conftest.i && { 2135 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2136 test ! -s conftest.err 2137 }; then : 2138 ac_retval=0 2139else 2140 $as_echo "$as_me: failed program was:" >&5 2141sed 's/^/| /' conftest.$ac_ext >&5 2142 2143 ac_retval=1 2144fi 2145 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2146 as_fn_set_status $ac_retval 2147 2148} # ac_fn_c_try_cpp 2149 2150# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 2151# ------------------------------------------------------- 2152# Tests whether HEADER exists and can be compiled using the include files in 2153# INCLUDES, setting the cache variable VAR accordingly. 2154ac_fn_c_check_header_compile () 2155{ 2156 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2158$as_echo_n "checking for $2... " >&6; } 2159if eval \${$3+:} false; then : 2160 $as_echo_n "(cached) " >&6 2161else 2162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2163/* end confdefs.h. */ 2164$4 2165#include <$2> 2166_ACEOF 2167if ac_fn_c_try_compile "$LINENO"; then : 2168 eval "$3=yes" 2169else 2170 eval "$3=no" 2171fi 2172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2173fi 2174eval ac_res=\$$3 2175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2176$as_echo "$ac_res" >&6; } 2177 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2178 2179} # ac_fn_c_check_header_compile 2180 2181# ac_fn_c_check_func LINENO FUNC VAR 2182# ---------------------------------- 2183# Tests whether FUNC exists, setting the cache variable VAR accordingly 2184ac_fn_c_check_func () 2185{ 2186 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2188$as_echo_n "checking for $2... " >&6; } 2189if eval \${$3+:} false; then : 2190 $as_echo_n "(cached) " >&6 2191else 2192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2193/* end confdefs.h. */ 2194/* Define $2 to an innocuous variant, in case <limits.h> declares $2. 2195 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 2196#define $2 innocuous_$2 2197 2198/* System header to define __stub macros and hopefully few prototypes, 2199 which can conflict with char $2 (); below. 2200 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 2201 <limits.h> exists even on freestanding compilers. */ 2202 2203#ifdef __STDC__ 2204# include <limits.h> 2205#else 2206# include <assert.h> 2207#endif 2208 2209#undef $2 2210 2211/* Override any GCC internal prototype to avoid an error. 2212 Use char because int might match the return type of a GCC 2213 builtin and then its argument prototype would still apply. */ 2214#ifdef __cplusplus 2215extern "C" 2216#endif 2217char $2 (); 2218/* The GNU C library defines this for functions which it implements 2219 to always fail with ENOSYS. Some functions are actually named 2220 something starting with __ and the normal name is an alias. */ 2221#if defined __stub_$2 || defined __stub___$2 2222choke me 2223#endif 2224 2225int 2226main () 2227{ 2228return $2 (); 2229 ; 2230 return 0; 2231} 2232_ACEOF 2233if ac_fn_c_try_link "$LINENO"; then : 2234 eval "$3=yes" 2235else 2236 eval "$3=no" 2237fi 2238rm -f core conftest.err conftest.$ac_objext \ 2239 conftest$ac_exeext conftest.$ac_ext 2240fi 2241eval ac_res=\$$3 2242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2243$as_echo "$ac_res" >&6; } 2244 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2245 2246} # ac_fn_c_check_func 2247 2248# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES 2249# ------------------------------------------------------- 2250# Tests whether HEADER exists, giving a warning if it cannot be compiled using 2251# the include files in INCLUDES and setting the cache variable VAR 2252# accordingly. 2253ac_fn_c_check_header_mongrel () 2254{ 2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2256 if eval \${$3+:} false; then : 2257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2258$as_echo_n "checking for $2... " >&6; } 2259if eval \${$3+:} false; then : 2260 $as_echo_n "(cached) " >&6 2261fi 2262eval ac_res=\$$3 2263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2264$as_echo "$ac_res" >&6; } 2265else 2266 # Is the header compilable? 2267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 2268$as_echo_n "checking $2 usability... " >&6; } 2269cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2270/* end confdefs.h. */ 2271$4 2272#include <$2> 2273_ACEOF 2274if ac_fn_c_try_compile "$LINENO"; then : 2275 ac_header_compiler=yes 2276else 2277 ac_header_compiler=no 2278fi 2279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 2281$as_echo "$ac_header_compiler" >&6; } 2282 2283# Is the header present? 2284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 2285$as_echo_n "checking $2 presence... " >&6; } 2286cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2287/* end confdefs.h. */ 2288#include <$2> 2289_ACEOF 2290if ac_fn_c_try_cpp "$LINENO"; then : 2291 ac_header_preproc=yes 2292else 2293 ac_header_preproc=no 2294fi 2295rm -f conftest.err conftest.i conftest.$ac_ext 2296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2297$as_echo "$ac_header_preproc" >&6; } 2298 2299# So? What about this header? 2300case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( 2301 yes:no: ) 2302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 2303$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} 2304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2305$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2306 ;; 2307 no:yes:* ) 2308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 2309$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} 2310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 2311$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} 2312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 2313$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} 2314 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 2315$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2316 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2317$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2318 ;; 2319esac 2320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2321$as_echo_n "checking for $2... " >&6; } 2322if eval \${$3+:} false; then : 2323 $as_echo_n "(cached) " >&6 2324else 2325 eval "$3=\$ac_header_compiler" 2326fi 2327eval ac_res=\$$3 2328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2329$as_echo "$ac_res" >&6; } 2330fi 2331 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2332 2333} # ac_fn_c_check_header_mongrel 2334 2335# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES 2336# ---------------------------------------------------- 2337# Tries to find if the field MEMBER exists in type AGGR, after including 2338# INCLUDES, setting cache variable VAR accordingly. 2339ac_fn_c_check_member () 2340{ 2341 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 2343$as_echo_n "checking for $2.$3... " >&6; } 2344if eval \${$4+:} false; then : 2345 $as_echo_n "(cached) " >&6 2346else 2347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2348/* end confdefs.h. */ 2349$5 2350int 2351main () 2352{ 2353static $2 ac_aggr; 2354if (ac_aggr.$3) 2355return 0; 2356 ; 2357 return 0; 2358} 2359_ACEOF 2360if ac_fn_c_try_compile "$LINENO"; then : 2361 eval "$4=yes" 2362else 2363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2364/* end confdefs.h. */ 2365$5 2366int 2367main () 2368{ 2369static $2 ac_aggr; 2370if (sizeof ac_aggr.$3) 2371return 0; 2372 ; 2373 return 0; 2374} 2375_ACEOF 2376if ac_fn_c_try_compile "$LINENO"; then : 2377 eval "$4=yes" 2378else 2379 eval "$4=no" 2380fi 2381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2382fi 2383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2384fi 2385eval ac_res=\$$4 2386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2387$as_echo "$ac_res" >&6; } 2388 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2389 2390} # ac_fn_c_check_member 2391 2392# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES 2393# --------------------------------------------- 2394# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 2395# accordingly. 2396ac_fn_c_check_decl () 2397{ 2398 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2399 as_decl_name=`echo $2|sed 's/ *(.*//'` 2400 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 2401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 2402$as_echo_n "checking whether $as_decl_name is declared... " >&6; } 2403if eval \${$3+:} false; then : 2404 $as_echo_n "(cached) " >&6 2405else 2406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2407/* end confdefs.h. */ 2408$4 2409int 2410main () 2411{ 2412#ifndef $as_decl_name 2413#ifdef __cplusplus 2414 (void) $as_decl_use; 2415#else 2416 (void) $as_decl_name; 2417#endif 2418#endif 2419 2420 ; 2421 return 0; 2422} 2423_ACEOF 2424if ac_fn_c_try_compile "$LINENO"; then : 2425 eval "$3=yes" 2426else 2427 eval "$3=no" 2428fi 2429rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2430fi 2431eval ac_res=\$$3 2432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2433$as_echo "$ac_res" >&6; } 2434 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2435 2436} # ac_fn_c_check_decl 2437 2438# ac_fn_c_check_type LINENO TYPE VAR INCLUDES 2439# ------------------------------------------- 2440# Tests whether TYPE exists after having included INCLUDES, setting cache 2441# variable VAR accordingly. 2442ac_fn_c_check_type () 2443{ 2444 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2446$as_echo_n "checking for $2... " >&6; } 2447if eval \${$3+:} false; then : 2448 $as_echo_n "(cached) " >&6 2449else 2450 eval "$3=no" 2451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2452/* end confdefs.h. */ 2453$4 2454int 2455main () 2456{ 2457if (sizeof ($2)) 2458 return 0; 2459 ; 2460 return 0; 2461} 2462_ACEOF 2463if ac_fn_c_try_compile "$LINENO"; then : 2464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2465/* end confdefs.h. */ 2466$4 2467int 2468main () 2469{ 2470if (sizeof (($2))) 2471 return 0; 2472 ; 2473 return 0; 2474} 2475_ACEOF 2476if ac_fn_c_try_compile "$LINENO"; then : 2477 2478else 2479 eval "$3=yes" 2480fi 2481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2482fi 2483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2484fi 2485eval ac_res=\$$3 2486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2487$as_echo "$ac_res" >&6; } 2488 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2489 2490} # ac_fn_c_check_type 2491 2492# ac_fn_cxx_try_compile LINENO 2493# ---------------------------- 2494# Try to compile conftest.$ac_ext, and return whether this succeeded. 2495ac_fn_cxx_try_compile () 2496{ 2497 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2498 rm -f conftest.$ac_objext 2499 if { { ac_try="$ac_compile" 2500case "(($ac_try" in 2501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2502 *) ac_try_echo=$ac_try;; 2503esac 2504eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2505$as_echo "$ac_try_echo"; } >&5 2506 (eval "$ac_compile") 2>conftest.err 2507 ac_status=$? 2508 if test -s conftest.err; then 2509 grep -v '^ *+' conftest.err >conftest.er1 2510 cat conftest.er1 >&5 2511 mv -f conftest.er1 conftest.err 2512 fi 2513 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2514 test $ac_status = 0; } && { 2515 test -z "$ac_cxx_werror_flag" || 2516 test ! -s conftest.err 2517 } && test -s conftest.$ac_objext; then : 2518 ac_retval=0 2519else 2520 $as_echo "$as_me: failed program was:" >&5 2521sed 's/^/| /' conftest.$ac_ext >&5 2522 2523 ac_retval=1 2524fi 2525 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2526 as_fn_set_status $ac_retval 2527 2528} # ac_fn_cxx_try_compile 2529cat >config.log <<_ACEOF 2530This file contains any messages produced by compilers while 2531running configure, to aid debugging if configure makes a mistake. 2532 2533It was created by $as_me, which was 2534generated by GNU Autoconf 2.69. Invocation command line was 2535 2536 $ $0 $@ 2537 2538_ACEOF 2539exec 5>>config.log 2540{ 2541cat <<_ASUNAME 2542## --------- ## 2543## Platform. ## 2544## --------- ## 2545 2546hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 2547uname -m = `(uname -m) 2>/dev/null || echo unknown` 2548uname -r = `(uname -r) 2>/dev/null || echo unknown` 2549uname -s = `(uname -s) 2>/dev/null || echo unknown` 2550uname -v = `(uname -v) 2>/dev/null || echo unknown` 2551 2552/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 2553/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 2554 2555/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 2556/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 2557/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2558/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 2559/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 2560/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 2561/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 2562 2563_ASUNAME 2564 2565as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2566for as_dir in $PATH 2567do 2568 IFS=$as_save_IFS 2569 test -z "$as_dir" && as_dir=. 2570 $as_echo "PATH: $as_dir" 2571 done 2572IFS=$as_save_IFS 2573 2574} >&5 2575 2576cat >&5 <<_ACEOF 2577 2578 2579## ----------- ## 2580## Core tests. ## 2581## ----------- ## 2582 2583_ACEOF 2584 2585 2586# Keep a trace of the command line. 2587# Strip out --no-create and --no-recursion so they do not pile up. 2588# Strip out --silent because we don't want to record it for future runs. 2589# Also quote any args containing shell meta-characters. 2590# Make two passes to allow for proper duplicate-argument suppression. 2591ac_configure_args= 2592ac_configure_args0= 2593ac_configure_args1= 2594ac_must_keep_next=false 2595for ac_pass in 1 2 2596do 2597 for ac_arg 2598 do 2599 case $ac_arg in 2600 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 2601 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2602 | -silent | --silent | --silen | --sile | --sil) 2603 continue ;; 2604 *\'*) 2605 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2606 esac 2607 case $ac_pass in 2608 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2609 2) 2610 as_fn_append ac_configure_args1 " '$ac_arg'" 2611 if test $ac_must_keep_next = true; then 2612 ac_must_keep_next=false # Got value, back to normal. 2613 else 2614 case $ac_arg in 2615 *=* | --config-cache | -C | -disable-* | --disable-* \ 2616 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 2617 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 2618 | -with-* | --with-* | -without-* | --without-* | --x) 2619 case "$ac_configure_args0 " in 2620 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 2621 esac 2622 ;; 2623 -* ) ac_must_keep_next=true ;; 2624 esac 2625 fi 2626 as_fn_append ac_configure_args " '$ac_arg'" 2627 ;; 2628 esac 2629 done 2630done 2631{ ac_configure_args0=; unset ac_configure_args0;} 2632{ ac_configure_args1=; unset ac_configure_args1;} 2633 2634# When interrupted or exit'd, cleanup temporary files, and complete 2635# config.log. We remove comments because anyway the quotes in there 2636# would cause problems or look ugly. 2637# WARNING: Use '\'' to represent an apostrophe within the trap. 2638# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 2639trap 'exit_status=$? 2640 # Save into config.log some information that might help in debugging. 2641 { 2642 echo 2643 2644 $as_echo "## ---------------- ## 2645## Cache variables. ## 2646## ---------------- ##" 2647 echo 2648 # The following way of writing the cache mishandles newlines in values, 2649( 2650 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2651 eval ac_val=\$$ac_var 2652 case $ac_val in #( 2653 *${as_nl}*) 2654 case $ac_var in #( 2655 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2656$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2657 esac 2658 case $ac_var in #( 2659 _ | IFS | as_nl) ;; #( 2660 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2661 *) { eval $ac_var=; unset $ac_var;} ;; 2662 esac ;; 2663 esac 2664 done 2665 (set) 2>&1 | 2666 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2667 *${as_nl}ac_space=\ *) 2668 sed -n \ 2669 "s/'\''/'\''\\\\'\'''\''/g; 2670 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2671 ;; #( 2672 *) 2673 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2674 ;; 2675 esac | 2676 sort 2677) 2678 echo 2679 2680 $as_echo "## ----------------- ## 2681## Output variables. ## 2682## ----------------- ##" 2683 echo 2684 for ac_var in $ac_subst_vars 2685 do 2686 eval ac_val=\$$ac_var 2687 case $ac_val in 2688 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2689 esac 2690 $as_echo "$ac_var='\''$ac_val'\''" 2691 done | sort 2692 echo 2693 2694 if test -n "$ac_subst_files"; then 2695 $as_echo "## ------------------- ## 2696## File substitutions. ## 2697## ------------------- ##" 2698 echo 2699 for ac_var in $ac_subst_files 2700 do 2701 eval ac_val=\$$ac_var 2702 case $ac_val in 2703 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2704 esac 2705 $as_echo "$ac_var='\''$ac_val'\''" 2706 done | sort 2707 echo 2708 fi 2709 2710 if test -s confdefs.h; then 2711 $as_echo "## ----------- ## 2712## confdefs.h. ## 2713## ----------- ##" 2714 echo 2715 cat confdefs.h 2716 echo 2717 fi 2718 test "$ac_signal" != 0 && 2719 $as_echo "$as_me: caught signal $ac_signal" 2720 $as_echo "$as_me: exit $exit_status" 2721 } >&5 2722 rm -f core *.core core.conftest.* && 2723 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2724 exit $exit_status 2725' 0 2726for ac_signal in 1 2 13 15; do 2727 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 2728done 2729ac_signal=0 2730 2731# confdefs.h avoids OS command line length limits that DEFS can exceed. 2732rm -f -r conftest* confdefs.h 2733 2734$as_echo "/* confdefs.h */" > confdefs.h 2735 2736# Predefined preprocessor variables. 2737 2738cat >>confdefs.h <<_ACEOF 2739#define PACKAGE_NAME "$PACKAGE_NAME" 2740_ACEOF 2741 2742cat >>confdefs.h <<_ACEOF 2743#define PACKAGE_TARNAME "$PACKAGE_TARNAME" 2744_ACEOF 2745 2746cat >>confdefs.h <<_ACEOF 2747#define PACKAGE_VERSION "$PACKAGE_VERSION" 2748_ACEOF 2749 2750cat >>confdefs.h <<_ACEOF 2751#define PACKAGE_STRING "$PACKAGE_STRING" 2752_ACEOF 2753 2754cat >>confdefs.h <<_ACEOF 2755#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 2756_ACEOF 2757 2758cat >>confdefs.h <<_ACEOF 2759#define PACKAGE_URL "$PACKAGE_URL" 2760_ACEOF 2761 2762 2763# Let the site file select an alternate cache file if it wants to. 2764# Prefer an explicitly selected file to automatically selected ones. 2765ac_site_file1=NONE 2766ac_site_file2=NONE 2767if test -n "$CONFIG_SITE"; then 2768 # We do not want a PATH search for config.site. 2769 case $CONFIG_SITE in #(( 2770 -*) ac_site_file1=./$CONFIG_SITE;; 2771 */*) ac_site_file1=$CONFIG_SITE;; 2772 *) ac_site_file1=./$CONFIG_SITE;; 2773 esac 2774elif test "x$prefix" != xNONE; then 2775 ac_site_file1=$prefix/share/config.site 2776 ac_site_file2=$prefix/etc/config.site 2777else 2778 ac_site_file1=$ac_default_prefix/share/config.site 2779 ac_site_file2=$ac_default_prefix/etc/config.site 2780fi 2781for ac_site_file in "$ac_site_file1" "$ac_site_file2" 2782do 2783 test "x$ac_site_file" = xNONE && continue 2784 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 2785 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2786$as_echo "$as_me: loading site script $ac_site_file" >&6;} 2787 sed 's/^/| /' "$ac_site_file" >&5 2788 . "$ac_site_file" \ 2789 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2790$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2791as_fn_error $? "failed to load site script $ac_site_file 2792See \`config.log' for more details" "$LINENO" 5; } 2793 fi 2794done 2795 2796if test -r "$cache_file"; then 2797 # Some versions of bash will fail to source /dev/null (special files 2798 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2799 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2800 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2801$as_echo "$as_me: loading cache $cache_file" >&6;} 2802 case $cache_file in 2803 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2804 *) . "./$cache_file";; 2805 esac 2806 fi 2807else 2808 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2809$as_echo "$as_me: creating cache $cache_file" >&6;} 2810 >$cache_file 2811fi 2812 2813# Check that the precious variables saved in the cache have kept the same 2814# value. 2815ac_cache_corrupted=false 2816for ac_var in $ac_precious_vars; do 2817 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2818 eval ac_new_set=\$ac_env_${ac_var}_set 2819 eval ac_old_val=\$ac_cv_env_${ac_var}_value 2820 eval ac_new_val=\$ac_env_${ac_var}_value 2821 case $ac_old_set,$ac_new_set in 2822 set,) 2823 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2824$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2825 ac_cache_corrupted=: ;; 2826 ,set) 2827 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2828$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2829 ac_cache_corrupted=: ;; 2830 ,);; 2831 *) 2832 if test "x$ac_old_val" != "x$ac_new_val"; then 2833 # differences in whitespace do not lead to failure. 2834 ac_old_val_w=`echo x $ac_old_val` 2835 ac_new_val_w=`echo x $ac_new_val` 2836 if test "$ac_old_val_w" != "$ac_new_val_w"; then 2837 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2838$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2839 ac_cache_corrupted=: 2840 else 2841 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2842$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2843 eval $ac_var=\$ac_old_val 2844 fi 2845 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2846$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 2847 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2848$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 2849 fi;; 2850 esac 2851 # Pass precious variables to config.status. 2852 if test "$ac_new_set" = set; then 2853 case $ac_new_val in 2854 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2855 *) ac_arg=$ac_var=$ac_new_val ;; 2856 esac 2857 case " $ac_configure_args " in 2858 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2859 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2860 esac 2861 fi 2862done 2863if $ac_cache_corrupted; then 2864 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 2866 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2867$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2868 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 2869fi 2870## -------------------- ## 2871## Main body of script. ## 2872## -------------------- ## 2873 2874ac_ext=c 2875ac_cpp='$CPP $CPPFLAGS' 2876ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2877ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2878ac_compiler_gnu=$ac_cv_c_compiler_gnu 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928no_werror_CFLAGS=$(echo "$CFLAGS" | sed 's/-Werror\([^=]\|$\)/ /g') 2929if test "$CFLAGS" != "$no_werror_CFLAGS"; then 2930 CFLAGS="$no_werror_CFLAGS" 2931 WERRORFLAGS=-Werror 2932fi 2933 2934#### Make srcdir absolute, if it isn't already. It's important to 2935#### avoid running the path through pwd unnecessary, since pwd can 2936#### give you automounter prefixes, which can go away. 2937case "${srcdir}" in 2938 /* ) ;; 2939 . ) 2940 ## We may be able to use the $PWD environment variable to make this 2941 ## absolute. But sometimes PWD is inaccurate. 2942 ## Make sure CDPATH doesn't affect cd (in case PWD is relative). 2943 CDPATH= 2944 if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ; 2945 then 2946 srcdir="$PWD" 2947 else 2948 srcdir="`(cd ${srcdir}; pwd)`" 2949 fi 2950 ;; 2951 * ) srcdir="`(cd ${srcdir}; pwd)`" ;; 2952esac 2953 2954## Now, make sure that ERL_TOP is set and is the same as srcdir 2955## 2956if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then 2957 as_fn_error $? "You need to set the environment variable ERL_TOP!" "$LINENO" 5 2958fi 2959if test x"${ERL_TOP}/erts" != x"$srcdir"; then 2960 as_fn_error $? "You need to run configure with argument --srcdir=${ERL_TOP}/erts" "$LINENO" 5 2961fi 2962erl_top=${ERL_TOP} 2963 2964# echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 2965# echo X 2966# echo "X srcdir = $srcdir" 2967# echo "X ERL_TOP = $ERL_TOP" 2968# echo X 2969# echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX 2970 2971ac_aux_dir= 2972for ac_dir in $srcdir/autoconf; do 2973 if test -f "$ac_dir/install-sh"; then 2974 ac_aux_dir=$ac_dir 2975 ac_install_sh="$ac_aux_dir/install-sh -c" 2976 break 2977 elif test -f "$ac_dir/install.sh"; then 2978 ac_aux_dir=$ac_dir 2979 ac_install_sh="$ac_aux_dir/install.sh -c" 2980 break 2981 elif test -f "$ac_dir/shtool"; then 2982 ac_aux_dir=$ac_dir 2983 ac_install_sh="$ac_aux_dir/shtool install -c" 2984 break 2985 fi 2986done 2987if test -z "$ac_aux_dir"; then 2988 as_fn_error $? "cannot find install-sh, install.sh, or shtool in $srcdir/autoconf" "$LINENO" 5 2989fi 2990 2991# These three variables are undocumented and unsupported, 2992# and are intended to be withdrawn in a future Autoconf release. 2993# They can cause serious problems if a builder's source tree is in a directory 2994# whose full name contains unusual characters. 2995ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 2996ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 2997ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 2998 2999 3000 3001 3002# 3003# To configure for free source run ./configure --host=free_source 3004# 3005if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then 3006 # Make sure we can run config.sub. 3007$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 3008 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 3009 3010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 3011$as_echo_n "checking build system type... " >&6; } 3012if ${ac_cv_build+:} false; then : 3013 $as_echo_n "(cached) " >&6 3014else 3015 ac_build_alias=$build_alias 3016test "x$ac_build_alias" = x && 3017 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 3018test "x$ac_build_alias" = x && 3019 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 3020ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 3021 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 3022 3023fi 3024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 3025$as_echo "$ac_cv_build" >&6; } 3026case $ac_cv_build in 3027*-*-*) ;; 3028*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 3029esac 3030build=$ac_cv_build 3031ac_save_IFS=$IFS; IFS='-' 3032set x $ac_cv_build 3033shift 3034build_cpu=$1 3035build_vendor=$2 3036shift; shift 3037# Remember, the first character of IFS is used to create $*, 3038# except with old shells: 3039build_os=$* 3040IFS=$ac_save_IFS 3041case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 3042 3043 3044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 3045$as_echo_n "checking host system type... " >&6; } 3046if ${ac_cv_host+:} false; then : 3047 $as_echo_n "(cached) " >&6 3048else 3049 if test "x$host_alias" = x; then 3050 ac_cv_host=$ac_cv_build 3051else 3052 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 3053 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 3054fi 3055 3056fi 3057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 3058$as_echo "$ac_cv_host" >&6; } 3059case $ac_cv_host in 3060*-*-*) ;; 3061*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 3062esac 3063host=$ac_cv_host 3064ac_save_IFS=$IFS; IFS='-' 3065set x $ac_cv_host 3066shift 3067host_cpu=$1 3068host_vendor=$2 3069shift; shift 3070# Remember, the first character of IFS is used to create $*, 3071# except with old shells: 3072host_os=$* 3073IFS=$ac_save_IFS 3074case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 3075 3076 3077else 3078 host_os=$host 3079fi 3080 3081if test "$cross_compiling" = "yes"; then 3082 CROSS_COMPILING=yes 3083else 3084 CROSS_COMPILING=no 3085fi 3086 3087 3088 3089erl_xcomp_without_sysroot=no 3090if test "$cross_compiling" = "yes"; then 3091 test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes 3092 test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot" 3093else 3094 erl_xcomp_sysroot= 3095 erl_xcomp_isysroot= 3096fi 3097 3098 3099ac_ext=c 3100ac_cpp='$CPP $CPPFLAGS' 3101ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3102ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3103ac_compiler_gnu=$ac_cv_c_compiler_gnu 3104if test -n "$ac_tool_prefix"; then 3105 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 3106set dummy ${ac_tool_prefix}gcc; ac_word=$2 3107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3108$as_echo_n "checking for $ac_word... " >&6; } 3109if ${ac_cv_prog_CC+:} false; then : 3110 $as_echo_n "(cached) " >&6 3111else 3112 if test -n "$CC"; then 3113 ac_cv_prog_CC="$CC" # Let the user override the test. 3114else 3115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3116for as_dir in $PATH 3117do 3118 IFS=$as_save_IFS 3119 test -z "$as_dir" && as_dir=. 3120 for ac_exec_ext in '' $ac_executable_extensions; do 3121 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3122 ac_cv_prog_CC="${ac_tool_prefix}gcc" 3123 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3124 break 2 3125 fi 3126done 3127 done 3128IFS=$as_save_IFS 3129 3130fi 3131fi 3132CC=$ac_cv_prog_CC 3133if test -n "$CC"; then 3134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3135$as_echo "$CC" >&6; } 3136else 3137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3138$as_echo "no" >&6; } 3139fi 3140 3141 3142fi 3143if test -z "$ac_cv_prog_CC"; then 3144 ac_ct_CC=$CC 3145 # Extract the first word of "gcc", so it can be a program name with args. 3146set dummy gcc; ac_word=$2 3147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3148$as_echo_n "checking for $ac_word... " >&6; } 3149if ${ac_cv_prog_ac_ct_CC+:} false; then : 3150 $as_echo_n "(cached) " >&6 3151else 3152 if test -n "$ac_ct_CC"; then 3153 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3154else 3155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3156for as_dir in $PATH 3157do 3158 IFS=$as_save_IFS 3159 test -z "$as_dir" && as_dir=. 3160 for ac_exec_ext in '' $ac_executable_extensions; do 3161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3162 ac_cv_prog_ac_ct_CC="gcc" 3163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3164 break 2 3165 fi 3166done 3167 done 3168IFS=$as_save_IFS 3169 3170fi 3171fi 3172ac_ct_CC=$ac_cv_prog_ac_ct_CC 3173if test -n "$ac_ct_CC"; then 3174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3175$as_echo "$ac_ct_CC" >&6; } 3176else 3177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3178$as_echo "no" >&6; } 3179fi 3180 3181 if test "x$ac_ct_CC" = x; then 3182 CC="" 3183 else 3184 case $cross_compiling:$ac_tool_warned in 3185yes:) 3186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3188ac_tool_warned=yes ;; 3189esac 3190 CC=$ac_ct_CC 3191 fi 3192else 3193 CC="$ac_cv_prog_CC" 3194fi 3195 3196if test -z "$CC"; then 3197 if test -n "$ac_tool_prefix"; then 3198 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 3199set dummy ${ac_tool_prefix}cc; ac_word=$2 3200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3201$as_echo_n "checking for $ac_word... " >&6; } 3202if ${ac_cv_prog_CC+:} false; then : 3203 $as_echo_n "(cached) " >&6 3204else 3205 if test -n "$CC"; then 3206 ac_cv_prog_CC="$CC" # Let the user override the test. 3207else 3208as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3209for as_dir in $PATH 3210do 3211 IFS=$as_save_IFS 3212 test -z "$as_dir" && as_dir=. 3213 for ac_exec_ext in '' $ac_executable_extensions; do 3214 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3215 ac_cv_prog_CC="${ac_tool_prefix}cc" 3216 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3217 break 2 3218 fi 3219done 3220 done 3221IFS=$as_save_IFS 3222 3223fi 3224fi 3225CC=$ac_cv_prog_CC 3226if test -n "$CC"; then 3227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3228$as_echo "$CC" >&6; } 3229else 3230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3231$as_echo "no" >&6; } 3232fi 3233 3234 3235 fi 3236fi 3237if test -z "$CC"; then 3238 # Extract the first word of "cc", so it can be a program name with args. 3239set dummy cc; ac_word=$2 3240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3241$as_echo_n "checking for $ac_word... " >&6; } 3242if ${ac_cv_prog_CC+:} false; then : 3243 $as_echo_n "(cached) " >&6 3244else 3245 if test -n "$CC"; then 3246 ac_cv_prog_CC="$CC" # Let the user override the test. 3247else 3248 ac_prog_rejected=no 3249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3250for as_dir in $PATH 3251do 3252 IFS=$as_save_IFS 3253 test -z "$as_dir" && as_dir=. 3254 for ac_exec_ext in '' $ac_executable_extensions; do 3255 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3256 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 3257 ac_prog_rejected=yes 3258 continue 3259 fi 3260 ac_cv_prog_CC="cc" 3261 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3262 break 2 3263 fi 3264done 3265 done 3266IFS=$as_save_IFS 3267 3268if test $ac_prog_rejected = yes; then 3269 # We found a bogon in the path, so make sure we never use it. 3270 set dummy $ac_cv_prog_CC 3271 shift 3272 if test $# != 0; then 3273 # We chose a different compiler from the bogus one. 3274 # However, it has the same basename, so the bogon will be chosen 3275 # first if we set CC to just the basename; use the full file name. 3276 shift 3277 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 3278 fi 3279fi 3280fi 3281fi 3282CC=$ac_cv_prog_CC 3283if test -n "$CC"; then 3284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3285$as_echo "$CC" >&6; } 3286else 3287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3288$as_echo "no" >&6; } 3289fi 3290 3291 3292fi 3293if test -z "$CC"; then 3294 if test -n "$ac_tool_prefix"; then 3295 for ac_prog in cl.exe 3296 do 3297 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 3298set dummy $ac_tool_prefix$ac_prog; ac_word=$2 3299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3300$as_echo_n "checking for $ac_word... " >&6; } 3301if ${ac_cv_prog_CC+:} false; then : 3302 $as_echo_n "(cached) " >&6 3303else 3304 if test -n "$CC"; then 3305 ac_cv_prog_CC="$CC" # Let the user override the test. 3306else 3307as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3308for as_dir in $PATH 3309do 3310 IFS=$as_save_IFS 3311 test -z "$as_dir" && as_dir=. 3312 for ac_exec_ext in '' $ac_executable_extensions; do 3313 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3314 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 3315 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3316 break 2 3317 fi 3318done 3319 done 3320IFS=$as_save_IFS 3321 3322fi 3323fi 3324CC=$ac_cv_prog_CC 3325if test -n "$CC"; then 3326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3327$as_echo "$CC" >&6; } 3328else 3329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3330$as_echo "no" >&6; } 3331fi 3332 3333 3334 test -n "$CC" && break 3335 done 3336fi 3337if test -z "$CC"; then 3338 ac_ct_CC=$CC 3339 for ac_prog in cl.exe 3340do 3341 # Extract the first word of "$ac_prog", so it can be a program name with args. 3342set dummy $ac_prog; ac_word=$2 3343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3344$as_echo_n "checking for $ac_word... " >&6; } 3345if ${ac_cv_prog_ac_ct_CC+:} false; then : 3346 $as_echo_n "(cached) " >&6 3347else 3348 if test -n "$ac_ct_CC"; then 3349 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3350else 3351as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3352for as_dir in $PATH 3353do 3354 IFS=$as_save_IFS 3355 test -z "$as_dir" && as_dir=. 3356 for ac_exec_ext in '' $ac_executable_extensions; do 3357 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3358 ac_cv_prog_ac_ct_CC="$ac_prog" 3359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3360 break 2 3361 fi 3362done 3363 done 3364IFS=$as_save_IFS 3365 3366fi 3367fi 3368ac_ct_CC=$ac_cv_prog_ac_ct_CC 3369if test -n "$ac_ct_CC"; then 3370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3371$as_echo "$ac_ct_CC" >&6; } 3372else 3373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3374$as_echo "no" >&6; } 3375fi 3376 3377 3378 test -n "$ac_ct_CC" && break 3379done 3380 3381 if test "x$ac_ct_CC" = x; then 3382 CC="" 3383 else 3384 case $cross_compiling:$ac_tool_warned in 3385yes:) 3386{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3387$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3388ac_tool_warned=yes ;; 3389esac 3390 CC=$ac_ct_CC 3391 fi 3392fi 3393 3394fi 3395 3396 3397test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3398$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3399as_fn_error $? "no acceptable C compiler found in \$PATH 3400See \`config.log' for more details" "$LINENO" 5; } 3401 3402# Provide some information about the compiler. 3403$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 3404set X $ac_compile 3405ac_compiler=$2 3406for ac_option in --version -v -V -qversion; do 3407 { { ac_try="$ac_compiler $ac_option >&5" 3408case "(($ac_try" in 3409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3410 *) ac_try_echo=$ac_try;; 3411esac 3412eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3413$as_echo "$ac_try_echo"; } >&5 3414 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 3415 ac_status=$? 3416 if test -s conftest.err; then 3417 sed '10a\ 3418... rest of stderr output deleted ... 3419 10q' conftest.err >conftest.er1 3420 cat conftest.er1 >&5 3421 fi 3422 rm -f conftest.er1 conftest.err 3423 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3424 test $ac_status = 0; } 3425done 3426 3427cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3428/* end confdefs.h. */ 3429 3430int 3431main () 3432{ 3433 3434 ; 3435 return 0; 3436} 3437_ACEOF 3438ac_clean_files_save=$ac_clean_files 3439ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 3440# Try to create an executable without -o first, disregard a.out. 3441# It will help us diagnose broken compilers, and finding out an intuition 3442# of exeext. 3443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 3444$as_echo_n "checking whether the C compiler works... " >&6; } 3445ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 3446 3447# The possible output files: 3448ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 3449 3450ac_rmfiles= 3451for ac_file in $ac_files 3452do 3453 case $ac_file in 3454 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3455 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 3456 esac 3457done 3458rm -f $ac_rmfiles 3459 3460if { { ac_try="$ac_link_default" 3461case "(($ac_try" in 3462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3463 *) ac_try_echo=$ac_try;; 3464esac 3465eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3466$as_echo "$ac_try_echo"; } >&5 3467 (eval "$ac_link_default") 2>&5 3468 ac_status=$? 3469 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3470 test $ac_status = 0; }; then : 3471 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 3472# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 3473# in a Makefile. We should not override ac_cv_exeext if it was cached, 3474# so that the user can short-circuit this test for compilers unknown to 3475# Autoconf. 3476for ac_file in $ac_files '' 3477do 3478 test -f "$ac_file" || continue 3479 case $ac_file in 3480 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 3481 ;; 3482 [ab].out ) 3483 # We found the default executable, but exeext='' is most 3484 # certainly right. 3485 break;; 3486 *.* ) 3487 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 3488 then :; else 3489 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3490 fi 3491 # We set ac_cv_exeext here because the later test for it is not 3492 # safe: cross compilers may not add the suffix if given an `-o' 3493 # argument, so we may need to know it at that point already. 3494 # Even if this section looks crufty: it has the advantage of 3495 # actually working. 3496 break;; 3497 * ) 3498 break;; 3499 esac 3500done 3501test "$ac_cv_exeext" = no && ac_cv_exeext= 3502 3503else 3504 ac_file='' 3505fi 3506if test -z "$ac_file"; then : 3507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3508$as_echo "no" >&6; } 3509$as_echo "$as_me: failed program was:" >&5 3510sed 's/^/| /' conftest.$ac_ext >&5 3511 3512{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3513$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3514as_fn_error 77 "C compiler cannot create executables 3515See \`config.log' for more details" "$LINENO" 5; } 3516else 3517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3518$as_echo "yes" >&6; } 3519fi 3520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 3521$as_echo_n "checking for C compiler default output file name... " >&6; } 3522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 3523$as_echo "$ac_file" >&6; } 3524ac_exeext=$ac_cv_exeext 3525 3526rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 3527ac_clean_files=$ac_clean_files_save 3528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 3529$as_echo_n "checking for suffix of executables... " >&6; } 3530if { { ac_try="$ac_link" 3531case "(($ac_try" in 3532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3533 *) ac_try_echo=$ac_try;; 3534esac 3535eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3536$as_echo "$ac_try_echo"; } >&5 3537 (eval "$ac_link") 2>&5 3538 ac_status=$? 3539 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3540 test $ac_status = 0; }; then : 3541 # If both `conftest.exe' and `conftest' are `present' (well, observable) 3542# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 3543# work properly (i.e., refer to `conftest.exe'), while it won't with 3544# `rm'. 3545for ac_file in conftest.exe conftest conftest.*; do 3546 test -f "$ac_file" || continue 3547 case $ac_file in 3548 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3549 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3550 break;; 3551 * ) break;; 3552 esac 3553done 3554else 3555 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3556$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3557as_fn_error $? "cannot compute suffix of executables: cannot compile and link 3558See \`config.log' for more details" "$LINENO" 5; } 3559fi 3560rm -f conftest conftest$ac_cv_exeext 3561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 3562$as_echo "$ac_cv_exeext" >&6; } 3563 3564rm -f conftest.$ac_ext 3565EXEEXT=$ac_cv_exeext 3566ac_exeext=$EXEEXT 3567cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3568/* end confdefs.h. */ 3569#include <stdio.h> 3570int 3571main () 3572{ 3573FILE *f = fopen ("conftest.out", "w"); 3574 return ferror (f) || fclose (f) != 0; 3575 3576 ; 3577 return 0; 3578} 3579_ACEOF 3580ac_clean_files="$ac_clean_files conftest.out" 3581# Check that the compiler produces executables we can run. If not, either 3582# the compiler is broken, or we cross compile. 3583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 3584$as_echo_n "checking whether we are cross compiling... " >&6; } 3585if test "$cross_compiling" != yes; then 3586 { { ac_try="$ac_link" 3587case "(($ac_try" in 3588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3589 *) ac_try_echo=$ac_try;; 3590esac 3591eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3592$as_echo "$ac_try_echo"; } >&5 3593 (eval "$ac_link") 2>&5 3594 ac_status=$? 3595 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3596 test $ac_status = 0; } 3597 if { ac_try='./conftest$ac_cv_exeext' 3598 { { case "(($ac_try" in 3599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3600 *) ac_try_echo=$ac_try;; 3601esac 3602eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3603$as_echo "$ac_try_echo"; } >&5 3604 (eval "$ac_try") 2>&5 3605 ac_status=$? 3606 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3607 test $ac_status = 0; }; }; then 3608 cross_compiling=no 3609 else 3610 if test "$cross_compiling" = maybe; then 3611 cross_compiling=yes 3612 else 3613 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3614$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3615as_fn_error $? "cannot run C compiled programs. 3616If you meant to cross compile, use \`--host'. 3617See \`config.log' for more details" "$LINENO" 5; } 3618 fi 3619 fi 3620fi 3621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 3622$as_echo "$cross_compiling" >&6; } 3623 3624rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 3625ac_clean_files=$ac_clean_files_save 3626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 3627$as_echo_n "checking for suffix of object files... " >&6; } 3628if ${ac_cv_objext+:} false; then : 3629 $as_echo_n "(cached) " >&6 3630else 3631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3632/* end confdefs.h. */ 3633 3634int 3635main () 3636{ 3637 3638 ; 3639 return 0; 3640} 3641_ACEOF 3642rm -f conftest.o conftest.obj 3643if { { ac_try="$ac_compile" 3644case "(($ac_try" in 3645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3646 *) ac_try_echo=$ac_try;; 3647esac 3648eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3649$as_echo "$ac_try_echo"; } >&5 3650 (eval "$ac_compile") 2>&5 3651 ac_status=$? 3652 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3653 test $ac_status = 0; }; then : 3654 for ac_file in conftest.o conftest.obj conftest.*; do 3655 test -f "$ac_file" || continue; 3656 case $ac_file in 3657 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 3658 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 3659 break;; 3660 esac 3661done 3662else 3663 $as_echo "$as_me: failed program was:" >&5 3664sed 's/^/| /' conftest.$ac_ext >&5 3665 3666{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3667$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3668as_fn_error $? "cannot compute suffix of object files: cannot compile 3669See \`config.log' for more details" "$LINENO" 5; } 3670fi 3671rm -f conftest.$ac_cv_objext conftest.$ac_ext 3672fi 3673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 3674$as_echo "$ac_cv_objext" >&6; } 3675OBJEXT=$ac_cv_objext 3676ac_objext=$OBJEXT 3677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 3678$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 3679if ${ac_cv_c_compiler_gnu+:} false; then : 3680 $as_echo_n "(cached) " >&6 3681else 3682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3683/* end confdefs.h. */ 3684 3685int 3686main () 3687{ 3688#ifndef __GNUC__ 3689 choke me 3690#endif 3691 3692 ; 3693 return 0; 3694} 3695_ACEOF 3696if ac_fn_c_try_compile "$LINENO"; then : 3697 ac_compiler_gnu=yes 3698else 3699 ac_compiler_gnu=no 3700fi 3701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3702ac_cv_c_compiler_gnu=$ac_compiler_gnu 3703 3704fi 3705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 3706$as_echo "$ac_cv_c_compiler_gnu" >&6; } 3707if test $ac_compiler_gnu = yes; then 3708 GCC=yes 3709else 3710 GCC= 3711fi 3712ac_test_CFLAGS=${CFLAGS+set} 3713ac_save_CFLAGS=$CFLAGS 3714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 3715$as_echo_n "checking whether $CC accepts -g... " >&6; } 3716if ${ac_cv_prog_cc_g+:} false; then : 3717 $as_echo_n "(cached) " >&6 3718else 3719 ac_save_c_werror_flag=$ac_c_werror_flag 3720 ac_c_werror_flag=yes 3721 ac_cv_prog_cc_g=no 3722 CFLAGS="-g" 3723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3724/* end confdefs.h. */ 3725 3726int 3727main () 3728{ 3729 3730 ; 3731 return 0; 3732} 3733_ACEOF 3734if ac_fn_c_try_compile "$LINENO"; then : 3735 ac_cv_prog_cc_g=yes 3736else 3737 CFLAGS="" 3738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3739/* end confdefs.h. */ 3740 3741int 3742main () 3743{ 3744 3745 ; 3746 return 0; 3747} 3748_ACEOF 3749if ac_fn_c_try_compile "$LINENO"; then : 3750 3751else 3752 ac_c_werror_flag=$ac_save_c_werror_flag 3753 CFLAGS="-g" 3754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3755/* end confdefs.h. */ 3756 3757int 3758main () 3759{ 3760 3761 ; 3762 return 0; 3763} 3764_ACEOF 3765if ac_fn_c_try_compile "$LINENO"; then : 3766 ac_cv_prog_cc_g=yes 3767fi 3768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3769fi 3770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3771fi 3772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3773 ac_c_werror_flag=$ac_save_c_werror_flag 3774fi 3775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 3776$as_echo "$ac_cv_prog_cc_g" >&6; } 3777if test "$ac_test_CFLAGS" = set; then 3778 CFLAGS=$ac_save_CFLAGS 3779elif test $ac_cv_prog_cc_g = yes; then 3780 if test "$GCC" = yes; then 3781 CFLAGS="-g -O2" 3782 else 3783 CFLAGS="-g" 3784 fi 3785else 3786 if test "$GCC" = yes; then 3787 CFLAGS="-O2" 3788 else 3789 CFLAGS= 3790 fi 3791fi 3792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 3793$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 3794if ${ac_cv_prog_cc_c89+:} false; then : 3795 $as_echo_n "(cached) " >&6 3796else 3797 ac_cv_prog_cc_c89=no 3798ac_save_CC=$CC 3799cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3800/* end confdefs.h. */ 3801#include <stdarg.h> 3802#include <stdio.h> 3803struct stat; 3804/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 3805struct buf { int x; }; 3806FILE * (*rcsopen) (struct buf *, struct stat *, int); 3807static char *e (p, i) 3808 char **p; 3809 int i; 3810{ 3811 return p[i]; 3812} 3813static char *f (char * (*g) (char **, int), char **p, ...) 3814{ 3815 char *s; 3816 va_list v; 3817 va_start (v,p); 3818 s = g (p, va_arg (v,int)); 3819 va_end (v); 3820 return s; 3821} 3822 3823/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 3824 function prototypes and stuff, but not '\xHH' hex character constants. 3825 These don't provoke an error unfortunately, instead are silently treated 3826 as 'x'. The following induces an error, until -std is added to get 3827 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 3828 array size at least. It's necessary to write '\x00'==0 to get something 3829 that's true only with -std. */ 3830int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 3831 3832/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 3833 inside strings and character constants. */ 3834#define FOO(x) 'x' 3835int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 3836 3837int test (int i, double x); 3838struct s1 {int (*f) (int a);}; 3839struct s2 {int (*f) (double a);}; 3840int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 3841int argc; 3842char **argv; 3843int 3844main () 3845{ 3846return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 3847 ; 3848 return 0; 3849} 3850_ACEOF 3851for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 3852 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 3853do 3854 CC="$ac_save_CC $ac_arg" 3855 if ac_fn_c_try_compile "$LINENO"; then : 3856 ac_cv_prog_cc_c89=$ac_arg 3857fi 3858rm -f core conftest.err conftest.$ac_objext 3859 test "x$ac_cv_prog_cc_c89" != "xno" && break 3860done 3861rm -f conftest.$ac_ext 3862CC=$ac_save_CC 3863 3864fi 3865# AC_CACHE_VAL 3866case "x$ac_cv_prog_cc_c89" in 3867 x) 3868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 3869$as_echo "none needed" >&6; } ;; 3870 xno) 3871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 3872$as_echo "unsupported" >&6; } ;; 3873 *) 3874 CC="$CC $ac_cv_prog_cc_c89" 3875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 3876$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 3877esac 3878if test "x$ac_cv_prog_cc_c89" != xno; then : 3879 3880fi 3881 3882ac_ext=c 3883ac_cpp='$CPP $CPPFLAGS' 3884ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3885ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3886ac_compiler_gnu=$ac_cv_c_compiler_gnu 3887 3888 3889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 3890$as_echo_n "checking for library containing strerror... " >&6; } 3891if ${ac_cv_search_strerror+:} false; then : 3892 $as_echo_n "(cached) " >&6 3893else 3894 ac_func_search_save_LIBS=$LIBS 3895cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3896/* end confdefs.h. */ 3897 3898/* Override any GCC internal prototype to avoid an error. 3899 Use char because int might match the return type of a GCC 3900 builtin and then its argument prototype would still apply. */ 3901#ifdef __cplusplus 3902extern "C" 3903#endif 3904char strerror (); 3905int 3906main () 3907{ 3908return strerror (); 3909 ; 3910 return 0; 3911} 3912_ACEOF 3913for ac_lib in '' cposix; do 3914 if test -z "$ac_lib"; then 3915 ac_res="none required" 3916 else 3917 ac_res=-l$ac_lib 3918 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 3919 fi 3920 if ac_fn_c_try_link "$LINENO"; then : 3921 ac_cv_search_strerror=$ac_res 3922fi 3923rm -f core conftest.err conftest.$ac_objext \ 3924 conftest$ac_exeext 3925 if ${ac_cv_search_strerror+:} false; then : 3926 break 3927fi 3928done 3929if ${ac_cv_search_strerror+:} false; then : 3930 3931else 3932 ac_cv_search_strerror=no 3933fi 3934rm conftest.$ac_ext 3935LIBS=$ac_func_search_save_LIBS 3936fi 3937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 3938$as_echo "$ac_cv_search_strerror" >&6; } 3939ac_res=$ac_cv_search_strerror 3940if test "$ac_res" != no; then : 3941 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 3942 3943fi 3944 3945 3946ac_config_headers="$ac_config_headers $host/config.h:config.h.in include/internal/$host/ethread_header_config.h:include/internal/ethread_header_config.h.in include/$host/erl_int_sizes_config.h:include/erl_int_sizes_config.h.in" 3947 3948ENABLE_ALLOC_TYPE_VARS= 3949 3950 3951# Check whether --enable-bootstrap-only was given. 3952if test "${enable_bootstrap_only+set}" = set; then : 3953 enableval=$enable_bootstrap_only; if test "X$enableval" = "Xyes"; then 3954 # Disable stuff not necessary in a bootstrap only system in order 3955 # to speed up things by reducing the amount of stuff needing to be 3956 # built... 3957 with_termcap=no 3958 with_ssl=no 3959 with_ssl_zlib=no 3960 enable_jit=no 3961 enable_sctp=no 3962 fi 3963 3964fi 3965 3966 3967# Check whether --enable-dirty-schedulers-test was given. 3968if test "${enable_dirty_schedulers_test+set}" = set; then : 3969 enableval=$enable_dirty_schedulers_test; case "$enableval" in 3970 yes) enable_dirty_schedulers_test=yes ;; 3971 *) enable_dirty_schedulers_test=no ;; 3972 esac 3973else 3974 enable_dirty_schedulers_test=no 3975fi 3976 3977 3978# Check whether --enable-smp-require-native-atomics was given. 3979if test "${enable_smp_require_native_atomics+set}" = set; then : 3980 enableval=$enable_smp_require_native_atomics; case "$enableval" in 3981 no) smp_require_native_atomics=no ;; 3982 *) smp_require_native_atomics=yes ;; 3983 esac 3984else 3985 smp_require_native_atomics=yes 3986fi 3987 3988 3989 3990# Check whether --with-termcap was given. 3991if test "${with_termcap+set}" = set; then : 3992 withval=$with_termcap; 3993else 3994 with_termcap=yes 3995fi 3996 3997 3998# Check whether --enable-lock-checking was given. 3999if test "${enable_lock_checking+set}" = set; then : 4000 enableval=$enable_lock_checking; case "$enableval" in 4001 no) enable_lock_check=no ;; 4002 *) enable_lock_check=yes ;; 4003 esac 4004 4005else 4006 enable_lock_check=no 4007fi 4008 4009 4010# Check whether --enable-lock-counter was given. 4011if test "${enable_lock_counter+set}" = set; then : 4012 enableval=$enable_lock_counter; case "$enableval" in 4013 no) enable_lock_count=no ;; 4014 *) enable_lock_count=yes ;; 4015 esac 4016else 4017 enable_lock_count=no 4018fi 4019 4020 4021# Check whether --enable-kernel-poll was given. 4022if test "${enable_kernel_poll+set}" = set; then : 4023 enableval=$enable_kernel_poll; case "$enableval" in 4024 no) enable_kernel_poll=no ;; 4025 *) enable_kernel_poll=yes ;; 4026 esac 4027else 4028 enable_kernel_poll=unknown 4029fi 4030 4031 4032 4033# Check whether --enable-sctp was given. 4034if test "${enable_sctp+set}" = set; then : 4035 enableval=$enable_sctp; case "x$enableval" in 4036 xno|xyes|xlib|x) 4037 ;; 4038 x*) 4039 as_fn_error $? "\"invalid value --enable-sctp=$enableval\"" "$LINENO" 5 4040 ;; 4041 esac 4042fi 4043 4044 4045# Check whether --enable-jit was given. 4046if test "${enable_jit+set}" = set; then : 4047 enableval=$enable_jit; case "$enableval" in 4048 no) enable_jit=no ;; 4049 *) enable_jit=yes ;; 4050 esac 4051 4052else 4053 enable_jit=auto 4054fi 4055 4056 4057# Check whether --enable-m64-build was given. 4058if test "${enable_m64_build+set}" = set; then : 4059 enableval=$enable_m64_build; case "$enableval" in 4060 no) enable_m64_build=no ;; 4061 *) enable_m64_build=yes ;; 4062 esac 4063 4064else 4065 enable_m64_build=no 4066fi 4067 4068 4069# Check whether --enable-m32-build was given. 4070if test "${enable_m32_build+set}" = set; then : 4071 enableval=$enable_m32_build; case "$enableval" in 4072 no) enable_m32_build=no ;; 4073 *) enable_m32_build=yes ;; 4074 esac 4075 4076else 4077 enable_m32_build=no 4078fi 4079 4080 4081 4082# Check whether --with-dynamic-trace was given. 4083if test "${with_dynamic_trace+set}" = set; then : 4084 withval=$with_dynamic_trace; 4085fi 4086 4087 4088if test X"$with_dynamic_trace" = X""; then 4089 with_dynamic_trace=no 4090fi 4091 4092case "$with_dynamic_trace" in 4093 no) DYNAMIC_TRACE_FRAMEWORK=;; 4094 lttng) 4095 4096$as_echo "#define USE_LTTNG 1" >>confdefs.h 4097 4098 DYNAMIC_TRACE_FRAMEWORK=lttng;; 4099 dtrace) 4100 4101$as_echo "#define USE_DTRACE 1" >>confdefs.h 4102 4103 DYNAMIC_TRACE_FRAMEWORK=dtrace;; 4104 systemtap) 4105 4106$as_echo "#define USE_SYSTEMTAP 1" >>confdefs.h 4107 4108 DYNAMIC_TRACE_FRAMEWORK=systemtap;; 4109 *) 4110 as_fn_error $? "Unknown dynamic tracing framework specified with --with-dynamic-trace!" "$LINENO" 5;; 4111esac 4112 4113if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then 4114 4115$as_echo "#define USE_DYNAMIC_TRACE 1" >>confdefs.h 4116 4117fi 4118 4119# Check whether --enable-vm-probes was given. 4120if test "${enable_vm_probes+set}" = set; then : 4121 enableval=$enable_vm_probes; case "$enableval" in 4122 no) use_vm_probes=no ;; 4123 *) 4124 if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then 4125 use_vm_probes=yes ; 4126 else 4127 as_fn_error $? "Can not enable VM probes without any dynamic tracing framework!" "$LINENO" 5; 4128 fi;; 4129 esac 4130else 4131 if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then 4132 use_vm_probes=yes ; 4133 else 4134 use_vm_probes=no 4135 fi 4136fi 4137 4138 4139 4140if test X"$DYNAMIC_TRACE_FRAMEWORK" != X"lttng"; then 4141 if test X"$use_vm_probes" = X"yes"; then 4142 USE_VM_PROBES=yes 4143 4144$as_echo "#define USE_VM_PROBES 1" >>confdefs.h 4145 4146 fi 4147fi 4148 4149 4150# Check whether --with-assumed-cache-line-size was given. 4151if test "${with_assumed_cache_line_size+set}" = set; then : 4152 withval=$with_assumed_cache_line_size; 4153fi 4154 4155 4156case "$with_assumed_cache_line_size" in 4157 ""|no|yes) 4158 with_assumed_cache_line_size=64;; 4159 16|32|64|128|256|512|1024|2048|4096|8192) 4160 ;; 4161 *) 4162 as_fn_error $? "Invalid assumed cache-line size of $with_assumed_cache_line_size bytes" "$LINENO" 5 4163 ;; 4164esac 4165 4166 4167cat >>confdefs.h <<_ACEOF 4168#define ASSUMED_CACHE_LINE_SIZE $with_assumed_cache_line_size 4169_ACEOF 4170 4171 4172# Check whether --enable-systemd was given. 4173if test "${enable_systemd+set}" = set; then : 4174 enableval=$enable_systemd; 4175else 4176 enable_systemd=no 4177fi 4178 4179 4180# Check whether --enable-saved-compile-time was given. 4181if test "${enable_saved_compile_time+set}" = set; then : 4182 enableval=$enable_saved_compile_time; case "$enableval" in 4183 no) save_compile_time=0 ;; 4184 *) save_compile_time=1 ;; 4185 esac 4186else 4187 save_compile_time=1 4188fi 4189 4190 4191 4192cat >>confdefs.h <<_ACEOF 4193#define ERTS_SAVED_COMPILE_TIME $save_compile_time 4194_ACEOF 4195 4196 4197 4198# Check whether --with-microstate-accounting was given. 4199if test "${with_microstate_accounting+set}" = set; then : 4200 withval=$with_microstate_accounting; 4201else 4202 with_microstate_accounting=yes 4203fi 4204 4205 4206case "$with_microstate_accounting" in 4207 yes) 4208$as_echo "#define ERTS_ENABLE_MSACC 1" >>confdefs.h 4209 ;; 4210 extra) 4211$as_echo "#define ERTS_ENABLE_MSACC 2" >>confdefs.h 4212 ;; 4213 *) ;; 4214esac 4215 4216OTP_RELEASE= 4217if test "${ERLANG_COMMERCIAL_BUILD}" != ""; then 4218 OTP_EXTRA_FLAGS=-DOTP_RELEASE 4219 OTP_RELEASE=yes 4220else 4221 OTP_EXTRA_FLAGS= 4222fi 4223 4224 4225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OTP release" >&5 4226$as_echo_n "checking OTP release... " >&6; } 4227SYSTEM_VSN=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"` 4228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_VSN" >&5 4229$as_echo "$SYSTEM_VSN" >&6; } 4230 4231 4232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OTP version" >&5 4233$as_echo_n "checking OTP version... " >&6; } 4234OTP_VERSION=`cat $ERL_TOP/OTP_VERSION` 4235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTP_VERSION" >&5 4236$as_echo "$OTP_VERSION" >&6; } 4237 4238 4239if test X${enable_m64_build} = Xyes; then 4240 case $CFLAGS in 4241 *-m64*) 4242 ;; 4243 *) 4244 CFLAGS="-m64 $CFLAGS" 4245 ;; 4246 esac 4247else 4248 if test X${enable_m32_build} = Xyes; 4249 then 4250 case $CFLAGS in 4251 *-m32*) 4252 ;; 4253 *) 4254 CFLAGS="-m32 $CFLAGS" 4255 ;; 4256 esac ; 4257 fi 4258fi 4259 4260# Check whether --enable-static-nifs was given. 4261if test "${enable_static_nifs+set}" = set; then : 4262 enableval=$enable_static_nifs; STATIC_NIFS="$enableval" 4263else 4264 STATIC_NIFS=no 4265fi 4266 4267 4268 4269# Check whether --enable-static-drivers was given. 4270if test "${enable_static_drivers+set}" = set; then : 4271 enableval=$enable_static_drivers; STATIC_DRIVERS="$enableval" 4272else 4273 STATIC_DRIVERS=no 4274fi 4275 4276 4277 4278 4279# Check whether --with-ets-write-concurrency-locks was given. 4280if test "${with_ets_write_concurrency_locks+set}" = set; then : 4281 withval=$with_ets_write_concurrency_locks; 4282fi 4283 4284 4285if test X"$with_ets_write_concurrency_locks" != X""; then 4286 4287cat >>confdefs.h <<_ACEOF 4288#define ERTS_DB_HASH_LOCK_CNT $with_ets_write_concurrency_locks 4289_ACEOF 4290 4291fi 4292 4293 4294# Check whether --with-spectre-mitigation was given. 4295if test "${with_spectre_mitigation+set}" = set; then : 4296 withval=$with_spectre_mitigation; 4297else 4298 with_spectre_mitigation=no 4299fi 4300 4301 4302case "$with_spectre_mitigation" in 4303 no) ;; 4304 yes) ;; 4305 incomplete) ;; 4306 *) as_fn_error $? "Invalid spectre mitigation setting" "$LINENO" 5 ;; 4307esac 4308 4309i_noretpoline_attr="" 4310 4311if test X"$with_spectre_mitigation" != X"no"; then 4312 CFLAGS="$CFLAGS -mindirect-branch=thunk" 4313 4314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spectre mitigation" >&5 4315$as_echo_n "checking for spectre mitigation... " >&6; } 4316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4317/* end confdefs.h. */ 4318 4319int 4320main () 4321{ 4322return 0; 4323 ; 4324 return 0; 4325} 4326_ACEOF 4327if ac_fn_c_try_compile "$LINENO"; then : 4328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4329$as_echo "yes" >&6; } 4330else 4331 as_fn_error $? "no" "$LINENO" 5 4332fi 4333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4334 4335 if test X"$with_spectre_mitigation" = X"incomplete"; then 4336 # gcc and clang support this attribute if they're recent enough. Note 4337 # that we must compile with -Werror to check for actual support as they 4338 # warn rather than error out on unsupported attributes. 4339 4340 i_noretpoline_attr='__attribute__((__indirect_branch__("keep")))' 4341 i_preserve_cflags="$CFLAGS" 4342 CFLAGS="$CFLAGS -Werror" 4343 4344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether spectre mitigation can be disabled on a per-function basis" >&5 4345$as_echo_n "checking whether spectre mitigation can be disabled on a per-function basis... " >&6; } 4346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4347/* end confdefs.h. */ 4348$i_noretpoline_attr 4349int 4350main () 4351{ 4352return 0; 4353 ; 4354 return 0; 4355} 4356_ACEOF 4357if ac_fn_c_try_compile "$LINENO"; then : 4358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4359$as_echo "yes" >&6; } 4360else 4361 as_fn_error $? "no" "$LINENO" 5 4362fi 4363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4364 4365 CFLAGS="$i_preserve_cflags" 4366 fi 4367fi 4368 4369 4370cat >>confdefs.h <<_ACEOF 4371#define ERTS_NO_RETPOLINE $i_noretpoline_attr 4372_ACEOF 4373 4374 4375 4376ac_ext=c 4377ac_cpp='$CPP $CPPFLAGS' 4378ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 4379ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 4380ac_compiler_gnu=$ac_cv_c_compiler_gnu 4381if test -n "$ac_tool_prefix"; then 4382 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 4383set dummy ${ac_tool_prefix}gcc; ac_word=$2 4384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4385$as_echo_n "checking for $ac_word... " >&6; } 4386if ${ac_cv_prog_CC+:} false; then : 4387 $as_echo_n "(cached) " >&6 4388else 4389 if test -n "$CC"; then 4390 ac_cv_prog_CC="$CC" # Let the user override the test. 4391else 4392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4393for as_dir in $PATH 4394do 4395 IFS=$as_save_IFS 4396 test -z "$as_dir" && as_dir=. 4397 for ac_exec_ext in '' $ac_executable_extensions; do 4398 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4399 ac_cv_prog_CC="${ac_tool_prefix}gcc" 4400 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4401 break 2 4402 fi 4403done 4404 done 4405IFS=$as_save_IFS 4406 4407fi 4408fi 4409CC=$ac_cv_prog_CC 4410if test -n "$CC"; then 4411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4412$as_echo "$CC" >&6; } 4413else 4414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4415$as_echo "no" >&6; } 4416fi 4417 4418 4419fi 4420if test -z "$ac_cv_prog_CC"; then 4421 ac_ct_CC=$CC 4422 # Extract the first word of "gcc", so it can be a program name with args. 4423set dummy gcc; ac_word=$2 4424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4425$as_echo_n "checking for $ac_word... " >&6; } 4426if ${ac_cv_prog_ac_ct_CC+:} false; then : 4427 $as_echo_n "(cached) " >&6 4428else 4429 if test -n "$ac_ct_CC"; then 4430 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 4431else 4432as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4433for as_dir in $PATH 4434do 4435 IFS=$as_save_IFS 4436 test -z "$as_dir" && as_dir=. 4437 for ac_exec_ext in '' $ac_executable_extensions; do 4438 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4439 ac_cv_prog_ac_ct_CC="gcc" 4440 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4441 break 2 4442 fi 4443done 4444 done 4445IFS=$as_save_IFS 4446 4447fi 4448fi 4449ac_ct_CC=$ac_cv_prog_ac_ct_CC 4450if test -n "$ac_ct_CC"; then 4451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 4452$as_echo "$ac_ct_CC" >&6; } 4453else 4454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4455$as_echo "no" >&6; } 4456fi 4457 4458 if test "x$ac_ct_CC" = x; then 4459 CC="" 4460 else 4461 case $cross_compiling:$ac_tool_warned in 4462yes:) 4463{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4464$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4465ac_tool_warned=yes ;; 4466esac 4467 CC=$ac_ct_CC 4468 fi 4469else 4470 CC="$ac_cv_prog_CC" 4471fi 4472 4473if test -z "$CC"; then 4474 if test -n "$ac_tool_prefix"; then 4475 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 4476set dummy ${ac_tool_prefix}cc; ac_word=$2 4477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4478$as_echo_n "checking for $ac_word... " >&6; } 4479if ${ac_cv_prog_CC+:} false; then : 4480 $as_echo_n "(cached) " >&6 4481else 4482 if test -n "$CC"; then 4483 ac_cv_prog_CC="$CC" # Let the user override the test. 4484else 4485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4486for as_dir in $PATH 4487do 4488 IFS=$as_save_IFS 4489 test -z "$as_dir" && as_dir=. 4490 for ac_exec_ext in '' $ac_executable_extensions; do 4491 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4492 ac_cv_prog_CC="${ac_tool_prefix}cc" 4493 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4494 break 2 4495 fi 4496done 4497 done 4498IFS=$as_save_IFS 4499 4500fi 4501fi 4502CC=$ac_cv_prog_CC 4503if test -n "$CC"; then 4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4505$as_echo "$CC" >&6; } 4506else 4507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4508$as_echo "no" >&6; } 4509fi 4510 4511 4512 fi 4513fi 4514if test -z "$CC"; then 4515 # Extract the first word of "cc", so it can be a program name with args. 4516set dummy cc; ac_word=$2 4517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4518$as_echo_n "checking for $ac_word... " >&6; } 4519if ${ac_cv_prog_CC+:} false; then : 4520 $as_echo_n "(cached) " >&6 4521else 4522 if test -n "$CC"; then 4523 ac_cv_prog_CC="$CC" # Let the user override the test. 4524else 4525 ac_prog_rejected=no 4526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4527for as_dir in $PATH 4528do 4529 IFS=$as_save_IFS 4530 test -z "$as_dir" && as_dir=. 4531 for ac_exec_ext in '' $ac_executable_extensions; do 4532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4533 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 4534 ac_prog_rejected=yes 4535 continue 4536 fi 4537 ac_cv_prog_CC="cc" 4538 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4539 break 2 4540 fi 4541done 4542 done 4543IFS=$as_save_IFS 4544 4545if test $ac_prog_rejected = yes; then 4546 # We found a bogon in the path, so make sure we never use it. 4547 set dummy $ac_cv_prog_CC 4548 shift 4549 if test $# != 0; then 4550 # We chose a different compiler from the bogus one. 4551 # However, it has the same basename, so the bogon will be chosen 4552 # first if we set CC to just the basename; use the full file name. 4553 shift 4554 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 4555 fi 4556fi 4557fi 4558fi 4559CC=$ac_cv_prog_CC 4560if test -n "$CC"; then 4561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4562$as_echo "$CC" >&6; } 4563else 4564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4565$as_echo "no" >&6; } 4566fi 4567 4568 4569fi 4570if test -z "$CC"; then 4571 if test -n "$ac_tool_prefix"; then 4572 for ac_prog in cl.exe 4573 do 4574 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 4575set dummy $ac_tool_prefix$ac_prog; ac_word=$2 4576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4577$as_echo_n "checking for $ac_word... " >&6; } 4578if ${ac_cv_prog_CC+:} false; then : 4579 $as_echo_n "(cached) " >&6 4580else 4581 if test -n "$CC"; then 4582 ac_cv_prog_CC="$CC" # Let the user override the test. 4583else 4584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4585for as_dir in $PATH 4586do 4587 IFS=$as_save_IFS 4588 test -z "$as_dir" && as_dir=. 4589 for ac_exec_ext in '' $ac_executable_extensions; do 4590 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4591 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 4592 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4593 break 2 4594 fi 4595done 4596 done 4597IFS=$as_save_IFS 4598 4599fi 4600fi 4601CC=$ac_cv_prog_CC 4602if test -n "$CC"; then 4603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4604$as_echo "$CC" >&6; } 4605else 4606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4607$as_echo "no" >&6; } 4608fi 4609 4610 4611 test -n "$CC" && break 4612 done 4613fi 4614if test -z "$CC"; then 4615 ac_ct_CC=$CC 4616 for ac_prog in cl.exe 4617do 4618 # Extract the first word of "$ac_prog", so it can be a program name with args. 4619set dummy $ac_prog; ac_word=$2 4620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4621$as_echo_n "checking for $ac_word... " >&6; } 4622if ${ac_cv_prog_ac_ct_CC+:} false; then : 4623 $as_echo_n "(cached) " >&6 4624else 4625 if test -n "$ac_ct_CC"; then 4626 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 4627else 4628as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4629for as_dir in $PATH 4630do 4631 IFS=$as_save_IFS 4632 test -z "$as_dir" && as_dir=. 4633 for ac_exec_ext in '' $ac_executable_extensions; do 4634 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4635 ac_cv_prog_ac_ct_CC="$ac_prog" 4636 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4637 break 2 4638 fi 4639done 4640 done 4641IFS=$as_save_IFS 4642 4643fi 4644fi 4645ac_ct_CC=$ac_cv_prog_ac_ct_CC 4646if test -n "$ac_ct_CC"; then 4647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 4648$as_echo "$ac_ct_CC" >&6; } 4649else 4650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4651$as_echo "no" >&6; } 4652fi 4653 4654 4655 test -n "$ac_ct_CC" && break 4656done 4657 4658 if test "x$ac_ct_CC" = x; then 4659 CC="" 4660 else 4661 case $cross_compiling:$ac_tool_warned in 4662yes:) 4663{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4664$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4665ac_tool_warned=yes ;; 4666esac 4667 CC=$ac_ct_CC 4668 fi 4669fi 4670 4671fi 4672 4673 4674test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4675$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4676as_fn_error $? "no acceptable C compiler found in \$PATH 4677See \`config.log' for more details" "$LINENO" 5; } 4678 4679# Provide some information about the compiler. 4680$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 4681set X $ac_compile 4682ac_compiler=$2 4683for ac_option in --version -v -V -qversion; do 4684 { { ac_try="$ac_compiler $ac_option >&5" 4685case "(($ac_try" in 4686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4687 *) ac_try_echo=$ac_try;; 4688esac 4689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4690$as_echo "$ac_try_echo"; } >&5 4691 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 4692 ac_status=$? 4693 if test -s conftest.err; then 4694 sed '10a\ 4695... rest of stderr output deleted ... 4696 10q' conftest.err >conftest.er1 4697 cat conftest.er1 >&5 4698 fi 4699 rm -f conftest.er1 conftest.err 4700 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4701 test $ac_status = 0; } 4702done 4703 4704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 4705$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 4706if ${ac_cv_c_compiler_gnu+:} false; then : 4707 $as_echo_n "(cached) " >&6 4708else 4709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4710/* end confdefs.h. */ 4711 4712int 4713main () 4714{ 4715#ifndef __GNUC__ 4716 choke me 4717#endif 4718 4719 ; 4720 return 0; 4721} 4722_ACEOF 4723if ac_fn_c_try_compile "$LINENO"; then : 4724 ac_compiler_gnu=yes 4725else 4726 ac_compiler_gnu=no 4727fi 4728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4729ac_cv_c_compiler_gnu=$ac_compiler_gnu 4730 4731fi 4732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 4733$as_echo "$ac_cv_c_compiler_gnu" >&6; } 4734if test $ac_compiler_gnu = yes; then 4735 GCC=yes 4736else 4737 GCC= 4738fi 4739ac_test_CFLAGS=${CFLAGS+set} 4740ac_save_CFLAGS=$CFLAGS 4741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 4742$as_echo_n "checking whether $CC accepts -g... " >&6; } 4743if ${ac_cv_prog_cc_g+:} false; then : 4744 $as_echo_n "(cached) " >&6 4745else 4746 ac_save_c_werror_flag=$ac_c_werror_flag 4747 ac_c_werror_flag=yes 4748 ac_cv_prog_cc_g=no 4749 CFLAGS="-g" 4750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4751/* end confdefs.h. */ 4752 4753int 4754main () 4755{ 4756 4757 ; 4758 return 0; 4759} 4760_ACEOF 4761if ac_fn_c_try_compile "$LINENO"; then : 4762 ac_cv_prog_cc_g=yes 4763else 4764 CFLAGS="" 4765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4766/* end confdefs.h. */ 4767 4768int 4769main () 4770{ 4771 4772 ; 4773 return 0; 4774} 4775_ACEOF 4776if ac_fn_c_try_compile "$LINENO"; then : 4777 4778else 4779 ac_c_werror_flag=$ac_save_c_werror_flag 4780 CFLAGS="-g" 4781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4782/* end confdefs.h. */ 4783 4784int 4785main () 4786{ 4787 4788 ; 4789 return 0; 4790} 4791_ACEOF 4792if ac_fn_c_try_compile "$LINENO"; then : 4793 ac_cv_prog_cc_g=yes 4794fi 4795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4796fi 4797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4798fi 4799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4800 ac_c_werror_flag=$ac_save_c_werror_flag 4801fi 4802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 4803$as_echo "$ac_cv_prog_cc_g" >&6; } 4804if test "$ac_test_CFLAGS" = set; then 4805 CFLAGS=$ac_save_CFLAGS 4806elif test $ac_cv_prog_cc_g = yes; then 4807 if test "$GCC" = yes; then 4808 CFLAGS="-g -O2" 4809 else 4810 CFLAGS="-g" 4811 fi 4812else 4813 if test "$GCC" = yes; then 4814 CFLAGS="-O2" 4815 else 4816 CFLAGS= 4817 fi 4818fi 4819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 4820$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 4821if ${ac_cv_prog_cc_c89+:} false; then : 4822 $as_echo_n "(cached) " >&6 4823else 4824 ac_cv_prog_cc_c89=no 4825ac_save_CC=$CC 4826cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4827/* end confdefs.h. */ 4828#include <stdarg.h> 4829#include <stdio.h> 4830struct stat; 4831/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 4832struct buf { int x; }; 4833FILE * (*rcsopen) (struct buf *, struct stat *, int); 4834static char *e (p, i) 4835 char **p; 4836 int i; 4837{ 4838 return p[i]; 4839} 4840static char *f (char * (*g) (char **, int), char **p, ...) 4841{ 4842 char *s; 4843 va_list v; 4844 va_start (v,p); 4845 s = g (p, va_arg (v,int)); 4846 va_end (v); 4847 return s; 4848} 4849 4850/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 4851 function prototypes and stuff, but not '\xHH' hex character constants. 4852 These don't provoke an error unfortunately, instead are silently treated 4853 as 'x'. The following induces an error, until -std is added to get 4854 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 4855 array size at least. It's necessary to write '\x00'==0 to get something 4856 that's true only with -std. */ 4857int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 4858 4859/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 4860 inside strings and character constants. */ 4861#define FOO(x) 'x' 4862int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 4863 4864int test (int i, double x); 4865struct s1 {int (*f) (int a);}; 4866struct s2 {int (*f) (double a);}; 4867int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 4868int argc; 4869char **argv; 4870int 4871main () 4872{ 4873return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 4874 ; 4875 return 0; 4876} 4877_ACEOF 4878for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 4879 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 4880do 4881 CC="$ac_save_CC $ac_arg" 4882 if ac_fn_c_try_compile "$LINENO"; then : 4883 ac_cv_prog_cc_c89=$ac_arg 4884fi 4885rm -f core conftest.err conftest.$ac_objext 4886 test "x$ac_cv_prog_cc_c89" != "xno" && break 4887done 4888rm -f conftest.$ac_ext 4889CC=$ac_save_CC 4890 4891fi 4892# AC_CACHE_VAL 4893case "x$ac_cv_prog_cc_c89" in 4894 x) 4895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4896$as_echo "none needed" >&6; } ;; 4897 xno) 4898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4899$as_echo "unsupported" >&6; } ;; 4900 *) 4901 CC="$CC $ac_cv_prog_cc_c89" 4902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 4903$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 4904esac 4905if test "x$ac_cv_prog_cc_c89" != xno; then : 4906 4907fi 4908 4909ac_ext=c 4910ac_cpp='$CPP $CPPFLAGS' 4911ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 4912ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 4913ac_compiler_gnu=$ac_cv_c_compiler_gnu 4914 4915 4916 4917 4918case $host_os in 4919 linux*) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE";; 4920 aix*|os400*) 4921 # * _ALL_SOURCE: Required to get the winsize structure for TIOCSWINSZ. 4922 # * _LINUX_SOURCE_COMPAT: Not required, but makes some libc functions 4923 # behave closer to glibc assumptions. 4924 CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT" 4925 ;; 4926 win32) 4927 # The ethread library requires _WIN32_WINNT of at least 0x0403. 4928 # -D_WIN32_WINNT=* from CPPFLAGS is saved in ETHR_DEFS. 4929 CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600 -DWINVER=0x0600" 4930 ;; 4931 *) 4932 ;; 4933esac 4934 4935 4936 4937 4938if test "X$windows_environment_" != "Xchecked"; then 4939windows_environment_=checked 4940MIXED_CYGWIN=no 4941MIXED_MSYS=no 4942MIXED_VSL=no 4943 4944MIXED_VC=no 4945MIXED_MINGW=no 4946 4947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mixed mingw-gcc and native VC++ environment" >&5 4948$as_echo_n "checking for mixed mingw-gcc and native VC++ environment... " >&6; } 4949if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then 4950 if test -x /usr/bin/msys-?.0.dll; then 4951 CFLAGS="$CFLAGS -O2" 4952 MIXED_MSYS=yes 4953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: MSYS and VC" >&5 4954$as_echo "MSYS and VC" >&6; } 4955 MIXED_VC=yes 4956 CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" 4957 elif test -x /usr/bin/cygpath; then 4958 CFLAGS="$CFLAGS -O2" 4959 MIXED_CYGWIN=yes 4960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cygwin and VC" >&5 4961$as_echo "Cygwin and VC" >&6; } 4962 MIXED_VC=yes 4963 CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" 4964 elif test -x /bin/wslpath; then 4965 CFLAGS="$CFLAGS -O2" 4966 MIXED_WSL=yes 4967 { $as_echo "$as_me:${as_lineno-$LINENO}: result: WSL and VC" >&5 4968$as_echo "WSL and VC" >&6; } 4969 MIXED_VC=yes 4970 CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" 4971 else 4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 4973$as_echo "undeterminable" >&6; } 4974 as_fn_error cannot handle this! "Seems to be mixed windows but not within any known env" "$LINENO" 5 4975 fi 4976else 4977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4978$as_echo "no" >&6; } 4979fi 4980 4981 4982 4983if test "x$MIXED_MSYS" != "xyes"; then 4984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mixed cygwin and native MinGW environment" >&5 4985$as_echo_n "checking for mixed cygwin and native MinGW environment... " >&6; } 4986 if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then 4987 if test -x /usr/bin/cygpath; then 4988 CFLAGS="$CFLAGS -O2" 4989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4990$as_echo "yes" >&6; } 4991 MIXED_MINGW=yes 4992 CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" 4993 else 4994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 4995$as_echo "undeterminable" >&6; } 4996 as_fn_error cannot handle this! "Seems to be mixed windows but not with cygwin" "$LINENO" 5 4997 fi 4998 else 4999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5000$as_echo "no" >&6; } 5001 fi 5002else 5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mixed MSYS and native MinGW environment" >&5 5004$as_echo_n "checking for mixed MSYS and native MinGW environment... " >&6; } 5005 if test "x$GCC" = x"yes"; then 5006 if test -x /usr/bin/msys-=.0.dll; then 5007 CFLAGS="$CFLAGS -O2" 5008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5009$as_echo "yes" >&6; } 5010 MIXED_MINGW=yes 5011 CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" 5012 else 5013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 5014$as_echo "undeterminable" >&6; } 5015 as_fn_error cannot handle this! "Seems to be mixed windows but not with msys" "$LINENO" 5 5016 fi 5017 else 5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5019$as_echo "no" >&6; } 5020 fi 5021fi 5022 5023 5024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we mix cygwin with any native compiler" >&5 5025$as_echo_n "checking if we mix cygwin with any native compiler... " >&6; } 5026if test "X$MIXED_CYGWIN" = "Xyes"; then 5027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5028$as_echo "yes" >&6; } 5029else 5030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5031$as_echo "no" >&6; } 5032fi 5033 5034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we mix msys with another native compiler" >&5 5035$as_echo_n "checking if we mix msys with another native compiler... " >&6; } 5036if test "X$MIXED_MSYS" = "Xyes" ; then 5037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5038$as_echo "yes" >&6; } 5039else 5040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5041$as_echo "no" >&6; } 5042fi 5043 5044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we mix WSL with another native compiler" >&5 5045$as_echo_n "checking if we mix WSL with another native compiler... " >&6; } 5046if test "X$MIXED_WSL" = "Xyes" ; then 5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5048$as_echo "yes" >&6; } 5049else 5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5051$as_echo "no" >&6; } 5052fi 5053 5054fi 5055 5056 5057 5058ERTS_CONFIG_H_IDIR="-I${ERL_TOP}/erts/$host" 5059 5060 5061extra_flags="$ERTS_CONFIG_H_IDIR $OTP_EXTRA_FLAGS" 5062CFLAGS="$CFLAGS $extra_flags" 5063DEBUG_CFLAGS="-g $CPPFLAGS $extra_flags $DEBUG_CFLAGS" 5064DEBUG_FLAGS=-g 5065 5066 5067case $CFLAGS in 5068 *-m64*) 5069 case $DEBUG_CFLAGS in 5070 *-m64*) 5071 ;; 5072 *) 5073 DEBUG_CFLAGS="-m64 $DEBUG_CFLAGS" 5074 ;; 5075 esac 5076 ;; 5077 *-m32*) 5078 case $DEBUG_CFLAGS in 5079 *-m32*) 5080 ;; 5081 *) 5082 DEBUG_CFLAGS="-m32 $DEBUG_CFLAGS" 5083 ;; 5084 esac 5085 ;; 5086 *) 5087 ;; 5088esac 5089 5090lfs_conf=ok 5091lfs_source=none 5092if test "${LFS_CFLAGS+set}" = "set" || \ 5093 test "${LFS_LDFLAGS+set}" = "set" || \ 5094 test "${LFS_LIBS+set}" = "set"; then 5095 lfs_source=user 5096else 5097 5098if test "$cross_compiling" != "yes"; then 5099 # Extract the first word of "getconf", so it can be a program name with args. 5100set dummy getconf; ac_word=$2 5101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5102$as_echo_n "checking for $ac_word... " >&6; } 5103if ${ac_cv_prog_GETCONF+:} false; then : 5104 $as_echo_n "(cached) " >&6 5105else 5106 if test -n "$GETCONF"; then 5107 ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. 5108else 5109as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5110for as_dir in $PATH 5111do 5112 IFS=$as_save_IFS 5113 test -z "$as_dir" && as_dir=. 5114 for ac_exec_ext in '' $ac_executable_extensions; do 5115 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5116 ac_cv_prog_GETCONF="getconf" 5117 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5118 break 2 5119 fi 5120done 5121 done 5122IFS=$as_save_IFS 5123 5124 test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" 5125fi 5126fi 5127GETCONF=$ac_cv_prog_GETCONF 5128if test -n "$GETCONF"; then 5129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 5130$as_echo "$GETCONF" >&6; } 5131else 5132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5133$as_echo "no" >&6; } 5134fi 5135 5136 5137else 5138 host_getconf="$host_alias-getconf" 5139 # Extract the first word of "$host_getconf", so it can be a program name with args. 5140set dummy $host_getconf; ac_word=$2 5141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5142$as_echo_n "checking for $ac_word... " >&6; } 5143if ${ac_cv_prog_GETCONF+:} false; then : 5144 $as_echo_n "(cached) " >&6 5145else 5146 if test -n "$GETCONF"; then 5147 ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. 5148else 5149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5150for as_dir in $PATH 5151do 5152 IFS=$as_save_IFS 5153 test -z "$as_dir" && as_dir=. 5154 for ac_exec_ext in '' $ac_executable_extensions; do 5155 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5156 ac_cv_prog_GETCONF="$host_getconf" 5157 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5158 break 2 5159 fi 5160done 5161 done 5162IFS=$as_save_IFS 5163 5164 test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" 5165fi 5166fi 5167GETCONF=$ac_cv_prog_GETCONF 5168if test -n "$GETCONF"; then 5169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 5170$as_echo "$GETCONF" >&6; } 5171else 5172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5173$as_echo "no" >&6; } 5174fi 5175 5176 5177 if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then 5178 GETCONF= 5179 prfx="$erl_xcomp_sysroot" 5180 if test -n "$ac_tool_prefix"; then 5181 # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args. 5182set dummy ${ac_tool_prefix}getconf; ac_word=$2 5183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5184$as_echo_n "checking for $ac_word... " >&6; } 5185if ${ac_cv_path_GETCONF+:} false; then : 5186 $as_echo_n "(cached) " >&6 5187else 5188 case $GETCONF in 5189 [\\/]* | ?:[\\/]*) 5190 ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. 5191 ;; 5192 *) 5193 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5194as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" 5195for as_dir in $as_dummy 5196do 5197 IFS=$as_save_IFS 5198 test -z "$as_dir" && as_dir=. 5199 for ac_exec_ext in '' $ac_executable_extensions; do 5200 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5201 ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext" 5202 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5203 break 2 5204 fi 5205done 5206 done 5207IFS=$as_save_IFS 5208 5209 ;; 5210esac 5211fi 5212GETCONF=$ac_cv_path_GETCONF 5213if test -n "$GETCONF"; then 5214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 5215$as_echo "$GETCONF" >&6; } 5216else 5217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5218$as_echo "no" >&6; } 5219fi 5220 5221 5222fi 5223if test -z "$ac_cv_path_GETCONF"; then 5224 ac_pt_GETCONF=$GETCONF 5225 # Extract the first word of "getconf", so it can be a program name with args. 5226set dummy getconf; ac_word=$2 5227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5228$as_echo_n "checking for $ac_word... " >&6; } 5229if ${ac_cv_path_ac_pt_GETCONF+:} false; then : 5230 $as_echo_n "(cached) " >&6 5231else 5232 case $ac_pt_GETCONF in 5233 [\\/]* | ?:[\\/]*) 5234 ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path. 5235 ;; 5236 *) 5237 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5238as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" 5239for as_dir in $as_dummy 5240do 5241 IFS=$as_save_IFS 5242 test -z "$as_dir" && as_dir=. 5243 for ac_exec_ext in '' $ac_executable_extensions; do 5244 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5245 ac_cv_path_ac_pt_GETCONF="$as_dir/$ac_word$ac_exec_ext" 5246 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5247 break 2 5248 fi 5249done 5250 done 5251IFS=$as_save_IFS 5252 5253 ;; 5254esac 5255fi 5256ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF 5257if test -n "$ac_pt_GETCONF"; then 5258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 5259$as_echo "$ac_pt_GETCONF" >&6; } 5260else 5261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5262$as_echo "no" >&6; } 5263fi 5264 5265 if test "x$ac_pt_GETCONF" = x; then 5266 GETCONF="false" 5267 else 5268 case $cross_compiling:$ac_tool_warned in 5269yes:) 5270{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 5271$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 5272ac_tool_warned=yes ;; 5273esac 5274 GETCONF=$ac_pt_GETCONF 5275 fi 5276else 5277 GETCONF="$ac_cv_path_GETCONF" 5278fi 5279 5280 fi 5281fi 5282 5283 test "$GETCONF" = "false" || lfs_source=getconf 5284fi 5285 5286if test "$lfs_source" = "none"; then 5287 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to check for large file support flags; no getconf is available" >&5 5288$as_echo "$as_me: WARNING: Do not know how to check for large file support flags; no getconf is available" >&2;} 5289else 5290 for var in CFLAGS LDFLAGS LIBS; do 5291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for large file support $var" >&5 5292$as_echo_n "checking for large file support $var... " >&6; } 5293 if test $lfs_source = user; then 5294 eval "lfs_val=\"\$LFS_$var\"" 5295 else 5296 eval "lfs_var=LFS_$var" 5297 lfs_val=`$GETCONF $lfs_var 2>/dev/null` || lfs_conf=failed 5298 if test $lfs_conf = failed; then 5299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 5300$as_echo "failed" >&6; } 5301 break 5302 fi 5303 eval "$lfs_var=\"$lfs_val\"" 5304 fi 5305 test "$lfs_val" != "" || lfs_val=none 5306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lfs_val" >&5 5307$as_echo "$lfs_val" >&6; } 5308 done 5309 if test $lfs_conf = failed; then 5310 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check for large file support flags failed; $GETCONF failed" >&5 5311$as_echo "$as_me: WARNING: Check for large file support flags failed; $GETCONF failed" >&2;} 5312 else 5313 CFLAGS="$CFLAGS $LFS_CFLAGS" 5314 DEBUG_CFLAGS="$DEBUG_CFLAGS $LFS_CFLAGS" 5315 LDFLAGS="$LDFLAGS $LFS_LDFLAGS" 5316 LIBS="$LIBS $LFS_LIBS" 5317 fi 5318fi 5319 5320if test "x$GCC" = xyes; then 5321 # Treat certain GCC warnings as errors 5322 5323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)" >&5 5324$as_echo_n "checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)... " >&6; } 5325 saved_CFLAGS=$CFLAGS; 5326 CFLAGS="-Werror=return-type $WERRORFLAGS"; 5327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5328/* end confdefs.h. */ 5329 5330int 5331main () 5332{ 5333return 0; 5334 ; 5335 return 0; 5336} 5337_ACEOF 5338if ac_fn_c_try_compile "$LINENO"; then : 5339 can_enable_flag=true 5340else 5341 can_enable_flag=false 5342fi 5343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5344 CFLAGS=$saved_CFLAGS; 5345 if test "X$can_enable_flag" = "Xtrue"; then 5346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5347$as_echo "yes" >&6; } 5348 WERRORFLAGS="-Werror=return-type $WERRORFLAGS" 5349 else 5350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5351$as_echo "no" >&6; } 5352 fi 5353 5354 5355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)" >&5 5356$as_echo_n "checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)... " >&6; } 5357 saved_CFLAGS=$CFLAGS; 5358 CFLAGS="-Werror=implicit $WERRORFLAGS"; 5359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5360/* end confdefs.h. */ 5361 5362int 5363main () 5364{ 5365return 0; 5366 ; 5367 return 0; 5368} 5369_ACEOF 5370if ac_fn_c_try_compile "$LINENO"; then : 5371 can_enable_flag=true 5372else 5373 can_enable_flag=false 5374fi 5375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5376 CFLAGS=$saved_CFLAGS; 5377 if test "X$can_enable_flag" = "Xtrue"; then 5378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5379$as_echo "yes" >&6; } 5380 WERRORFLAGS="-Werror=implicit $WERRORFLAGS" 5381 else 5382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5383$as_echo "no" >&6; } 5384 fi 5385 5386 5387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)" >&5 5388$as_echo_n "checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)... " >&6; } 5389 saved_CFLAGS=$CFLAGS; 5390 CFLAGS="-Werror=undef $WERRORFLAGS"; 5391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5392/* end confdefs.h. */ 5393 5394int 5395main () 5396{ 5397return 0; 5398 ; 5399 return 0; 5400} 5401_ACEOF 5402if ac_fn_c_try_compile "$LINENO"; then : 5403 can_enable_flag=true 5404else 5405 can_enable_flag=false 5406fi 5407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5408 CFLAGS=$saved_CFLAGS; 5409 if test "X$can_enable_flag" = "Xtrue"; then 5410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5411$as_echo "yes" >&6; } 5412 WERRORFLAGS="-Werror=undef $WERRORFLAGS" 5413 else 5414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5415$as_echo "no" >&6; } 5416 fi 5417 5418 5419 # until the emulator can handle this, I suggest we turn it off! 5420 #WFLAGS="-Wall -Wshadow -Wcast-qual -Wmissing-declarations" 5421 WFLAGS="-Wall -Wstrict-prototypes -Wpointer-arith" 5422 5423 case "$host_cpu" in 5424 tile*) 5425 # tile-gcc is a bit stricter with -Wmissing-prototypes than other gccs, 5426 # and too strict for our taste. 5427 ;; 5428 *) 5429 WFLAGS="$WFLAGS -Wmissing-prototypes";; 5430 esac 5431 5432 saved_CFLAGS=$CFLAGS 5433 CFLAGS="$CFLAGS -Wdeclaration-after-statement" 5434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5435/* end confdefs.h. */ 5436 5437int 5438main () 5439{ 5440; 5441 ; 5442 return 0; 5443} 5444_ACEOF 5445if ac_fn_c_try_compile "$LINENO"; then : 5446 warn_decl_after_st=true 5447else 5448 warn_decl_after_st=false 5449fi 5450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5451 if test "X$warn_decl_after_st" = "Xtrue"; then 5452 WFLAGS="$WFLAGS -Wdeclaration-after-statement" 5453 fi 5454 CFLAGS=$saved_CFLAGS 5455 5456 # Use -fno-common for gcc, that is link error if multiple definitions of 5457 # global variables are encountered. This is ISO C compliant. 5458 # Until version 10, gcc has had -fcommon as default, which allows and merges 5459 # such dubious duplicates. 5460 5461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-common to CFLAGS (via CFLAGS)" >&5 5462$as_echo_n "checking if we can add -fno-common to CFLAGS (via CFLAGS)... " >&6; } 5463 saved_CFLAGS=$CFLAGS; 5464 CFLAGS="-fno-common $CFLAGS"; 5465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5466/* end confdefs.h. */ 5467 5468int 5469main () 5470{ 5471return 0; 5472 ; 5473 return 0; 5474} 5475_ACEOF 5476if ac_fn_c_try_compile "$LINENO"; then : 5477 can_enable_flag=true 5478else 5479 can_enable_flag=false 5480fi 5481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5482 CFLAGS=$saved_CFLAGS; 5483 if test "X$can_enable_flag" = "Xtrue"; then 5484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5485$as_echo "yes" >&6; } 5486 CFLAGS="-fno-common $CFLAGS" 5487 else 5488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5489$as_echo "no" >&6; } 5490 fi 5491 5492else 5493 WFLAGS="" 5494 WERRORFLAGS=${WERRORFLAGS:-""} 5495fi 5496 5497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking C99 support" >&5 5498$as_echo_n "checking C99 support... " >&6; } 5499 5500cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5501/* end confdefs.h. */ 5502 5503int 5504main () 5505{ 5506 5507#if __STDC_VERSION__ < 199901L 5508 #error "Not C99" 5509#endif 5510 ; 5511 return 0; 5512} 5513_ACEOF 5514if ac_fn_c_try_compile "$LINENO"; then : 5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5516$as_echo "yes" >&6; } 5517else 5518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5519$as_echo "no" >&6; } 5520 CFLAGS="-std=gnu99 $CFLAGS" 5521 DEBUG_CFLAGS="-std=gnu99 $DEBUG_CFLAGS" 5522fi 5523rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5524 5525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for -O switch" >&5 5526$as_echo_n "checking CFLAGS for -O switch... " >&6; } 5527case "$CFLAGS" in 5528 *-O*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5529$as_echo "yes" >&6; } ;; 5530 *) 5531 as_fn_error $? " 5532 CFLAGS must contain a -O flag. If you need to edit the CFLAGS you probably 5533 also want to add the default CFLAGS. The default CFLAGS are \"-O2 -g\". 5534 If you want to build erts without any optimization, pass -O0 to CFLAGS." "$LINENO" 5 ;; 5535esac 5536 5537 5538 5539 5540 5541 5542## Check if we can do profile guided optimization of beam_emu 5543 5544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-generate -Werror..." >&5 5545$as_echo_n "checking whether $CC accepts -fprofile-generate -Werror...... " >&6; } 5546 saved_CFLAGS=$CFLAGS; 5547 CFLAGS="-fprofile-generate -Werror $CFLAGS"; 5548 if test "$cross_compiling" = yes; then : 5549 can_enable_flag=false 5550else 5551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5552/* end confdefs.h. */ 5553 5554_ACEOF 5555if ac_fn_c_try_run "$LINENO"; then : 5556 return 0; 5557else 5558 can_enable_flag=true 5559fi 5560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 5561 conftest.$ac_objext conftest.beam conftest.$ac_ext 5562fi 5563 5564 CFLAGS=$saved_CFLAGS; 5565 if test "X$can_enable_flag" = "Xtrue"; then 5566 PROFILE_GENERATE=true 5567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5568$as_echo "yes" >&6; } 5569 else 5570 PROFILE_GENERATE=false 5571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5572$as_echo "no" >&6; } 5573 fi 5574 5575 5576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-use -Werror..." >&5 5577$as_echo_n "checking whether $CC accepts -fprofile-use -Werror...... " >&6; } 5578 saved_CFLAGS=$CFLAGS; 5579 CFLAGS="-fprofile-use -Werror $CFLAGS"; 5580 if test "$cross_compiling" = yes; then : 5581 can_enable_flag=false 5582else 5583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5584/* end confdefs.h. */ 5585 5586_ACEOF 5587if ac_fn_c_try_run "$LINENO"; then : 5588 return 0; 5589else 5590 can_enable_flag=true 5591fi 5592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 5593 conftest.$ac_objext conftest.beam conftest.$ac_ext 5594fi 5595 5596 CFLAGS=$saved_CFLAGS; 5597 if test "X$can_enable_flag" = "Xtrue"; then 5598 PROFILE_USE=true 5599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5600$as_echo "yes" >&6; } 5601 else 5602 PROFILE_USE=false 5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5604$as_echo "no" >&6; } 5605 fi 5606 5607 5608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-use -fprofile-correction -Werror..." >&5 5609$as_echo_n "checking whether $CC accepts -fprofile-use -fprofile-correction -Werror...... " >&6; } 5610 saved_CFLAGS=$CFLAGS; 5611 CFLAGS="-fprofile-use -fprofile-correction -Werror $CFLAGS"; 5612 if test "$cross_compiling" = yes; then : 5613 can_enable_flag=false 5614else 5615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5616/* end confdefs.h. */ 5617 5618_ACEOF 5619if ac_fn_c_try_run "$LINENO"; then : 5620 return 0; 5621else 5622 can_enable_flag=true 5623fi 5624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 5625 conftest.$ac_objext conftest.beam conftest.$ac_ext 5626fi 5627 5628 CFLAGS=$saved_CFLAGS; 5629 if test "X$can_enable_flag" = "Xtrue"; then 5630 PROFILE_CORRECTION=true 5631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5632$as_echo "yes" >&6; } 5633 else 5634 PROFILE_CORRECTION=false 5635 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5636$as_echo "no" >&6; } 5637 fi 5638 5639 5640if test "X$PROFILE_CORRECTION" = "Xtrue"; then 5641 saved_CFLAGS=$CFLAGS 5642 saved_LDFLAGS=$LDFLAGS 5643 CFLAGS="-fprofile-generate $saved_CFLAGS" 5644 LDFLAGS="-fprofile-generate $saved_LDFLAGS" 5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC links with -fprofile-generate" >&5 5646$as_echo_n "checking whether $CC links with -fprofile-generate... " >&6; } 5647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5648/* end confdefs.h. */ 5649 5650int 5651main () 5652{ 5653return 0; 5654 ; 5655 return 0; 5656} 5657_ACEOF 5658if ac_fn_c_try_link "$LINENO"; then : 5659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5660$as_echo "yes" >&6; } 5661 PROFILE_GENERATE=true 5662else 5663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5664$as_echo "no" >&6; } 5665 PROFILE_GENERATE=false 5666fi 5667rm -f core conftest.err conftest.$ac_objext \ 5668 conftest$ac_exeext conftest.$ac_ext 5669 CFLAGS=$saved_CFLAGS 5670 LDFLAGS=$saved_LDFLAGS 5671fi 5672 5673## Check if this is clang 5674 5675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-instr-generate -Werror..." >&5 5676$as_echo_n "checking whether $CC accepts -fprofile-instr-generate -Werror...... " >&6; } 5677 saved_CFLAGS=$CFLAGS; 5678 CFLAGS="-fprofile-instr-generate -Werror $CFLAGS"; 5679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5680/* end confdefs.h. */ 5681 5682int 5683main () 5684{ 5685return 0; 5686 ; 5687 return 0; 5688} 5689_ACEOF 5690if ac_fn_c_try_compile "$LINENO"; then : 5691 can_enable_flag=true 5692else 5693 can_enable_flag=false 5694fi 5695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5696 CFLAGS=$saved_CFLAGS; 5697 if test "X$can_enable_flag" = "Xtrue"; then 5698 PROFILE_INSTR_GENERATE=true 5699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5700$as_echo "yes" >&6; } 5701 else 5702 PROFILE_INSTR_GENERATE=false 5703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5704$as_echo "no" >&6; } 5705 fi 5706 5707if test "X$PROFILE_INSTR_GENERATE" = "Xtrue"; then 5708 # It was clang, now we also have to check if we have llvm-profdata and that 5709 # we can link programs with -fprofile-instr-use 5710 saved_CFLAGS=$CFLAGS; 5711 CFLAGS="-fprofile-instr-generate -Werror $saved_CFLAGS" 5712 if test "$cross_compiling" = yes; then : 5713 { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling PGO when cross-compiling" >&5 5714$as_echo "$as_me: Disabling PGO when cross-compiling" >&6;} 5715else 5716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5717/* end confdefs.h. */ 5718 5719int 5720main () 5721{ 5722 5723 ; 5724 return 0; 5725} 5726_ACEOF 5727if ac_fn_c_try_run "$LINENO"; then : 5728 # Extract the first word of "llvm-profdata", so it can be a program name with args. 5729set dummy llvm-profdata; ac_word=$2 5730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5731$as_echo_n "checking for $ac_word... " >&6; } 5732if ${ac_cv_path_LLVM_PROFDATA+:} false; then : 5733 $as_echo_n "(cached) " >&6 5734else 5735 case $LLVM_PROFDATA in 5736 [\\/]* | ?:[\\/]*) 5737 ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path. 5738 ;; 5739 *) 5740 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5741as_dummy="$PATH:/Library/Developer/CommandLineTools/usr/bin" 5742for as_dir in $as_dummy 5743do 5744 IFS=$as_save_IFS 5745 test -z "$as_dir" && as_dir=. 5746 for ac_exec_ext in '' $ac_executable_extensions; do 5747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5748 ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" 5749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5750 break 2 5751 fi 5752done 5753 done 5754IFS=$as_save_IFS 5755 5756 ;; 5757esac 5758fi 5759LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA 5760if test -n "$LLVM_PROFDATA"; then 5761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5 5762$as_echo "$LLVM_PROFDATA" >&6; } 5763else 5764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5765$as_echo "no" >&6; } 5766fi 5767 5768 5769 for ac_prog in xcrun 5770do 5771 # Extract the first word of "$ac_prog", so it can be a program name with args. 5772set dummy $ac_prog; ac_word=$2 5773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5774$as_echo_n "checking for $ac_word... " >&6; } 5775if ${ac_cv_prog_XCRUN+:} false; then : 5776 $as_echo_n "(cached) " >&6 5777else 5778 if test -n "$XCRUN"; then 5779 ac_cv_prog_XCRUN="$XCRUN" # Let the user override the test. 5780else 5781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5782for as_dir in $PATH 5783do 5784 IFS=$as_save_IFS 5785 test -z "$as_dir" && as_dir=. 5786 for ac_exec_ext in '' $ac_executable_extensions; do 5787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5788 ac_cv_prog_XCRUN="$ac_prog" 5789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5790 break 2 5791 fi 5792done 5793 done 5794IFS=$as_save_IFS 5795 5796fi 5797fi 5798XCRUN=$ac_cv_prog_XCRUN 5799if test -n "$XCRUN"; then 5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCRUN" >&5 5801$as_echo "$XCRUN" >&6; } 5802else 5803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5804$as_echo "no" >&6; } 5805fi 5806 5807 5808 test -n "$XCRUN" && break 5809done 5810 5811 if test "X$XCRUN" != "X" -a "X$LLVM_PROFDATA" = "X"; then 5812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XCRUN $LLVM_PROFDATA" >&5 5813$as_echo_n "checking for $XCRUN $LLVM_PROFDATA... " >&6; } 5814 if $XCRUN $LLVM_PROFDATA --help 2>& 5 >& 5; then 5815 LLVM_PROFDATA="$XCRUN $LLVM_PROFDATA" 5816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5817$as_echo "yes" >&6; } 5818 else 5819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5820$as_echo "no" >&6; } 5821 fi 5822 fi 5823 5824 if test "X$LLVM_PROFDATA" != "X"; then 5825 CFLAGS="-fprofile-instr-use=default.profdata $saved_CFLAGS"; 5826 $LLVM_PROFDATA merge -output=default.profdata *.profraw; 5827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-instr-use=default.profdata -Werror" >&5 5828$as_echo_n "checking whether $CC accepts -fprofile-instr-use=default.profdata -Werror... " >&6; } 5829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5830/* end confdefs.h. */ 5831 5832int 5833main () 5834{ 5835return 0; 5836 ; 5837 return 0; 5838} 5839_ACEOF 5840if ac_fn_c_try_compile "$LINENO"; then : 5841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5842$as_echo "yes" >&6; } 5843 PROFILE_INSTR_USE=true 5844else 5845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5846$as_echo "no" >&6; } 5847 PROFILE_INSTR_USE=false 5848fi 5849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5850 rm -f default.profdata 5851 fi 5852fi 5853rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 5854 conftest.$ac_objext conftest.beam conftest.$ac_ext 5855fi 5856 5857 rm -f *.profraw 5858 CFLAGS=$saved_CFLAGS; 5859fi 5860 5861# Check whether --enable-pgo was given. 5862if test "${enable_pgo+set}" = set; then : 5863 enableval=$enable_pgo; case "$enableval" in 5864 no) enable_pgo=no ;; 5865 *) enable_pgo=yes ;; 5866 esac 5867 5868else 5869 enable_pgo=default 5870fi 5871 5872 5873USE_PGO=false 5874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do PGO of erts" >&5 5875$as_echo_n "checking whether to do PGO of erts... " >&6; } 5876if test $enable_pgo = no; then 5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled by user" >&5 5878$as_echo "no, disabled by user" >&6; } 5879elif test $CROSS_COMPILING = yes; then 5880 if test $enable_pgo = yes; then 5881 as_fn_error $? "cannot use PGO when cross-compiling" "$LINENO" 5 5882 else 5883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cross compiling" >&5 5884$as_echo "no, cross compiling" >&6; } 5885 fi 5886elif test "X$host" = "Xwin32"; then 5887 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not supported in windows" >&5 5888$as_echo "no, not supported in windows" >&6; } 5889elif test "X$PROFILE_GENERATE" = "Xtrue" -a "X$PROFILE_USE" = "Xtrue" -a "X$PROFILE_CORRECTION" = "Xtrue"; then 5890 ## We need -fprofile-generate and -fprofile-correction support to use PGO with 5891 ## gcc as multiple threads run within the executed object files 5892 USE_PGO=true 5893 PROFILE_COMPILER=gcc 5894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using -fprofile-generate -fprofile-correction" >&5 5895$as_echo "yes, using -fprofile-generate -fprofile-correction" >&6; } 5896elif test "X$PROFILE_INSTR_GENERATE" = "Xtrue" -a "X$PROFILE_INSTR_USE" = "Xtrue"; then 5897 USE_PGO=true 5898 PROFILE_COMPILER=clang 5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using -fprofile-instr-generate" >&5 5900$as_echo "yes, using -fprofile-instr-generate" >&6; } 5901else 5902 if test $enable_pgo = yes; then 5903 as_fn_error $? "cannot use PGO with this compiler" "$LINENO" 5 5904 else 5905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5906$as_echo "no" >&6; } 5907 fi 5908fi 5909 5910USE_PGO=false 5911 5912 5913 5914 5915ac_ext=c 5916ac_cpp='$CPP $CPPFLAGS' 5917ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5918ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5919ac_compiler_gnu=$ac_cv_c_compiler_gnu 5920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 5921$as_echo_n "checking how to run the C preprocessor... " >&6; } 5922# On Suns, sometimes $CPP names a directory. 5923if test -n "$CPP" && test -d "$CPP"; then 5924 CPP= 5925fi 5926if test -z "$CPP"; then 5927 if ${ac_cv_prog_CPP+:} false; then : 5928 $as_echo_n "(cached) " >&6 5929else 5930 # Double quotes because CPP needs to be expanded 5931 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 5932 do 5933 ac_preproc_ok=false 5934for ac_c_preproc_warn_flag in '' yes 5935do 5936 # Use a header file that comes with gcc, so configuring glibc 5937 # with a fresh cross-compiler works. 5938 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 5939 # <limits.h> exists even on freestanding compilers. 5940 # On the NeXT, cc -E runs the code through the compiler's parser, 5941 # not just through cpp. "Syntax error" is here to catch this case. 5942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5943/* end confdefs.h. */ 5944#ifdef __STDC__ 5945# include <limits.h> 5946#else 5947# include <assert.h> 5948#endif 5949 Syntax error 5950_ACEOF 5951if ac_fn_c_try_cpp "$LINENO"; then : 5952 5953else 5954 # Broken: fails on valid input. 5955continue 5956fi 5957rm -f conftest.err conftest.i conftest.$ac_ext 5958 5959 # OK, works on sane cases. Now check whether nonexistent headers 5960 # can be detected and how. 5961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5962/* end confdefs.h. */ 5963#include <ac_nonexistent.h> 5964_ACEOF 5965if ac_fn_c_try_cpp "$LINENO"; then : 5966 # Broken: success on invalid input. 5967continue 5968else 5969 # Passes both tests. 5970ac_preproc_ok=: 5971break 5972fi 5973rm -f conftest.err conftest.i conftest.$ac_ext 5974 5975done 5976# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5977rm -f conftest.i conftest.err conftest.$ac_ext 5978if $ac_preproc_ok; then : 5979 break 5980fi 5981 5982 done 5983 ac_cv_prog_CPP=$CPP 5984 5985fi 5986 CPP=$ac_cv_prog_CPP 5987else 5988 ac_cv_prog_CPP=$CPP 5989fi 5990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 5991$as_echo "$CPP" >&6; } 5992ac_preproc_ok=false 5993for ac_c_preproc_warn_flag in '' yes 5994do 5995 # Use a header file that comes with gcc, so configuring glibc 5996 # with a fresh cross-compiler works. 5997 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 5998 # <limits.h> exists even on freestanding compilers. 5999 # On the NeXT, cc -E runs the code through the compiler's parser, 6000 # not just through cpp. "Syntax error" is here to catch this case. 6001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6002/* end confdefs.h. */ 6003#ifdef __STDC__ 6004# include <limits.h> 6005#else 6006# include <assert.h> 6007#endif 6008 Syntax error 6009_ACEOF 6010if ac_fn_c_try_cpp "$LINENO"; then : 6011 6012else 6013 # Broken: fails on valid input. 6014continue 6015fi 6016rm -f conftest.err conftest.i conftest.$ac_ext 6017 6018 # OK, works on sane cases. Now check whether nonexistent headers 6019 # can be detected and how. 6020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6021/* end confdefs.h. */ 6022#include <ac_nonexistent.h> 6023_ACEOF 6024if ac_fn_c_try_cpp "$LINENO"; then : 6025 # Broken: success on invalid input. 6026continue 6027else 6028 # Passes both tests. 6029ac_preproc_ok=: 6030break 6031fi 6032rm -f conftest.err conftest.i conftest.$ac_ext 6033 6034done 6035# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 6036rm -f conftest.i conftest.err conftest.$ac_ext 6037if $ac_preproc_ok; then : 6038 6039else 6040 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 6041$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 6042as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 6043See \`config.log' for more details" "$LINENO" 5; } 6044fi 6045 6046ac_ext=c 6047ac_cpp='$CPP $CPPFLAGS' 6048ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 6049ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 6050ac_compiler_gnu=$ac_cv_c_compiler_gnu 6051 6052 6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 6054$as_echo_n "checking for grep that handles long lines and -e... " >&6; } 6055if ${ac_cv_path_GREP+:} false; then : 6056 $as_echo_n "(cached) " >&6 6057else 6058 if test -z "$GREP"; then 6059 ac_path_GREP_found=false 6060 # Loop through the user's path and test for each of PROGNAME-LIST 6061 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6062for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6063do 6064 IFS=$as_save_IFS 6065 test -z "$as_dir" && as_dir=. 6066 for ac_prog in grep ggrep; do 6067 for ac_exec_ext in '' $ac_executable_extensions; do 6068 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 6069 as_fn_executable_p "$ac_path_GREP" || continue 6070# Check for GNU ac_path_GREP and select it if it is found. 6071 # Check for GNU $ac_path_GREP 6072case `"$ac_path_GREP" --version 2>&1` in 6073*GNU*) 6074 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 6075*) 6076 ac_count=0 6077 $as_echo_n 0123456789 >"conftest.in" 6078 while : 6079 do 6080 cat "conftest.in" "conftest.in" >"conftest.tmp" 6081 mv "conftest.tmp" "conftest.in" 6082 cp "conftest.in" "conftest.nl" 6083 $as_echo 'GREP' >> "conftest.nl" 6084 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6085 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6086 as_fn_arith $ac_count + 1 && ac_count=$as_val 6087 if test $ac_count -gt ${ac_path_GREP_max-0}; then 6088 # Best one so far, save it but keep looking for a better one 6089 ac_cv_path_GREP="$ac_path_GREP" 6090 ac_path_GREP_max=$ac_count 6091 fi 6092 # 10*(2^10) chars as input seems more than enough 6093 test $ac_count -gt 10 && break 6094 done 6095 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6096esac 6097 6098 $ac_path_GREP_found && break 3 6099 done 6100 done 6101 done 6102IFS=$as_save_IFS 6103 if test -z "$ac_cv_path_GREP"; then 6104 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6105 fi 6106else 6107 ac_cv_path_GREP=$GREP 6108fi 6109 6110fi 6111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 6112$as_echo "$ac_cv_path_GREP" >&6; } 6113 GREP="$ac_cv_path_GREP" 6114 6115 6116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 6117$as_echo_n "checking for egrep... " >&6; } 6118if ${ac_cv_path_EGREP+:} false; then : 6119 $as_echo_n "(cached) " >&6 6120else 6121 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 6122 then ac_cv_path_EGREP="$GREP -E" 6123 else 6124 if test -z "$EGREP"; then 6125 ac_path_EGREP_found=false 6126 # Loop through the user's path and test for each of PROGNAME-LIST 6127 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6128for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6129do 6130 IFS=$as_save_IFS 6131 test -z "$as_dir" && as_dir=. 6132 for ac_prog in egrep; do 6133 for ac_exec_ext in '' $ac_executable_extensions; do 6134 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 6135 as_fn_executable_p "$ac_path_EGREP" || continue 6136# Check for GNU ac_path_EGREP and select it if it is found. 6137 # Check for GNU $ac_path_EGREP 6138case `"$ac_path_EGREP" --version 2>&1` in 6139*GNU*) 6140 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 6141*) 6142 ac_count=0 6143 $as_echo_n 0123456789 >"conftest.in" 6144 while : 6145 do 6146 cat "conftest.in" "conftest.in" >"conftest.tmp" 6147 mv "conftest.tmp" "conftest.in" 6148 cp "conftest.in" "conftest.nl" 6149 $as_echo 'EGREP' >> "conftest.nl" 6150 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6151 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6152 as_fn_arith $ac_count + 1 && ac_count=$as_val 6153 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 6154 # Best one so far, save it but keep looking for a better one 6155 ac_cv_path_EGREP="$ac_path_EGREP" 6156 ac_path_EGREP_max=$ac_count 6157 fi 6158 # 10*(2^10) chars as input seems more than enough 6159 test $ac_count -gt 10 && break 6160 done 6161 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6162esac 6163 6164 $ac_path_EGREP_found && break 3 6165 done 6166 done 6167 done 6168IFS=$as_save_IFS 6169 if test -z "$ac_cv_path_EGREP"; then 6170 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6171 fi 6172else 6173 ac_cv_path_EGREP=$EGREP 6174fi 6175 6176 fi 6177fi 6178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 6179$as_echo "$ac_cv_path_EGREP" >&6; } 6180 EGREP="$ac_cv_path_EGREP" 6181 6182 6183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 6184$as_echo_n "checking for ANSI C header files... " >&6; } 6185if ${ac_cv_header_stdc+:} false; then : 6186 $as_echo_n "(cached) " >&6 6187else 6188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6189/* end confdefs.h. */ 6190#include <stdlib.h> 6191#include <stdarg.h> 6192#include <string.h> 6193#include <float.h> 6194 6195int 6196main () 6197{ 6198 6199 ; 6200 return 0; 6201} 6202_ACEOF 6203if ac_fn_c_try_compile "$LINENO"; then : 6204 ac_cv_header_stdc=yes 6205else 6206 ac_cv_header_stdc=no 6207fi 6208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6209 6210if test $ac_cv_header_stdc = yes; then 6211 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 6212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6213/* end confdefs.h. */ 6214#include <string.h> 6215 6216_ACEOF 6217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6218 $EGREP "memchr" >/dev/null 2>&1; then : 6219 6220else 6221 ac_cv_header_stdc=no 6222fi 6223rm -f conftest* 6224 6225fi 6226 6227if test $ac_cv_header_stdc = yes; then 6228 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 6229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6230/* end confdefs.h. */ 6231#include <stdlib.h> 6232 6233_ACEOF 6234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6235 $EGREP "free" >/dev/null 2>&1; then : 6236 6237else 6238 ac_cv_header_stdc=no 6239fi 6240rm -f conftest* 6241 6242fi 6243 6244if test $ac_cv_header_stdc = yes; then 6245 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 6246 if test "$cross_compiling" = yes; then : 6247 : 6248else 6249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6250/* end confdefs.h. */ 6251#include <ctype.h> 6252#include <stdlib.h> 6253#if ((' ' & 0x0FF) == 0x020) 6254# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 6255# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 6256#else 6257# define ISLOWER(c) \ 6258 (('a' <= (c) && (c) <= 'i') \ 6259 || ('j' <= (c) && (c) <= 'r') \ 6260 || ('s' <= (c) && (c) <= 'z')) 6261# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 6262#endif 6263 6264#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 6265int 6266main () 6267{ 6268 int i; 6269 for (i = 0; i < 256; i++) 6270 if (XOR (islower (i), ISLOWER (i)) 6271 || toupper (i) != TOUPPER (i)) 6272 return 2; 6273 return 0; 6274} 6275_ACEOF 6276if ac_fn_c_try_run "$LINENO"; then : 6277 6278else 6279 ac_cv_header_stdc=no 6280fi 6281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 6282 conftest.$ac_objext conftest.beam conftest.$ac_ext 6283fi 6284 6285fi 6286fi 6287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 6288$as_echo "$ac_cv_header_stdc" >&6; } 6289if test $ac_cv_header_stdc = yes; then 6290 6291$as_echo "#define STDC_HEADERS 1" >>confdefs.h 6292 6293fi 6294 6295# On IRIX 5.3, sys/types and inttypes.h are conflicting. 6296for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 6297 inttypes.h stdint.h unistd.h 6298do : 6299 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 6300ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 6301" 6302if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 6303 cat >>confdefs.h <<_ACEOF 6304#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 6305_ACEOF 6306 6307fi 6308 6309done 6310 6311 6312# The cast to long int works around a bug in the HP C Compiler 6313# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 6314# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 6315# This bug is HP SR number 8606223364. 6316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 6317$as_echo_n "checking size of void *... " >&6; } 6318if ${ac_cv_sizeof_void_p+:} false; then : 6319 $as_echo_n "(cached) " >&6 6320else 6321 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : 6322 6323else 6324 if test "$ac_cv_type_void_p" = yes; then 6325 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 6326$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 6327as_fn_error 77 "cannot compute sizeof (void *) 6328See \`config.log' for more details" "$LINENO" 5; } 6329 else 6330 ac_cv_sizeof_void_p=0 6331 fi 6332fi 6333 6334fi 6335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 6336$as_echo "$ac_cv_sizeof_void_p" >&6; } 6337 6338 6339 6340cat >>confdefs.h <<_ACEOF 6341#define SIZEOF_VOID_P $ac_cv_sizeof_void_p 6342_ACEOF 6343 6344 # Needed for ARCH and smp checks below 6345if test "x$ac_cv_sizeof_void_p" = x8; then 6346 EXTERNAL_WORD_SIZE=64 6347 6348else 6349 EXTERNAL_WORD_SIZE=32 6350 6351fi 6352 6353 6354if test "x$host_alias" != "x"; then 6355 chk_opsys_=$host_os 6356else 6357 chk_opsys_=`uname -s` 6358 if test "x$chk_opsys_" = "xSunOS"; then 6359 chk_opsys_=$chk_opsys_`uname -r` 6360 fi 6361fi 6362case $chk_opsys_ in 6363 win32) OPSYS=win32;; 6364 solaris2.*|SunOS5.*) OPSYS=sol2;; 6365 linux*|Linux) OPSYS=linux;; 6366 darwin|Darwin) OPSYS=darwin;; 6367 freebsd|FreeBSD) OPSYS=freebsd;; 6368 *) OPSYS=noopsys 6369esac 6370 6371 6372 6373 6374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target hardware architecture" >&5 6375$as_echo_n "checking target hardware architecture... " >&6; } 6376 if test "x$host_alias" != "x" -a "x$host_cpu" != "x"; then 6377 chk_arch_=$host_cpu 6378 else 6379 chk_arch_=`uname -m` 6380 fi 6381 6382 case $chk_arch_ in 6383 sun4u) ARCH=ultrasparc;; 6384 sparc64) ARCH=sparc64;; 6385 sun4v) ARCH=ultrasparc;; 6386 i86pc) ARCH=x86;; 6387 i386) ARCH=x86;; 6388 i486) ARCH=x86;; 6389 i586) ARCH=x86;; 6390 i686) ARCH=x86;; 6391 x86_64) ARCH=amd64;; 6392 amd64) ARCH=amd64;; 6393 macppc) ARCH=ppc;; 6394 powerpc) ARCH=ppc;; 6395 ppc) ARCH=ppc;; 6396 ppc64) ARCH=ppc64;; 6397 ppc64le) ARCH=ppc64le;; 6398 powerpc64) ARCH=ppc64;; 6399 powerpc64le) ARCH=ppc64le;; 6400 "Power Macintosh") ARCH=ppc;; 6401 arm64) ARCH=arm64;; 6402 armv5b) ARCH=arm;; 6403 armv5teb) ARCH=arm;; 6404 armv5tel) ARCH=arm;; 6405 armv5tejl) ARCH=arm;; 6406 armv6l) ARCH=arm;; 6407 armv6hl) ARCH=arm;; 6408 armv7l) ARCH=arm;; 6409 armv7hl) ARCH=arm;; 6410 armv8*) ARCH=arm;; 6411 aarch64) ARCH=arm64;; 6412 aarch*) ARCH=arm;; 6413 tile) ARCH=tile;; 6414 e2k) ARCH=e2k;; 6415 *) ARCH=noarch;; 6416 esac 6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH" >&5 6418$as_echo "$ARCH" >&6; } 6419 6420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compilation mode forces ARCH adjustment" >&5 6421$as_echo_n "checking whether compilation mode forces ARCH adjustment... " >&6; } 6422 case "$ARCH-$ac_cv_sizeof_void_p" in 6423 x86-8) 6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=x86 to ARCH=amd64" >&5 6425$as_echo "yes: adjusting ARCH=x86 to ARCH=amd64" >&6; } 6426 ARCH=amd64 6427 ;; 6428 amd64-4) 6429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=amd64 to ARCH=x86" >&5 6430$as_echo "yes: adjusting ARCH=amd64 to ARCH=x86" >&6; } 6431 ARCH=x86 6432 ;; 6433 ultrasparc-8) 6434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ultrasparc to ARCH=sparc64" >&5 6435$as_echo "yes: adjusting ARCH=ultrasparc to ARCH=sparc64" >&6; } 6436 ARCH=sparc64 6437 ;; 6438 sparc64-4) 6439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=sparc64 to ARCH=ultrasparc" >&5 6440$as_echo "yes: adjusting ARCH=sparc64 to ARCH=ultrasparc" >&6; } 6441 ARCH=ultrasparc 6442 ;; 6443 ppc64-4) 6444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ppc64 to ARCH=ppc" >&5 6445$as_echo "yes: adjusting ARCH=ppc64 to ARCH=ppc" >&6; } 6446 ARCH=ppc 6447 ;; 6448 ppc-8) 6449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ppc to ARCH=ppc64" >&5 6450$as_echo "yes: adjusting ARCH=ppc to ARCH=ppc64" >&6; } 6451 ARCH=ppc64 6452 ;; 6453 arm-8) 6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=arm to ARCH=arm64" >&5 6455$as_echo "yes: adjusting ARCH=arm to ARCH=arm64" >&6; } 6456 ARCH=arm64 6457 ;; 6458 *) 6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: ARCH is $ARCH" >&5 6460$as_echo "no: ARCH is $ARCH" >&6; } 6461 ;; 6462 esac 6463 6464 6465 6466 6467 6468 6469 6470case $ARCH-$OPSYS in 6471 amd64-darwin*|arm64-darwin*) 6472 { $as_echo "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to cope with 64bit Darwin" >&5 6473$as_echo "$as_me: Adjusting LDFLAGS to cope with 64bit Darwin" >&6;} 6474 case $LDFLAGS in 6475 *-m64*) 6476 ;; 6477 *) 6478 LDFLAGS="-m64 $LDFLAGS" 6479 ;; 6480 esac 6481 ;; 6482 *-darwin*) 6483 case $LDFLAGS in 6484 *-m32*) 6485 ;; 6486 *) 6487 LDFLAGS="-m32 $LDFLAGS" 6488 ;; 6489 esac 6490 ;; 6491 *) 6492 if test X${enable_m64_build} = Xyes; then 6493 { $as_echo "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to use -m64" >&5 6494$as_echo "$as_me: Adjusting LDFLAGS to use -m64" >&6;} 6495 case $LDFLAGS in 6496 *-m64*) 6497 ;; 6498 *) 6499 LDFLAGS="-m64 $LDFLAGS" 6500 ;; 6501 esac 6502 fi; 6503 if test X${enable_m32_build} = Xyes; then 6504 { $as_echo "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to use -m32" >&5 6505$as_echo "$as_me: Adjusting LDFLAGS to use -m32" >&6;} ; 6506 case $LDFLAGS in 6507 *-m32*) 6508 ;; 6509 *) 6510 LDFLAGS="-m32 $LDFLAGS" 6511 ;; 6512 esac ; 6513 fi 6514 ;; 6515esac 6516 6517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if VM has to be linked with Carbon framework" >&5 6518$as_echo_n "checking if VM has to be linked with Carbon framework... " >&6; } 6519case $ARCH-$OPSYS in 6520 *-darwin*) 6521 LIBCARBON="-framework Carbon -framework Cocoa" 6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6523$as_echo "yes" >&6; } 6524 ;; 6525 *) 6526 LIBCARBON= 6527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6528$as_echo "no" >&6; } 6529 ;; 6530esac 6531 6532 6533 6534_search_path=/bin:/usr/bin:/usr/local/bin:$PATH 6535 6536# Extract the first word of "mkdir", so it can be a program name with args. 6537set dummy mkdir; ac_word=$2 6538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6539$as_echo_n "checking for $ac_word... " >&6; } 6540if ${ac_cv_path_MKDIR+:} false; then : 6541 $as_echo_n "(cached) " >&6 6542else 6543 case $MKDIR in 6544 [\\/]* | ?:[\\/]*) 6545 ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. 6546 ;; 6547 *) 6548 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6549for as_dir in $_search_path 6550do 6551 IFS=$as_save_IFS 6552 test -z "$as_dir" && as_dir=. 6553 for ac_exec_ext in '' $ac_executable_extensions; do 6554 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6555 ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" 6556 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6557 break 2 6558 fi 6559done 6560 done 6561IFS=$as_save_IFS 6562 6563 test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="false" 6564 ;; 6565esac 6566fi 6567MKDIR=$ac_cv_path_MKDIR 6568if test -n "$MKDIR"; then 6569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 6570$as_echo "$MKDIR" >&6; } 6571else 6572 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6573$as_echo "no" >&6; } 6574fi 6575 6576 6577if test "$ac_cv_path_MKDIR" = false; then 6578 as_fn_error $? "No 'mkdir' command found" "$LINENO" 5 6579fi 6580 6581# Extract the first word of "cp", so it can be a program name with args. 6582set dummy cp; ac_word=$2 6583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6584$as_echo_n "checking for $ac_word... " >&6; } 6585if ${ac_cv_path_CP+:} false; then : 6586 $as_echo_n "(cached) " >&6 6587else 6588 case $CP in 6589 [\\/]* | ?:[\\/]*) 6590 ac_cv_path_CP="$CP" # Let the user override the test with a path. 6591 ;; 6592 *) 6593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6594for as_dir in $_search_path 6595do 6596 IFS=$as_save_IFS 6597 test -z "$as_dir" && as_dir=. 6598 for ac_exec_ext in '' $ac_executable_extensions; do 6599 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6600 ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" 6601 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6602 break 2 6603 fi 6604done 6605 done 6606IFS=$as_save_IFS 6607 6608 test -z "$ac_cv_path_CP" && ac_cv_path_CP="false" 6609 ;; 6610esac 6611fi 6612CP=$ac_cv_path_CP 6613if test -n "$CP"; then 6614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 6615$as_echo "$CP" >&6; } 6616else 6617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6618$as_echo "no" >&6; } 6619fi 6620 6621 6622if test "$ac_cv_path_CP" = false; then 6623 as_fn_error $? "No 'cp' command found" "$LINENO" 5 6624fi 6625 6626_search_path= 6627 6628 6629# Remove old configuration information. 6630# Next line should be before first output to CONN_INFO. So this is 6631# just the right place. 6632rm -f "$ERL_TOP/erts/CONF_INFO" 6633 6634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we are building a sharing-preserving emulator" >&5 6635$as_echo_n "checking if we are building a sharing-preserving emulator... " >&6; } 6636if test "$enable_sharing_preserving" = "yes"; then 6637 6638$as_echo "#define SHCOPY 1" >>confdefs.h 6639 6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6641$as_echo "yes" >&6; } 6642else 6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6644$as_echo "no" >&6; } 6645fi 6646 6647 6648ac_ext=c 6649ac_cpp='$CPP $CPPFLAGS' 6650ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 6651ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 6652ac_compiler_gnu=$ac_cv_c_compiler_gnu 6653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 6654$as_echo_n "checking how to run the C preprocessor... " >&6; } 6655# On Suns, sometimes $CPP names a directory. 6656if test -n "$CPP" && test -d "$CPP"; then 6657 CPP= 6658fi 6659if test -z "$CPP"; then 6660 if ${ac_cv_prog_CPP+:} false; then : 6661 $as_echo_n "(cached) " >&6 6662else 6663 # Double quotes because CPP needs to be expanded 6664 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 6665 do 6666 ac_preproc_ok=false 6667for ac_c_preproc_warn_flag in '' yes 6668do 6669 # Use a header file that comes with gcc, so configuring glibc 6670 # with a fresh cross-compiler works. 6671 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6672 # <limits.h> exists even on freestanding compilers. 6673 # On the NeXT, cc -E runs the code through the compiler's parser, 6674 # not just through cpp. "Syntax error" is here to catch this case. 6675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6676/* end confdefs.h. */ 6677#ifdef __STDC__ 6678# include <limits.h> 6679#else 6680# include <assert.h> 6681#endif 6682 Syntax error 6683_ACEOF 6684if ac_fn_c_try_cpp "$LINENO"; then : 6685 6686else 6687 # Broken: fails on valid input. 6688continue 6689fi 6690rm -f conftest.err conftest.i conftest.$ac_ext 6691 6692 # OK, works on sane cases. Now check whether nonexistent headers 6693 # can be detected and how. 6694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6695/* end confdefs.h. */ 6696#include <ac_nonexistent.h> 6697_ACEOF 6698if ac_fn_c_try_cpp "$LINENO"; then : 6699 # Broken: success on invalid input. 6700continue 6701else 6702 # Passes both tests. 6703ac_preproc_ok=: 6704break 6705fi 6706rm -f conftest.err conftest.i conftest.$ac_ext 6707 6708done 6709# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 6710rm -f conftest.i conftest.err conftest.$ac_ext 6711if $ac_preproc_ok; then : 6712 break 6713fi 6714 6715 done 6716 ac_cv_prog_CPP=$CPP 6717 6718fi 6719 CPP=$ac_cv_prog_CPP 6720else 6721 ac_cv_prog_CPP=$CPP 6722fi 6723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 6724$as_echo "$CPP" >&6; } 6725ac_preproc_ok=false 6726for ac_c_preproc_warn_flag in '' yes 6727do 6728 # Use a header file that comes with gcc, so configuring glibc 6729 # with a fresh cross-compiler works. 6730 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6731 # <limits.h> exists even on freestanding compilers. 6732 # On the NeXT, cc -E runs the code through the compiler's parser, 6733 # not just through cpp. "Syntax error" is here to catch this case. 6734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6735/* end confdefs.h. */ 6736#ifdef __STDC__ 6737# include <limits.h> 6738#else 6739# include <assert.h> 6740#endif 6741 Syntax error 6742_ACEOF 6743if ac_fn_c_try_cpp "$LINENO"; then : 6744 6745else 6746 # Broken: fails on valid input. 6747continue 6748fi 6749rm -f conftest.err conftest.i conftest.$ac_ext 6750 6751 # OK, works on sane cases. Now check whether nonexistent headers 6752 # can be detected and how. 6753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6754/* end confdefs.h. */ 6755#include <ac_nonexistent.h> 6756_ACEOF 6757if ac_fn_c_try_cpp "$LINENO"; then : 6758 # Broken: success on invalid input. 6759continue 6760else 6761 # Passes both tests. 6762ac_preproc_ok=: 6763break 6764fi 6765rm -f conftest.err conftest.i conftest.$ac_ext 6766 6767done 6768# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 6769rm -f conftest.i conftest.err conftest.$ac_ext 6770if $ac_preproc_ok; then : 6771 6772else 6773 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 6774$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 6775as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 6776See \`config.log' for more details" "$LINENO" 5; } 6777fi 6778 6779ac_ext=c 6780ac_cpp='$CPP $CPPFLAGS' 6781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 6782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 6783ac_compiler_gnu=$ac_cv_c_compiler_gnu 6784 6785 6786if test -n "$ac_tool_prefix"; then 6787 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 6788set dummy ${ac_tool_prefix}ranlib; ac_word=$2 6789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6790$as_echo_n "checking for $ac_word... " >&6; } 6791if ${ac_cv_prog_RANLIB+:} false; then : 6792 $as_echo_n "(cached) " >&6 6793else 6794 if test -n "$RANLIB"; then 6795 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 6796else 6797as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6798for as_dir in $PATH 6799do 6800 IFS=$as_save_IFS 6801 test -z "$as_dir" && as_dir=. 6802 for ac_exec_ext in '' $ac_executable_extensions; do 6803 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6804 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 6805 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6806 break 2 6807 fi 6808done 6809 done 6810IFS=$as_save_IFS 6811 6812fi 6813fi 6814RANLIB=$ac_cv_prog_RANLIB 6815if test -n "$RANLIB"; then 6816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 6817$as_echo "$RANLIB" >&6; } 6818else 6819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6820$as_echo "no" >&6; } 6821fi 6822 6823 6824fi 6825if test -z "$ac_cv_prog_RANLIB"; then 6826 ac_ct_RANLIB=$RANLIB 6827 # Extract the first word of "ranlib", so it can be a program name with args. 6828set dummy ranlib; ac_word=$2 6829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6830$as_echo_n "checking for $ac_word... " >&6; } 6831if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : 6832 $as_echo_n "(cached) " >&6 6833else 6834 if test -n "$ac_ct_RANLIB"; then 6835 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 6836else 6837as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6838for as_dir in $PATH 6839do 6840 IFS=$as_save_IFS 6841 test -z "$as_dir" && as_dir=. 6842 for ac_exec_ext in '' $ac_executable_extensions; do 6843 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6844 ac_cv_prog_ac_ct_RANLIB="ranlib" 6845 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6846 break 2 6847 fi 6848done 6849 done 6850IFS=$as_save_IFS 6851 6852fi 6853fi 6854ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 6855if test -n "$ac_ct_RANLIB"; then 6856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 6857$as_echo "$ac_ct_RANLIB" >&6; } 6858else 6859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6860$as_echo "no" >&6; } 6861fi 6862 6863 if test "x$ac_ct_RANLIB" = x; then 6864 RANLIB=":" 6865 else 6866 case $cross_compiling:$ac_tool_warned in 6867yes:) 6868{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6869$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6870ac_tool_warned=yes ;; 6871esac 6872 RANLIB=$ac_ct_RANLIB 6873 fi 6874else 6875 RANLIB="$ac_cv_prog_RANLIB" 6876fi 6877 6878 6879for ac_prog in 'bison -y' byacc 6880do 6881 # Extract the first word of "$ac_prog", so it can be a program name with args. 6882set dummy $ac_prog; ac_word=$2 6883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6884$as_echo_n "checking for $ac_word... " >&6; } 6885if ${ac_cv_prog_YACC+:} false; then : 6886 $as_echo_n "(cached) " >&6 6887else 6888 if test -n "$YACC"; then 6889 ac_cv_prog_YACC="$YACC" # Let the user override the test. 6890else 6891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6892for as_dir in $PATH 6893do 6894 IFS=$as_save_IFS 6895 test -z "$as_dir" && as_dir=. 6896 for ac_exec_ext in '' $ac_executable_extensions; do 6897 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6898 ac_cv_prog_YACC="$ac_prog" 6899 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6900 break 2 6901 fi 6902done 6903 done 6904IFS=$as_save_IFS 6905 6906fi 6907fi 6908YACC=$ac_cv_prog_YACC 6909if test -n "$YACC"; then 6910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 6911$as_echo "$YACC" >&6; } 6912else 6913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6914$as_echo "no" >&6; } 6915fi 6916 6917 6918 test -n "$YACC" && break 6919done 6920test -n "$YACC" || YACC="yacc" 6921 6922for ac_prog in perl5 perl 6923do 6924 # Extract the first word of "$ac_prog", so it can be a program name with args. 6925set dummy $ac_prog; ac_word=$2 6926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6927$as_echo_n "checking for $ac_word... " >&6; } 6928if ${ac_cv_path_PERL+:} false; then : 6929 $as_echo_n "(cached) " >&6 6930else 6931 case $PERL in 6932 [\\/]* | ?:[\\/]*) 6933 ac_cv_path_PERL="$PERL" # Let the user override the test with a path. 6934 ;; 6935 *) 6936 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6937as_dummy="/usr/local/bin:/opt/local/bin:/usr/local/gnu/bin:${PATH}" 6938for as_dir in $as_dummy 6939do 6940 IFS=$as_save_IFS 6941 test -z "$as_dir" && as_dir=. 6942 for ac_exec_ext in '' $ac_executable_extensions; do 6943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6944 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" 6945 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6946 break 2 6947 fi 6948done 6949 done 6950IFS=$as_save_IFS 6951 6952 ;; 6953esac 6954fi 6955PERL=$ac_cv_path_PERL 6956if test -n "$PERL"; then 6957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 6958$as_echo "$PERL" >&6; } 6959else 6960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6961$as_echo "no" >&6; } 6962fi 6963 6964 6965 test -n "$PERL" && break 6966done 6967test -n "$PERL" || PERL="false" 6968 6969if test "$PERL" = "false"; then 6970 ac_cv_path_PERL=false 6971 PERL=false 6972fi 6973 6974if test "$ac_cv_path_PERL" = false; then 6975 as_fn_error $? "Perl version 5 is required to build the emulator!" "$LINENO" 5 6976fi 6977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 6978$as_echo_n "checking whether ln -s works... " >&6; } 6979LN_S=$as_ln_s 6980if test "$LN_S" = "ln -s"; then 6981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6982$as_echo "yes" >&6; } 6983else 6984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 6985$as_echo "no, using $LN_S" >&6; } 6986fi 6987 6988 6989 6990if test -n "$ac_tool_prefix"; then 6991 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 6992set dummy ${ac_tool_prefix}ar; ac_word=$2 6993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6994$as_echo_n "checking for $ac_word... " >&6; } 6995if ${ac_cv_prog_AR+:} false; then : 6996 $as_echo_n "(cached) " >&6 6997else 6998 if test -n "$AR"; then 6999 ac_cv_prog_AR="$AR" # Let the user override the test. 7000else 7001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7002for as_dir in $PATH 7003do 7004 IFS=$as_save_IFS 7005 test -z "$as_dir" && as_dir=. 7006 for ac_exec_ext in '' $ac_executable_extensions; do 7007 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7008 ac_cv_prog_AR="${ac_tool_prefix}ar" 7009 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7010 break 2 7011 fi 7012done 7013 done 7014IFS=$as_save_IFS 7015 7016fi 7017fi 7018AR=$ac_cv_prog_AR 7019if test -n "$AR"; then 7020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 7021$as_echo "$AR" >&6; } 7022else 7023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7024$as_echo "no" >&6; } 7025fi 7026 7027 7028fi 7029if test -z "$ac_cv_prog_AR"; then 7030 ac_ct_AR=$AR 7031 # Extract the first word of "ar", so it can be a program name with args. 7032set dummy ar; ac_word=$2 7033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7034$as_echo_n "checking for $ac_word... " >&6; } 7035if ${ac_cv_prog_ac_ct_AR+:} false; then : 7036 $as_echo_n "(cached) " >&6 7037else 7038 if test -n "$ac_ct_AR"; then 7039 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 7040else 7041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7042for as_dir in $PATH 7043do 7044 IFS=$as_save_IFS 7045 test -z "$as_dir" && as_dir=. 7046 for ac_exec_ext in '' $ac_executable_extensions; do 7047 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7048 ac_cv_prog_ac_ct_AR="ar" 7049 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7050 break 2 7051 fi 7052done 7053 done 7054IFS=$as_save_IFS 7055 7056fi 7057fi 7058ac_ct_AR=$ac_cv_prog_ac_ct_AR 7059if test -n "$ac_ct_AR"; then 7060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 7061$as_echo "$ac_ct_AR" >&6; } 7062else 7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7064$as_echo "no" >&6; } 7065fi 7066 7067 if test "x$ac_ct_AR" = x; then 7068 AR="false" 7069 else 7070 case $cross_compiling:$ac_tool_warned in 7071yes:) 7072{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 7073$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 7074ac_tool_warned=yes ;; 7075esac 7076 AR=$ac_ct_AR 7077 fi 7078else 7079 AR="$ac_cv_prog_AR" 7080fi 7081 7082if test "$ac_cv_prog_AR" = false; then 7083 as_fn_error $? "No 'ar' command found in PATH" "$LINENO" 5 7084fi 7085 7086# 7087# Get programs needed for building the documentation 7088# 7089 7090## Delete previous failed configure results 7091if test -f doc/CONF_INFO; then 7092 rm -f doc/CONF_INFO 7093fi 7094 7095for ac_prog in xsltproc 7096do 7097 # Extract the first word of "$ac_prog", so it can be a program name with args. 7098set dummy $ac_prog; ac_word=$2 7099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7100$as_echo_n "checking for $ac_word... " >&6; } 7101if ${ac_cv_prog_XSLTPROC+:} false; then : 7102 $as_echo_n "(cached) " >&6 7103else 7104 if test -n "$XSLTPROC"; then 7105 ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test. 7106else 7107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7108for as_dir in $PATH 7109do 7110 IFS=$as_save_IFS 7111 test -z "$as_dir" && as_dir=. 7112 for ac_exec_ext in '' $ac_executable_extensions; do 7113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7114 ac_cv_prog_XSLTPROC="$ac_prog" 7115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7116 break 2 7117 fi 7118done 7119 done 7120IFS=$as_save_IFS 7121 7122fi 7123fi 7124XSLTPROC=$ac_cv_prog_XSLTPROC 7125if test -n "$XSLTPROC"; then 7126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 7127$as_echo "$XSLTPROC" >&6; } 7128else 7129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7130$as_echo "no" >&6; } 7131fi 7132 7133 7134 test -n "$XSLTPROC" && break 7135done 7136 7137if test -z "$XSLTPROC"; then 7138 echo "xsltproc" >> doc/CONF_INFO 7139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No 'xsltproc' command found: the documentation cannot be built" >&5 7140$as_echo "$as_me: WARNING: No 'xsltproc' command found: the documentation cannot be built" >&2;} 7141fi 7142 7143for ac_prog in fop 7144do 7145 # Extract the first word of "$ac_prog", so it can be a program name with args. 7146set dummy $ac_prog; ac_word=$2 7147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7148$as_echo_n "checking for $ac_word... " >&6; } 7149if ${ac_cv_prog_FOP+:} false; then : 7150 $as_echo_n "(cached) " >&6 7151else 7152 if test -n "$FOP"; then 7153 ac_cv_prog_FOP="$FOP" # Let the user override the test. 7154else 7155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7156for as_dir in $PATH 7157do 7158 IFS=$as_save_IFS 7159 test -z "$as_dir" && as_dir=. 7160 for ac_exec_ext in '' $ac_executable_extensions; do 7161 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7162 ac_cv_prog_FOP="$ac_prog" 7163 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7164 break 2 7165 fi 7166done 7167 done 7168IFS=$as_save_IFS 7169 7170fi 7171fi 7172FOP=$ac_cv_prog_FOP 7173if test -n "$FOP"; then 7174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5 7175$as_echo "$FOP" >&6; } 7176else 7177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7178$as_echo "no" >&6; } 7179fi 7180 7181 7182 test -n "$FOP" && break 7183done 7184 7185if test -z "$FOP"; then 7186 FOP="$ERL_TOP/make/fakefop" 7187 echo "fop" >> doc/CONF_INFO 7188 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No 'fop' command found: going to generate placeholder PDF files" >&5 7189$as_echo "$as_me: WARNING: No 'fop' command found: going to generate placeholder PDF files" >&2;} 7190fi 7191 7192for ac_prog in xmllint 7193do 7194 # Extract the first word of "$ac_prog", so it can be a program name with args. 7195set dummy $ac_prog; ac_word=$2 7196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7197$as_echo_n "checking for $ac_word... " >&6; } 7198if ${ac_cv_prog_XMLLINT+:} false; then : 7199 $as_echo_n "(cached) " >&6 7200else 7201 if test -n "$XMLLINT"; then 7202 ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test. 7203else 7204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7205for as_dir in $PATH 7206do 7207 IFS=$as_save_IFS 7208 test -z "$as_dir" && as_dir=. 7209 for ac_exec_ext in '' $ac_executable_extensions; do 7210 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7211 ac_cv_prog_XMLLINT="$ac_prog" 7212 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 7213 break 2 7214 fi 7215done 7216 done 7217IFS=$as_save_IFS 7218 7219fi 7220fi 7221XMLLINT=$ac_cv_prog_XMLLINT 7222if test -n "$XMLLINT"; then 7223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 7224$as_echo "$XMLLINT" >&6; } 7225else 7226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7227$as_echo "no" >&6; } 7228fi 7229 7230 7231 test -n "$XMLLINT" && break 7232done 7233 7234if test -z "$XMLLINT"; then 7235 echo "xmllint" >> doc/CONF_INFO 7236 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No 'xmllint' command found: can't run the xmllint target for the documentation" >&5 7237$as_echo "$as_me: WARNING: No 'xmllint' command found: can't run the xmllint target for the documentation" >&2;} 7238fi 7239 7240case $host in 7241 *-*-solaris*|free_source) 7242 if test -x /usr/ucb/install; then 7243 INSTALL="/usr/ucb/install -c" 7244 fi 7245 ;; 7246 *) 7247 ;; 7248esac 7249# Find a good install program. We prefer a C program (faster), 7250# so one script is as good as another. But avoid the broken or 7251# incompatible versions: 7252# SysV /etc/install, /usr/sbin/install 7253# SunOS /usr/etc/install 7254# IRIX /sbin/install 7255# AIX /bin/install 7256# AmigaOS /C/install, which installs bootblocks on floppy discs 7257# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 7258# AFS /usr/afsws/bin/install, which mishandles nonexistent args 7259# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 7260# OS/2's system install, which has a completely different semantic 7261# ./install, which can be erroneously created by make from ./install.sh. 7262# Reject install programs that cannot install multiple files. 7263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 7264$as_echo_n "checking for a BSD-compatible install... " >&6; } 7265if test -z "$INSTALL"; then 7266if ${ac_cv_path_install+:} false; then : 7267 $as_echo_n "(cached) " >&6 7268else 7269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7270for as_dir in $PATH 7271do 7272 IFS=$as_save_IFS 7273 test -z "$as_dir" && as_dir=. 7274 # Account for people who put trailing slashes in PATH elements. 7275case $as_dir/ in #(( 7276 ./ | .// | /[cC]/* | \ 7277 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 7278 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 7279 /usr/ucb/* ) ;; 7280 *) 7281 # OSF1 and SCO ODT 3.0 have their own names for install. 7282 # Don't use installbsd from OSF since it installs stuff as root 7283 # by default. 7284 for ac_prog in ginstall scoinst install; do 7285 for ac_exec_ext in '' $ac_executable_extensions; do 7286 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then 7287 if test $ac_prog = install && 7288 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 7289 # AIX install. It has an incompatible calling convention. 7290 : 7291 elif test $ac_prog = install && 7292 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 7293 # program-specific install script used by HP pwplus--don't use. 7294 : 7295 else 7296 rm -rf conftest.one conftest.two conftest.dir 7297 echo one > conftest.one 7298 echo two > conftest.two 7299 mkdir conftest.dir 7300 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && 7301 test -s conftest.one && test -s conftest.two && 7302 test -s conftest.dir/conftest.one && 7303 test -s conftest.dir/conftest.two 7304 then 7305 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" 7306 break 3 7307 fi 7308 fi 7309 fi 7310 done 7311 done 7312 ;; 7313esac 7314 7315 done 7316IFS=$as_save_IFS 7317 7318rm -rf conftest.one conftest.two conftest.dir 7319 7320fi 7321 if test "${ac_cv_path_install+set}" = set; then 7322 INSTALL=$ac_cv_path_install 7323 else 7324 # As a last resort, use the slow shell script. Don't cache a 7325 # value for INSTALL within a source directory, because that will 7326 # break other packages using the cache if that directory is 7327 # removed, or if the value is a relative name. 7328 INSTALL=$ac_install_sh 7329 fi 7330fi 7331{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 7332$as_echo "$INSTALL" >&6; } 7333 7334# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 7335# It thinks the first close brace ends the variable substitution. 7336test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 7337 7338test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 7339 7340test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 7341 7342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a directory including parents" >&5 7343$as_echo_n "checking how to create a directory including parents... " >&6; } 7344if ${ac_cv_prog_mkdir_p+:} false; then : 7345 $as_echo_n "(cached) " >&6 7346else 7347 7348temp_name_base=config.$$ 7349temp_name=$temp_name_base/x/y/z 7350$INSTALL -d $temp_name >/dev/null 2>&1 7351ac_cv_prog_mkdir_p=none 7352if test -d $temp_name; then 7353 ac_cv_prog_mkdir_p="$INSTALL -d" 7354else 7355 mkdir -p $temp_name >/dev/null 2>&1 7356 if test -d $temp_name; then 7357 ac_cv_prog_mkdir_p="mkdir -p" 7358 fi 7359fi 7360rm -fr $temp_name_base 7361 7362fi 7363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_mkdir_p" >&5 7364$as_echo "$ac_cv_prog_mkdir_p" >&6; } 7365 7366case "${ac_cv_prog_mkdir_p}" in 7367 none) as_fn_error $? "don't know how create directories with parents" "$LINENO" 5 ;; 7368 *) INSTALL_DIR="$ac_cv_prog_mkdir_p" ;; 7369esac 7370 7371 7372case $host_os in 7373 darwin*) 7374 INSTALL_DATA="$INSTALL_DATA -p";; 7375 *) 7376 ;; 7377esac 7378 7379 7380case $build in 7381 *tile*) 7382 INSTALL_PROGRAM="$INSTALL_PROGRAM -m755" 7383 INSTALL_SCRIPT="$INSTALL_SCRIPT -m755" 7384 ;; 7385 *) 7386 ;; 7387esac 7388 7389 7390HCC='$(CC)' 7391HCFLAGS="" 7392HCFLAGS="$HCFLAGS -I${ERL_TOP}/erts/$host" 7393 7394LD='$(CC)' 7395LD_MAY_BE_WEAK=no 7396 7397 7398 7399 7400 7401case $host in 7402 win32) 7403 ERLANG_OSTYPE=win32 ;; 7404 *) 7405 ERLANG_OSTYPE=unix ;; 7406esac 7407 7408 7409 7410# Check how to export functions from the emulator executable, needed 7411# when dynamically loaded drivers are loaded (so that they can find 7412# emulator functions). 7413# OS'es with ELF executables using the GNU linker (Linux and recent *BSD, 7414# in rare cases Solaris) typically need '-Wl,-export-dynamic' (i.e. pass 7415# -export-dynamic to the linker - also known as -rdynamic and some other 7416# variants); some sysVr4 system(s) instead need(s) '-Wl,-Bexport'. 7417# AIX 4.x (perhaps only for x>=2) wants -Wl,-bexpall,-brtl and doesn't 7418# reliably return an error for others, thus we separate it out. 7419# Otherwise we assume that if the linker accepts the flag, it is needed. 7420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra flags needed to export symbols" >&5 7421$as_echo_n "checking for extra flags needed to export symbols... " >&6; } 7422DEXPORT="" 7423case $host_os in 7424 aix*|os400*) 7425 DEXPORT=-Wl,-bexpall,-brtl 7426 ;; 7427 bsdi*) 7428 DEXPORT="-rdynamic " 7429 ;; 7430 win32) 7431 DEXPORT="" 7432 ;; 7433 *) 7434 save_ldflags="$LDFLAGS" 7435 LDFLAGS=-Wl,-export-dynamic 7436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7437/* end confdefs.h. */ 7438 7439int 7440main () 7441{ 7442 7443 ; 7444 return 0; 7445} 7446_ACEOF 7447if ac_fn_c_try_link "$LINENO"; then : 7448 DEXPORT=-Wl,-export-dynamic 7449else 7450 7451 LDFLAGS=-Wl,-Bexport 7452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7453/* end confdefs.h. */ 7454 7455int 7456main () 7457{ 7458 7459 ; 7460 return 0; 7461} 7462_ACEOF 7463if ac_fn_c_try_link "$LINENO"; then : 7464 DEXPORT=-Wl,-Bexport 7465fi 7466rm -f core conftest.err conftest.$ac_objext \ 7467 conftest$ac_exeext conftest.$ac_ext 7468fi 7469rm -f core conftest.err conftest.$ac_objext \ 7470 conftest$ac_exeext conftest.$ac_ext 7471 LDFLAGS="$save_ldflags" 7472 ;; 7473esac 7474 7475case "x$DEXPORT" in 7476 "x") 7477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 7478$as_echo "none" >&6; };; 7479 *) 7480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEXPORT" >&5 7481$as_echo "$DEXPORT" >&6; };; 7482esac 7483 7484# Check for Solaris/ultrasparc /dev/perfmon interface 7485# (also needs gcc specific asm instructions) 7486case "${host}:${GCC}" in 7487 sparc-*-solaris*:yes) 7488 7489$as_echo "#define HAVE_SOLARIS_SPARC_PERFMON 1" >>confdefs.h 7490 7491 ;; 7492 *) 7493 ;; 7494esac 7495 7496 7497case $host_os in 7498 darwin19*) 7499 # Disable stack checking to avoid crashing with a segment fault 7500 # in macOS Catalina. 7501 { $as_echo "$as_me:${as_lineno-$LINENO}: Turning off stack check on macOS 10.15 (Catalina)" >&5 7502$as_echo "$as_me: Turning off stack check on macOS 10.15 (Catalina)" >&6;} 7503 CFLAGS="-fno-stack-check $CFLAGS" 7504 ;; 7505 *) 7506 ;; 7507esac 7508 7509 7510 7511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 7512$as_echo_n "checking for sin in -lm... " >&6; } 7513if ${ac_cv_lib_m_sin+:} false; then : 7514 $as_echo_n "(cached) " >&6 7515else 7516 ac_check_lib_save_LIBS=$LIBS 7517LIBS="-lm $LIBS" 7518cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7519/* end confdefs.h. */ 7520 7521/* Override any GCC internal prototype to avoid an error. 7522 Use char because int might match the return type of a GCC 7523 builtin and then its argument prototype would still apply. */ 7524#ifdef __cplusplus 7525extern "C" 7526#endif 7527char sin (); 7528int 7529main () 7530{ 7531return sin (); 7532 ; 7533 return 0; 7534} 7535_ACEOF 7536if ac_fn_c_try_link "$LINENO"; then : 7537 ac_cv_lib_m_sin=yes 7538else 7539 ac_cv_lib_m_sin=no 7540fi 7541rm -f core conftest.err conftest.$ac_objext \ 7542 conftest$ac_exeext conftest.$ac_ext 7543LIBS=$ac_check_lib_save_LIBS 7544fi 7545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 7546$as_echo "$ac_cv_lib_m_sin" >&6; } 7547if test "x$ac_cv_lib_m_sin" = xyes; then : 7548 cat >>confdefs.h <<_ACEOF 7549#define HAVE_LIBM 1 7550_ACEOF 7551 7552 LIBS="-lm $LIBS" 7553 7554fi 7555 7556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 7557$as_echo_n "checking for dlopen in -ldl... " >&6; } 7558if ${ac_cv_lib_dl_dlopen+:} false; then : 7559 $as_echo_n "(cached) " >&6 7560else 7561 ac_check_lib_save_LIBS=$LIBS 7562LIBS="-ldl $LIBS" 7563cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7564/* end confdefs.h. */ 7565 7566/* Override any GCC internal prototype to avoid an error. 7567 Use char because int might match the return type of a GCC 7568 builtin and then its argument prototype would still apply. */ 7569#ifdef __cplusplus 7570extern "C" 7571#endif 7572char dlopen (); 7573int 7574main () 7575{ 7576return dlopen (); 7577 ; 7578 return 0; 7579} 7580_ACEOF 7581if ac_fn_c_try_link "$LINENO"; then : 7582 ac_cv_lib_dl_dlopen=yes 7583else 7584 ac_cv_lib_dl_dlopen=no 7585fi 7586rm -f core conftest.err conftest.$ac_objext \ 7587 conftest$ac_exeext conftest.$ac_ext 7588LIBS=$ac_check_lib_save_LIBS 7589fi 7590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 7591$as_echo "$ac_cv_lib_dl_dlopen" >&6; } 7592if test "x$ac_cv_lib_dl_dlopen" = xyes; then : 7593 cat >>confdefs.h <<_ACEOF 7594#define HAVE_LIBDL 1 7595_ACEOF 7596 7597 LIBS="-ldl $LIBS" 7598 7599fi 7600 7601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 7602$as_echo_n "checking for main in -linet... " >&6; } 7603if ${ac_cv_lib_inet_main+:} false; then : 7604 $as_echo_n "(cached) " >&6 7605else 7606 ac_check_lib_save_LIBS=$LIBS 7607LIBS="-linet $LIBS" 7608cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7609/* end confdefs.h. */ 7610 7611 7612int 7613main () 7614{ 7615return main (); 7616 ; 7617 return 0; 7618} 7619_ACEOF 7620if ac_fn_c_try_link "$LINENO"; then : 7621 ac_cv_lib_inet_main=yes 7622else 7623 ac_cv_lib_inet_main=no 7624fi 7625rm -f core conftest.err conftest.$ac_objext \ 7626 conftest$ac_exeext conftest.$ac_ext 7627LIBS=$ac_check_lib_save_LIBS 7628fi 7629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 7630$as_echo "$ac_cv_lib_inet_main" >&6; } 7631if test "x$ac_cv_lib_inet_main" = xyes; then : 7632 cat >>confdefs.h <<_ACEOF 7633#define HAVE_LIBINET 1 7634_ACEOF 7635 7636 LIBS="-linet $LIBS" 7637 7638fi 7639 7640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 7641$as_echo_n "checking for openpty in -lutil... " >&6; } 7642if ${ac_cv_lib_util_openpty+:} false; then : 7643 $as_echo_n "(cached) " >&6 7644else 7645 ac_check_lib_save_LIBS=$LIBS 7646LIBS="-lutil $LIBS" 7647cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7648/* end confdefs.h. */ 7649 7650/* Override any GCC internal prototype to avoid an error. 7651 Use char because int might match the return type of a GCC 7652 builtin and then its argument prototype would still apply. */ 7653#ifdef __cplusplus 7654extern "C" 7655#endif 7656char openpty (); 7657int 7658main () 7659{ 7660return openpty (); 7661 ; 7662 return 0; 7663} 7664_ACEOF 7665if ac_fn_c_try_link "$LINENO"; then : 7666 ac_cv_lib_util_openpty=yes 7667else 7668 ac_cv_lib_util_openpty=no 7669fi 7670rm -f core conftest.err conftest.$ac_objext \ 7671 conftest$ac_exeext conftest.$ac_ext 7672LIBS=$ac_check_lib_save_LIBS 7673fi 7674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 7675$as_echo "$ac_cv_lib_util_openpty" >&6; } 7676if test "x$ac_cv_lib_util_openpty" = xyes; then : 7677 cat >>confdefs.h <<_ACEOF 7678#define HAVE_LIBUTIL 1 7679_ACEOF 7680 7681 LIBS="-lutil $LIBS" 7682 7683fi 7684 7685 7686 7687 7688# Check whether --enable-native-ethr-impls was given. 7689if test "${enable_native_ethr_impls+set}" = set; then : 7690 enableval=$enable_native_ethr_impls; case "$enableval" in 7691 no) disable_native_ethr_impls=yes ;; 7692 *) disable_native_ethr_impls=no ;; 7693 esac 7694else 7695 disable_native_ethr_impls=no 7696fi 7697 7698 7699test "X$disable_native_ethr_impls" = "Xyes" && 7700 7701$as_echo "#define ETHR_DISABLE_NATIVE_IMPLS 1" >>confdefs.h 7702 7703 7704# Check whether --enable-x86-out-of-order was given. 7705if test "${enable_x86_out_of_order+set}" = set; then : 7706 enableval=$enable_x86_out_of_order; 7707fi 7708 7709 7710# Check whether --enable-prefer-gcc-native-ethr-impls was given. 7711if test "${enable_prefer_gcc_native_ethr_impls+set}" = set; then : 7712 enableval=$enable_prefer_gcc_native_ethr_impls; case "$enableval" in 7713 yes) enable_prefer_gcc_native_ethr_impls=yes ;; 7714 *) enable_prefer_gcc_native_ethr_impls=no ;; 7715 esac 7716else 7717 enable_prefer_gcc_native_ethr_impls=no 7718fi 7719 7720 7721test $enable_prefer_gcc_native_ethr_impls = yes && 7722 7723$as_echo "#define ETHR_PREFER_GCC_NATIVE_IMPLS 1" >>confdefs.h 7724 7725 7726# Check whether --enable-trust-gcc-atomic-builtins-memory-barriers was given. 7727if test "${enable_trust_gcc_atomic_builtins_memory_barriers+set}" = set; then : 7728 enableval=$enable_trust_gcc_atomic_builtins_memory_barriers; case "$enableval" in 7729 yes) trust_gcc_atomic_builtins_mbs=1 ;; 7730 *) trust_gcc_atomic_builtins_mbs=0 ;; 7731 esac 7732else 7733 trust_gcc_atomic_builtins_mbs=0 7734fi 7735 7736 7737 7738cat >>confdefs.h <<_ACEOF 7739#define ETHR_TRUST_GCC_ATOMIC_BUILTINS_MEMORY_BARRIERS $trust_gcc_atomic_builtins_mbs 7740_ACEOF 7741 7742 7743 7744# Check whether --with-libatomic_ops was given. 7745if test "${with_libatomic_ops+set}" = set; then : 7746 withval=$with_libatomic_ops; 7747fi 7748 7749 7750 7751# Check whether --with-with_sparc_memory_order was given. 7752if test "${with_with_sparc_memory_order+set}" = set; then : 7753 withval=$with_with_sparc_memory_order; 7754fi 7755 7756 7757# Check whether --enable-ppc-lwsync-instruction was given. 7758if test "${enable_ppc_lwsync_instruction+set}" = set; then : 7759 enableval=$enable_ppc_lwsync_instruction; case "$enableval" in 7760 no) enable_lwsync=no ;; 7761 *) enable_lwsync=yes ;; 7762 esac 7763else 7764 7765 # The cast to long int works around a bug in the HP C Compiler 7766# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 7767# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 7768# This bug is HP SR number 8606223364. 7769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 7770$as_echo_n "checking size of void *... " >&6; } 7771if ${ac_cv_sizeof_void_p+:} false; then : 7772 $as_echo_n "(cached) " >&6 7773else 7774 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : 7775 7776else 7777 if test "$ac_cv_type_void_p" = yes; then 7778 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 7779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 7780as_fn_error 77 "cannot compute sizeof (void *) 7781See \`config.log' for more details" "$LINENO" 5; } 7782 else 7783 ac_cv_sizeof_void_p=0 7784 fi 7785fi 7786 7787fi 7788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 7789$as_echo "$ac_cv_sizeof_void_p" >&6; } 7790 7791 7792 7793cat >>confdefs.h <<_ACEOF 7794#define SIZEOF_VOID_P $ac_cv_sizeof_void_p 7795_ACEOF 7796 7797 7798 case $host_cpu-$ac_cv_sizeof_void_p in 7799 macppc-8|powerpc-8|ppc-8|powerpc64-8|ppc64-8|powerpc64le-8|ppc64le-8|"Power Macintosh"-8) 7800 enable_lwsync=yes;; 7801 *) 7802 enable_lwsync=undefined;; 7803 esac 7804fi 7805 7806 7807case $enable_lwsync in 7808 no) 7809 7810$as_echo "#define ETHR_PPC_HAVE_NO_LWSYNC 1" >>confdefs.h 7811 7812 ;; 7813 yes) 7814 7815$as_echo "#define ETHR_PPC_HAVE_LWSYNC 1" >>confdefs.h 7816 7817 ;; 7818 *) 7819 ;; 7820esac 7821 7822 7823 7824NEED_NPTL_PTHREAD_H=no 7825 7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native win32 threads" >&5 7827$as_echo_n "checking for native win32 threads... " >&6; } 7828if test "X$host_os" = "Xwin32"; then 7829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7830$as_echo "yes" >&6; } 7831 THR_DEFS="-DWIN32_THREADS" 7832 THR_LIBS= 7833 THR_LIB_NAME=win32_threads 7834 THR_LIB_TYPE=win32_threads 7835else 7836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7837$as_echo "no" >&6; } 7838 THR_DEFS= 7839 THR_LIBS= 7840 THR_LIB_NAME= 7841 THR_LIB_TYPE=posix_unknown 7842 7843 7844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 7845$as_echo_n "checking for pthread_create in -lpthread... " >&6; } 7846if ${ac_cv_lib_pthread_pthread_create+:} false; then : 7847 $as_echo_n "(cached) " >&6 7848else 7849 ac_check_lib_save_LIBS=$LIBS 7850LIBS="-lpthread $LIBS" 7851cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7852/* end confdefs.h. */ 7853 7854/* Override any GCC internal prototype to avoid an error. 7855 Use char because int might match the return type of a GCC 7856 builtin and then its argument prototype would still apply. */ 7857#ifdef __cplusplus 7858extern "C" 7859#endif 7860char pthread_create (); 7861int 7862main () 7863{ 7864return pthread_create (); 7865 ; 7866 return 0; 7867} 7868_ACEOF 7869if ac_fn_c_try_link "$LINENO"; then : 7870 ac_cv_lib_pthread_pthread_create=yes 7871else 7872 ac_cv_lib_pthread_pthread_create=no 7873fi 7874rm -f core conftest.err conftest.$ac_objext \ 7875 conftest$ac_exeext conftest.$ac_ext 7876LIBS=$ac_check_lib_save_LIBS 7877fi 7878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 7879$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } 7880if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : 7881 THR_LIBS="-lpthread" 7882fi 7883 7884 7885 if test "x$THR_LIBS" = "x"; then 7886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 7887$as_echo_n "checking for pthread_create in -lc_r... " >&6; } 7888if ${ac_cv_lib_c_r_pthread_create+:} false; then : 7889 $as_echo_n "(cached) " >&6 7890else 7891 ac_check_lib_save_LIBS=$LIBS 7892LIBS="-lc_r $LIBS" 7893cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7894/* end confdefs.h. */ 7895 7896/* Override any GCC internal prototype to avoid an error. 7897 Use char because int might match the return type of a GCC 7898 builtin and then its argument prototype would still apply. */ 7899#ifdef __cplusplus 7900extern "C" 7901#endif 7902char pthread_create (); 7903int 7904main () 7905{ 7906return pthread_create (); 7907 ; 7908 return 0; 7909} 7910_ACEOF 7911if ac_fn_c_try_link "$LINENO"; then : 7912 ac_cv_lib_c_r_pthread_create=yes 7913else 7914 ac_cv_lib_c_r_pthread_create=no 7915fi 7916rm -f core conftest.err conftest.$ac_objext \ 7917 conftest$ac_exeext conftest.$ac_ext 7918LIBS=$ac_check_lib_save_LIBS 7919fi 7920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 7921$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } 7922if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : 7923 THR_LIBS="-lc_r" 7924fi 7925 7926 fi 7927 7928 if test "x$THR_LIBS" = "x"; then 7929 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" 7930if test "x$ac_cv_func_pthread_create" = xyes; then : 7931 THR_LIBS="none_needed" 7932fi 7933 7934 fi 7935 7936 if test "x$THR_LIBS" = "x"; then 7937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the '-pthread' switch can be used" >&5 7938$as_echo_n "checking if the '-pthread' switch can be used... " >&6; } 7939 saved_cflags=$CFLAGS 7940 CFLAGS="$CFLAGS -pthread" 7941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7942/* end confdefs.h. */ 7943#include <pthread.h> 7944int 7945main () 7946{ 7947pthread_create((void*)0,(void*)0,(void*)0,(void*)0); 7948 ; 7949 return 0; 7950} 7951_ACEOF 7952if ac_fn_c_try_link "$LINENO"; then : 7953 THR_DEFS="-pthread" 7954 THR_LIBS="-pthread" 7955fi 7956rm -f core conftest.err conftest.$ac_objext \ 7957 conftest$ac_exeext conftest.$ac_ext 7958 CFLAGS=$saved_cflags 7959 if test "x$THR_LIBS" != "x"; then 7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7961$as_echo "yes" >&6; } 7962 else 7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 7964$as_echo "no" >&6; } 7965 fi 7966 fi 7967 7968 if test "x$THR_LIBS" != "x"; then 7969 THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS" 7970 THR_LIB_NAME=pthread 7971 if test "x$THR_LIBS" = "xnone_needed"; then 7972 THR_LIBS= 7973 fi 7974 case $host_os in 7975 solaris*) 7976 THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;; 7977 linux*) 7978 THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS" 7979 7980 7981if test "$cross_compiling" != "yes"; then 7982 # Extract the first word of "getconf", so it can be a program name with args. 7983set dummy getconf; ac_word=$2 7984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7985$as_echo_n "checking for $ac_word... " >&6; } 7986if ${ac_cv_prog_GETCONF+:} false; then : 7987 $as_echo_n "(cached) " >&6 7988else 7989 if test -n "$GETCONF"; then 7990 ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. 7991else 7992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7993for as_dir in $PATH 7994do 7995 IFS=$as_save_IFS 7996 test -z "$as_dir" && as_dir=. 7997 for ac_exec_ext in '' $ac_executable_extensions; do 7998 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 7999 ac_cv_prog_GETCONF="getconf" 8000 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8001 break 2 8002 fi 8003done 8004 done 8005IFS=$as_save_IFS 8006 8007 test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" 8008fi 8009fi 8010GETCONF=$ac_cv_prog_GETCONF 8011if test -n "$GETCONF"; then 8012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 8013$as_echo "$GETCONF" >&6; } 8014else 8015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8016$as_echo "no" >&6; } 8017fi 8018 8019 8020else 8021 host_getconf="$host_alias-getconf" 8022 # Extract the first word of "$host_getconf", so it can be a program name with args. 8023set dummy $host_getconf; ac_word=$2 8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8025$as_echo_n "checking for $ac_word... " >&6; } 8026if ${ac_cv_prog_GETCONF+:} false; then : 8027 $as_echo_n "(cached) " >&6 8028else 8029 if test -n "$GETCONF"; then 8030 ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. 8031else 8032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8033for as_dir in $PATH 8034do 8035 IFS=$as_save_IFS 8036 test -z "$as_dir" && as_dir=. 8037 for ac_exec_ext in '' $ac_executable_extensions; do 8038 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8039 ac_cv_prog_GETCONF="$host_getconf" 8040 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8041 break 2 8042 fi 8043done 8044 done 8045IFS=$as_save_IFS 8046 8047 test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" 8048fi 8049fi 8050GETCONF=$ac_cv_prog_GETCONF 8051if test -n "$GETCONF"; then 8052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 8053$as_echo "$GETCONF" >&6; } 8054else 8055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8056$as_echo "no" >&6; } 8057fi 8058 8059 8060 if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then 8061 GETCONF= 8062 prfx="$erl_xcomp_sysroot" 8063 if test -n "$ac_tool_prefix"; then 8064 # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args. 8065set dummy ${ac_tool_prefix}getconf; ac_word=$2 8066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8067$as_echo_n "checking for $ac_word... " >&6; } 8068if ${ac_cv_path_GETCONF+:} false; then : 8069 $as_echo_n "(cached) " >&6 8070else 8071 case $GETCONF in 8072 [\\/]* | ?:[\\/]*) 8073 ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. 8074 ;; 8075 *) 8076 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8077as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" 8078for as_dir in $as_dummy 8079do 8080 IFS=$as_save_IFS 8081 test -z "$as_dir" && as_dir=. 8082 for ac_exec_ext in '' $ac_executable_extensions; do 8083 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8084 ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext" 8085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8086 break 2 8087 fi 8088done 8089 done 8090IFS=$as_save_IFS 8091 8092 ;; 8093esac 8094fi 8095GETCONF=$ac_cv_path_GETCONF 8096if test -n "$GETCONF"; then 8097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 8098$as_echo "$GETCONF" >&6; } 8099else 8100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8101$as_echo "no" >&6; } 8102fi 8103 8104 8105fi 8106if test -z "$ac_cv_path_GETCONF"; then 8107 ac_pt_GETCONF=$GETCONF 8108 # Extract the first word of "getconf", so it can be a program name with args. 8109set dummy getconf; ac_word=$2 8110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8111$as_echo_n "checking for $ac_word... " >&6; } 8112if ${ac_cv_path_ac_pt_GETCONF+:} false; then : 8113 $as_echo_n "(cached) " >&6 8114else 8115 case $ac_pt_GETCONF in 8116 [\\/]* | ?:[\\/]*) 8117 ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path. 8118 ;; 8119 *) 8120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8121as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" 8122for as_dir in $as_dummy 8123do 8124 IFS=$as_save_IFS 8125 test -z "$as_dir" && as_dir=. 8126 for ac_exec_ext in '' $ac_executable_extensions; do 8127 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8128 ac_cv_path_ac_pt_GETCONF="$as_dir/$ac_word$ac_exec_ext" 8129 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8130 break 2 8131 fi 8132done 8133 done 8134IFS=$as_save_IFS 8135 8136 ;; 8137esac 8138fi 8139ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF 8140if test -n "$ac_pt_GETCONF"; then 8141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 8142$as_echo "$ac_pt_GETCONF" >&6; } 8143else 8144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8145$as_echo "no" >&6; } 8146fi 8147 8148 if test "x$ac_pt_GETCONF" = x; then 8149 GETCONF="false" 8150 else 8151 case $cross_compiling:$ac_tool_warned in 8152yes:) 8153{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8154$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8155ac_tool_warned=yes ;; 8156esac 8157 GETCONF=$ac_pt_GETCONF 8158 fi 8159else 8160 GETCONF="$ac_cv_path_GETCONF" 8161fi 8162 8163 fi 8164fi 8165 8166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Native POSIX Thread Library" >&5 8167$as_echo_n "checking for Native POSIX Thread Library... " >&6; } 8168 libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null` 8169 if test $? -eq 0; then 8170 case "$libpthr_vsn" in 8171 *nptl*|*NPTL*) nptl=yes;; 8172 *) nptl=no;; 8173 esac 8174 elif test "$cross_compiling" = "yes"; then 8175 case "$erl_xcomp_linux_nptl" in 8176 "") nptl=cross;; 8177 yes|no) nptl=$erl_xcomp_linux_nptl;; 8178 *) as_fn_error $? "Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl" "$LINENO" 5;; 8179 esac 8180 else 8181 nptl=no 8182 fi 8183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nptl" >&5 8184$as_echo "$nptl" >&6; } 8185 if test $nptl = cross; then 8186 nptl=yes 8187 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 8188$as_echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} 8189 fi 8190 if test $nptl = yes; then 8191 THR_LIB_TYPE=posix_nptl 8192 need_nptl_incldir=no 8193 ac_fn_c_check_header_mongrel "$LINENO" "nptl/pthread.h" "ac_cv_header_nptl_pthread_h" "$ac_includes_default" 8194if test "x$ac_cv_header_nptl_pthread_h" = xyes; then : 8195 need_nptl_incldir=yes 8196 NEED_NPTL_PTHREAD_H=yes 8197fi 8198 8199 8200 if test $need_nptl_incldir = yes; then 8201 # Ahh... 8202 nptl_path="$C_INCLUDE_PATH:$CPATH" 8203 if test X$cross_compiling != Xyes; then 8204 nptl_path="$nptl_path:/usr/local/include:/usr/include" 8205 else 8206 IROOT="$erl_xcomp_isysroot" 8207 test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot" 8208 test "$IROOT" != "" || as_fn_error $? "Don't know where to search for includes! Please set erl_xcomp_isysroot" "$LINENO" 5 8209 nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include" 8210 fi 8211 nptl_ws_path= 8212 save_ifs="$IFS"; IFS=":" 8213 for dir in $nptl_path; do 8214 if test "x$dir" != "x"; then 8215 nptl_ws_path="$nptl_ws_path $dir" 8216 fi 8217 done 8218 IFS=$save_ifs 8219 nptl_incldir= 8220 for dir in $nptl_ws_path; do 8221 as_ac_Header=`$as_echo "ac_cv_header_$dir/nptl/pthread.h" | $as_tr_sh` 8222ac_fn_c_check_header_mongrel "$LINENO" "$dir/nptl/pthread.h" "$as_ac_Header" "$ac_includes_default" 8223if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 8224 nptl_incldir=$dir/nptl 8225fi 8226 8227 8228 if test "x$nptl_incldir" != "x"; then 8229 THR_DEFS="$THR_DEFS -isystem $nptl_incldir" 8230 break 8231 fi 8232 done 8233 if test "x$nptl_incldir" = "x"; then 8234 as_fn_error $? "Failed to locate nptl system include directory" "$LINENO" 5 8235 fi 8236 fi 8237 fi 8238 ;; 8239 *) ;; 8240 esac 8241 8242 saved_cppflags=$CPPFLAGS 8243 CPPFLAGS="$CPPFLAGS $THR_DEFS" 8244 8245 8246 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 8247if test "x$ac_cv_header_pthread_h" = xyes; then : 8248 8249$as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h 8250 8251fi 8252 8253 8254 8255 ac_fn_c_check_header_mongrel "$LINENO" "pthread/mit/pthread.h" "ac_cv_header_pthread_mit_pthread_h" "$ac_includes_default" 8256if test "x$ac_cv_header_pthread_mit_pthread_h" = xyes; then : 8257 \ 8258 8259$as_echo "#define HAVE_MIT_PTHREAD_H 1" >>confdefs.h 8260 8261fi 8262 8263 8264 8265 CPPFLAGS=$saved_cppflags 8266 8267 fi 8268fi 8269 8270 8271 8272 8273ERTS_INTERNAL_X_LIBS= 8274 8275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 8276$as_echo_n "checking for kstat_open in -lkstat... " >&6; } 8277if ${ac_cv_lib_kstat_kstat_open+:} false; then : 8278 $as_echo_n "(cached) " >&6 8279else 8280 ac_check_lib_save_LIBS=$LIBS 8281LIBS="-lkstat $LIBS" 8282cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8283/* end confdefs.h. */ 8284 8285/* Override any GCC internal prototype to avoid an error. 8286 Use char because int might match the return type of a GCC 8287 builtin and then its argument prototype would still apply. */ 8288#ifdef __cplusplus 8289extern "C" 8290#endif 8291char kstat_open (); 8292int 8293main () 8294{ 8295return kstat_open (); 8296 ; 8297 return 0; 8298} 8299_ACEOF 8300if ac_fn_c_try_link "$LINENO"; then : 8301 ac_cv_lib_kstat_kstat_open=yes 8302else 8303 ac_cv_lib_kstat_kstat_open=no 8304fi 8305rm -f core conftest.err conftest.$ac_objext \ 8306 conftest$ac_exeext conftest.$ac_ext 8307LIBS=$ac_check_lib_save_LIBS 8308fi 8309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 8310$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } 8311if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : 8312 8313$as_echo "#define HAVE_KSTAT 1" >>confdefs.h 8314 8315ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat" 8316fi 8317 8318 8319 8320 8321 8322 8323 8324 if test "no" = "yes"; then 8325 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" 8326 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" 8327 high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" 8328 else 8329 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" 8330 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" 8331 high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" 8332 fi 8333 8334 case "try_find_pthread_compatible" in 8335 high_resolution) 8336 check_msg="high resolution " 8337 prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" 8338 ;; 8339 low_resolution) 8340 check_msg="low resolution " 8341 prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" 8342 ;; 8343 custom_resolution) 8344 check_msg="custom resolution " 8345 prefer_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_MONOTONIC" 8346 ;; 8347 *) 8348 check_msg="custom " 8349 prefer_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_MONOTONIC" 8350 ;; 8351 esac 8352 8353 clock_gettime_lib="" 8354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 8355$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 8356if ${ac_cv_lib_rt_clock_gettime+:} false; then : 8357 $as_echo_n "(cached) " >&6 8358else 8359 ac_check_lib_save_LIBS=$LIBS 8360LIBS="-lrt $LIBS" 8361cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8362/* end confdefs.h. */ 8363 8364/* Override any GCC internal prototype to avoid an error. 8365 Use char because int might match the return type of a GCC 8366 builtin and then its argument prototype would still apply. */ 8367#ifdef __cplusplus 8368extern "C" 8369#endif 8370char clock_gettime (); 8371int 8372main () 8373{ 8374return clock_gettime (); 8375 ; 8376 return 0; 8377} 8378_ACEOF 8379if ac_fn_c_try_link "$LINENO"; then : 8380 ac_cv_lib_rt_clock_gettime=yes 8381else 8382 ac_cv_lib_rt_clock_gettime=no 8383fi 8384rm -f core conftest.err conftest.$ac_objext \ 8385 conftest$ac_exeext conftest.$ac_ext 8386LIBS=$ac_check_lib_save_LIBS 8387fi 8388{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 8389$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 8390if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 8391 clock_gettime_lib="-lrt" 8392fi 8393 8394 8395 save_LIBS="$LIBS" 8396 LIBS="$LIBS $clock_gettime_lib" 8397 8398 if test "$LD_MAY_BE_WEAK" != "no"; then 8399 trust_test="#error May not be there due to weak linking" 8400 else 8401 trust_test="" 8402 fi 8403 8404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 8405$as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } 8406if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : 8407 $as_echo_n "(cached) " >&6 8408else 8409 8410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8411/* end confdefs.h. */ 8412 8413#include <time.h> 8414$trust_test 8415 8416int 8417main () 8418{ 8419 8420 struct timespec ts; 8421 long long result; 8422 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); 8423 result = ((long long) ts.tv_sec) * 1000000000LL + 8424 ((long long) ts.tv_nsec); 8425 8426 ; 8427 return 0; 8428} 8429_ACEOF 8430if ac_fn_c_try_link "$LINENO"; then : 8431 erl_cv_clock_gettime_monotonic_raw=yes 8432else 8433 erl_cv_clock_gettime_monotonic_raw=no 8434fi 8435rm -f core conftest.err conftest.$ac_objext \ 8436 conftest$ac_exeext conftest.$ac_ext 8437 8438fi 8439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 8440$as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } 8441 8442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 8443$as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } 8444if ${erl_cv_clock_gettime_monotonic_try_find_pthread_compatible+:} false; then : 8445 $as_echo_n "(cached) " >&6 8446else 8447 8448 for clock_type in $prefer_resolution_clock_gettime_monotonic $default_resolution_clock_gettime_monotonic $high_resolution_clock_gettime_monotonic $low_resolution_clock_gettime_monotonic; do 8449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8450/* end confdefs.h. */ 8451 8452#include <time.h> 8453$trust_test 8454 8455int 8456main () 8457{ 8458 8459 struct timespec ts; 8460 long long result; 8461 clock_gettime($clock_type,&ts); 8462 result = ((long long) ts.tv_sec) * 1000000000LL + 8463 ((long long) ts.tv_nsec); 8464 8465 ; 8466 return 0; 8467} 8468_ACEOF 8469if ac_fn_c_try_link "$LINENO"; then : 8470 erl_cv_clock_gettime_monotonic_try_find_pthread_compatible=$clock_type 8471else 8472 erl_cv_clock_gettime_monotonic_try_find_pthread_compatible=no 8473fi 8474rm -f core conftest.err conftest.$ac_objext \ 8475 conftest$ac_exeext conftest.$ac_ext 8476 test $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible = no || break 8477 done 8478 8479fi 8480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible" >&5 8481$as_echo "$erl_cv_clock_gettime_monotonic_try_find_pthread_compatible" >&6; } 8482 8483 LIBS="$save_LIBS" 8484 8485 if test "$LD_MAY_BE_WEAK" != "no"; then 8486 for ac_func in clock_get_attributes gethrtime 8487do : 8488 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 8489ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 8490if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 8491 cat >>confdefs.h <<_ACEOF 8492#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 8493_ACEOF 8494 8495fi 8496done 8497 8498 else 8499 for ac_func in clock_getres clock_get_attributes gethrtime 8500do : 8501 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 8502ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 8503if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 8504 cat >>confdefs.h <<_ACEOF 8505#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 8506_ACEOF 8507 8508fi 8509done 8510 8511 fi 8512 8513 8514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 8515$as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } 8516if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : 8517 $as_echo_n "(cached) " >&6 8518else 8519 8520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8521/* end confdefs.h. */ 8522 8523#include <mach/clock.h> 8524#include <mach/mach.h> 8525 8526int 8527main () 8528{ 8529 8530 kern_return_t res; 8531 clock_serv_t clk_srv; 8532 mach_timespec_t time_spec; 8533 8534 host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); 8535 res = clock_get_time(clk_srv, &time_spec); 8536 mach_port_deallocate(mach_task_self(), clk_srv); 8537 8538 ; 8539 return 0; 8540} 8541_ACEOF 8542if ac_fn_c_try_compile "$LINENO"; then : 8543 erl_cv_mach_clock_get_time_monotonic=yes 8544else 8545 erl_cv_mach_clock_get_time_monotonic=no 8546fi 8547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8548 8549fi 8550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 8551$as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } 8552 8553 erl_corrected_monotonic_clock=no 8554 case $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in 8555 *-*-*-win32) 8556 erl_monotonic_clock_func=WindowsAPI 8557 ;; 8558 CLOCK_*-*-*-linux*) 8559 case $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible-$erl_cv_clock_gettime_monotonic_raw in 8560 CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) 8561 erl_corrected_monotonic_clock=yes 8562 ;; 8563 *) 8564 # We don't trust CLOCK_MONOTONIC to be NTP 8565 # adjusted on linux systems that do not have 8566 # CLOCK_MONOTONIC_RAW (although it seems to 8567 # be...) 8568 ;; 8569 esac 8570 erl_monotonic_clock_func=clock_gettime 8571 ;; 8572 no-no-no-linux*) 8573 erl_monotonic_clock_func=times 8574 ;; 8575 CLOCK_*-*-*-*) 8576 erl_monotonic_clock_func=clock_gettime 8577 ;; 8578 no-yes-*-*) 8579 erl_monotonic_clock_func=gethrtime 8580 ;; 8581 no-no-yes-*) 8582 erl_monotonic_clock_func=mach_clock_get_time 8583 ;; 8584 no-no-no-*) 8585 erl_monotonic_clock_func=none 8586 ;; 8587 esac 8588 8589 erl_monotonic_clock_low_resolution=no 8590 erl_monotonic_clock_lib= 8591 erl_monotonic_clock_id= 8592 case $erl_monotonic_clock_func in 8593 clock_gettime) 8594 erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_try_find_pthread_compatible 8595 for low_res_id in $low_resolution_clock_gettime_monotonic; do 8596 if test $erl_monotonic_clock_id = $low_res_id; then 8597 erl_monotonic_clock_low_resolution=yes 8598 break 8599 fi 8600 done 8601 erl_monotonic_clock_lib=$clock_gettime_lib 8602 ;; 8603 mach_clock_get_time) 8604 erl_monotonic_clock_id=SYSTEM_CLOCK 8605 ;; 8606 times) 8607 erl_monotonic_clock_low_resolution=yes 8608 ;; 8609 *) 8610 ;; 8611 esac 8612 8613 8614 8615case $erl_monotonic_clock_func in 8616 clock_gettime) 8617 8618$as_echo "#define ETHR_HAVE_CLOCK_GETTIME_MONOTONIC 1" >>confdefs.h 8619 8620 ;; 8621 mach_clock_get_time) 8622 8623$as_echo "#define ETHR_HAVE_MACH_CLOCK_GET_TIME 1" >>confdefs.h 8624 8625 ;; 8626 gethrtime) 8627 8628$as_echo "#define ETHR_HAVE_GETHRTIME 1" >>confdefs.h 8629 8630 ;; 8631 *) 8632 ;; 8633esac 8634 8635if test "x$erl_monotonic_clock_id" != "x"; then 8636 8637cat >>confdefs.h <<_ACEOF 8638#define ETHR_MONOTONIC_CLOCK_ID $erl_monotonic_clock_id 8639_ACEOF 8640 8641fi 8642 8643ethr_native_atomic_implementation=none 8644ethr_have_native_atomics=no 8645ethr_have_native_spinlock=no 8646ETHR_THR_LIB_BASE="$THR_LIB_NAME" 8647ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE" 8648ETHR_DEFS="$THR_DEFS" 8649ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS $erl_monotonic_clock_lib" 8650ETHR_LIBS= 8651ETHR_LIB_NAME= 8652 8653ethr_modified_default_stack_size= 8654 8655 8656# Check whether --with-threadnames was given. 8657if test "${with_threadnames+set}" = set; then : 8658 withval=$with_threadnames; 8659else 8660 with_threadnames=yes 8661fi 8662 8663 8664ethr_lib_name=ethread 8665 8666case "$THR_LIB_NAME" in 8667 8668 win32_threads) 8669 ETHR_THR_LIB_BASE_DIR=win 8670 # * _WIN32_WINNT >= 0x0400 is needed for 8671 # TryEnterCriticalSection 8672 # * _WIN32_WINNT >= 0x0403 is needed for 8673 # InitializeCriticalSectionAndSpinCount 8674 # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403. 8675 # 8676 # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it 8677 # and save it in ETHR_DEFS. 8678 found_win32_winnt=no 8679 for cppflag in $CPPFLAGS; do 8680 case $cppflag in 8681 -DWINVER*) 8682 ETHR_DEFS="$ETHR_DEFS $cppflag" 8683 ;; 8684 -D_WIN32_WINNT*) 8685 ETHR_DEFS="$ETHR_DEFS $cppflag" 8686 found_win32_winnt=yes 8687 ;; 8688 *) 8689 ;; 8690 esac 8691 done 8692 if test $found_win32_winnt = no; then 8693 as_fn_error $? "-D_WIN32_WINNT missing in CPPFLAGS" "$LINENO" 5 8694 fi 8695 8696 8697$as_echo "#define ETHR_WIN32_THREADS 1" >>confdefs.h 8698 8699 8700 if test "X$disable_native_ethr_impls" = "Xyes"; then 8701 have_interlocked_op=no 8702 ethr_have_native_atomics=no 8703 else 8704 8705 ilckd="_InterlockedDecrement" 8706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 8707$as_echo_n "checking for ${ilckd}()... " >&6; } 8708 case "1" in 8709 "1") ilckd_call="${ilckd}(var);";; 8710 "2") ilckd_call="${ilckd}(var, (long) 0);";; 8711 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 8712 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 8713 esac 8714 have_interlocked_op=no 8715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8716/* end confdefs.h. */ 8717 8718 #define WIN32_LEAN_AND_MEAN 8719 #include <windows.h> 8720 #include <intrin.h> 8721 8722int 8723main () 8724{ 8725 8726 volatile long *var; 8727 volatile long arr[2]; 8728 8729 $ilckd_call 8730 return 0; 8731 8732 ; 8733 return 0; 8734} 8735_ACEOF 8736if ac_fn_c_try_link "$LINENO"; then : 8737 have_interlocked_op=yes 8738fi 8739rm -f core conftest.err conftest.$ac_objext \ 8740 conftest$ac_exeext conftest.$ac_ext 8741 test $have_interlocked_op = yes && 8742cat >>confdefs.h <<_ACEOF 8743#define ETHR_HAVE__INTERLOCKEDDECREMENT 1 8744_ACEOF 8745 8746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 8747$as_echo "$have_interlocked_op" >&6; } 8748 8749 8750 ilckd="_InterlockedDecrement_rel" 8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 8752$as_echo_n "checking for ${ilckd}()... " >&6; } 8753 case "1" in 8754 "1") ilckd_call="${ilckd}(var);";; 8755 "2") ilckd_call="${ilckd}(var, (long) 0);";; 8756 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 8757 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 8758 esac 8759 have_interlocked_op=no 8760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8761/* end confdefs.h. */ 8762 8763 #define WIN32_LEAN_AND_MEAN 8764 #include <windows.h> 8765 #include <intrin.h> 8766 8767int 8768main () 8769{ 8770 8771 volatile long *var; 8772 volatile long arr[2]; 8773 8774 $ilckd_call 8775 return 0; 8776 8777 ; 8778 return 0; 8779} 8780_ACEOF 8781if ac_fn_c_try_link "$LINENO"; then : 8782 have_interlocked_op=yes 8783fi 8784rm -f core conftest.err conftest.$ac_objext \ 8785 conftest$ac_exeext conftest.$ac_ext 8786 test $have_interlocked_op = yes && 8787cat >>confdefs.h <<_ACEOF 8788#define ETHR_HAVE__INTERLOCKEDDECREMENT_REL 1 8789_ACEOF 8790 8791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 8792$as_echo "$have_interlocked_op" >&6; } 8793 8794 8795 ilckd="_InterlockedIncrement" 8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 8797$as_echo_n "checking for ${ilckd}()... " >&6; } 8798 case "1" in 8799 "1") ilckd_call="${ilckd}(var);";; 8800 "2") ilckd_call="${ilckd}(var, (long) 0);";; 8801 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 8802 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 8803 esac 8804 have_interlocked_op=no 8805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8806/* end confdefs.h. */ 8807 8808 #define WIN32_LEAN_AND_MEAN 8809 #include <windows.h> 8810 #include <intrin.h> 8811 8812int 8813main () 8814{ 8815 8816 volatile long *var; 8817 volatile long arr[2]; 8818 8819 $ilckd_call 8820 return 0; 8821 8822 ; 8823 return 0; 8824} 8825_ACEOF 8826if ac_fn_c_try_link "$LINENO"; then : 8827 have_interlocked_op=yes 8828fi 8829rm -f core conftest.err conftest.$ac_objext \ 8830 conftest$ac_exeext conftest.$ac_ext 8831 test $have_interlocked_op = yes && 8832cat >>confdefs.h <<_ACEOF 8833#define ETHR_HAVE__INTERLOCKEDINCREMENT 1 8834_ACEOF 8835 8836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 8837$as_echo "$have_interlocked_op" >&6; } 8838 8839 8840 ilckd="_InterlockedIncrement_acq" 8841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 8842$as_echo_n "checking for ${ilckd}()... " >&6; } 8843 case "1" in 8844 "1") ilckd_call="${ilckd}(var);";; 8845 "2") ilckd_call="${ilckd}(var, (long) 0);";; 8846 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 8847 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 8848 esac 8849 have_interlocked_op=no 8850 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8851/* end confdefs.h. */ 8852 8853 #define WIN32_LEAN_AND_MEAN 8854 #include <windows.h> 8855 #include <intrin.h> 8856 8857int 8858main () 8859{ 8860 8861 volatile long *var; 8862 volatile long arr[2]; 8863 8864 $ilckd_call 8865 return 0; 8866 8867 ; 8868 return 0; 8869} 8870_ACEOF 8871if ac_fn_c_try_link "$LINENO"; then : 8872 have_interlocked_op=yes 8873fi 8874rm -f core conftest.err conftest.$ac_objext \ 8875 conftest$ac_exeext conftest.$ac_ext 8876 test $have_interlocked_op = yes && 8877cat >>confdefs.h <<_ACEOF 8878#define ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ 1 8879_ACEOF 8880 8881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 8882$as_echo "$have_interlocked_op" >&6; } 8883 8884 8885 ilckd="_InterlockedExchangeAdd" 8886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 8887$as_echo_n "checking for ${ilckd}()... " >&6; } 8888 case "2" in 8889 "1") ilckd_call="${ilckd}(var);";; 8890 "2") ilckd_call="${ilckd}(var, (long) 0);";; 8891 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 8892 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 8893 esac 8894 have_interlocked_op=no 8895 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8896/* end confdefs.h. */ 8897 8898 #define WIN32_LEAN_AND_MEAN 8899 #include <windows.h> 8900 #include <intrin.h> 8901 8902int 8903main () 8904{ 8905 8906 volatile long *var; 8907 volatile long arr[2]; 8908 8909 $ilckd_call 8910 return 0; 8911 8912 ; 8913 return 0; 8914} 8915_ACEOF 8916if ac_fn_c_try_link "$LINENO"; then : 8917 have_interlocked_op=yes 8918fi 8919rm -f core conftest.err conftest.$ac_objext \ 8920 conftest$ac_exeext conftest.$ac_ext 8921 test $have_interlocked_op = yes && 8922cat >>confdefs.h <<_ACEOF 8923#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD 1 8924_ACEOF 8925 8926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 8927$as_echo "$have_interlocked_op" >&6; } 8928 8929 8930 ilckd="_InterlockedExchangeAdd_acq" 8931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 8932$as_echo_n "checking for ${ilckd}()... " >&6; } 8933 case "2" in 8934 "1") ilckd_call="${ilckd}(var);";; 8935 "2") ilckd_call="${ilckd}(var, (long) 0);";; 8936 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 8937 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 8938 esac 8939 have_interlocked_op=no 8940 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8941/* end confdefs.h. */ 8942 8943 #define WIN32_LEAN_AND_MEAN 8944 #include <windows.h> 8945 #include <intrin.h> 8946 8947int 8948main () 8949{ 8950 8951 volatile long *var; 8952 volatile long arr[2]; 8953 8954 $ilckd_call 8955 return 0; 8956 8957 ; 8958 return 0; 8959} 8960_ACEOF 8961if ac_fn_c_try_link "$LINENO"; then : 8962 have_interlocked_op=yes 8963fi 8964rm -f core conftest.err conftest.$ac_objext \ 8965 conftest$ac_exeext conftest.$ac_ext 8966 test $have_interlocked_op = yes && 8967cat >>confdefs.h <<_ACEOF 8968#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ 1 8969_ACEOF 8970 8971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 8972$as_echo "$have_interlocked_op" >&6; } 8973 8974 8975 ilckd="_InterlockedAnd" 8976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 8977$as_echo_n "checking for ${ilckd}()... " >&6; } 8978 case "2" in 8979 "1") ilckd_call="${ilckd}(var);";; 8980 "2") ilckd_call="${ilckd}(var, (long) 0);";; 8981 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 8982 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 8983 esac 8984 have_interlocked_op=no 8985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8986/* end confdefs.h. */ 8987 8988 #define WIN32_LEAN_AND_MEAN 8989 #include <windows.h> 8990 #include <intrin.h> 8991 8992int 8993main () 8994{ 8995 8996 volatile long *var; 8997 volatile long arr[2]; 8998 8999 $ilckd_call 9000 return 0; 9001 9002 ; 9003 return 0; 9004} 9005_ACEOF 9006if ac_fn_c_try_link "$LINENO"; then : 9007 have_interlocked_op=yes 9008fi 9009rm -f core conftest.err conftest.$ac_objext \ 9010 conftest$ac_exeext conftest.$ac_ext 9011 test $have_interlocked_op = yes && 9012cat >>confdefs.h <<_ACEOF 9013#define ETHR_HAVE__INTERLOCKEDAND 1 9014_ACEOF 9015 9016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9017$as_echo "$have_interlocked_op" >&6; } 9018 9019 9020 ilckd="_InterlockedOr" 9021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9022$as_echo_n "checking for ${ilckd}()... " >&6; } 9023 case "2" in 9024 "1") ilckd_call="${ilckd}(var);";; 9025 "2") ilckd_call="${ilckd}(var, (long) 0);";; 9026 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 9027 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 9028 esac 9029 have_interlocked_op=no 9030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9031/* end confdefs.h. */ 9032 9033 #define WIN32_LEAN_AND_MEAN 9034 #include <windows.h> 9035 #include <intrin.h> 9036 9037int 9038main () 9039{ 9040 9041 volatile long *var; 9042 volatile long arr[2]; 9043 9044 $ilckd_call 9045 return 0; 9046 9047 ; 9048 return 0; 9049} 9050_ACEOF 9051if ac_fn_c_try_link "$LINENO"; then : 9052 have_interlocked_op=yes 9053fi 9054rm -f core conftest.err conftest.$ac_objext \ 9055 conftest$ac_exeext conftest.$ac_ext 9056 test $have_interlocked_op = yes && 9057cat >>confdefs.h <<_ACEOF 9058#define ETHR_HAVE__INTERLOCKEDOR 1 9059_ACEOF 9060 9061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9062$as_echo "$have_interlocked_op" >&6; } 9063 9064 9065 ilckd="_InterlockedExchange" 9066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9067$as_echo_n "checking for ${ilckd}()... " >&6; } 9068 case "2" in 9069 "1") ilckd_call="${ilckd}(var);";; 9070 "2") ilckd_call="${ilckd}(var, (long) 0);";; 9071 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 9072 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 9073 esac 9074 have_interlocked_op=no 9075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9076/* end confdefs.h. */ 9077 9078 #define WIN32_LEAN_AND_MEAN 9079 #include <windows.h> 9080 #include <intrin.h> 9081 9082int 9083main () 9084{ 9085 9086 volatile long *var; 9087 volatile long arr[2]; 9088 9089 $ilckd_call 9090 return 0; 9091 9092 ; 9093 return 0; 9094} 9095_ACEOF 9096if ac_fn_c_try_link "$LINENO"; then : 9097 have_interlocked_op=yes 9098fi 9099rm -f core conftest.err conftest.$ac_objext \ 9100 conftest$ac_exeext conftest.$ac_ext 9101 test $have_interlocked_op = yes && 9102cat >>confdefs.h <<_ACEOF 9103#define ETHR_HAVE__INTERLOCKEDEXCHANGE 1 9104_ACEOF 9105 9106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9107$as_echo "$have_interlocked_op" >&6; } 9108 9109 9110 ilckd="_InterlockedCompareExchange" 9111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9112$as_echo_n "checking for ${ilckd}()... " >&6; } 9113 case "3" in 9114 "1") ilckd_call="${ilckd}(var);";; 9115 "2") ilckd_call="${ilckd}(var, (long) 0);";; 9116 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 9117 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 9118 esac 9119 have_interlocked_op=no 9120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9121/* end confdefs.h. */ 9122 9123 #define WIN32_LEAN_AND_MEAN 9124 #include <windows.h> 9125 #include <intrin.h> 9126 9127int 9128main () 9129{ 9130 9131 volatile long *var; 9132 volatile long arr[2]; 9133 9134 $ilckd_call 9135 return 0; 9136 9137 ; 9138 return 0; 9139} 9140_ACEOF 9141if ac_fn_c_try_link "$LINENO"; then : 9142 have_interlocked_op=yes 9143fi 9144rm -f core conftest.err conftest.$ac_objext \ 9145 conftest$ac_exeext conftest.$ac_ext 9146 test $have_interlocked_op = yes && 9147cat >>confdefs.h <<_ACEOF 9148#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE 1 9149_ACEOF 9150 9151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9152$as_echo "$have_interlocked_op" >&6; } 9153 9154 test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes 9155 9156 ilckd="_InterlockedCompareExchange_acq" 9157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9158$as_echo_n "checking for ${ilckd}()... " >&6; } 9159 case "3" in 9160 "1") ilckd_call="${ilckd}(var);";; 9161 "2") ilckd_call="${ilckd}(var, (long) 0);";; 9162 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 9163 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 9164 esac 9165 have_interlocked_op=no 9166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9167/* end confdefs.h. */ 9168 9169 #define WIN32_LEAN_AND_MEAN 9170 #include <windows.h> 9171 #include <intrin.h> 9172 9173int 9174main () 9175{ 9176 9177 volatile long *var; 9178 volatile long arr[2]; 9179 9180 $ilckd_call 9181 return 0; 9182 9183 ; 9184 return 0; 9185} 9186_ACEOF 9187if ac_fn_c_try_link "$LINENO"; then : 9188 have_interlocked_op=yes 9189fi 9190rm -f core conftest.err conftest.$ac_objext \ 9191 conftest$ac_exeext conftest.$ac_ext 9192 test $have_interlocked_op = yes && 9193cat >>confdefs.h <<_ACEOF 9194#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ 1 9195_ACEOF 9196 9197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9198$as_echo "$have_interlocked_op" >&6; } 9199 9200 test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes 9201 9202 ilckd="_InterlockedCompareExchange_rel" 9203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9204$as_echo_n "checking for ${ilckd}()... " >&6; } 9205 case "3" in 9206 "1") ilckd_call="${ilckd}(var);";; 9207 "2") ilckd_call="${ilckd}(var, (long) 0);";; 9208 "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; 9209 "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; 9210 esac 9211 have_interlocked_op=no 9212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9213/* end confdefs.h. */ 9214 9215 #define WIN32_LEAN_AND_MEAN 9216 #include <windows.h> 9217 #include <intrin.h> 9218 9219int 9220main () 9221{ 9222 9223 volatile long *var; 9224 volatile long arr[2]; 9225 9226 $ilckd_call 9227 return 0; 9228 9229 ; 9230 return 0; 9231} 9232_ACEOF 9233if ac_fn_c_try_link "$LINENO"; then : 9234 have_interlocked_op=yes 9235fi 9236rm -f core conftest.err conftest.$ac_objext \ 9237 conftest$ac_exeext conftest.$ac_ext 9238 test $have_interlocked_op = yes && 9239cat >>confdefs.h <<_ACEOF 9240#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL 1 9241_ACEOF 9242 9243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9244$as_echo "$have_interlocked_op" >&6; } 9245 9246 test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes 9247 9248 9249 ilckd="_InterlockedDecrement64" 9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9251$as_echo_n "checking for ${ilckd}()... " >&6; } 9252 case "1" in 9253 "1") ilckd_call="${ilckd}(var);";; 9254 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9255 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9256 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9257 esac 9258 have_interlocked_op=no 9259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9260/* end confdefs.h. */ 9261 9262 #define WIN32_LEAN_AND_MEAN 9263 #include <windows.h> 9264 #include <intrin.h> 9265 9266int 9267main () 9268{ 9269 9270 volatile __int64 *var; 9271 volatile __int64 arr[2]; 9272 9273 $ilckd_call 9274 return 0; 9275 9276 ; 9277 return 0; 9278} 9279_ACEOF 9280if ac_fn_c_try_link "$LINENO"; then : 9281 have_interlocked_op=yes 9282fi 9283rm -f core conftest.err conftest.$ac_objext \ 9284 conftest$ac_exeext conftest.$ac_ext 9285 test $have_interlocked_op = yes && 9286cat >>confdefs.h <<_ACEOF 9287#define ETHR_HAVE__INTERLOCKEDDECREMENT64 1 9288_ACEOF 9289 9290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9291$as_echo "$have_interlocked_op" >&6; } 9292 9293 9294 ilckd="_InterlockedDecrement64_rel" 9295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9296$as_echo_n "checking for ${ilckd}()... " >&6; } 9297 case "1" in 9298 "1") ilckd_call="${ilckd}(var);";; 9299 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9300 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9301 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9302 esac 9303 have_interlocked_op=no 9304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9305/* end confdefs.h. */ 9306 9307 #define WIN32_LEAN_AND_MEAN 9308 #include <windows.h> 9309 #include <intrin.h> 9310 9311int 9312main () 9313{ 9314 9315 volatile __int64 *var; 9316 volatile __int64 arr[2]; 9317 9318 $ilckd_call 9319 return 0; 9320 9321 ; 9322 return 0; 9323} 9324_ACEOF 9325if ac_fn_c_try_link "$LINENO"; then : 9326 have_interlocked_op=yes 9327fi 9328rm -f core conftest.err conftest.$ac_objext \ 9329 conftest$ac_exeext conftest.$ac_ext 9330 test $have_interlocked_op = yes && 9331cat >>confdefs.h <<_ACEOF 9332#define ETHR_HAVE__INTERLOCKEDDECREMENT64_REL 1 9333_ACEOF 9334 9335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9336$as_echo "$have_interlocked_op" >&6; } 9337 9338 9339 ilckd="_InterlockedIncrement64" 9340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9341$as_echo_n "checking for ${ilckd}()... " >&6; } 9342 case "1" in 9343 "1") ilckd_call="${ilckd}(var);";; 9344 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9345 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9346 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9347 esac 9348 have_interlocked_op=no 9349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9350/* end confdefs.h. */ 9351 9352 #define WIN32_LEAN_AND_MEAN 9353 #include <windows.h> 9354 #include <intrin.h> 9355 9356int 9357main () 9358{ 9359 9360 volatile __int64 *var; 9361 volatile __int64 arr[2]; 9362 9363 $ilckd_call 9364 return 0; 9365 9366 ; 9367 return 0; 9368} 9369_ACEOF 9370if ac_fn_c_try_link "$LINENO"; then : 9371 have_interlocked_op=yes 9372fi 9373rm -f core conftest.err conftest.$ac_objext \ 9374 conftest$ac_exeext conftest.$ac_ext 9375 test $have_interlocked_op = yes && 9376cat >>confdefs.h <<_ACEOF 9377#define ETHR_HAVE__INTERLOCKEDINCREMENT64 1 9378_ACEOF 9379 9380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9381$as_echo "$have_interlocked_op" >&6; } 9382 9383 9384 ilckd="_InterlockedIncrement64_acq" 9385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9386$as_echo_n "checking for ${ilckd}()... " >&6; } 9387 case "1" in 9388 "1") ilckd_call="${ilckd}(var);";; 9389 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9390 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9391 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9392 esac 9393 have_interlocked_op=no 9394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9395/* end confdefs.h. */ 9396 9397 #define WIN32_LEAN_AND_MEAN 9398 #include <windows.h> 9399 #include <intrin.h> 9400 9401int 9402main () 9403{ 9404 9405 volatile __int64 *var; 9406 volatile __int64 arr[2]; 9407 9408 $ilckd_call 9409 return 0; 9410 9411 ; 9412 return 0; 9413} 9414_ACEOF 9415if ac_fn_c_try_link "$LINENO"; then : 9416 have_interlocked_op=yes 9417fi 9418rm -f core conftest.err conftest.$ac_objext \ 9419 conftest$ac_exeext conftest.$ac_ext 9420 test $have_interlocked_op = yes && 9421cat >>confdefs.h <<_ACEOF 9422#define ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ 1 9423_ACEOF 9424 9425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9426$as_echo "$have_interlocked_op" >&6; } 9427 9428 9429 ilckd="_InterlockedExchangeAdd64" 9430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9431$as_echo_n "checking for ${ilckd}()... " >&6; } 9432 case "2" in 9433 "1") ilckd_call="${ilckd}(var);";; 9434 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9435 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9436 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9437 esac 9438 have_interlocked_op=no 9439 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9440/* end confdefs.h. */ 9441 9442 #define WIN32_LEAN_AND_MEAN 9443 #include <windows.h> 9444 #include <intrin.h> 9445 9446int 9447main () 9448{ 9449 9450 volatile __int64 *var; 9451 volatile __int64 arr[2]; 9452 9453 $ilckd_call 9454 return 0; 9455 9456 ; 9457 return 0; 9458} 9459_ACEOF 9460if ac_fn_c_try_link "$LINENO"; then : 9461 have_interlocked_op=yes 9462fi 9463rm -f core conftest.err conftest.$ac_objext \ 9464 conftest$ac_exeext conftest.$ac_ext 9465 test $have_interlocked_op = yes && 9466cat >>confdefs.h <<_ACEOF 9467#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64 1 9468_ACEOF 9469 9470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9471$as_echo "$have_interlocked_op" >&6; } 9472 9473 9474 ilckd="_InterlockedExchangeAdd64_acq" 9475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9476$as_echo_n "checking for ${ilckd}()... " >&6; } 9477 case "2" in 9478 "1") ilckd_call="${ilckd}(var);";; 9479 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9480 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9481 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9482 esac 9483 have_interlocked_op=no 9484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9485/* end confdefs.h. */ 9486 9487 #define WIN32_LEAN_AND_MEAN 9488 #include <windows.h> 9489 #include <intrin.h> 9490 9491int 9492main () 9493{ 9494 9495 volatile __int64 *var; 9496 volatile __int64 arr[2]; 9497 9498 $ilckd_call 9499 return 0; 9500 9501 ; 9502 return 0; 9503} 9504_ACEOF 9505if ac_fn_c_try_link "$LINENO"; then : 9506 have_interlocked_op=yes 9507fi 9508rm -f core conftest.err conftest.$ac_objext \ 9509 conftest$ac_exeext conftest.$ac_ext 9510 test $have_interlocked_op = yes && 9511cat >>confdefs.h <<_ACEOF 9512#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ 1 9513_ACEOF 9514 9515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9516$as_echo "$have_interlocked_op" >&6; } 9517 9518 9519 ilckd="_InterlockedAnd64" 9520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9521$as_echo_n "checking for ${ilckd}()... " >&6; } 9522 case "2" in 9523 "1") ilckd_call="${ilckd}(var);";; 9524 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9525 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9526 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9527 esac 9528 have_interlocked_op=no 9529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9530/* end confdefs.h. */ 9531 9532 #define WIN32_LEAN_AND_MEAN 9533 #include <windows.h> 9534 #include <intrin.h> 9535 9536int 9537main () 9538{ 9539 9540 volatile __int64 *var; 9541 volatile __int64 arr[2]; 9542 9543 $ilckd_call 9544 return 0; 9545 9546 ; 9547 return 0; 9548} 9549_ACEOF 9550if ac_fn_c_try_link "$LINENO"; then : 9551 have_interlocked_op=yes 9552fi 9553rm -f core conftest.err conftest.$ac_objext \ 9554 conftest$ac_exeext conftest.$ac_ext 9555 test $have_interlocked_op = yes && 9556cat >>confdefs.h <<_ACEOF 9557#define ETHR_HAVE__INTERLOCKEDAND64 1 9558_ACEOF 9559 9560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9561$as_echo "$have_interlocked_op" >&6; } 9562 9563 9564 ilckd="_InterlockedOr64" 9565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9566$as_echo_n "checking for ${ilckd}()... " >&6; } 9567 case "2" in 9568 "1") ilckd_call="${ilckd}(var);";; 9569 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9570 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9571 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9572 esac 9573 have_interlocked_op=no 9574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9575/* end confdefs.h. */ 9576 9577 #define WIN32_LEAN_AND_MEAN 9578 #include <windows.h> 9579 #include <intrin.h> 9580 9581int 9582main () 9583{ 9584 9585 volatile __int64 *var; 9586 volatile __int64 arr[2]; 9587 9588 $ilckd_call 9589 return 0; 9590 9591 ; 9592 return 0; 9593} 9594_ACEOF 9595if ac_fn_c_try_link "$LINENO"; then : 9596 have_interlocked_op=yes 9597fi 9598rm -f core conftest.err conftest.$ac_objext \ 9599 conftest$ac_exeext conftest.$ac_ext 9600 test $have_interlocked_op = yes && 9601cat >>confdefs.h <<_ACEOF 9602#define ETHR_HAVE__INTERLOCKEDOR64 1 9603_ACEOF 9604 9605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9606$as_echo "$have_interlocked_op" >&6; } 9607 9608 9609 ilckd="_InterlockedExchange64" 9610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9611$as_echo_n "checking for ${ilckd}()... " >&6; } 9612 case "2" in 9613 "1") ilckd_call="${ilckd}(var);";; 9614 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9615 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9616 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9617 esac 9618 have_interlocked_op=no 9619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9620/* end confdefs.h. */ 9621 9622 #define WIN32_LEAN_AND_MEAN 9623 #include <windows.h> 9624 #include <intrin.h> 9625 9626int 9627main () 9628{ 9629 9630 volatile __int64 *var; 9631 volatile __int64 arr[2]; 9632 9633 $ilckd_call 9634 return 0; 9635 9636 ; 9637 return 0; 9638} 9639_ACEOF 9640if ac_fn_c_try_link "$LINENO"; then : 9641 have_interlocked_op=yes 9642fi 9643rm -f core conftest.err conftest.$ac_objext \ 9644 conftest$ac_exeext conftest.$ac_ext 9645 test $have_interlocked_op = yes && 9646cat >>confdefs.h <<_ACEOF 9647#define ETHR_HAVE__INTERLOCKEDEXCHANGE64 1 9648_ACEOF 9649 9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9651$as_echo "$have_interlocked_op" >&6; } 9652 9653 9654 ilckd="_InterlockedCompareExchange64" 9655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9656$as_echo_n "checking for ${ilckd}()... " >&6; } 9657 case "3" in 9658 "1") ilckd_call="${ilckd}(var);";; 9659 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9660 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9661 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9662 esac 9663 have_interlocked_op=no 9664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9665/* end confdefs.h. */ 9666 9667 #define WIN32_LEAN_AND_MEAN 9668 #include <windows.h> 9669 #include <intrin.h> 9670 9671int 9672main () 9673{ 9674 9675 volatile __int64 *var; 9676 volatile __int64 arr[2]; 9677 9678 $ilckd_call 9679 return 0; 9680 9681 ; 9682 return 0; 9683} 9684_ACEOF 9685if ac_fn_c_try_link "$LINENO"; then : 9686 have_interlocked_op=yes 9687fi 9688rm -f core conftest.err conftest.$ac_objext \ 9689 conftest$ac_exeext conftest.$ac_ext 9690 test $have_interlocked_op = yes && 9691cat >>confdefs.h <<_ACEOF 9692#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64 1 9693_ACEOF 9694 9695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9696$as_echo "$have_interlocked_op" >&6; } 9697 9698 test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes 9699 9700 ilckd="_InterlockedCompareExchange64_acq" 9701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9702$as_echo_n "checking for ${ilckd}()... " >&6; } 9703 case "3" in 9704 "1") ilckd_call="${ilckd}(var);";; 9705 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9706 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9707 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9708 esac 9709 have_interlocked_op=no 9710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9711/* end confdefs.h. */ 9712 9713 #define WIN32_LEAN_AND_MEAN 9714 #include <windows.h> 9715 #include <intrin.h> 9716 9717int 9718main () 9719{ 9720 9721 volatile __int64 *var; 9722 volatile __int64 arr[2]; 9723 9724 $ilckd_call 9725 return 0; 9726 9727 ; 9728 return 0; 9729} 9730_ACEOF 9731if ac_fn_c_try_link "$LINENO"; then : 9732 have_interlocked_op=yes 9733fi 9734rm -f core conftest.err conftest.$ac_objext \ 9735 conftest$ac_exeext conftest.$ac_ext 9736 test $have_interlocked_op = yes && 9737cat >>confdefs.h <<_ACEOF 9738#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ 1 9739_ACEOF 9740 9741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9742$as_echo "$have_interlocked_op" >&6; } 9743 9744 test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes 9745 9746 ilckd="_InterlockedCompareExchange64_rel" 9747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9748$as_echo_n "checking for ${ilckd}()... " >&6; } 9749 case "3" in 9750 "1") ilckd_call="${ilckd}(var);";; 9751 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9752 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9753 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9754 esac 9755 have_interlocked_op=no 9756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9757/* end confdefs.h. */ 9758 9759 #define WIN32_LEAN_AND_MEAN 9760 #include <windows.h> 9761 #include <intrin.h> 9762 9763int 9764main () 9765{ 9766 9767 volatile __int64 *var; 9768 volatile __int64 arr[2]; 9769 9770 $ilckd_call 9771 return 0; 9772 9773 ; 9774 return 0; 9775} 9776_ACEOF 9777if ac_fn_c_try_link "$LINENO"; then : 9778 have_interlocked_op=yes 9779fi 9780rm -f core conftest.err conftest.$ac_objext \ 9781 conftest$ac_exeext conftest.$ac_ext 9782 test $have_interlocked_op = yes && 9783cat >>confdefs.h <<_ACEOF 9784#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL 1 9785_ACEOF 9786 9787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9788$as_echo "$have_interlocked_op" >&6; } 9789 9790 test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes 9791 9792 9793 ilckd="_InterlockedCompareExchange128" 9794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 9795$as_echo_n "checking for ${ilckd}()... " >&6; } 9796 case "4" in 9797 "1") ilckd_call="${ilckd}(var);";; 9798 "2") ilckd_call="${ilckd}(var, (__int64) 0);";; 9799 "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; 9800 "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; 9801 esac 9802 have_interlocked_op=no 9803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9804/* end confdefs.h. */ 9805 9806 #define WIN32_LEAN_AND_MEAN 9807 #include <windows.h> 9808 #include <intrin.h> 9809 9810int 9811main () 9812{ 9813 9814 volatile __int64 *var; 9815 volatile __int64 arr[2]; 9816 9817 $ilckd_call 9818 return 0; 9819 9820 ; 9821 return 0; 9822} 9823_ACEOF 9824if ac_fn_c_try_link "$LINENO"; then : 9825 have_interlocked_op=yes 9826fi 9827rm -f core conftest.err conftest.$ac_objext \ 9828 conftest$ac_exeext conftest.$ac_ext 9829 test $have_interlocked_op = yes && 9830cat >>confdefs.h <<_ACEOF 9831#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128 1 9832_ACEOF 9833 9834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 9835$as_echo "$have_interlocked_op" >&6; } 9836 9837 fi 9838 if test "$ethr_have_native_atomics" = "yes"; then 9839 ethr_native_atomic_implementation=windows 9840 ethr_have_native_spinlock=yes 9841 fi 9842 ;; 9843 9844 pthread) 9845 ETHR_THR_LIB_BASE_DIR=pthread 9846 9847$as_echo "#define ETHR_PTHREADS 1" >>confdefs.h 9848 9849 case $host_os in 9850 openbsd*) 9851 # The default stack size is insufficient for our needs 9852 # on OpenBSD. We increase it to 256 kilo words. 9853 ethr_modified_default_stack_size=256;; 9854 linux*) 9855 ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE" 9856 9857 if test X$cross_compiling = Xyes; then 9858 case X$erl_xcomp_linux_usable_sigusrx in 9859 X) usable_sigusrx=cross;; 9860 Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;; 9861 *) as_fn_error $? "Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx" "$LINENO" 5;; 9862 esac 9863 case X$erl_xcomp_linux_usable_sigaltstack in 9864 X) usable_sigaltstack=cross;; 9865 Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;; 9866 *) as_fn_error $? "Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack" "$LINENO" 5;; 9867 esac 9868 else 9869 # FIXME: Test for actual problems instead of kernel versions 9870 linux_kernel_vsn_=`uname -r` 9871 case $linux_kernel_vsn_ in 9872 [0-1].*|2.[0-1]|2.[0-1].*) 9873 usable_sigusrx=no 9874 usable_sigaltstack=no;; 9875 2.[2-3]|2.[2-3].*) 9876 usable_sigusrx=yes 9877 usable_sigaltstack=no;; 9878 *) 9879 usable_sigusrx=yes 9880 usable_sigaltstack=yes;; 9881 esac 9882 fi 9883 9884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIGUSR1 and SIGUSR2 can be used" >&5 9885$as_echo_n "checking if SIGUSR1 and SIGUSR2 can be used... " >&6; } 9886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $usable_sigusrx" >&5 9887$as_echo "$usable_sigusrx" >&6; } 9888 if test $usable_sigusrx = cross; then 9889 usable_sigusrx=yes 9890 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 9891$as_echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} 9892 fi 9893 if test $usable_sigusrx = no; then 9894 ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX" 9895 fi 9896 9897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaltstack can be used" >&5 9898$as_echo_n "checking if sigaltstack can be used... " >&6; } 9899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $usable_sigaltstack" >&5 9900$as_echo "$usable_sigaltstack" >&6; } 9901 if test $usable_sigaltstack = cross; then 9902 usable_sigaltstack=yes 9903 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 9904$as_echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} 9905 fi 9906 if test $usable_sigaltstack = no; then 9907 ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK" 9908 fi 9909 ;; 9910 *) ;; 9911 esac 9912 9913 saved_cppflags="$CPPFLAGS" 9914 CPPFLAGS="$CPPFLAGS $ETHR_DEFS" 9915 9916 saved_libs="$LIBS" 9917 LIBS="$LIBS $ETHR_X_LIBS" 9918 9919 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 9920if test "x$ac_cv_header_pthread_h" = xyes; then : 9921 \ 9922 9923$as_echo "#define ETHR_HAVE_PTHREAD_H 1" >>confdefs.h 9924 9925fi 9926 9927 9928 9929 ac_fn_c_check_header_mongrel "$LINENO" "pthread/mit/pthread.h" "ac_cv_header_pthread_mit_pthread_h" "$ac_includes_default" 9930if test "x$ac_cv_header_pthread_mit_pthread_h" = xyes; then : 9931 \ 9932 9933$as_echo "#define ETHR_HAVE_MIT_PTHREAD_H 1" >>confdefs.h 9934 9935fi 9936 9937 9938 9939 if test $NEED_NPTL_PTHREAD_H = yes; then 9940 9941$as_echo "#define ETHR_NEED_NPTL_PTHREAD_H 1" >>confdefs.h 9942 9943 fi 9944 9945 ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default" 9946if test "x$ac_cv_header_sched_h" = xyes; then : 9947 \ 9948 9949$as_echo "#define ETHR_HAVE_SCHED_H 1" >>confdefs.h 9950 9951fi 9952 9953 9954 9955 ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" 9956if test "x$ac_cv_header_sys_time_h" = xyes; then : 9957 \ 9958 9959$as_echo "#define ETHR_HAVE_SYS_TIME_H 1" >>confdefs.h 9960 9961fi 9962 9963 9964 9965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9966/* end confdefs.h. */ 9967#include <time.h> 9968 #include <sys/time.h> 9969int 9970main () 9971{ 9972struct timeval *tv; return 0; 9973 ; 9974 return 0; 9975} 9976_ACEOF 9977if ac_fn_c_try_compile "$LINENO"; then : 9978 9979$as_echo "#define ETHR_TIME_WITH_SYS_TIME 1" >>confdefs.h 9980 9981fi 9982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9983 9984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable PTHREAD_STACK_MIN" >&5 9985$as_echo_n "checking for usable PTHREAD_STACK_MIN... " >&6; } 9986 pthread_stack_min=no 9987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9988/* end confdefs.h. */ 9989 9990#include <limits.h> 9991#if defined(ETHR_NEED_NPTL_PTHREAD_H) 9992#include <nptl/pthread.h> 9993#elif defined(ETHR_HAVE_MIT_PTHREAD_H) 9994#include <pthread/mit/pthread.h> 9995#elif defined(ETHR_HAVE_PTHREAD_H) 9996#include <pthread.h> 9997#endif 9998 9999int 10000main () 10001{ 10002return PTHREAD_STACK_MIN; 10003 ; 10004 return 0; 10005} 10006_ACEOF 10007if ac_fn_c_try_compile "$LINENO"; then : 10008 pthread_stack_min=yes 10009fi 10010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10011 10012 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_stack_min" >&5 10013$as_echo "$pthread_stack_min" >&6; } 10014 test $pthread_stack_min != yes || { 10015 10016$as_echo "#define ETHR_HAVE_USABLE_PTHREAD_STACK_MIN 1" >>confdefs.h 10017 10018 } 10019 10020 ac_fn_c_check_func "$LINENO" "pthread_spin_lock" "ac_cv_func_pthread_spin_lock" 10021if test "x$ac_cv_func_pthread_spin_lock" = xyes; then : 10022 \ 10023 ethr_have_native_spinlock=yes \ 10024 10025$as_echo "#define ETHR_HAVE_PTHREAD_SPIN_LOCK 1" >>confdefs.h 10026 10027fi 10028 10029 10030 have_sched_yield=no 10031 have_librt_sched_yield=no 10032 ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield" 10033if test "x$ac_cv_func_sched_yield" = xyes; then : 10034 have_sched_yield=yes 10035fi 10036 10037 if test $have_sched_yield = no; then 10038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 10039$as_echo_n "checking for sched_yield in -lrt... " >&6; } 10040if ${ac_cv_lib_rt_sched_yield+:} false; then : 10041 $as_echo_n "(cached) " >&6 10042else 10043 ac_check_lib_save_LIBS=$LIBS 10044LIBS="-lrt $LIBS" 10045cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10046/* end confdefs.h. */ 10047 10048/* Override any GCC internal prototype to avoid an error. 10049 Use char because int might match the return type of a GCC 10050 builtin and then its argument prototype would still apply. */ 10051#ifdef __cplusplus 10052extern "C" 10053#endif 10054char sched_yield (); 10055int 10056main () 10057{ 10058return sched_yield (); 10059 ; 10060 return 0; 10061} 10062_ACEOF 10063if ac_fn_c_try_link "$LINENO"; then : 10064 ac_cv_lib_rt_sched_yield=yes 10065else 10066 ac_cv_lib_rt_sched_yield=no 10067fi 10068rm -f core conftest.err conftest.$ac_objext \ 10069 conftest$ac_exeext conftest.$ac_ext 10070LIBS=$ac_check_lib_save_LIBS 10071fi 10072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 10073$as_echo "$ac_cv_lib_rt_sched_yield" >&6; } 10074if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : 10075 have_librt_sched_yield=yes 10076 ETHR_X_LIBS="$ETHR_X_LIBS -lrt" 10077fi 10078 10079 fi 10080 if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then 10081 10082$as_echo "#define ETHR_HAVE_SCHED_YIELD 1" >>confdefs.h 10083 10084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sched_yield() returns an int" >&5 10085$as_echo_n "checking whether sched_yield() returns an int... " >&6; } 10086 sched_yield_ret_int=no 10087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10088/* end confdefs.h. */ 10089 10090 #ifdef ETHR_HAVE_SCHED_H 10091 #include <sched.h> 10092 #endif 10093 10094int 10095main () 10096{ 10097int sched_yield(); 10098 ; 10099 return 0; 10100} 10101_ACEOF 10102if ac_fn_c_try_link "$LINENO"; then : 10103 sched_yield_ret_int=yes 10104fi 10105rm -f core conftest.err conftest.$ac_objext \ 10106 conftest$ac_exeext conftest.$ac_ext 10107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sched_yield_ret_int" >&5 10108$as_echo "$sched_yield_ret_int" >&6; } 10109 if test $sched_yield_ret_int = yes; then 10110 10111$as_echo "#define ETHR_SCHED_YIELD_RET_INT 1" >>confdefs.h 10112 10113 fi 10114 fi 10115 10116 have_pthread_yield=no 10117 ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield" 10118if test "x$ac_cv_func_pthread_yield" = xyes; then : 10119 have_pthread_yield=yes 10120fi 10121 10122 if test $have_pthread_yield = yes; then 10123 10124$as_echo "#define ETHR_HAVE_PTHREAD_YIELD 1" >>confdefs.h 10125 10126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_yield() returns an int" >&5 10127$as_echo_n "checking whether pthread_yield() returns an int... " >&6; } 10128 pthread_yield_ret_int=no 10129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10130/* end confdefs.h. */ 10131 10132 #if defined(ETHR_NEED_NPTL_PTHREAD_H) 10133 #include <nptl/pthread.h> 10134 #elif defined(ETHR_HAVE_MIT_PTHREAD_H) 10135 #include <pthread/mit/pthread.h> 10136 #elif defined(ETHR_HAVE_PTHREAD_H) 10137 #include <pthread.h> 10138 #endif 10139 10140int 10141main () 10142{ 10143int pthread_yield(); 10144 ; 10145 return 0; 10146} 10147_ACEOF 10148if ac_fn_c_try_link "$LINENO"; then : 10149 pthread_yield_ret_int=yes 10150fi 10151rm -f core conftest.err conftest.$ac_objext \ 10152 conftest$ac_exeext conftest.$ac_ext 10153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_yield_ret_int" >&5 10154$as_echo "$pthread_yield_ret_int" >&6; } 10155 if test $pthread_yield_ret_int = yes; then 10156 10157$as_echo "#define ETHR_PTHREAD_YIELD_RET_INT 1" >>confdefs.h 10158 10159 fi 10160 fi 10161 10162 have_pthread_rwlock_init=no 10163 ac_fn_c_check_func "$LINENO" "pthread_rwlock_init" "ac_cv_func_pthread_rwlock_init" 10164if test "x$ac_cv_func_pthread_rwlock_init" = xyes; then : 10165 have_pthread_rwlock_init=yes 10166fi 10167 10168 if test $have_pthread_rwlock_init = yes; then 10169 10170 ethr_have_pthread_rwlockattr_setkind_np=no 10171 ac_fn_c_check_func "$LINENO" "pthread_rwlockattr_setkind_np" "ac_cv_func_pthread_rwlockattr_setkind_np" 10172if test "x$ac_cv_func_pthread_rwlockattr_setkind_np" = xyes; then : 10173 ethr_have_pthread_rwlockattr_setkind_np=yes 10174fi 10175 10176 10177 if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then 10178 10179$as_echo "#define ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP 1" >>confdefs.h 10180 10181 10182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP" >&5 10183$as_echo_n "checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP... " >&6; } 10184 ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no 10185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10186/* end confdefs.h. */ 10187 10188 #if defined(ETHR_NEED_NPTL_PTHREAD_H) 10189 #include <nptl/pthread.h> 10190 #elif defined(ETHR_HAVE_MIT_PTHREAD_H) 10191 #include <pthread/mit/pthread.h> 10192 #elif defined(ETHR_HAVE_PTHREAD_H) 10193 #include <pthread.h> 10194 #endif 10195 10196int 10197main () 10198{ 10199 10200 pthread_rwlockattr_t *attr; 10201 return pthread_rwlockattr_setkind_np(attr, 10202 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); 10203 10204 ; 10205 return 0; 10206} 10207_ACEOF 10208if ac_fn_c_try_link "$LINENO"; then : 10209 ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes 10210fi 10211rm -f core conftest.err conftest.$ac_objext \ 10212 conftest$ac_exeext conftest.$ac_ext 10213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&5 10214$as_echo "$ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&6; } 10215 if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then 10216 10217$as_echo "#define ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 1" >>confdefs.h 10218 10219 fi 10220 fi 10221 fi 10222 10223 if test "$force_pthread_rwlocks" = "yes"; then 10224 10225 10226$as_echo "#define ETHR_FORCE_PTHREAD_RWLOCK 1" >>confdefs.h 10227 10228 10229 if test $have_pthread_rwlock_init = yes; then 10230 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues." >&5 10231$as_echo "$as_me: WARNING: Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues." >&2;} 10232 else 10233 as_fn_error $? "User forced usage of pthread rwlock, but no such implementation was found" "$LINENO" 5 10234 fi 10235 fi 10236 10237 ac_fn_c_check_func "$LINENO" "pthread_attr_setguardsize" "ac_cv_func_pthread_attr_setguardsize" 10238if test "x$ac_cv_func_pthread_attr_setguardsize" = xyes; then : 10239 \ 10240 10241$as_echo "#define ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE 1" >>confdefs.h 10242 10243fi 10244 10245 10246 if test "x$erl_monotonic_clock_id" != "x"; then 10247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_cond_timedwait() can use the monotonic clock $erl_monotonic_clock_id for timeout" >&5 10248$as_echo_n "checking whether pthread_cond_timedwait() can use the monotonic clock $erl_monotonic_clock_id for timeout... " >&6; } 10249 pthread_cond_timedwait_monotonic=no 10250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10251/* end confdefs.h. */ 10252 10253 #if defined(ETHR_NEED_NPTL_PTHREAD_H) 10254 # include <nptl/pthread.h> 10255 #elif defined(ETHR_HAVE_MIT_PTHREAD_H) 10256 # include <pthread/mit/pthread.h> 10257 #elif defined(ETHR_HAVE_PTHREAD_H) 10258 # include <pthread.h> 10259 #endif 10260 #ifdef ETHR_TIME_WITH_SYS_TIME 10261 # include <time.h> 10262 # include <sys/time.h> 10263 #else 10264 # ifdef ETHR_HAVE_SYS_TIME_H 10265 # include <sys/time.h> 10266 # else 10267 # include <time.h> 10268 # endif 10269 #endif 10270 #if defined(ETHR_HAVE_MACH_CLOCK_GET_TIME) 10271 # include <mach/clock.h> 10272 # include <mach/mach.h> 10273 #endif 10274 10275int 10276main () 10277{ 10278 10279 int res; 10280 pthread_condattr_t attr; 10281 pthread_cond_t cond; 10282 struct timespec cond_timeout; 10283 pthread_mutex_t mutex; 10284 res = pthread_condattr_init(&attr); 10285 res = pthread_condattr_setclock(&attr, ETHR_MONOTONIC_CLOCK_ID); 10286 res = pthread_cond_init(&cond, &attr); 10287 res = pthread_cond_timedwait(&cond, &mutex, &cond_timeout); 10288 10289 ; 10290 return 0; 10291} 10292_ACEOF 10293if ac_fn_c_try_link "$LINENO"; then : 10294 pthread_cond_timedwait_monotonic=yes 10295fi 10296rm -f core conftest.err conftest.$ac_objext \ 10297 conftest$ac_exeext conftest.$ac_ext 10298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_cond_timedwait_monotonic" >&5 10299$as_echo "$pthread_cond_timedwait_monotonic" >&6; } 10300 if test $pthread_cond_timedwait_monotonic = yes; then 10301 10302$as_echo "#define ETHR_HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1" >>confdefs.h 10303 10304 fi 10305 fi 10306 10307 linux_futex=no 10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux futexes" >&5 10309$as_echo_n "checking for Linux futexes... " >&6; } 10310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10311/* end confdefs.h. */ 10312 10313 #include <sys/syscall.h> 10314 #include <unistd.h> 10315 #include <linux/futex.h> 10316 #include <sys/time.h> 10317 10318int 10319main () 10320{ 10321 10322 int i = 1; 10323 syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1, 10324 (void*)0,(void*)0, 0); 10325 syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0, 10326 (void*)0,(void*)0, 0); 10327 return 0; 10328 10329 ; 10330 return 0; 10331} 10332_ACEOF 10333if ac_fn_c_try_link "$LINENO"; then : 10334 linux_futex=yes 10335fi 10336rm -f core conftest.err conftest.$ac_objext \ 10337 conftest$ac_exeext conftest.$ac_ext 10338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $linux_futex" >&5 10339$as_echo "$linux_futex" >&6; } 10340 test $linux_futex = yes && 10341$as_echo "#define ETHR_HAVE_LINUX_FUTEX 1" >>confdefs.h 10342 10343 10344 pthread_setname=no 10345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np" >&5 10346$as_echo_n "checking for pthread_setname_np... " >&6; } 10347 old_CFLAGS=$CFLAGS 10348 CFLAGS="$CFLAGS -Werror" 10349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10350/* end confdefs.h. */ 10351#define __USE_GNU 10352 #include <pthread.h> 10353int 10354main () 10355{ 10356pthread_setname_np(pthread_self(), "name"); 10357 ; 10358 return 0; 10359} 10360_ACEOF 10361if ac_fn_c_try_link "$LINENO"; then : 10362 pthread_setname=linux 10363fi 10364rm -f core conftest.err conftest.$ac_objext \ 10365 conftest$ac_exeext conftest.$ac_ext 10366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10367/* end confdefs.h. */ 10368#define __USE_GNU 10369 #include <pthread.h> 10370int 10371main () 10372{ 10373pthread_set_name_np(pthread_self(), "name"); 10374 ; 10375 return 0; 10376} 10377_ACEOF 10378if ac_fn_c_try_link "$LINENO"; then : 10379 pthread_setname=bsd 10380fi 10381rm -f core conftest.err conftest.$ac_objext \ 10382 conftest$ac_exeext conftest.$ac_ext 10383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10384/* end confdefs.h. */ 10385#define _DARWIN_C_SOURCE 10386 #include <pthread.h> 10387int 10388main () 10389{ 10390pthread_setname_np("name"); 10391 ; 10392 return 0; 10393} 10394_ACEOF 10395if ac_fn_c_try_link "$LINENO"; then : 10396 pthread_setname=darwin 10397fi 10398rm -f core conftest.err conftest.$ac_objext \ 10399 conftest$ac_exeext conftest.$ac_ext 10400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_setname" >&5 10401$as_echo "$pthread_setname" >&6; } 10402 case $with_threadnames-$pthread_setname in 10403 yes-linux) 10404$as_echo "#define ETHR_HAVE_PTHREAD_SETNAME_NP_2 1" >>confdefs.h 10405;; 10406 yes-bsd) 10407$as_echo "#define ETHR_HAVE_PTHREAD_SET_NAME_NP_2 1" >>confdefs.h 10408;; 10409 yes-darwin) 10410$as_echo "#define ETHR_HAVE_PTHREAD_SETNAME_NP_1 1" >>confdefs.h 10411;; 10412 *) ;; 10413 esac 10414 10415 pthread_getname=no 10416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_getname_np" >&5 10417$as_echo_n "checking for pthread_getname_np... " >&6; } 10418 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10419/* end confdefs.h. */ 10420#define __USE_GNU 10421 #define _DARWIN_C_SOURCE 10422 #include <pthread.h> 10423int 10424main () 10425{ 10426char buff[256]; pthread_getname_np(pthread_self(), buff, 256); 10427 ; 10428 return 0; 10429} 10430_ACEOF 10431if ac_fn_c_try_link "$LINENO"; then : 10432 pthread_getname=linux 10433fi 10434rm -f core conftest.err conftest.$ac_objext \ 10435 conftest$ac_exeext conftest.$ac_ext 10436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10437/* end confdefs.h. */ 10438#define __USE_GNU 10439 #define _DARWIN_C_SOURCE 10440 #include <pthread.h> 10441int 10442main () 10443{ 10444char buff[256]; pthread_getname_np(pthread_self(), buff); 10445 ; 10446 return 0; 10447} 10448_ACEOF 10449if ac_fn_c_try_link "$LINENO"; then : 10450 pthread_getname=ibm 10451fi 10452rm -f core conftest.err conftest.$ac_objext \ 10453 conftest$ac_exeext conftest.$ac_ext 10454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_getname" >&5 10455$as_echo "$pthread_getname" >&6; } 10456 case $pthread_getname in 10457 linux) 10458$as_echo "#define ETHR_HAVE_PTHREAD_GETNAME_NP_3 1" >>confdefs.h 10459;; 10460 ibm) 10461$as_echo "#define ETHR_HAVE_PTHREAD_GETNAME_NP_2 1" >>confdefs.h 10462;; 10463 *) ;; 10464 esac 10465 CFLAGS=$old_CFLAGS 10466 10467 if test "X$disable_native_ethr_impls" = "Xyes"; then 10468 ethr_have_native_atomics=no 10469 else 10470 10471 10472 # The cast to long int works around a bug in the HP C Compiler 10473# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 10474# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 10475# This bug is HP SR number 8606223364. 10476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 10477$as_echo_n "checking size of short... " >&6; } 10478if ${ac_cv_sizeof_short+:} false; then : 10479 $as_echo_n "(cached) " >&6 10480else 10481 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : 10482 10483else 10484 if test "$ac_cv_type_short" = yes; then 10485 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 10486$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 10487as_fn_error 77 "cannot compute sizeof (short) 10488See \`config.log' for more details" "$LINENO" 5; } 10489 else 10490 ac_cv_sizeof_short=0 10491 fi 10492fi 10493 10494fi 10495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 10496$as_echo "$ac_cv_sizeof_short" >&6; } 10497 10498 10499 10500cat >>confdefs.h <<_ACEOF 10501#define SIZEOF_SHORT $ac_cv_sizeof_short 10502_ACEOF 10503 10504 10505 # The cast to long int works around a bug in the HP C Compiler 10506# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 10507# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 10508# This bug is HP SR number 8606223364. 10509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 10510$as_echo_n "checking size of int... " >&6; } 10511if ${ac_cv_sizeof_int+:} false; then : 10512 $as_echo_n "(cached) " >&6 10513else 10514 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : 10515 10516else 10517 if test "$ac_cv_type_int" = yes; then 10518 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 10519$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 10520as_fn_error 77 "cannot compute sizeof (int) 10521See \`config.log' for more details" "$LINENO" 5; } 10522 else 10523 ac_cv_sizeof_int=0 10524 fi 10525fi 10526 10527fi 10528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 10529$as_echo "$ac_cv_sizeof_int" >&6; } 10530 10531 10532 10533cat >>confdefs.h <<_ACEOF 10534#define SIZEOF_INT $ac_cv_sizeof_int 10535_ACEOF 10536 10537 10538 # The cast to long int works around a bug in the HP C Compiler 10539# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 10540# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 10541# This bug is HP SR number 8606223364. 10542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 10543$as_echo_n "checking size of long... " >&6; } 10544if ${ac_cv_sizeof_long+:} false; then : 10545 $as_echo_n "(cached) " >&6 10546else 10547 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : 10548 10549else 10550 if test "$ac_cv_type_long" = yes; then 10551 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 10552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 10553as_fn_error 77 "cannot compute sizeof (long) 10554See \`config.log' for more details" "$LINENO" 5; } 10555 else 10556 ac_cv_sizeof_long=0 10557 fi 10558fi 10559 10560fi 10561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 10562$as_echo "$ac_cv_sizeof_long" >&6; } 10563 10564 10565 10566cat >>confdefs.h <<_ACEOF 10567#define SIZEOF_LONG $ac_cv_sizeof_long 10568_ACEOF 10569 10570 10571 # The cast to long int works around a bug in the HP C Compiler 10572# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 10573# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 10574# This bug is HP SR number 8606223364. 10575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 10576$as_echo_n "checking size of long long... " >&6; } 10577if ${ac_cv_sizeof_long_long+:} false; then : 10578 $as_echo_n "(cached) " >&6 10579else 10580 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : 10581 10582else 10583 if test "$ac_cv_type_long_long" = yes; then 10584 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 10585$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 10586as_fn_error 77 "cannot compute sizeof (long long) 10587See \`config.log' for more details" "$LINENO" 5; } 10588 else 10589 ac_cv_sizeof_long_long=0 10590 fi 10591fi 10592 10593fi 10594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 10595$as_echo "$ac_cv_sizeof_long_long" >&6; } 10596 10597 10598 10599cat >>confdefs.h <<_ACEOF 10600#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long 10601_ACEOF 10602 10603 10604 # The cast to long int works around a bug in the HP C Compiler 10605# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 10606# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 10607# This bug is HP SR number 8606223364. 10608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int128_t" >&5 10609$as_echo_n "checking size of __int128_t... " >&6; } 10610if ${ac_cv_sizeof___int128_t+:} false; then : 10611 $as_echo_n "(cached) " >&6 10612else 10613 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int128_t))" "ac_cv_sizeof___int128_t" "$ac_includes_default"; then : 10614 10615else 10616 if test "$ac_cv_type___int128_t" = yes; then 10617 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 10618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 10619as_fn_error 77 "cannot compute sizeof (__int128_t) 10620See \`config.log' for more details" "$LINENO" 5; } 10621 else 10622 ac_cv_sizeof___int128_t=0 10623 fi 10624fi 10625 10626fi 10627{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int128_t" >&5 10628$as_echo "$ac_cv_sizeof___int128_t" >&6; } 10629 10630 10631 10632cat >>confdefs.h <<_ACEOF 10633#define SIZEOF___INT128_T $ac_cv_sizeof___int128_t 10634_ACEOF 10635 10636 10637 10638 if test "$ac_cv_sizeof_short" = "4"; then 10639 gcc_atomic_type32="short" 10640 elif test "$ac_cv_sizeof_int" = "4"; then 10641 gcc_atomic_type32="int" 10642 elif test "$ac_cv_sizeof_long" = "4"; then 10643 gcc_atomic_type32="long" 10644 else 10645 as_fn_error $? "No 32-bit type found" "$LINENO" 5 10646 fi 10647 10648 if test "$ac_cv_sizeof_int" = "8"; then 10649 gcc_atomic_type64="int" 10650 elif test "$ac_cv_sizeof_long" = "8"; then 10651 gcc_atomic_type64="long" 10652 elif test "$ac_cv_sizeof_long_long" = "8"; then 10653 gcc_atomic_type64="long long" 10654 else 10655 as_fn_error $? "No 64-bit type found" "$LINENO" 5 10656 fi 10657 10658 if test "$ac_cv_sizeof___int128_t" = "16"; then 10659 gcc_atomic_type128="__int128_t" 10660 else 10661 gcc_atomic_type128="#error " 10662 fi 10663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working __sync_synchronize()" >&5 10664$as_echo_n "checking for a working __sync_synchronize()... " >&6; } 10665if ${ethr_cv___sync_synchronize+:} false; then : 10666 $as_echo_n "(cached) " >&6 10667else 10668 10669 ethr_cv___sync_synchronize=no 10670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10671/* end confdefs.h. */ 10672 10673int 10674main () 10675{ 10676 __sync_synchronize(); 10677 ; 10678 return 0; 10679} 10680_ACEOF 10681if ac_fn_c_try_link "$LINENO"; then : 10682 ethr_cv___sync_synchronize=yes 10683fi 10684rm -f core conftest.err conftest.$ac_objext \ 10685 conftest$ac_exeext conftest.$ac_ext 10686 if test $ethr_cv___sync_synchronize = yes; then 10687 # 10688 # Old gcc versions on at least x86 have a buggy 10689 # __sync_synchronize() which does not emit a 10690 # memory barrier. We try to detect this by 10691 # compiling to assembly with and without 10692 # __sync_synchronize() and compare the results. 10693 # 10694 10695 ethr_test_filename="chk_if___sync_synchronize_noop_config1test.$$" 10696 cat > "${ethr_test_filename}.c" <<EOF 10697int 10698my_test(void) 10699{ 10700 __sync_synchronize(); 10701 return 0; 10702} 10703EOF 10704 $CC -O3 $ETHR_DEFS -c "${ethr_test_filename}.c" -o "${ethr_test_filename}1.o" 10705 cat > "${ethr_test_filename}.c" <<EOF 10706int 10707my_test(void) 10708{ 10709 ; 10710 return 0; 10711} 10712EOF 10713 $CC -O3 $ETHR_DEFS -c "${ethr_test_filename}.c" -o "${ethr_test_filename}2.o" 10714 if diff "${ethr_test_filename}1.o" "${ethr_test_filename}2.o" >/dev/null 2>&1; then 10715 ethr___sync_synchronize_noop=yes 10716 else 10717 ethr___sync_synchronize_noop=no 10718 fi 10719 rm -f "${ethr_test_filename}.c" "${ethr_test_filename}1.o" "${ethr_test_filename}2.o" 10720 10721 if test $ethr___sync_synchronize_noop = yes; then 10722 # Got a buggy implementation of 10723 # __sync_synchronize... 10724 ethr_cv___sync_synchronize="no; buggy implementation" 10725 fi 10726 fi 10727 10728fi 10729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv___sync_synchronize" >&5 10730$as_echo "$ethr_cv___sync_synchronize" >&6; } 10731 10732 if test "$ethr_cv___sync_synchronize" = "yes"; then 10733 have_sync_synchronize_value="~0" 10734 else 10735 have_sync_synchronize_value="0" 10736 fi 10737 10738cat >>confdefs.h <<_ACEOF 10739#define ETHR_HAVE___sync_synchronize $have_sync_synchronize_value 10740_ACEOF 10741 10742 10743 10744 # __sync_add_and_fetch - atomic_op 10745 10746 for atomic_bit_size in 32 64 128; do 10747 case $atomic_bit_size in 10748 32) gcc_atomic_type="$gcc_atomic_type32";; 10749 64) gcc_atomic_type="$gcc_atomic_type64";; 10750 128) gcc_atomic_type="$gcc_atomic_type128";; 10751 esac 10752 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 10753 case __sync_add_and_fetch in 10754 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 10755 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_add_and_fetch(&var, ($gcc_atomic_type) 0);" 10756 ;; 10757 __sync_val_compare_and_swap) 10758 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_add_and_fetch(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 10759 ;; 10760 __atomic_store_n) 10761 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __sync_add_and_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __sync_add_and_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 10762 ;; 10763 __atomic_load_n) 10764 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_add_and_fetch(&var, __ATOMIC_RELAXED); res = __sync_add_and_fetch(&var, __ATOMIC_ACQUIRE);" 10765 ;; 10766 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 10767 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_add_and_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __sync_add_and_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __sync_add_and_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 10768 ;; 10769 __atomic_compare_exchange_n) 10770 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __sync_add_and_fetch(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __sync_add_and_fetch(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 10771 ;; 10772 *) 10773 as_fn_error $? "Internal error: missing implementation for __sync_add_and_fetch" "$LINENO" 5 10774 ;; 10775 esac 10776 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 10777 done 10778 10779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_add_and_fetch()" >&5 10780$as_echo_n "checking for 32-bit __sync_add_and_fetch()... " >&6; } 10781if ${ethr_cv_32bit___sync_add_and_fetch+:} false; then : 10782 $as_echo_n "(cached) " >&6 10783else 10784 10785 ethr_cv_32bit___sync_add_and_fetch=no 10786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10787/* end confdefs.h. */ 10788 10789int 10790main () 10791{ 10792$atomic32_call 10793 ; 10794 return 0; 10795} 10796_ACEOF 10797if ac_fn_c_try_link "$LINENO"; then : 10798 ethr_cv_32bit___sync_add_and_fetch=yes 10799fi 10800rm -f core conftest.err conftest.$ac_objext \ 10801 conftest$ac_exeext conftest.$ac_ext 10802 10803fi 10804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_add_and_fetch" >&5 10805$as_echo "$ethr_cv_32bit___sync_add_and_fetch" >&6; } 10806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_add_and_fetch()" >&5 10807$as_echo_n "checking for 64-bit __sync_add_and_fetch()... " >&6; } 10808if ${ethr_cv_64bit___sync_add_and_fetch+:} false; then : 10809 $as_echo_n "(cached) " >&6 10810else 10811 10812 ethr_cv_64bit___sync_add_and_fetch=no 10813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10814/* end confdefs.h. */ 10815 10816int 10817main () 10818{ 10819$atomic64_call 10820 ; 10821 return 0; 10822} 10823_ACEOF 10824if ac_fn_c_try_link "$LINENO"; then : 10825 ethr_cv_64bit___sync_add_and_fetch=yes 10826fi 10827rm -f core conftest.err conftest.$ac_objext \ 10828 conftest$ac_exeext conftest.$ac_ext 10829 10830fi 10831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_add_and_fetch" >&5 10832$as_echo "$ethr_cv_64bit___sync_add_and_fetch" >&6; } 10833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_add_and_fetch()" >&5 10834$as_echo_n "checking for 128-bit __sync_add_and_fetch()... " >&6; } 10835if ${ethr_cv_128bit___sync_add_and_fetch+:} false; then : 10836 $as_echo_n "(cached) " >&6 10837else 10838 10839 ethr_cv_128bit___sync_add_and_fetch=no 10840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10841/* end confdefs.h. */ 10842 10843int 10844main () 10845{ 10846$atomic128_call 10847 ; 10848 return 0; 10849} 10850_ACEOF 10851if ac_fn_c_try_link "$LINENO"; then : 10852 ethr_cv_128bit___sync_add_and_fetch=yes 10853fi 10854rm -f core conftest.err conftest.$ac_objext \ 10855 conftest$ac_exeext conftest.$ac_ext 10856 10857fi 10858{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_add_and_fetch" >&5 10859$as_echo "$ethr_cv_128bit___sync_add_and_fetch" >&6; } 10860 10861 case $ethr_cv_128bit___sync_add_and_fetch-$ethr_cv_64bit___sync_add_and_fetch-$ethr_cv_32bit___sync_add_and_fetch in 10862 no-no-no) 10863 have_atomic_ops=0;; 10864 no-no-yes) 10865 have_atomic_ops=4;; 10866 no-yes-no) 10867 have_atomic_ops=8;; 10868 no-yes-yes) 10869 have_atomic_ops=12;; 10870 yes-no-no) 10871 have_atomic_ops=16;; 10872 yes-no-yes) 10873 have_atomic_ops=20;; 10874 yes-yes-no) 10875 have_atomic_ops=24;; 10876 yes-yes-yes) 10877 have_atomic_ops=28;; 10878 esac 10879 10880cat >>confdefs.h <<_ACEOF 10881#define ETHR_HAVE___sync_add_and_fetch $have_atomic_ops 10882_ACEOF 10883 10884 10885 10886 # __sync_fetch_and_and - atomic_op 10887 10888 for atomic_bit_size in 32 64 128; do 10889 case $atomic_bit_size in 10890 32) gcc_atomic_type="$gcc_atomic_type32";; 10891 64) gcc_atomic_type="$gcc_atomic_type64";; 10892 128) gcc_atomic_type="$gcc_atomic_type128";; 10893 esac 10894 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 10895 case __sync_fetch_and_and in 10896 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 10897 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_and(&var, ($gcc_atomic_type) 0);" 10898 ;; 10899 __sync_val_compare_and_swap) 10900 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_and(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 10901 ;; 10902 __atomic_store_n) 10903 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __sync_fetch_and_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __sync_fetch_and_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 10904 ;; 10905 __atomic_load_n) 10906 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_and(&var, __ATOMIC_RELAXED); res = __sync_fetch_and_and(&var, __ATOMIC_ACQUIRE);" 10907 ;; 10908 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 10909 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __sync_fetch_and_and(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __sync_fetch_and_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 10910 ;; 10911 __atomic_compare_exchange_n) 10912 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __sync_fetch_and_and(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __sync_fetch_and_and(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 10913 ;; 10914 *) 10915 as_fn_error $? "Internal error: missing implementation for __sync_fetch_and_and" "$LINENO" 5 10916 ;; 10917 esac 10918 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 10919 done 10920 10921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_fetch_and_and()" >&5 10922$as_echo_n "checking for 32-bit __sync_fetch_and_and()... " >&6; } 10923if ${ethr_cv_32bit___sync_fetch_and_and+:} false; then : 10924 $as_echo_n "(cached) " >&6 10925else 10926 10927 ethr_cv_32bit___sync_fetch_and_and=no 10928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10929/* end confdefs.h. */ 10930 10931int 10932main () 10933{ 10934$atomic32_call 10935 ; 10936 return 0; 10937} 10938_ACEOF 10939if ac_fn_c_try_link "$LINENO"; then : 10940 ethr_cv_32bit___sync_fetch_and_and=yes 10941fi 10942rm -f core conftest.err conftest.$ac_objext \ 10943 conftest$ac_exeext conftest.$ac_ext 10944 10945fi 10946{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_fetch_and_and" >&5 10947$as_echo "$ethr_cv_32bit___sync_fetch_and_and" >&6; } 10948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_fetch_and_and()" >&5 10949$as_echo_n "checking for 64-bit __sync_fetch_and_and()... " >&6; } 10950if ${ethr_cv_64bit___sync_fetch_and_and+:} false; then : 10951 $as_echo_n "(cached) " >&6 10952else 10953 10954 ethr_cv_64bit___sync_fetch_and_and=no 10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10956/* end confdefs.h. */ 10957 10958int 10959main () 10960{ 10961$atomic64_call 10962 ; 10963 return 0; 10964} 10965_ACEOF 10966if ac_fn_c_try_link "$LINENO"; then : 10967 ethr_cv_64bit___sync_fetch_and_and=yes 10968fi 10969rm -f core conftest.err conftest.$ac_objext \ 10970 conftest$ac_exeext conftest.$ac_ext 10971 10972fi 10973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_fetch_and_and" >&5 10974$as_echo "$ethr_cv_64bit___sync_fetch_and_and" >&6; } 10975 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_fetch_and_and()" >&5 10976$as_echo_n "checking for 128-bit __sync_fetch_and_and()... " >&6; } 10977if ${ethr_cv_128bit___sync_fetch_and_and+:} false; then : 10978 $as_echo_n "(cached) " >&6 10979else 10980 10981 ethr_cv_128bit___sync_fetch_and_and=no 10982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10983/* end confdefs.h. */ 10984 10985int 10986main () 10987{ 10988$atomic128_call 10989 ; 10990 return 0; 10991} 10992_ACEOF 10993if ac_fn_c_try_link "$LINENO"; then : 10994 ethr_cv_128bit___sync_fetch_and_and=yes 10995fi 10996rm -f core conftest.err conftest.$ac_objext \ 10997 conftest$ac_exeext conftest.$ac_ext 10998 10999fi 11000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_fetch_and_and" >&5 11001$as_echo "$ethr_cv_128bit___sync_fetch_and_and" >&6; } 11002 11003 case $ethr_cv_128bit___sync_fetch_and_and-$ethr_cv_64bit___sync_fetch_and_and-$ethr_cv_32bit___sync_fetch_and_and in 11004 no-no-no) 11005 have_atomic_ops=0;; 11006 no-no-yes) 11007 have_atomic_ops=4;; 11008 no-yes-no) 11009 have_atomic_ops=8;; 11010 no-yes-yes) 11011 have_atomic_ops=12;; 11012 yes-no-no) 11013 have_atomic_ops=16;; 11014 yes-no-yes) 11015 have_atomic_ops=20;; 11016 yes-yes-no) 11017 have_atomic_ops=24;; 11018 yes-yes-yes) 11019 have_atomic_ops=28;; 11020 esac 11021 11022cat >>confdefs.h <<_ACEOF 11023#define ETHR_HAVE___sync_fetch_and_and $have_atomic_ops 11024_ACEOF 11025 11026 11027 11028 # __sync_fetch_and_or - atomic_op 11029 11030 for atomic_bit_size in 32 64 128; do 11031 case $atomic_bit_size in 11032 32) gcc_atomic_type="$gcc_atomic_type32";; 11033 64) gcc_atomic_type="$gcc_atomic_type64";; 11034 128) gcc_atomic_type="$gcc_atomic_type128";; 11035 esac 11036 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 11037 case __sync_fetch_and_or in 11038 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 11039 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_or(&var, ($gcc_atomic_type) 0);" 11040 ;; 11041 __sync_val_compare_and_swap) 11042 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_or(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 11043 ;; 11044 __atomic_store_n) 11045 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __sync_fetch_and_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __sync_fetch_and_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11046 ;; 11047 __atomic_load_n) 11048 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_or(&var, __ATOMIC_RELAXED); res = __sync_fetch_and_or(&var, __ATOMIC_ACQUIRE);" 11049 ;; 11050 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 11051 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __sync_fetch_and_or(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __sync_fetch_and_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11052 ;; 11053 __atomic_compare_exchange_n) 11054 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __sync_fetch_and_or(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __sync_fetch_and_or(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 11055 ;; 11056 *) 11057 as_fn_error $? "Internal error: missing implementation for __sync_fetch_and_or" "$LINENO" 5 11058 ;; 11059 esac 11060 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 11061 done 11062 11063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_fetch_and_or()" >&5 11064$as_echo_n "checking for 32-bit __sync_fetch_and_or()... " >&6; } 11065if ${ethr_cv_32bit___sync_fetch_and_or+:} false; then : 11066 $as_echo_n "(cached) " >&6 11067else 11068 11069 ethr_cv_32bit___sync_fetch_and_or=no 11070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11071/* end confdefs.h. */ 11072 11073int 11074main () 11075{ 11076$atomic32_call 11077 ; 11078 return 0; 11079} 11080_ACEOF 11081if ac_fn_c_try_link "$LINENO"; then : 11082 ethr_cv_32bit___sync_fetch_and_or=yes 11083fi 11084rm -f core conftest.err conftest.$ac_objext \ 11085 conftest$ac_exeext conftest.$ac_ext 11086 11087fi 11088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_fetch_and_or" >&5 11089$as_echo "$ethr_cv_32bit___sync_fetch_and_or" >&6; } 11090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_fetch_and_or()" >&5 11091$as_echo_n "checking for 64-bit __sync_fetch_and_or()... " >&6; } 11092if ${ethr_cv_64bit___sync_fetch_and_or+:} false; then : 11093 $as_echo_n "(cached) " >&6 11094else 11095 11096 ethr_cv_64bit___sync_fetch_and_or=no 11097 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11098/* end confdefs.h. */ 11099 11100int 11101main () 11102{ 11103$atomic64_call 11104 ; 11105 return 0; 11106} 11107_ACEOF 11108if ac_fn_c_try_link "$LINENO"; then : 11109 ethr_cv_64bit___sync_fetch_and_or=yes 11110fi 11111rm -f core conftest.err conftest.$ac_objext \ 11112 conftest$ac_exeext conftest.$ac_ext 11113 11114fi 11115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_fetch_and_or" >&5 11116$as_echo "$ethr_cv_64bit___sync_fetch_and_or" >&6; } 11117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_fetch_and_or()" >&5 11118$as_echo_n "checking for 128-bit __sync_fetch_and_or()... " >&6; } 11119if ${ethr_cv_128bit___sync_fetch_and_or+:} false; then : 11120 $as_echo_n "(cached) " >&6 11121else 11122 11123 ethr_cv_128bit___sync_fetch_and_or=no 11124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11125/* end confdefs.h. */ 11126 11127int 11128main () 11129{ 11130$atomic128_call 11131 ; 11132 return 0; 11133} 11134_ACEOF 11135if ac_fn_c_try_link "$LINENO"; then : 11136 ethr_cv_128bit___sync_fetch_and_or=yes 11137fi 11138rm -f core conftest.err conftest.$ac_objext \ 11139 conftest$ac_exeext conftest.$ac_ext 11140 11141fi 11142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_fetch_and_or" >&5 11143$as_echo "$ethr_cv_128bit___sync_fetch_and_or" >&6; } 11144 11145 case $ethr_cv_128bit___sync_fetch_and_or-$ethr_cv_64bit___sync_fetch_and_or-$ethr_cv_32bit___sync_fetch_and_or in 11146 no-no-no) 11147 have_atomic_ops=0;; 11148 no-no-yes) 11149 have_atomic_ops=4;; 11150 no-yes-no) 11151 have_atomic_ops=8;; 11152 no-yes-yes) 11153 have_atomic_ops=12;; 11154 yes-no-no) 11155 have_atomic_ops=16;; 11156 yes-no-yes) 11157 have_atomic_ops=20;; 11158 yes-yes-no) 11159 have_atomic_ops=24;; 11160 yes-yes-yes) 11161 have_atomic_ops=28;; 11162 esac 11163 11164cat >>confdefs.h <<_ACEOF 11165#define ETHR_HAVE___sync_fetch_and_or $have_atomic_ops 11166_ACEOF 11167 11168 11169 11170 # __sync_val_compare_and_swap - atomic_op 11171 11172 for atomic_bit_size in 32 64 128; do 11173 case $atomic_bit_size in 11174 32) gcc_atomic_type="$gcc_atomic_type32";; 11175 64) gcc_atomic_type="$gcc_atomic_type64";; 11176 128) gcc_atomic_type="$gcc_atomic_type128";; 11177 esac 11178 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 11179 case __sync_val_compare_and_swap in 11180 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 11181 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0);" 11182 ;; 11183 __sync_val_compare_and_swap) 11184 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 11185 ;; 11186 __atomic_store_n) 11187 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11188 ;; 11189 __atomic_load_n) 11190 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_val_compare_and_swap(&var, __ATOMIC_RELAXED); res = __sync_val_compare_and_swap(&var, __ATOMIC_ACQUIRE);" 11191 ;; 11192 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 11193 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11194 ;; 11195 __atomic_compare_exchange_n) 11196 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __sync_val_compare_and_swap(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __sync_val_compare_and_swap(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 11197 ;; 11198 *) 11199 as_fn_error $? "Internal error: missing implementation for __sync_val_compare_and_swap" "$LINENO" 5 11200 ;; 11201 esac 11202 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 11203 done 11204 11205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_val_compare_and_swap()" >&5 11206$as_echo_n "checking for 32-bit __sync_val_compare_and_swap()... " >&6; } 11207if ${ethr_cv_32bit___sync_val_compare_and_swap+:} false; then : 11208 $as_echo_n "(cached) " >&6 11209else 11210 11211 ethr_cv_32bit___sync_val_compare_and_swap=no 11212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11213/* end confdefs.h. */ 11214 11215int 11216main () 11217{ 11218$atomic32_call 11219 ; 11220 return 0; 11221} 11222_ACEOF 11223if ac_fn_c_try_link "$LINENO"; then : 11224 ethr_cv_32bit___sync_val_compare_and_swap=yes 11225fi 11226rm -f core conftest.err conftest.$ac_objext \ 11227 conftest$ac_exeext conftest.$ac_ext 11228 11229fi 11230{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_val_compare_and_swap" >&5 11231$as_echo "$ethr_cv_32bit___sync_val_compare_and_swap" >&6; } 11232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_val_compare_and_swap()" >&5 11233$as_echo_n "checking for 64-bit __sync_val_compare_and_swap()... " >&6; } 11234if ${ethr_cv_64bit___sync_val_compare_and_swap+:} false; then : 11235 $as_echo_n "(cached) " >&6 11236else 11237 11238 ethr_cv_64bit___sync_val_compare_and_swap=no 11239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11240/* end confdefs.h. */ 11241 11242int 11243main () 11244{ 11245$atomic64_call 11246 ; 11247 return 0; 11248} 11249_ACEOF 11250if ac_fn_c_try_link "$LINENO"; then : 11251 ethr_cv_64bit___sync_val_compare_and_swap=yes 11252fi 11253rm -f core conftest.err conftest.$ac_objext \ 11254 conftest$ac_exeext conftest.$ac_ext 11255 11256fi 11257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_val_compare_and_swap" >&5 11258$as_echo "$ethr_cv_64bit___sync_val_compare_and_swap" >&6; } 11259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_val_compare_and_swap()" >&5 11260$as_echo_n "checking for 128-bit __sync_val_compare_and_swap()... " >&6; } 11261if ${ethr_cv_128bit___sync_val_compare_and_swap+:} false; then : 11262 $as_echo_n "(cached) " >&6 11263else 11264 11265 ethr_cv_128bit___sync_val_compare_and_swap=no 11266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11267/* end confdefs.h. */ 11268 11269int 11270main () 11271{ 11272$atomic128_call 11273 ; 11274 return 0; 11275} 11276_ACEOF 11277if ac_fn_c_try_link "$LINENO"; then : 11278 ethr_cv_128bit___sync_val_compare_and_swap=yes 11279fi 11280rm -f core conftest.err conftest.$ac_objext \ 11281 conftest$ac_exeext conftest.$ac_ext 11282 11283fi 11284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_val_compare_and_swap" >&5 11285$as_echo "$ethr_cv_128bit___sync_val_compare_and_swap" >&6; } 11286 11287 case $ethr_cv_128bit___sync_val_compare_and_swap-$ethr_cv_64bit___sync_val_compare_and_swap-$ethr_cv_32bit___sync_val_compare_and_swap in 11288 no-no-no) 11289 have_atomic_ops=0;; 11290 no-no-yes) 11291 have_atomic_ops=4;; 11292 no-yes-no) 11293 have_atomic_ops=8;; 11294 no-yes-yes) 11295 have_atomic_ops=12;; 11296 yes-no-no) 11297 have_atomic_ops=16;; 11298 yes-no-yes) 11299 have_atomic_ops=20;; 11300 yes-yes-no) 11301 have_atomic_ops=24;; 11302 yes-yes-yes) 11303 have_atomic_ops=28;; 11304 esac 11305 11306cat >>confdefs.h <<_ACEOF 11307#define ETHR_HAVE___sync_val_compare_and_swap $have_atomic_ops 11308_ACEOF 11309 11310 11311 11312 11313 # __atomic_store_n - atomic_op 11314 11315 for atomic_bit_size in 32 64 128; do 11316 case $atomic_bit_size in 11317 32) gcc_atomic_type="$gcc_atomic_type32";; 11318 64) gcc_atomic_type="$gcc_atomic_type64";; 11319 128) gcc_atomic_type="$gcc_atomic_type128";; 11320 esac 11321 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 11322 case __atomic_store_n in 11323 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 11324 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_store_n(&var, ($gcc_atomic_type) 0);" 11325 ;; 11326 __sync_val_compare_and_swap) 11327 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_store_n(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 11328 ;; 11329 __atomic_store_n) 11330 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __atomic_store_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __atomic_store_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11331 ;; 11332 __atomic_load_n) 11333 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_store_n(&var, __ATOMIC_RELAXED); res = __atomic_store_n(&var, __ATOMIC_ACQUIRE);" 11334 ;; 11335 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 11336 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_store_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __atomic_store_n(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __atomic_store_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11337 ;; 11338 __atomic_compare_exchange_n) 11339 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __atomic_store_n(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __atomic_store_n(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 11340 ;; 11341 *) 11342 as_fn_error $? "Internal error: missing implementation for __atomic_store_n" "$LINENO" 5 11343 ;; 11344 esac 11345 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 11346 done 11347 11348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_store_n()" >&5 11349$as_echo_n "checking for 32-bit __atomic_store_n()... " >&6; } 11350if ${ethr_cv_32bit___atomic_store_n+:} false; then : 11351 $as_echo_n "(cached) " >&6 11352else 11353 11354 ethr_cv_32bit___atomic_store_n=no 11355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11356/* end confdefs.h. */ 11357 11358int 11359main () 11360{ 11361$atomic32_call 11362 ; 11363 return 0; 11364} 11365_ACEOF 11366if ac_fn_c_try_link "$LINENO"; then : 11367 ethr_cv_32bit___atomic_store_n=yes 11368fi 11369rm -f core conftest.err conftest.$ac_objext \ 11370 conftest$ac_exeext conftest.$ac_ext 11371 11372fi 11373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_store_n" >&5 11374$as_echo "$ethr_cv_32bit___atomic_store_n" >&6; } 11375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_store_n()" >&5 11376$as_echo_n "checking for 64-bit __atomic_store_n()... " >&6; } 11377if ${ethr_cv_64bit___atomic_store_n+:} false; then : 11378 $as_echo_n "(cached) " >&6 11379else 11380 11381 ethr_cv_64bit___atomic_store_n=no 11382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11383/* end confdefs.h. */ 11384 11385int 11386main () 11387{ 11388$atomic64_call 11389 ; 11390 return 0; 11391} 11392_ACEOF 11393if ac_fn_c_try_link "$LINENO"; then : 11394 ethr_cv_64bit___atomic_store_n=yes 11395fi 11396rm -f core conftest.err conftest.$ac_objext \ 11397 conftest$ac_exeext conftest.$ac_ext 11398 11399fi 11400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_store_n" >&5 11401$as_echo "$ethr_cv_64bit___atomic_store_n" >&6; } 11402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_store_n()" >&5 11403$as_echo_n "checking for 128-bit __atomic_store_n()... " >&6; } 11404if ${ethr_cv_128bit___atomic_store_n+:} false; then : 11405 $as_echo_n "(cached) " >&6 11406else 11407 11408 ethr_cv_128bit___atomic_store_n=no 11409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11410/* end confdefs.h. */ 11411 11412int 11413main () 11414{ 11415$atomic128_call 11416 ; 11417 return 0; 11418} 11419_ACEOF 11420if ac_fn_c_try_link "$LINENO"; then : 11421 ethr_cv_128bit___atomic_store_n=yes 11422fi 11423rm -f core conftest.err conftest.$ac_objext \ 11424 conftest$ac_exeext conftest.$ac_ext 11425 11426fi 11427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_store_n" >&5 11428$as_echo "$ethr_cv_128bit___atomic_store_n" >&6; } 11429 11430 case $ethr_cv_128bit___atomic_store_n-$ethr_cv_64bit___atomic_store_n-$ethr_cv_32bit___atomic_store_n in 11431 no-no-no) 11432 have_atomic_ops=0;; 11433 no-no-yes) 11434 have_atomic_ops=4;; 11435 no-yes-no) 11436 have_atomic_ops=8;; 11437 no-yes-yes) 11438 have_atomic_ops=12;; 11439 yes-no-no) 11440 have_atomic_ops=16;; 11441 yes-no-yes) 11442 have_atomic_ops=20;; 11443 yes-yes-no) 11444 have_atomic_ops=24;; 11445 yes-yes-yes) 11446 have_atomic_ops=28;; 11447 esac 11448 11449cat >>confdefs.h <<_ACEOF 11450#define ETHR_HAVE___atomic_store_n $have_atomic_ops 11451_ACEOF 11452 11453 11454 11455 # __atomic_load_n - atomic_op 11456 11457 for atomic_bit_size in 32 64 128; do 11458 case $atomic_bit_size in 11459 32) gcc_atomic_type="$gcc_atomic_type32";; 11460 64) gcc_atomic_type="$gcc_atomic_type64";; 11461 128) gcc_atomic_type="$gcc_atomic_type128";; 11462 esac 11463 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 11464 case __atomic_load_n in 11465 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 11466 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_load_n(&var, ($gcc_atomic_type) 0);" 11467 ;; 11468 __sync_val_compare_and_swap) 11469 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_load_n(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 11470 ;; 11471 __atomic_store_n) 11472 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __atomic_load_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __atomic_load_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11473 ;; 11474 __atomic_load_n) 11475 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_load_n(&var, __ATOMIC_RELAXED); res = __atomic_load_n(&var, __ATOMIC_ACQUIRE);" 11476 ;; 11477 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 11478 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_load_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __atomic_load_n(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __atomic_load_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11479 ;; 11480 __atomic_compare_exchange_n) 11481 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __atomic_load_n(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __atomic_load_n(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 11482 ;; 11483 *) 11484 as_fn_error $? "Internal error: missing implementation for __atomic_load_n" "$LINENO" 5 11485 ;; 11486 esac 11487 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 11488 done 11489 11490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_load_n()" >&5 11491$as_echo_n "checking for 32-bit __atomic_load_n()... " >&6; } 11492if ${ethr_cv_32bit___atomic_load_n+:} false; then : 11493 $as_echo_n "(cached) " >&6 11494else 11495 11496 ethr_cv_32bit___atomic_load_n=no 11497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11498/* end confdefs.h. */ 11499 11500int 11501main () 11502{ 11503$atomic32_call 11504 ; 11505 return 0; 11506} 11507_ACEOF 11508if ac_fn_c_try_link "$LINENO"; then : 11509 ethr_cv_32bit___atomic_load_n=yes 11510fi 11511rm -f core conftest.err conftest.$ac_objext \ 11512 conftest$ac_exeext conftest.$ac_ext 11513 11514fi 11515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_load_n" >&5 11516$as_echo "$ethr_cv_32bit___atomic_load_n" >&6; } 11517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_load_n()" >&5 11518$as_echo_n "checking for 64-bit __atomic_load_n()... " >&6; } 11519if ${ethr_cv_64bit___atomic_load_n+:} false; then : 11520 $as_echo_n "(cached) " >&6 11521else 11522 11523 ethr_cv_64bit___atomic_load_n=no 11524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11525/* end confdefs.h. */ 11526 11527int 11528main () 11529{ 11530$atomic64_call 11531 ; 11532 return 0; 11533} 11534_ACEOF 11535if ac_fn_c_try_link "$LINENO"; then : 11536 ethr_cv_64bit___atomic_load_n=yes 11537fi 11538rm -f core conftest.err conftest.$ac_objext \ 11539 conftest$ac_exeext conftest.$ac_ext 11540 11541fi 11542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_load_n" >&5 11543$as_echo "$ethr_cv_64bit___atomic_load_n" >&6; } 11544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_load_n()" >&5 11545$as_echo_n "checking for 128-bit __atomic_load_n()... " >&6; } 11546if ${ethr_cv_128bit___atomic_load_n+:} false; then : 11547 $as_echo_n "(cached) " >&6 11548else 11549 11550 ethr_cv_128bit___atomic_load_n=no 11551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11552/* end confdefs.h. */ 11553 11554int 11555main () 11556{ 11557$atomic128_call 11558 ; 11559 return 0; 11560} 11561_ACEOF 11562if ac_fn_c_try_link "$LINENO"; then : 11563 ethr_cv_128bit___atomic_load_n=yes 11564fi 11565rm -f core conftest.err conftest.$ac_objext \ 11566 conftest$ac_exeext conftest.$ac_ext 11567 11568fi 11569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_load_n" >&5 11570$as_echo "$ethr_cv_128bit___atomic_load_n" >&6; } 11571 11572 case $ethr_cv_128bit___atomic_load_n-$ethr_cv_64bit___atomic_load_n-$ethr_cv_32bit___atomic_load_n in 11573 no-no-no) 11574 have_atomic_ops=0;; 11575 no-no-yes) 11576 have_atomic_ops=4;; 11577 no-yes-no) 11578 have_atomic_ops=8;; 11579 no-yes-yes) 11580 have_atomic_ops=12;; 11581 yes-no-no) 11582 have_atomic_ops=16;; 11583 yes-no-yes) 11584 have_atomic_ops=20;; 11585 yes-yes-no) 11586 have_atomic_ops=24;; 11587 yes-yes-yes) 11588 have_atomic_ops=28;; 11589 esac 11590 11591cat >>confdefs.h <<_ACEOF 11592#define ETHR_HAVE___atomic_load_n $have_atomic_ops 11593_ACEOF 11594 11595 11596 11597 # __atomic_add_fetch - atomic_op 11598 11599 for atomic_bit_size in 32 64 128; do 11600 case $atomic_bit_size in 11601 32) gcc_atomic_type="$gcc_atomic_type32";; 11602 64) gcc_atomic_type="$gcc_atomic_type64";; 11603 128) gcc_atomic_type="$gcc_atomic_type128";; 11604 esac 11605 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 11606 case __atomic_add_fetch in 11607 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 11608 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_add_fetch(&var, ($gcc_atomic_type) 0);" 11609 ;; 11610 __sync_val_compare_and_swap) 11611 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_add_fetch(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 11612 ;; 11613 __atomic_store_n) 11614 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __atomic_add_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __atomic_add_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11615 ;; 11616 __atomic_load_n) 11617 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_add_fetch(&var, __ATOMIC_RELAXED); res = __atomic_add_fetch(&var, __ATOMIC_ACQUIRE);" 11618 ;; 11619 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 11620 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_add_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __atomic_add_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __atomic_add_fetch(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11621 ;; 11622 __atomic_compare_exchange_n) 11623 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __atomic_add_fetch(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __atomic_add_fetch(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 11624 ;; 11625 *) 11626 as_fn_error $? "Internal error: missing implementation for __atomic_add_fetch" "$LINENO" 5 11627 ;; 11628 esac 11629 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 11630 done 11631 11632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_add_fetch()" >&5 11633$as_echo_n "checking for 32-bit __atomic_add_fetch()... " >&6; } 11634if ${ethr_cv_32bit___atomic_add_fetch+:} false; then : 11635 $as_echo_n "(cached) " >&6 11636else 11637 11638 ethr_cv_32bit___atomic_add_fetch=no 11639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11640/* end confdefs.h. */ 11641 11642int 11643main () 11644{ 11645$atomic32_call 11646 ; 11647 return 0; 11648} 11649_ACEOF 11650if ac_fn_c_try_link "$LINENO"; then : 11651 ethr_cv_32bit___atomic_add_fetch=yes 11652fi 11653rm -f core conftest.err conftest.$ac_objext \ 11654 conftest$ac_exeext conftest.$ac_ext 11655 11656fi 11657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_add_fetch" >&5 11658$as_echo "$ethr_cv_32bit___atomic_add_fetch" >&6; } 11659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_add_fetch()" >&5 11660$as_echo_n "checking for 64-bit __atomic_add_fetch()... " >&6; } 11661if ${ethr_cv_64bit___atomic_add_fetch+:} false; then : 11662 $as_echo_n "(cached) " >&6 11663else 11664 11665 ethr_cv_64bit___atomic_add_fetch=no 11666 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11667/* end confdefs.h. */ 11668 11669int 11670main () 11671{ 11672$atomic64_call 11673 ; 11674 return 0; 11675} 11676_ACEOF 11677if ac_fn_c_try_link "$LINENO"; then : 11678 ethr_cv_64bit___atomic_add_fetch=yes 11679fi 11680rm -f core conftest.err conftest.$ac_objext \ 11681 conftest$ac_exeext conftest.$ac_ext 11682 11683fi 11684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_add_fetch" >&5 11685$as_echo "$ethr_cv_64bit___atomic_add_fetch" >&6; } 11686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_add_fetch()" >&5 11687$as_echo_n "checking for 128-bit __atomic_add_fetch()... " >&6; } 11688if ${ethr_cv_128bit___atomic_add_fetch+:} false; then : 11689 $as_echo_n "(cached) " >&6 11690else 11691 11692 ethr_cv_128bit___atomic_add_fetch=no 11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11694/* end confdefs.h. */ 11695 11696int 11697main () 11698{ 11699$atomic128_call 11700 ; 11701 return 0; 11702} 11703_ACEOF 11704if ac_fn_c_try_link "$LINENO"; then : 11705 ethr_cv_128bit___atomic_add_fetch=yes 11706fi 11707rm -f core conftest.err conftest.$ac_objext \ 11708 conftest$ac_exeext conftest.$ac_ext 11709 11710fi 11711{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_add_fetch" >&5 11712$as_echo "$ethr_cv_128bit___atomic_add_fetch" >&6; } 11713 11714 case $ethr_cv_128bit___atomic_add_fetch-$ethr_cv_64bit___atomic_add_fetch-$ethr_cv_32bit___atomic_add_fetch in 11715 no-no-no) 11716 have_atomic_ops=0;; 11717 no-no-yes) 11718 have_atomic_ops=4;; 11719 no-yes-no) 11720 have_atomic_ops=8;; 11721 no-yes-yes) 11722 have_atomic_ops=12;; 11723 yes-no-no) 11724 have_atomic_ops=16;; 11725 yes-no-yes) 11726 have_atomic_ops=20;; 11727 yes-yes-no) 11728 have_atomic_ops=24;; 11729 yes-yes-yes) 11730 have_atomic_ops=28;; 11731 esac 11732 11733cat >>confdefs.h <<_ACEOF 11734#define ETHR_HAVE___atomic_add_fetch $have_atomic_ops 11735_ACEOF 11736 11737 11738 11739 # __atomic_fetch_and - atomic_op 11740 11741 for atomic_bit_size in 32 64 128; do 11742 case $atomic_bit_size in 11743 32) gcc_atomic_type="$gcc_atomic_type32";; 11744 64) gcc_atomic_type="$gcc_atomic_type64";; 11745 128) gcc_atomic_type="$gcc_atomic_type128";; 11746 esac 11747 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 11748 case __atomic_fetch_and in 11749 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 11750 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_and(&var, ($gcc_atomic_type) 0);" 11751 ;; 11752 __sync_val_compare_and_swap) 11753 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_and(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 11754 ;; 11755 __atomic_store_n) 11756 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __atomic_fetch_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __atomic_fetch_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11757 ;; 11758 __atomic_load_n) 11759 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_and(&var, __ATOMIC_RELAXED); res = __atomic_fetch_and(&var, __ATOMIC_ACQUIRE);" 11760 ;; 11761 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 11762 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __atomic_fetch_and(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __atomic_fetch_and(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11763 ;; 11764 __atomic_compare_exchange_n) 11765 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __atomic_fetch_and(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __atomic_fetch_and(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 11766 ;; 11767 *) 11768 as_fn_error $? "Internal error: missing implementation for __atomic_fetch_and" "$LINENO" 5 11769 ;; 11770 esac 11771 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 11772 done 11773 11774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_fetch_and()" >&5 11775$as_echo_n "checking for 32-bit __atomic_fetch_and()... " >&6; } 11776if ${ethr_cv_32bit___atomic_fetch_and+:} false; then : 11777 $as_echo_n "(cached) " >&6 11778else 11779 11780 ethr_cv_32bit___atomic_fetch_and=no 11781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11782/* end confdefs.h. */ 11783 11784int 11785main () 11786{ 11787$atomic32_call 11788 ; 11789 return 0; 11790} 11791_ACEOF 11792if ac_fn_c_try_link "$LINENO"; then : 11793 ethr_cv_32bit___atomic_fetch_and=yes 11794fi 11795rm -f core conftest.err conftest.$ac_objext \ 11796 conftest$ac_exeext conftest.$ac_ext 11797 11798fi 11799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_fetch_and" >&5 11800$as_echo "$ethr_cv_32bit___atomic_fetch_and" >&6; } 11801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_fetch_and()" >&5 11802$as_echo_n "checking for 64-bit __atomic_fetch_and()... " >&6; } 11803if ${ethr_cv_64bit___atomic_fetch_and+:} false; then : 11804 $as_echo_n "(cached) " >&6 11805else 11806 11807 ethr_cv_64bit___atomic_fetch_and=no 11808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11809/* end confdefs.h. */ 11810 11811int 11812main () 11813{ 11814$atomic64_call 11815 ; 11816 return 0; 11817} 11818_ACEOF 11819if ac_fn_c_try_link "$LINENO"; then : 11820 ethr_cv_64bit___atomic_fetch_and=yes 11821fi 11822rm -f core conftest.err conftest.$ac_objext \ 11823 conftest$ac_exeext conftest.$ac_ext 11824 11825fi 11826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_fetch_and" >&5 11827$as_echo "$ethr_cv_64bit___atomic_fetch_and" >&6; } 11828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_fetch_and()" >&5 11829$as_echo_n "checking for 128-bit __atomic_fetch_and()... " >&6; } 11830if ${ethr_cv_128bit___atomic_fetch_and+:} false; then : 11831 $as_echo_n "(cached) " >&6 11832else 11833 11834 ethr_cv_128bit___atomic_fetch_and=no 11835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11836/* end confdefs.h. */ 11837 11838int 11839main () 11840{ 11841$atomic128_call 11842 ; 11843 return 0; 11844} 11845_ACEOF 11846if ac_fn_c_try_link "$LINENO"; then : 11847 ethr_cv_128bit___atomic_fetch_and=yes 11848fi 11849rm -f core conftest.err conftest.$ac_objext \ 11850 conftest$ac_exeext conftest.$ac_ext 11851 11852fi 11853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_fetch_and" >&5 11854$as_echo "$ethr_cv_128bit___atomic_fetch_and" >&6; } 11855 11856 case $ethr_cv_128bit___atomic_fetch_and-$ethr_cv_64bit___atomic_fetch_and-$ethr_cv_32bit___atomic_fetch_and in 11857 no-no-no) 11858 have_atomic_ops=0;; 11859 no-no-yes) 11860 have_atomic_ops=4;; 11861 no-yes-no) 11862 have_atomic_ops=8;; 11863 no-yes-yes) 11864 have_atomic_ops=12;; 11865 yes-no-no) 11866 have_atomic_ops=16;; 11867 yes-no-yes) 11868 have_atomic_ops=20;; 11869 yes-yes-no) 11870 have_atomic_ops=24;; 11871 yes-yes-yes) 11872 have_atomic_ops=28;; 11873 esac 11874 11875cat >>confdefs.h <<_ACEOF 11876#define ETHR_HAVE___atomic_fetch_and $have_atomic_ops 11877_ACEOF 11878 11879 11880 11881 # __atomic_fetch_or - atomic_op 11882 11883 for atomic_bit_size in 32 64 128; do 11884 case $atomic_bit_size in 11885 32) gcc_atomic_type="$gcc_atomic_type32";; 11886 64) gcc_atomic_type="$gcc_atomic_type64";; 11887 128) gcc_atomic_type="$gcc_atomic_type128";; 11888 esac 11889 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 11890 case __atomic_fetch_or in 11891 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 11892 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_or(&var, ($gcc_atomic_type) 0);" 11893 ;; 11894 __sync_val_compare_and_swap) 11895 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_or(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 11896 ;; 11897 __atomic_store_n) 11898 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __atomic_fetch_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __atomic_fetch_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11899 ;; 11900 __atomic_load_n) 11901 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_or(&var, __ATOMIC_RELAXED); res = __atomic_fetch_or(&var, __ATOMIC_ACQUIRE);" 11902 ;; 11903 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 11904 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __atomic_fetch_or(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __atomic_fetch_or(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 11905 ;; 11906 __atomic_compare_exchange_n) 11907 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __atomic_fetch_or(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __atomic_fetch_or(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 11908 ;; 11909 *) 11910 as_fn_error $? "Internal error: missing implementation for __atomic_fetch_or" "$LINENO" 5 11911 ;; 11912 esac 11913 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 11914 done 11915 11916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_fetch_or()" >&5 11917$as_echo_n "checking for 32-bit __atomic_fetch_or()... " >&6; } 11918if ${ethr_cv_32bit___atomic_fetch_or+:} false; then : 11919 $as_echo_n "(cached) " >&6 11920else 11921 11922 ethr_cv_32bit___atomic_fetch_or=no 11923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11924/* end confdefs.h. */ 11925 11926int 11927main () 11928{ 11929$atomic32_call 11930 ; 11931 return 0; 11932} 11933_ACEOF 11934if ac_fn_c_try_link "$LINENO"; then : 11935 ethr_cv_32bit___atomic_fetch_or=yes 11936fi 11937rm -f core conftest.err conftest.$ac_objext \ 11938 conftest$ac_exeext conftest.$ac_ext 11939 11940fi 11941{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_fetch_or" >&5 11942$as_echo "$ethr_cv_32bit___atomic_fetch_or" >&6; } 11943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_fetch_or()" >&5 11944$as_echo_n "checking for 64-bit __atomic_fetch_or()... " >&6; } 11945if ${ethr_cv_64bit___atomic_fetch_or+:} false; then : 11946 $as_echo_n "(cached) " >&6 11947else 11948 11949 ethr_cv_64bit___atomic_fetch_or=no 11950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11951/* end confdefs.h. */ 11952 11953int 11954main () 11955{ 11956$atomic64_call 11957 ; 11958 return 0; 11959} 11960_ACEOF 11961if ac_fn_c_try_link "$LINENO"; then : 11962 ethr_cv_64bit___atomic_fetch_or=yes 11963fi 11964rm -f core conftest.err conftest.$ac_objext \ 11965 conftest$ac_exeext conftest.$ac_ext 11966 11967fi 11968{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_fetch_or" >&5 11969$as_echo "$ethr_cv_64bit___atomic_fetch_or" >&6; } 11970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_fetch_or()" >&5 11971$as_echo_n "checking for 128-bit __atomic_fetch_or()... " >&6; } 11972if ${ethr_cv_128bit___atomic_fetch_or+:} false; then : 11973 $as_echo_n "(cached) " >&6 11974else 11975 11976 ethr_cv_128bit___atomic_fetch_or=no 11977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11978/* end confdefs.h. */ 11979 11980int 11981main () 11982{ 11983$atomic128_call 11984 ; 11985 return 0; 11986} 11987_ACEOF 11988if ac_fn_c_try_link "$LINENO"; then : 11989 ethr_cv_128bit___atomic_fetch_or=yes 11990fi 11991rm -f core conftest.err conftest.$ac_objext \ 11992 conftest$ac_exeext conftest.$ac_ext 11993 11994fi 11995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_fetch_or" >&5 11996$as_echo "$ethr_cv_128bit___atomic_fetch_or" >&6; } 11997 11998 case $ethr_cv_128bit___atomic_fetch_or-$ethr_cv_64bit___atomic_fetch_or-$ethr_cv_32bit___atomic_fetch_or in 11999 no-no-no) 12000 have_atomic_ops=0;; 12001 no-no-yes) 12002 have_atomic_ops=4;; 12003 no-yes-no) 12004 have_atomic_ops=8;; 12005 no-yes-yes) 12006 have_atomic_ops=12;; 12007 yes-no-no) 12008 have_atomic_ops=16;; 12009 yes-no-yes) 12010 have_atomic_ops=20;; 12011 yes-yes-no) 12012 have_atomic_ops=24;; 12013 yes-yes-yes) 12014 have_atomic_ops=28;; 12015 esac 12016 12017cat >>confdefs.h <<_ACEOF 12018#define ETHR_HAVE___atomic_fetch_or $have_atomic_ops 12019_ACEOF 12020 12021 12022 12023 # __atomic_compare_exchange_n - atomic_op 12024 12025 for atomic_bit_size in 32 64 128; do 12026 case $atomic_bit_size in 12027 32) gcc_atomic_type="$gcc_atomic_type32";; 12028 64) gcc_atomic_type="$gcc_atomic_type64";; 12029 128) gcc_atomic_type="$gcc_atomic_type128";; 12030 esac 12031 gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" 12032 case __atomic_compare_exchange_n in 12033 __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) 12034 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0);" 12035 ;; 12036 __sync_val_compare_and_swap) 12037 atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" 12038 ;; 12039 __atomic_store_n) 12040 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 12041 ;; 12042 __atomic_load_n) 12043 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_compare_exchange_n(&var, __ATOMIC_RELAXED); res = __atomic_compare_exchange_n(&var, __ATOMIC_ACQUIRE);" 12044 ;; 12045 __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 12046 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELAXED); res = __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0, __ATOMIC_ACQUIRE); res = __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0, __ATOMIC_RELEASE);" 12047 ;; 12048 __atomic_compare_exchange_n) 12049 atomic_call="$gcc_atomic_lockfree; volatile $gcc_atomic_type var; $gcc_atomic_type val; int res = __atomic_compare_exchange_n(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_RELAXED, __ATOMIC_RELAXED); res = __atomic_compare_exchange_n(&var, &val, ($gcc_atomic_type) 0, 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);" 12050 ;; 12051 *) 12052 as_fn_error $? "Internal error: missing implementation for __atomic_compare_exchange_n" "$LINENO" 5 12053 ;; 12054 esac 12055 eval atomic${atomic_bit_size}_call=\"$atomic_call\" 12056 done 12057 12058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_compare_exchange_n()" >&5 12059$as_echo_n "checking for 32-bit __atomic_compare_exchange_n()... " >&6; } 12060if ${ethr_cv_32bit___atomic_compare_exchange_n+:} false; then : 12061 $as_echo_n "(cached) " >&6 12062else 12063 12064 ethr_cv_32bit___atomic_compare_exchange_n=no 12065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12066/* end confdefs.h. */ 12067 12068int 12069main () 12070{ 12071$atomic32_call 12072 ; 12073 return 0; 12074} 12075_ACEOF 12076if ac_fn_c_try_link "$LINENO"; then : 12077 ethr_cv_32bit___atomic_compare_exchange_n=yes 12078fi 12079rm -f core conftest.err conftest.$ac_objext \ 12080 conftest$ac_exeext conftest.$ac_ext 12081 12082fi 12083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_compare_exchange_n" >&5 12084$as_echo "$ethr_cv_32bit___atomic_compare_exchange_n" >&6; } 12085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_compare_exchange_n()" >&5 12086$as_echo_n "checking for 64-bit __atomic_compare_exchange_n()... " >&6; } 12087if ${ethr_cv_64bit___atomic_compare_exchange_n+:} false; then : 12088 $as_echo_n "(cached) " >&6 12089else 12090 12091 ethr_cv_64bit___atomic_compare_exchange_n=no 12092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12093/* end confdefs.h. */ 12094 12095int 12096main () 12097{ 12098$atomic64_call 12099 ; 12100 return 0; 12101} 12102_ACEOF 12103if ac_fn_c_try_link "$LINENO"; then : 12104 ethr_cv_64bit___atomic_compare_exchange_n=yes 12105fi 12106rm -f core conftest.err conftest.$ac_objext \ 12107 conftest$ac_exeext conftest.$ac_ext 12108 12109fi 12110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_compare_exchange_n" >&5 12111$as_echo "$ethr_cv_64bit___atomic_compare_exchange_n" >&6; } 12112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_compare_exchange_n()" >&5 12113$as_echo_n "checking for 128-bit __atomic_compare_exchange_n()... " >&6; } 12114if ${ethr_cv_128bit___atomic_compare_exchange_n+:} false; then : 12115 $as_echo_n "(cached) " >&6 12116else 12117 12118 ethr_cv_128bit___atomic_compare_exchange_n=no 12119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12120/* end confdefs.h. */ 12121 12122int 12123main () 12124{ 12125$atomic128_call 12126 ; 12127 return 0; 12128} 12129_ACEOF 12130if ac_fn_c_try_link "$LINENO"; then : 12131 ethr_cv_128bit___atomic_compare_exchange_n=yes 12132fi 12133rm -f core conftest.err conftest.$ac_objext \ 12134 conftest$ac_exeext conftest.$ac_ext 12135 12136fi 12137{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_compare_exchange_n" >&5 12138$as_echo "$ethr_cv_128bit___atomic_compare_exchange_n" >&6; } 12139 12140 case $ethr_cv_128bit___atomic_compare_exchange_n-$ethr_cv_64bit___atomic_compare_exchange_n-$ethr_cv_32bit___atomic_compare_exchange_n in 12141 no-no-no) 12142 have_atomic_ops=0;; 12143 no-no-yes) 12144 have_atomic_ops=4;; 12145 no-yes-no) 12146 have_atomic_ops=8;; 12147 no-yes-yes) 12148 have_atomic_ops=12;; 12149 yes-no-no) 12150 have_atomic_ops=16;; 12151 yes-no-yes) 12152 have_atomic_ops=20;; 12153 yes-yes-no) 12154 have_atomic_ops=24;; 12155 yes-yes-yes) 12156 have_atomic_ops=28;; 12157 esac 12158 12159cat >>confdefs.h <<_ACEOF 12160#define ETHR_HAVE___atomic_compare_exchange_n $have_atomic_ops 12161_ACEOF 12162 12163 12164 12165 ethr_have_gcc_native_atomics=no 12166 ethr_arm_dbm_sy_instr_val=0 12167 ethr_arm_dbm_st_instr_val=0 12168 ethr_arm_dbm_ld_instr_val=0 12169 case "$GCC-$host_cpu" in 12170 yes-arm*|yes-aarch*) 12171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb sy' instruction" >&5 12172$as_echo_n "checking for ARM 'dmb sy' instruction... " >&6; } 12173if ${ethr_cv_arm_dbm_sy_instr+:} false; then : 12174 $as_echo_n "(cached) " >&6 12175else 12176 12177 ethr_cv_arm_dbm_sy_instr=no 12178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12179/* end confdefs.h. */ 12180 12181int 12182main () 12183{ 12184 12185 __asm__ __volatile__("dmb sy" : : : "memory"); 12186 12187 ; 12188 return 0; 12189} 12190_ACEOF 12191if ac_fn_c_try_link "$LINENO"; then : 12192 ethr_cv_arm_dbm_sy_instr=yes 12193fi 12194rm -f core conftest.err conftest.$ac_objext \ 12195 conftest$ac_exeext conftest.$ac_ext 12196 12197fi 12198{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_sy_instr" >&5 12199$as_echo "$ethr_cv_arm_dbm_sy_instr" >&6; } 12200 if test $ethr_cv_arm_dbm_sy_instr = yes; then 12201 ethr_arm_dbm_sy_instr_val=1 12202 test $ethr_cv_64bit___atomic_compare_exchange_n = yes && 12203 ethr_have_gcc_native_atomics=yes 12204 fi 12205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb st' instruction" >&5 12206$as_echo_n "checking for ARM 'dmb st' instruction... " >&6; } 12207if ${ethr_cv_arm_dbm_st_instr+:} false; then : 12208 $as_echo_n "(cached) " >&6 12209else 12210 12211 ethr_cv_arm_dbm_st_instr=no 12212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12213/* end confdefs.h. */ 12214 12215int 12216main () 12217{ 12218 12219 __asm__ __volatile__("dmb st" : : : "memory"); 12220 12221 ; 12222 return 0; 12223} 12224_ACEOF 12225if ac_fn_c_try_link "$LINENO"; then : 12226 ethr_cv_arm_dbm_st_instr=yes 12227fi 12228rm -f core conftest.err conftest.$ac_objext \ 12229 conftest$ac_exeext conftest.$ac_ext 12230 12231fi 12232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_st_instr" >&5 12233$as_echo "$ethr_cv_arm_dbm_st_instr" >&6; } 12234 if test $ethr_cv_arm_dbm_st_instr = yes; then 12235 ethr_arm_dbm_st_instr_val=1 12236 fi 12237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb ld' instruction" >&5 12238$as_echo_n "checking for ARM 'dmb ld' instruction... " >&6; } 12239if ${ethr_cv_arm_dbm_ld_instr+:} false; then : 12240 $as_echo_n "(cached) " >&6 12241else 12242 12243 ethr_cv_arm_dbm_ld_instr=no 12244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12245/* end confdefs.h. */ 12246 12247int 12248main () 12249{ 12250 12251 __asm__ __volatile__("dmb ld" : : : "memory"); 12252 12253 ; 12254 return 0; 12255} 12256_ACEOF 12257if ac_fn_c_try_link "$LINENO"; then : 12258 ethr_cv_arm_dbm_ld_instr=yes 12259fi 12260rm -f core conftest.err conftest.$ac_objext \ 12261 conftest$ac_exeext conftest.$ac_ext 12262 12263fi 12264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_ld_instr" >&5 12265$as_echo "$ethr_cv_arm_dbm_ld_instr" >&6; } 12266 if test $ethr_cv_arm_dbm_ld_instr = yes; then 12267 ethr_arm_dbm_ld_instr_val=1 12268 fi;; 12269 *) 12270 ;; 12271 esac 12272 12273cat >>confdefs.h <<_ACEOF 12274#define ETHR_HAVE_GCC_ASM_ARM_DMB_INSTRUCTION $ethr_arm_dbm_sy_instr_val 12275_ACEOF 12276 12277 12278cat >>confdefs.h <<_ACEOF 12279#define ETHR_HAVE_GCC_ASM_ARM_DMB_ST_INSTRUCTION $ethr_arm_dbm_st_instr_val 12280_ACEOF 12281 12282 12283cat >>confdefs.h <<_ACEOF 12284#define ETHR_HAVE_GCC_ASM_ARM_DMB_LD_INSTRUCTION $ethr_arm_dbm_ld_instr_val 12285_ACEOF 12286 12287 test $ethr_cv_32bit___sync_val_compare_and_swap = yes && 12288 ethr_have_gcc_native_atomics=yes 12289 test $ethr_cv_64bit___sync_val_compare_and_swap = yes && 12290 ethr_have_gcc_native_atomics=yes 12291 if test "$ethr_cv___sync_synchronize" = "yes"; then 12292 test $ethr_cv_64bit___atomic_compare_exchange_n = yes && 12293 ethr_have_gcc_native_atomics=yes 12294 test $ethr_cv_32bit___atomic_compare_exchange_n = yes && 12295 ethr_have_gcc_native_atomics=yes 12296 fi 12297 ethr_have_gcc_atomic_builtins=0 12298 if test $ethr_have_gcc_native_atomics = yes; then 12299 ethr_native_atomic_implementation=gcc_sync 12300 test $ethr_cv_32bit___atomic_compare_exchange_n = yes && ethr_have_gcc_atomic_builtins=1 12301 test $ethr_cv_64bit___atomic_compare_exchange_n = yes && ethr_have_gcc_atomic_builtins=1 12302 test $ethr_have_gcc_atomic_builtins = 1 && ethr_native_atomic_implementation=gcc_atomic_sync 12303 fi 12304 12305cat >>confdefs.h <<_ACEOF 12306#define ETHR_HAVE_GCC___ATOMIC_BUILTINS $ethr_have_gcc_atomic_builtins 12307_ACEOF 12308 12309 test $ethr_have_gcc_native_atomics = yes && ethr_have_native_atomics=yes 12310 12311 12312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a usable libatomic_ops implementation" >&5 12313$as_echo_n "checking for a usable libatomic_ops implementation... " >&6; } 12314 case "x$with_libatomic_ops" in 12315 xno | xyes | x) 12316 libatomic_ops_include= 12317 ;; 12318 *) 12319 if test -d "${with_libatomic_ops}/include"; then 12320 libatomic_ops_include="-I$with_libatomic_ops/include" 12321 CPPFLAGS="$CPPFLAGS $libatomic_ops_include" 12322 else 12323 as_fn_error $? "libatomic_ops include directory $with_libatomic_ops/include not found" "$LINENO" 5 12324 fi;; 12325 esac 12326 ethr_have_libatomic_ops=no 12327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12328/* end confdefs.h. */ 12329#include "atomic_ops.h" 12330int 12331main () 12332{ 12333 12334 volatile AO_t x; 12335 AO_t y; 12336 int z; 12337 12338 AO_nop_full(); 12339#if defined(AO_HAVE_store) 12340 AO_store(&x, (AO_t) 0); 12341#elif defined(AO_HAVE_store_release) 12342 AO_store_release(&x, (AO_t) 0); 12343#else 12344#error No store 12345#endif 12346#if defined(AO_HAVE_load) 12347 z = AO_load(&x); 12348#elif defined(AO_HAVE_load_acquire) 12349 z = AO_load_acquire(&x); 12350#else 12351#error No load 12352#endif 12353#if defined(AO_HAVE_compare_and_swap_full) 12354 z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1); 12355#elif defined(AO_HAVE_compare_and_swap_release) 12356 z = AO_compare_and_swap_release(&x, (AO_t) 0, (AO_t) 1); 12357#elif defined(AO_HAVE_compare_and_swap_acquire) 12358 z = AO_compare_and_swap_acquire(&x, (AO_t) 0, (AO_t) 1); 12359#elif defined(AO_HAVE_compare_and_swap) 12360 z = AO_compare_and_swap(&x, (AO_t) 0, (AO_t) 1); 12361#else 12362#error No compare_and_swap 12363#endif 12364 12365 ; 12366 return 0; 12367} 12368_ACEOF 12369if ac_fn_c_try_link "$LINENO"; then : 12370 ethr_have_native_atomics=yes 12371 ethr_native_atomic_implementation=libatomic_ops 12372 ethr_have_libatomic_ops=yes 12373fi 12374rm -f core conftest.err conftest.$ac_objext \ 12375 conftest$ac_exeext conftest.$ac_ext 12376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_have_libatomic_ops" >&5 12377$as_echo "$ethr_have_libatomic_ops" >&6; } 12378 if test $ethr_have_libatomic_ops = yes; then 12379 # The cast to long int works around a bug in the HP C Compiler 12380# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 12381# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 12382# This bug is HP SR number 8606223364. 12383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of AO_t" >&5 12384$as_echo_n "checking size of AO_t... " >&6; } 12385if ${ac_cv_sizeof_AO_t+:} false; then : 12386 $as_echo_n "(cached) " >&6 12387else 12388 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (AO_t))" "ac_cv_sizeof_AO_t" " 12389 #include <stdio.h> 12390 #include \"atomic_ops.h\" 12391 12392"; then : 12393 12394else 12395 if test "$ac_cv_type_AO_t" = yes; then 12396 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12398as_fn_error 77 "cannot compute sizeof (AO_t) 12399See \`config.log' for more details" "$LINENO" 5; } 12400 else 12401 ac_cv_sizeof_AO_t=0 12402 fi 12403fi 12404 12405fi 12406{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_AO_t" >&5 12407$as_echo "$ac_cv_sizeof_AO_t" >&6; } 12408 12409 12410 12411cat >>confdefs.h <<_ACEOF 12412#define SIZEOF_AO_T $ac_cv_sizeof_AO_t 12413_ACEOF 12414 12415 12416 12417cat >>confdefs.h <<_ACEOF 12418#define ETHR_SIZEOF_AO_T $ac_cv_sizeof_AO_t 12419_ACEOF 12420 12421 12422 12423$as_echo "#define ETHR_HAVE_LIBATOMIC_OPS 1" >>confdefs.h 12424 12425 if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then 12426 12427$as_echo "#define ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS 1" >>confdefs.h 12428 12429 fi 12430 ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include" 12431 elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then 12432 as_fn_error $? "No usable libatomic_ops implementation found" "$LINENO" 5 12433 fi 12434 12435 case "$host_cpu" in 12436 sparc | sun4u | sparc64 | sun4v) 12437 case "$with_sparc_memory_order" in 12438 "TSO") 12439 12440$as_echo "#define ETHR_SPARC_TSO 1" >>confdefs.h 12441;; 12442 "PSO") 12443 12444$as_echo "#define ETHR_SPARC_PSO 1" >>confdefs.h 12445;; 12446 "RMO"|"") 12447 12448$as_echo "#define ETHR_SPARC_RMO 1" >>confdefs.h 12449;; 12450 *) 12451 as_fn_error $? "Unsupported Sparc memory order: $with_sparc_memory_order" "$LINENO" 5;; 12452 esac 12453 ethr_native_atomic_implementation=ethread 12454 ethr_have_native_atomics=yes;; 12455 i86pc | i*86 | x86_64 | amd64) 12456 if test "$enable_x86_out_of_order" = "yes"; then 12457 12458$as_echo "#define ETHR_X86_OUT_OF_ORDER 1" >>confdefs.h 12459 12460 fi 12461 ethr_native_atomic_implementation=ethread 12462 ethr_have_native_atomics=yes;; 12463 macppc | ppc | powerpc | "Power Macintosh") 12464 ethr_native_atomic_implementation=ethread 12465 ethr_have_native_atomics=yes;; 12466 tile) 12467 ethr_native_atomic_implementation=ethread 12468 ethr_have_native_atomics=yes;; 12469 *) 12470 ;; 12471 esac 12472 12473 fi 12474 12475 test ethr_have_native_atomics = "yes" && ethr_have_native_spinlock=yes 12476 12477 LIBS=$saved_libs 12478 CPPFLAGS=$saved_cppflags 12479 12480 ;; 12481 *) 12482 ;; 12483esac 12484 12485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether default stack size should be modified" >&5 12486$as_echo_n "checking whether default stack size should be modified... " >&6; } 12487if test "x$ethr_modified_default_stack_size" != "x"; then 12488 12489cat >>confdefs.h <<_ACEOF 12490#define ETHR_MODIFIED_DEFAULT_STACK_SIZE $ethr_modified_default_stack_size 12491_ACEOF 12492 12493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; to $ethr_modified_default_stack_size kilo words" >&5 12494$as_echo "yes; to $ethr_modified_default_stack_size kilo words" >&6; } 12495else 12496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 12497$as_echo "no" >&6; } 12498fi 12499 12500if test "x$ETHR_THR_LIB_BASE" != "x"; then 12501 ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS" 12502 ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS" 12503 ETHR_LIB_NAME=$ethr_lib_name 12504fi 12505 12506# The cast to long int works around a bug in the HP C Compiler 12507# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 12508# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 12509# This bug is HP SR number 8606223364. 12510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 12511$as_echo_n "checking size of void *... " >&6; } 12512if ${ac_cv_sizeof_void_p+:} false; then : 12513 $as_echo_n "(cached) " >&6 12514else 12515 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : 12516 12517else 12518 if test "$ac_cv_type_void_p" = yes; then 12519 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12521as_fn_error 77 "cannot compute sizeof (void *) 12522See \`config.log' for more details" "$LINENO" 5; } 12523 else 12524 ac_cv_sizeof_void_p=0 12525 fi 12526fi 12527 12528fi 12529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 12530$as_echo "$ac_cv_sizeof_void_p" >&6; } 12531 12532 12533 12534cat >>confdefs.h <<_ACEOF 12535#define SIZEOF_VOID_P $ac_cv_sizeof_void_p 12536_ACEOF 12537 12538 12539 12540cat >>confdefs.h <<_ACEOF 12541#define ETHR_SIZEOF_PTR $ac_cv_sizeof_void_p 12542_ACEOF 12543 12544 12545# The cast to long int works around a bug in the HP C Compiler 12546# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 12547# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 12548# This bug is HP SR number 8606223364. 12549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 12550$as_echo_n "checking size of int... " >&6; } 12551if ${ac_cv_sizeof_int+:} false; then : 12552 $as_echo_n "(cached) " >&6 12553else 12554 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : 12555 12556else 12557 if test "$ac_cv_type_int" = yes; then 12558 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12559$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12560as_fn_error 77 "cannot compute sizeof (int) 12561See \`config.log' for more details" "$LINENO" 5; } 12562 else 12563 ac_cv_sizeof_int=0 12564 fi 12565fi 12566 12567fi 12568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 12569$as_echo "$ac_cv_sizeof_int" >&6; } 12570 12571 12572 12573cat >>confdefs.h <<_ACEOF 12574#define SIZEOF_INT $ac_cv_sizeof_int 12575_ACEOF 12576 12577 12578 12579cat >>confdefs.h <<_ACEOF 12580#define ETHR_SIZEOF_INT $ac_cv_sizeof_int 12581_ACEOF 12582 12583# The cast to long int works around a bug in the HP C Compiler 12584# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 12585# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 12586# This bug is HP SR number 8606223364. 12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 12588$as_echo_n "checking size of long... " >&6; } 12589if ${ac_cv_sizeof_long+:} false; then : 12590 $as_echo_n "(cached) " >&6 12591else 12592 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : 12593 12594else 12595 if test "$ac_cv_type_long" = yes; then 12596 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12598as_fn_error 77 "cannot compute sizeof (long) 12599See \`config.log' for more details" "$LINENO" 5; } 12600 else 12601 ac_cv_sizeof_long=0 12602 fi 12603fi 12604 12605fi 12606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 12607$as_echo "$ac_cv_sizeof_long" >&6; } 12608 12609 12610 12611cat >>confdefs.h <<_ACEOF 12612#define SIZEOF_LONG $ac_cv_sizeof_long 12613_ACEOF 12614 12615 12616 12617cat >>confdefs.h <<_ACEOF 12618#define ETHR_SIZEOF_LONG $ac_cv_sizeof_long 12619_ACEOF 12620 12621# The cast to long int works around a bug in the HP C Compiler 12622# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 12623# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 12624# This bug is HP SR number 8606223364. 12625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 12626$as_echo_n "checking size of long long... " >&6; } 12627if ${ac_cv_sizeof_long_long+:} false; then : 12628 $as_echo_n "(cached) " >&6 12629else 12630 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : 12631 12632else 12633 if test "$ac_cv_type_long_long" = yes; then 12634 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12636as_fn_error 77 "cannot compute sizeof (long long) 12637See \`config.log' for more details" "$LINENO" 5; } 12638 else 12639 ac_cv_sizeof_long_long=0 12640 fi 12641fi 12642 12643fi 12644{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 12645$as_echo "$ac_cv_sizeof_long_long" >&6; } 12646 12647 12648 12649cat >>confdefs.h <<_ACEOF 12650#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long 12651_ACEOF 12652 12653 12654 12655cat >>confdefs.h <<_ACEOF 12656#define ETHR_SIZEOF_LONG_LONG $ac_cv_sizeof_long_long 12657_ACEOF 12658 12659# The cast to long int works around a bug in the HP C Compiler 12660# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 12661# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 12662# This bug is HP SR number 8606223364. 12663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 12664$as_echo_n "checking size of __int64... " >&6; } 12665if ${ac_cv_sizeof___int64+:} false; then : 12666 $as_echo_n "(cached) " >&6 12667else 12668 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : 12669 12670else 12671 if test "$ac_cv_type___int64" = yes; then 12672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12674as_fn_error 77 "cannot compute sizeof (__int64) 12675See \`config.log' for more details" "$LINENO" 5; } 12676 else 12677 ac_cv_sizeof___int64=0 12678 fi 12679fi 12680 12681fi 12682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 12683$as_echo "$ac_cv_sizeof___int64" >&6; } 12684 12685 12686 12687cat >>confdefs.h <<_ACEOF 12688#define SIZEOF___INT64 $ac_cv_sizeof___int64 12689_ACEOF 12690 12691 12692 12693cat >>confdefs.h <<_ACEOF 12694#define ETHR_SIZEOF___INT64 $ac_cv_sizeof___int64 12695_ACEOF 12696 12697# The cast to long int works around a bug in the HP C Compiler 12698# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 12699# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 12700# This bug is HP SR number 8606223364. 12701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int128_t" >&5 12702$as_echo_n "checking size of __int128_t... " >&6; } 12703if ${ac_cv_sizeof___int128_t+:} false; then : 12704 $as_echo_n "(cached) " >&6 12705else 12706 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int128_t))" "ac_cv_sizeof___int128_t" "$ac_includes_default"; then : 12707 12708else 12709 if test "$ac_cv_type___int128_t" = yes; then 12710 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 12711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 12712as_fn_error 77 "cannot compute sizeof (__int128_t) 12713See \`config.log' for more details" "$LINENO" 5; } 12714 else 12715 ac_cv_sizeof___int128_t=0 12716 fi 12717fi 12718 12719fi 12720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int128_t" >&5 12721$as_echo "$ac_cv_sizeof___int128_t" >&6; } 12722 12723 12724 12725cat >>confdefs.h <<_ACEOF 12726#define SIZEOF___INT128_T $ac_cv_sizeof___int128_t 12727_ACEOF 12728 12729 12730 12731cat >>confdefs.h <<_ACEOF 12732#define ETHR_SIZEOF___INT128_T $ac_cv_sizeof___int128_t 12733_ACEOF 12734 12735 12736 12737case X$erl_xcomp_bigendian in 12738 X) ;; 12739 Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;; 12740 *) as_fn_error $? "Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" "$LINENO" 5;; 12741esac 12742 12743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 12744$as_echo_n "checking whether byte ordering is bigendian... " >&6; } 12745if ${ac_cv_c_bigendian+:} false; then : 12746 $as_echo_n "(cached) " >&6 12747else 12748 ac_cv_c_bigendian=unknown 12749 # See if we're dealing with a universal compiler. 12750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12751/* end confdefs.h. */ 12752#ifndef __APPLE_CC__ 12753 not a universal capable compiler 12754 #endif 12755 typedef int dummy; 12756 12757_ACEOF 12758if ac_fn_c_try_compile "$LINENO"; then : 12759 12760 # Check for potential -arch flags. It is not universal unless 12761 # there are at least two -arch flags with different values. 12762 ac_arch= 12763 ac_prev= 12764 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 12765 if test -n "$ac_prev"; then 12766 case $ac_word in 12767 i?86 | x86_64 | ppc | ppc64) 12768 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 12769 ac_arch=$ac_word 12770 else 12771 ac_cv_c_bigendian=universal 12772 break 12773 fi 12774 ;; 12775 esac 12776 ac_prev= 12777 elif test "x$ac_word" = "x-arch"; then 12778 ac_prev=arch 12779 fi 12780 done 12781fi 12782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12783 if test $ac_cv_c_bigendian = unknown; then 12784 # See if sys/param.h defines the BYTE_ORDER macro. 12785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12786/* end confdefs.h. */ 12787#include <sys/types.h> 12788 #include <sys/param.h> 12789 12790int 12791main () 12792{ 12793#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 12794 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 12795 && LITTLE_ENDIAN) 12796 bogus endian macros 12797 #endif 12798 12799 ; 12800 return 0; 12801} 12802_ACEOF 12803if ac_fn_c_try_compile "$LINENO"; then : 12804 # It does; now see whether it defined to BIG_ENDIAN or not. 12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12806/* end confdefs.h. */ 12807#include <sys/types.h> 12808 #include <sys/param.h> 12809 12810int 12811main () 12812{ 12813#if BYTE_ORDER != BIG_ENDIAN 12814 not big endian 12815 #endif 12816 12817 ; 12818 return 0; 12819} 12820_ACEOF 12821if ac_fn_c_try_compile "$LINENO"; then : 12822 ac_cv_c_bigendian=yes 12823else 12824 ac_cv_c_bigendian=no 12825fi 12826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12827fi 12828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12829 fi 12830 if test $ac_cv_c_bigendian = unknown; then 12831 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 12832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12833/* end confdefs.h. */ 12834#include <limits.h> 12835 12836int 12837main () 12838{ 12839#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 12840 bogus endian macros 12841 #endif 12842 12843 ; 12844 return 0; 12845} 12846_ACEOF 12847if ac_fn_c_try_compile "$LINENO"; then : 12848 # It does; now see whether it defined to _BIG_ENDIAN or not. 12849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12850/* end confdefs.h. */ 12851#include <limits.h> 12852 12853int 12854main () 12855{ 12856#ifndef _BIG_ENDIAN 12857 not big endian 12858 #endif 12859 12860 ; 12861 return 0; 12862} 12863_ACEOF 12864if ac_fn_c_try_compile "$LINENO"; then : 12865 ac_cv_c_bigendian=yes 12866else 12867 ac_cv_c_bigendian=no 12868fi 12869rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12870fi 12871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12872 fi 12873 if test $ac_cv_c_bigendian = unknown; then 12874 # Compile a test program. 12875 if test "$cross_compiling" = yes; then : 12876 # Try to guess by grepping values from an object file. 12877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12878/* end confdefs.h. */ 12879short int ascii_mm[] = 12880 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 12881 short int ascii_ii[] = 12882 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 12883 int use_ascii (int i) { 12884 return ascii_mm[i] + ascii_ii[i]; 12885 } 12886 short int ebcdic_ii[] = 12887 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 12888 short int ebcdic_mm[] = 12889 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 12890 int use_ebcdic (int i) { 12891 return ebcdic_mm[i] + ebcdic_ii[i]; 12892 } 12893 extern int foo; 12894 12895int 12896main () 12897{ 12898return use_ascii (foo) == use_ebcdic (foo); 12899 ; 12900 return 0; 12901} 12902_ACEOF 12903if ac_fn_c_try_compile "$LINENO"; then : 12904 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 12905 ac_cv_c_bigendian=yes 12906 fi 12907 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 12908 if test "$ac_cv_c_bigendian" = unknown; then 12909 ac_cv_c_bigendian=no 12910 else 12911 # finding both strings is unlikely to happen, but who knows? 12912 ac_cv_c_bigendian=unknown 12913 fi 12914 fi 12915fi 12916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12917else 12918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12919/* end confdefs.h. */ 12920$ac_includes_default 12921int 12922main () 12923{ 12924 12925 /* Are we little or big endian? From Harbison&Steele. */ 12926 union 12927 { 12928 long int l; 12929 char c[sizeof (long int)]; 12930 } u; 12931 u.l = 1; 12932 return u.c[sizeof (long int) - 1] == 1; 12933 12934 ; 12935 return 0; 12936} 12937_ACEOF 12938if ac_fn_c_try_run "$LINENO"; then : 12939 ac_cv_c_bigendian=no 12940else 12941 ac_cv_c_bigendian=yes 12942fi 12943rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 12944 conftest.$ac_objext conftest.beam conftest.$ac_ext 12945fi 12946 12947 fi 12948fi 12949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 12950$as_echo "$ac_cv_c_bigendian" >&6; } 12951 case $ac_cv_c_bigendian in #( 12952 yes) 12953 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h 12954;; #( 12955 no) 12956 ;; #( 12957 universal) 12958 12959$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h 12960 12961 ;; #( 12962 *) 12963 as_fn_error $? "unknown endianness 12964 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 12965 esac 12966 12967 12968if test "$ac_cv_c_bigendian" = "yes"; then 12969 12970$as_echo "#define ETHR_BIGENDIAN 1" >>confdefs.h 12971 12972fi 12973 12974case X$erl_xcomp_double_middle_endian in 12975 X) ;; 12976 Xyes|Xno|Xunknown) ac_cv_c_double_middle_endian=$erl_xcomp_double_middle_endian;; 12977 *) as_fn_error $? "Bad erl_xcomp_double_middle_endian value: $erl_xcomp_double_middle_endian" "$LINENO" 5;; 12978esac 12979 12980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether double word ordering is middle-endian" >&5 12981$as_echo_n "checking whether double word ordering is middle-endian... " >&6; } 12982if ${ac_cv_c_double_middle_endian+:} false; then : 12983 $as_echo_n "(cached) " >&6 12984else 12985 # It does not; compile a test program. 12986if test "$cross_compiling" = yes; then : 12987 ac_cv_c_double_middle=unknown 12988else 12989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12990/* end confdefs.h. */ 12991#include <stdlib.h> 12992 12993int 12994main(void) 12995{ 12996 int i = 0; 12997 int zero = 0; 12998 int bigendian; 12999 int zero_index = 0; 13000 13001 union 13002 { 13003 long int l; 13004 char c[sizeof (long int)]; 13005 } u; 13006 13007 /* we'll use the one with 32-bit words */ 13008 union 13009 { 13010 double d; 13011 unsigned int c[2]; 13012 } vint; 13013 13014 union 13015 { 13016 double d; 13017 unsigned long c[2]; 13018 } vlong; 13019 13020 union 13021 { 13022 double d; 13023 unsigned short c[2]; 13024 } vshort; 13025 13026 13027 /* Are we little or big endian? From Harbison&Steele. */ 13028 u.l = 1; 13029 bigendian = (u.c[sizeof (long int) - 1] == 1); 13030 13031 zero_index = bigendian ? 1 : 0; 13032 13033 vint.d = 1.0; 13034 vlong.d = 1.0; 13035 vshort.d = 1.0; 13036 13037 if (sizeof(unsigned int) == 4) 13038 { 13039 if (vint.c[zero_index] != 0) 13040 zero = 1; 13041 } 13042 else if (sizeof(unsigned long) == 4) 13043 { 13044 if (vlong.c[zero_index] != 0) 13045 zero = 1; 13046 } 13047 else if (sizeof(unsigned short) == 4) 13048 { 13049 if (vshort.c[zero_index] != 0) 13050 zero = 1; 13051 } 13052 13053 exit (zero); 13054} 13055 13056_ACEOF 13057if ac_fn_c_try_run "$LINENO"; then : 13058 ac_cv_c_double_middle_endian=no 13059else 13060 ac_cv_c_double_middle_endian=yes 13061fi 13062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13063 conftest.$ac_objext conftest.beam conftest.$ac_ext 13064fi 13065 13066fi 13067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_double_middle_endian" >&5 13068$as_echo "$ac_cv_c_double_middle_endian" >&6; } 13069case $ac_cv_c_double_middle_endian in 13070 yes) 13071 13072$as_echo "#define DOUBLE_MIDDLE_ENDIAN 1" >>confdefs.h 13073 ;; 13074 no) 13075 ;; 13076 *) 13077 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown double endianness 13078presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&5 13079$as_echo "$as_me: WARNING: unknown double endianness 13080presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&2;} ;; 13081esac 13082 13083 13084ETHR_X86_SSE2_ASM=no 13085case "$GCC-$ac_cv_sizeof_void_p-$host_cpu" in 13086 yes-4-i86pc | yes-4-i*86 | yes-4-x86_64 | yes-4-amd64) 13087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc sse2 asm support" >&5 13088$as_echo_n "checking for gcc sse2 asm support... " >&6; } 13089 save_CFLAGS="$CFLAGS" 13090 CFLAGS="$CFLAGS -msse2" 13091 gcc_sse2_asm=no 13092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13093/* end confdefs.h. */ 13094 13095int 13096main () 13097{ 13098 13099 long long x, *y; 13100 __asm__ __volatile__("movq %1, %0\n\t" : "=x"(x) : "m"(*y) : "memory"); 13101 13102 ; 13103 return 0; 13104} 13105_ACEOF 13106if ac_fn_c_try_compile "$LINENO"; then : 13107 gcc_sse2_asm=yes 13108fi 13109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13110 CFLAGS="$save_CFLAGS" 13111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_sse2_asm" >&5 13112$as_echo "$gcc_sse2_asm" >&6; } 13113 if test "$gcc_sse2_asm" = "yes"; then 13114 13115$as_echo "#define ETHR_GCC_HAVE_SSE2_ASM_SUPPORT 1" >>confdefs.h 13116 13117 ETHR_X86_SSE2_ASM=yes 13118 fi 13119 ;; 13120 *) 13121 ;; 13122esac 13123 13124case "$GCC-$host_cpu" in 13125 yes-i86pc | yes-i*86 | yes-x86_64 | yes-amd64) 13126 13127 if test $ac_cv_sizeof_void_p = 4; then 13128 dw_cmpxchg="cmpxchg8b" 13129 else 13130 dw_cmpxchg="cmpxchg16b" 13131 fi 13132 13133 gcc_dw_cmpxchg_asm=no 13134 gcc_pic_dw_cmpxchg_asm=no 13135 gcc_cflags_pic=no 13136 gcc_cmpxchg8b_pic_no_clobber_ebx=no 13137 gcc_cmpxchg8b_pic_no_clobber_ebx_register_shortage=no 13138 13139 save_CFLAGS="$CFLAGS" 13140 13141 # Check if it works out of the box using passed CFLAGS 13142 # and with -fPIC added to CFLAGS if the passed CFLAGS 13143 # doesn't trigger position independent code 13144 pic_cmpxchg=unknown 13145 while true; do 13146 13147 case $pic_cmpxchg in 13148 yes) pic_text="pic ";; 13149 *) pic_text="";; 13150 esac 13151 13152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc $pic_text$dw_cmpxchg plain asm support" >&5 13153$as_echo_n "checking for gcc $pic_text$dw_cmpxchg plain asm support... " >&6; } 13154 13155 plain_cmpxchg=no 13156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13157/* end confdefs.h. */ 13158 13159int 13160main () 13161{ 13162 13163 char xchgd; 13164 long new[2], xchg[2], *p; 13165 __asm__ __volatile__( 13166#if ETHR_SIZEOF_PTR == 4 13167 "lock; cmpxchg8b %0\n\t" 13168#else 13169 "lock; cmpxchg16b %0\n\t" 13170#endif 13171 "setz %3\n\t" 13172 : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=q"(xchgd) 13173 : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "c"(new[1]), "b"(new[0]) 13174 : "cc", "memory"); 13175 13176 ; 13177 return 0; 13178} 13179_ACEOF 13180if ac_fn_c_try_compile "$LINENO"; then : 13181 plain_cmpxchg=yes 13182fi 13183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13184 13185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plain_cmpxchg" >&5 13186$as_echo "$plain_cmpxchg" >&6; } 13187 13188 if test $pic_cmpxchg = yes; then 13189 gcc_pic_dw_cmpxchg_asm=$plain_cmpxchg 13190 break 13191 fi 13192 13193 gcc_dw_cmpxchg_asm=$plain_cmpxchg 13194 13195 # If not already compiling to position independent 13196 # code add -fPIC to CFLAGS and do it again. This 13197 # since we want also want to know how to compile 13198 # to position independent code since this might 13199 # cause problems with the use of the EBX register 13200 # as input to the asm on 32-bit x86 and old gcc 13201 # compilers (gcc vsn < 5). 13202 13203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13204/* end confdefs.h. */ 13205 13206int 13207main () 13208{ 13209 13210#if !defined(__PIC__) || !__PIC__ 13211# error no pic 13212#endif 13213 13214 ; 13215 return 0; 13216} 13217_ACEOF 13218if ac_fn_c_try_compile "$LINENO"; then : 13219 pic_cmpxchg=yes 13220 gcc_cflags_pic=yes 13221else 13222 pic_cmpxchg=no 13223fi 13224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13225 13226 if test $pic_cmpxchg = yes; then 13227 gcc_pic_dw_cmpxchg_asm=$gcc_dw_cmpxchg_asm 13228 break 13229 fi 13230 13231 CFLAGS="$save_CFLAGS -fPIC" 13232 pic_cmpxchg=yes 13233 13234 done 13235 13236 if test $gcc_pic_dw_cmpxchg_asm = no && test $ac_cv_sizeof_void_p = 4; then 13237 13238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc pic cmpxchg8b asm support with EBX workaround" >&5 13239$as_echo_n "checking for gcc pic cmpxchg8b asm support with EBX workaround... " >&6; } 13240 13241 # Check if we can work around it by managing the ebx 13242 # register explicitly in the asm... 13243 13244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13245/* end confdefs.h. */ 13246 13247int 13248main () 13249{ 13250 13251 char xchgd; 13252 long new[2], xchg[2], *p; 13253 __asm__ __volatile__( 13254 "pushl %%ebx\n\t" 13255 "movl %8, %%ebx\n\t" 13256 "lock; cmpxchg8b %0\n\t" 13257 "setz %3\n\t" 13258 "popl %%ebx\n\t" 13259 : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=q"(xchgd) 13260 : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "c"(new[1]), "r"(new[0]) 13261 : "cc", "memory"); 13262 13263 ; 13264 return 0; 13265} 13266_ACEOF 13267if ac_fn_c_try_compile "$LINENO"; then : 13268 gcc_pic_dw_cmpxchg_asm=yes 13269 gcc_cmpxchg8b_pic_no_clobber_ebx=yes 13270fi 13271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13272 13273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_pic_dw_cmpxchg_asm" >&5 13274$as_echo "$gcc_pic_dw_cmpxchg_asm" >&6; } 13275 13276 if test $gcc_pic_dw_cmpxchg_asm = no; then 13277 13278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc pic cmpxchg8b asm support with EBX and register shortage workarounds" >&5 13279$as_echo_n "checking for gcc pic cmpxchg8b asm support with EBX and register shortage workarounds... " >&6; } 13280 # If no optimization is enabled we sometimes get a 13281 # register shortage. Check if we can work around 13282 # this... 13283 13284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13285/* end confdefs.h. */ 13286 13287int 13288main () 13289{ 13290 13291 char xchgd; 13292 long new[2], xchg[2], *p; 13293 __asm__ __volatile__( 13294 "pushl %%ebx\n\t" 13295 "movl (%7), %%ebx\n\t" 13296 "movl 4(%7), %%ecx\n\t" 13297 "lock; cmpxchg8b %0\n\t" 13298 "setz %3\n\t" 13299 "popl %%ebx\n\t" 13300 : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd) 13301 : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "r"(new) 13302 : "cc", "memory"); 13303 13304 13305 ; 13306 return 0; 13307} 13308_ACEOF 13309if ac_fn_c_try_compile "$LINENO"; then : 13310 gcc_pic_dw_cmpxchg_asm=yes 13311 gcc_cmpxchg8b_pic_no_clobber_ebx=yes 13312 gcc_cmpxchg8b_pic_no_clobber_ebx_register_shortage=yes 13313fi 13314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13315 13316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_pic_dw_cmpxchg_asm" >&5 13317$as_echo "$gcc_pic_dw_cmpxchg_asm" >&6; } 13318 fi 13319 13320 if test $gcc_cflags_pic = yes; then 13321 gcc_dw_cmpxchg_asm=$gcc_pic_dw_cmpxchg_asm 13322 fi 13323 13324 fi 13325 13326 CFLAGS="$save_CFLAGS" 13327 13328 if test "$gcc_cmpxchg8b_pic_no_clobber_ebx" = "yes"; then 13329 13330$as_echo "#define ETHR_CMPXCHG8B_PIC_NO_CLOBBER_EBX 1" >>confdefs.h 13331 13332 fi 13333 if test "$gcc_cmpxchg8b_pic_no_clobber_ebx_register_shortage" = "yes"; then 13334 13335$as_echo "#define ETHR_CMPXCHG8B_REGISTER_SHORTAGE 1" >>confdefs.h 13336 13337 fi 13338 if test "$gcc_dw_cmpxchg_asm" = "yes"; then 13339 13340$as_echo "#define ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT 1" >>confdefs.h 13341 13342 fi;; 13343 *) 13344 ;; 13345esac 13346 13347 13348$as_echo "#define ETHR_HAVE_ETHREAD_DEFINES 1" >>confdefs.h 13349 13350 13351 13352 13353 13354 13355 13356 13357 13358 13359 13360 13361if test "X$ETHR_LIB_NAME" = "X"; then 13362 as_fn_error $? "cannot build emulator since no thread library was found" "$LINENO" 5 13363fi 13364 13365TYPES=opt 13366 13367DIRTY_SCHEDULER_TEST=$enable_dirty_schedulers_test 13368 13369test $DIRTY_SCHEDULER_TEST != yes || { 13370 test -f "$ERL_TOP/erts/CONF_INFO" || echo "" > "$ERL_TOP/erts/CONF_INFO" 13371 cat >> $ERL_TOP/erts/CONF_INFO <<EOF 13372 13373 WARNING: 13374 Dirty Scheduler Test has been enabled. This 13375 feature is for debugging purposes only. 13376 Poor performance as well as strange system 13377 characteristics is expected! 13378 13379EOF 13380} 13381 13382test "X$smp_require_native_atomics" = "Xyes" && 13383 13384$as_echo "#define ETHR_SMP_REQUIRE_NATIVE_IMPLS 1" >>confdefs.h 13385 13386 13387case "$ethr_have_native_atomics-$smp_require_native_atomics-$ethr_have_native_spinlock" in 13388 yes-*) 13389 if test "$ethr_native_atomic_implementation" = "gcc_sync"; then 13390 test -f "$ERL_TOP/erts/CONF_INFO" || 13391 echo "" > "$ERL_TOP/erts/CONF_INFO" 13392 cat >> $ERL_TOP/erts/CONF_INFO <<EOF 13393 13394 WARNING: 13395 Only gcc's __sync_* builtins available for 13396 atomic memory access. This will cause lots 13397 of expensive and unnecessary memory barrier 13398 instructions to be issued which will make 13399 the performance of the runtime system 13400 suffer. You are *strongly* advised to 13401 upgrade to a gcc version that supports the 13402 __atomic_* builtins (at least gcc version 13403 4.7) or build with libatomic_ops. See the 13404 "Atomic Memory Operations and the VM" 13405 chapter of \$ERL_TOP/HOWTO/INSTALL.md for 13406 more information. 13407 13408EOF 13409 fi 13410 ;; 13411 13412 no-yes-*) 13413 as_fn_error $? "No native atomic implementation found. See the \\"Atomic Memory Operations and the VM\\" chapter of \$ERL_TOP/HOWTO/INSTALL.md for more information." "$LINENO" 5 13414 ;; 13415 13416 no-no-yes) 13417 13418 test -f "$ERL_TOP/erts/CONF_INFO" || 13419 echo "" > "$ERL_TOP/erts/CONF_INFO" 13420 cat >> $ERL_TOP/erts/CONF_INFO <<EOF 13421 13422 No native atomic implementation available. 13423 Fallbacks implemented using spinlocks will be 13424 used. Note that the performance of the SMP 13425 runtime system will suffer immensely due to 13426 this. 13427 13428EOF 13429 ;; 13430 13431 no-no-no) 13432 test -f "$ERL_TOP/erts/CONF_INFO" || 13433 echo "" > "$ERL_TOP/erts/CONF_INFO" 13434 cat >> "$ERL_TOP/erts/CONF_INFO" <<EOF 13435 13436 No native atomic implementation, nor no native 13437 spinlock implementation available. Fallbacks 13438 implemented using mutexes will be used. Note 13439 that the performance of the SMP runtime system 13440 will suffer immensely due to this. 13441 13442EOF 13443 ;; 13444 13445esac 13446 13447 13448for ac_func in posix_fadvise closefrom 13449do : 13450 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13451ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 13452if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 13453 cat >>confdefs.h <<_ACEOF 13454#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13455_ACEOF 13456 13457fi 13458done 13459 13460for ac_header in linux/falloc.h 13461do : 13462 ac_fn_c_check_header_mongrel "$LINENO" "linux/falloc.h" "ac_cv_header_linux_falloc_h" "$ac_includes_default" 13463if test "x$ac_cv_header_linux_falloc_h" = xyes; then : 13464 cat >>confdefs.h <<_ACEOF 13465#define HAVE_LINUX_FALLOC_H 1 13466_ACEOF 13467 13468fi 13469 13470done 13471 13472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fallocate() works" >&5 13473$as_echo_n "checking whether fallocate() works... " >&6; } 13474if ${i_cv_fallocate_works+:} false; then : 13475 $as_echo_n "(cached) " >&6 13476else 13477 13478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13479/* end confdefs.h. */ 13480 13481 #include <stdio.h> 13482 #include <stdlib.h> 13483 #include <fcntl.h> 13484 #include <unistd.h> 13485 #include <fcntl.h> 13486 #include <linux/falloc.h> 13487 13488int 13489main () 13490{ 13491 13492 int fd = creat("conftest.temp", 0600); 13493 fallocate(fd, FALLOC_FL_KEEP_SIZE,(off_t) 1024,(off_t) 1024); 13494 13495 ; 13496 return 0; 13497} 13498_ACEOF 13499if ac_fn_c_try_link "$LINENO"; then : 13500 i_cv_fallocate_works=yes 13501else 13502 i_cv_fallocate_works=no 13503fi 13504rm -f core conftest.err conftest.$ac_objext \ 13505 conftest$ac_exeext conftest.$ac_ext 13506 13507fi 13508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_fallocate_works" >&5 13509$as_echo "$i_cv_fallocate_works" >&6; } 13510if test $i_cv_fallocate_works = yes; then 13511 13512$as_echo "#define HAVE_FALLOCATE 1" >>confdefs.h 13513 13514fi 13515 13516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_fallocate() works" >&5 13517$as_echo_n "checking whether posix_fallocate() works... " >&6; } 13518if ${i_cv_posix_fallocate_works+:} false; then : 13519 $as_echo_n "(cached) " >&6 13520else 13521 13522 if test "$cross_compiling" = yes; then : 13523 13524 i_cv_posix_fallocate_works=no 13525 13526else 13527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13528/* end confdefs.h. */ 13529 13530 #if !defined(__sun) && !defined(__sun__) 13531 #define _XOPEN_SOURCE 600 13532 #endif 13533 #include <stdio.h> 13534 #include <stdlib.h> 13535 #include <fcntl.h> 13536 #include <unistd.h> 13537 #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)) 13538 possibly broken posix_fallocate 13539 #endif 13540 int main() { 13541 int fd = creat("conftest.temp", 0600); 13542 int ret; 13543 if (-1 == fd) { 13544 perror("creat()"); 13545 return 2; 13546 } 13547 ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0; 13548 unlink("conftest.temp"); 13549 return ret; 13550 } 13551 13552_ACEOF 13553if ac_fn_c_try_run "$LINENO"; then : 13554 13555 i_cv_posix_fallocate_works=yes 13556 13557else 13558 13559 i_cv_posix_fallocate_works=no 13560 13561fi 13562rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13563 conftest.$ac_objext conftest.beam conftest.$ac_ext 13564fi 13565 13566 13567fi 13568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_posix_fallocate_works" >&5 13569$as_echo "$i_cv_posix_fallocate_works" >&6; } 13570if test $i_cv_posix_fallocate_works = yes; then 13571 13572$as_echo "#define HAVE_POSIX_FALLOCATE /**/" >>confdefs.h 13573 13574fi 13575 13576# 13577# EMU_THR_LIB_NAME, EMU_THR_LIBS, EMU_THR_X_LIBS, and EMU_THR_DEFS is 13578# used by the emulator, and can (but should not) be used by applications 13579# that only require thread support when the emulator has thread support. 13580# Other applications should use ETHR_LIB_NAME, ETHR_LIBS, ETHR_X_LIBS, 13581# and ETHR_DEFS. 13582# 13583 13584EMU_THR_LIB_NAME= 13585EMU_THR_X_LIBS= 13586EMU_THR_LIBS= 13587EMU_THR_DEFS= 13588 13589# Threads enabled for emulator 13590EMU_THR_LIB_NAME=$ETHR_LIB_NAME 13591EMU_THR_X_LIBS=$ETHR_X_LIBS 13592EMU_THR_LIBS=$ETHR_LIBS 13593EMU_THR_DEFS=$ETHR_DEFS 13594ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS threads" 13595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lock checking should be enabled" >&5 13596$as_echo_n "checking whether lock checking should be enabled... " >&6; } 13597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lock_check" >&5 13598$as_echo "$enable_lock_check" >&6; } 13599if test "x$enable_lock_check" != "xno"; then 13600 EMU_THR_DEFS="$EMU_THR_DEFS -DERTS_ENABLE_LOCK_CHECK" 13601fi 13602 13603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lock counters should be enabled" >&5 13604$as_echo_n "checking whether lock counters should be enabled... " >&6; } 13605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lock_count" >&5 13606$as_echo "$enable_lock_count" >&6; } 13607if test "x$enable_lock_count" != "xno"; then 13608 TYPES="$TYPES lcnt" 13609fi 13610 13611case $host_os in 13612 linux*) 13613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dlopen() needs to be called before first call to dlerror()" >&5 13614$as_echo_n "checking whether dlopen() needs to be called before first call to dlerror()... " >&6; } 13615 if test "x$ETHR_THR_LIB_BASE_TYPE" != "xposix_nptl"; then 13616 13617$as_echo "#define ERTS_NEED_DLOPEN_BEFORE_DLERROR 1" >>confdefs.h 13618 13619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13620$as_echo "yes" >&6; } 13621 else 13622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 13623$as_echo "no" >&6; } 13624 fi 13625 ;; 13626 *) 13627 ;; 13628esac 13629 13630# Remove -D_WIN32_WINNT*, -DWINVER* and -D_GNU_SOURCE from EMU_THR_DEFS 13631# (defined in CFLAGS). Note that we want to keep these flags 13632# in ETHR_DEFS, but not in EMU_THR_DEFS. 13633new_emu_thr_defs= 13634for thr_def in $EMU_THR_DEFS; do 13635 case $thr_def in 13636 -D_GNU_SOURCE*|-D_WIN32_WINNT*|-DWINVER*) 13637 ;; 13638 *) 13639 new_emu_thr_defs="$new_emu_thr_defs $thr_def" 13640 ;; 13641 esac 13642done 13643EMU_THR_DEFS=$new_emu_thr_defs 13644 13645 13646 13647 13648 13649 13650if test "x$enable_lock_check" = "xno"; then 13651 EMU_LOCK_CHECKING=no 13652else 13653 EMU_LOCK_CHECKING=yes 13654fi 13655 13656 13657 13658 13659 13660ERTS_INTERNAL_X_LIBS= 13661 13662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 13663$as_echo_n "checking for kstat_open in -lkstat... " >&6; } 13664if ${ac_cv_lib_kstat_kstat_open+:} false; then : 13665 $as_echo_n "(cached) " >&6 13666else 13667 ac_check_lib_save_LIBS=$LIBS 13668LIBS="-lkstat $LIBS" 13669cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13670/* end confdefs.h. */ 13671 13672/* Override any GCC internal prototype to avoid an error. 13673 Use char because int might match the return type of a GCC 13674 builtin and then its argument prototype would still apply. */ 13675#ifdef __cplusplus 13676extern "C" 13677#endif 13678char kstat_open (); 13679int 13680main () 13681{ 13682return kstat_open (); 13683 ; 13684 return 0; 13685} 13686_ACEOF 13687if ac_fn_c_try_link "$LINENO"; then : 13688 ac_cv_lib_kstat_kstat_open=yes 13689else 13690 ac_cv_lib_kstat_kstat_open=no 13691fi 13692rm -f core conftest.err conftest.$ac_objext \ 13693 conftest$ac_exeext conftest.$ac_ext 13694LIBS=$ac_check_lib_save_LIBS 13695fi 13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 13697$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } 13698if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : 13699 13700$as_echo "#define HAVE_KSTAT 1" >>confdefs.h 13701 13702ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat" 13703fi 13704 13705 13706 13707 13708 13709 13710THR_LIBS=$ETHR_X_LIBS 13711THR_DEFS=$ETHR_DEFS 13712 13713 13714 13715 13716 13717TERMCAP_LIB= 13718 13719if test "x$with_termcap" != "xno" && 13720 test "X$host" != "Xwin32"; then 13721 # try these libs 13722 termcap_libs="tinfo ncurses curses termcap termlib" 13723 13724 for termcap_lib in $termcap_libs; do 13725 as_ac_Lib=`$as_echo "ac_cv_lib_$termcap_lib''_tgetent" | $as_tr_sh` 13726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l$termcap_lib" >&5 13727$as_echo_n "checking for tgetent in -l$termcap_lib... " >&6; } 13728if eval \${$as_ac_Lib+:} false; then : 13729 $as_echo_n "(cached) " >&6 13730else 13731 ac_check_lib_save_LIBS=$LIBS 13732LIBS="-l$termcap_lib $LIBS" 13733cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13734/* end confdefs.h. */ 13735 13736/* Override any GCC internal prototype to avoid an error. 13737 Use char because int might match the return type of a GCC 13738 builtin and then its argument prototype would still apply. */ 13739#ifdef __cplusplus 13740extern "C" 13741#endif 13742char tgetent (); 13743int 13744main () 13745{ 13746return tgetent (); 13747 ; 13748 return 0; 13749} 13750_ACEOF 13751if ac_fn_c_try_link "$LINENO"; then : 13752 eval "$as_ac_Lib=yes" 13753else 13754 eval "$as_ac_Lib=no" 13755fi 13756rm -f core conftest.err conftest.$ac_objext \ 13757 conftest$ac_exeext conftest.$ac_ext 13758LIBS=$ac_check_lib_save_LIBS 13759fi 13760eval ac_res=\$$as_ac_Lib 13761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 13762$as_echo "$ac_res" >&6; } 13763if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : 13764 TERMCAP_LIB="-l$termcap_lib" 13765fi 13766 13767 if test "x$TERMCAP_LIB" != "x"; then 13768 break 13769 fi 13770 done 13771 13772 if test "x$TERMCAP_LIB" = "x"; then 13773 as_fn_error $? "No curses library functions found" "$LINENO" 5 13774 fi 13775fi 13776 13777 13778 13779if test "x$TERMCAP_LIB" != "x"; then 13780 13781 13782$as_echo "#define HAVE_TERMCAP 1" >>confdefs.h 13783 13784fi 13785 13786if test "X$host" != "Xwin32"; then 13787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth" >&5 13788$as_echo_n "checking for wcwidth... " >&6; } 13789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13790/* end confdefs.h. */ 13791#include <wchar.h> 13792int 13793main () 13794{ 13795wcwidth(0); 13796 ; 13797 return 0; 13798} 13799_ACEOF 13800if ac_fn_c_try_link "$LINENO"; then : 13801 have_wcwidth=yes 13802else 13803 have_wcwidth=no 13804fi 13805rm -f core conftest.err conftest.$ac_objext \ 13806 conftest$ac_exeext conftest.$ac_ext 13807 if test $have_wcwidth = yes; then 13808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13809$as_echo "yes" >&6; } 13810 13811$as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h 13812 13813 fi 13814fi 13815 13816 13817# Check whether --enable-builtin-zlib was given. 13818if test "${enable_builtin_zlib+set}" = set; then : 13819 enableval=$enable_builtin_zlib; case "$enableval" in 13820 no) enable_builtin_zlib=no ;; 13821 *) enable_builtin_zlib=yes ;; 13822 esac 13823else 13824 enable_builtin_zlib=no 13825fi 13826 13827 13828Z_LIB= 13829 13830if test "x$enable_builtin_zlib" = "xyes"; then 13831 13832$as_echo "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h 13833 13834 { $as_echo "$as_me:${as_lineno-$LINENO}: Using our own built-in zlib source" >&5 13835$as_echo "$as_me: Using our own built-in zlib source" >&6;} 13836else 13837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib 1.2.5 or higher" >&5 13838$as_echo_n "checking for zlib 1.2.5 or higher... " >&6; } 13839zlib_save_LIBS=$LIBS 13840LIBS="-lz $LIBS" 13841cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13842/* end confdefs.h. */ 13843 13844#include "zlib.h" 13845 13846int 13847main () 13848{ 13849 13850#if ZLIB_VERNUM >= 0x1250 13851 Bytef s[1]; 13852 s[0] = 0; 13853 (void) adler32((uLong)0, s, 1); 13854#else 13855#error "No zlib 1.2.5 or higher found" 13856error 13857#endif 13858 13859 ; 13860 return 0; 13861} 13862_ACEOF 13863if ac_fn_c_try_link "$LINENO"; then : 13864 13865 Z_LIB="-lz" 13866 13867$as_echo "#define HAVE_LIBZ 1" >>confdefs.h 13868 13869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13870$as_echo "yes" >&6; } 13871 13872else 13873 13874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 13875$as_echo "no" >&6; } 13876 13877fi 13878rm -f core conftest.err conftest.$ac_objext \ 13879 conftest$ac_exeext conftest.$ac_ext 13880 13881if test "$Z_LIB" != ""; then 13882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateGetDictionary" >&5 13883$as_echo_n "checking for library containing inflateGetDictionary... " >&6; } 13884if ${ac_cv_search_inflateGetDictionary+:} false; then : 13885 $as_echo_n "(cached) " >&6 13886else 13887 ac_func_search_save_LIBS=$LIBS 13888cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13889/* end confdefs.h. */ 13890 13891/* Override any GCC internal prototype to avoid an error. 13892 Use char because int might match the return type of a GCC 13893 builtin and then its argument prototype would still apply. */ 13894#ifdef __cplusplus 13895extern "C" 13896#endif 13897char inflateGetDictionary (); 13898int 13899main () 13900{ 13901return inflateGetDictionary (); 13902 ; 13903 return 0; 13904} 13905_ACEOF 13906for ac_lib in '' z; do 13907 if test -z "$ac_lib"; then 13908 ac_res="none required" 13909 else 13910 ac_res=-l$ac_lib 13911 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 13912 fi 13913 if ac_fn_c_try_link "$LINENO"; then : 13914 ac_cv_search_inflateGetDictionary=$ac_res 13915fi 13916rm -f core conftest.err conftest.$ac_objext \ 13917 conftest$ac_exeext 13918 if ${ac_cv_search_inflateGetDictionary+:} false; then : 13919 break 13920fi 13921done 13922if ${ac_cv_search_inflateGetDictionary+:} false; then : 13923 13924else 13925 ac_cv_search_inflateGetDictionary=no 13926fi 13927rm conftest.$ac_ext 13928LIBS=$ac_func_search_save_LIBS 13929fi 13930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateGetDictionary" >&5 13931$as_echo "$ac_cv_search_inflateGetDictionary" >&6; } 13932ac_res=$ac_cv_search_inflateGetDictionary 13933if test "$ac_res" != no; then : 13934 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 13935 13936$as_echo "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h 13937 13938fi 13939 13940fi 13941 13942LIBS=$zlib_save_LIBS 13943 13944fi 13945 13946 13947 13948 13949# Check whether --enable-esock was given. 13950if test "${enable_esock+set}" = set; then : 13951 enableval=$enable_esock; 13952fi 13953 13954 13955USE_ESOCK=yes 13956 13957if test "x$enable_esock" = "xyes"; then 13958 USE_ESOCK=yes 13959else 13960 if test "x$enable_esock" = "xno"; then 13961 USE_ESOCK=no 13962 fi 13963fi 13964 13965if test "x$USE_ESOCK" = "xyes"; then 13966 if test "x$USE_ESOCK" = "xyes"; then 13967 for ac_func in localtime_r strftime getprotoent setprotoent endprotoent 13968do : 13969 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 13970ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 13971if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 13972 cat >>confdefs.h <<_ACEOF 13973#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 13974_ACEOF 13975 13976fi 13977done 13978 13979 fi 13980fi 13981 13982 13983 13984 13985 13986# Check whether --enable-esock_use_rcvsndtimeo was given. 13987if test "${enable_esock_use_rcvsndtimeo+set}" = set; then : 13988 enableval=$enable_esock_use_rcvsndtimeo; 13989fi 13990 13991 13992if test "x$enable_esock_rcvsndtimeo" = "xyes"; then 13993 13994$as_echo "#define ESOCK_USE_RCVSNDTIMEO 1" >>confdefs.h 13995 13996fi 13997 13998 13999 14000 14001# Check whether --with-esock-counter-size was given. 14002if test "${with_esock_counter_size+set}" = set; then : 14003 withval=$with_esock_counter_size; 14004else 14005 with_esock_counter_size=64 14006fi 14007 14008 14009case "$with_esock_counter_size" in 14010 16) 14011 14012$as_echo "#define ESOCK_COUNTER_SIZE 16" >>confdefs.h 14013 14014 ;; 14015 24) 14016 14017$as_echo "#define ESOCK_COUNTER_SIZE 24" >>confdefs.h 14018 14019 ;; 14020 32) 14021 14022$as_echo "#define ESOCK_COUNTER_SIZE 32" >>confdefs.h 14023 14024 ;; 14025 48) 14026 14027$as_echo "#define ESOCK_COUNTER_SIZE 48" >>confdefs.h 14028 14029 ;; 14030 64) 14031 14032$as_echo "#define ESOCK_COUNTER_SIZE 64" >>confdefs.h 14033 14034 ;; 14035 *) 14036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Invalid esock counter size ($with_esock_counter_size), using default (64)" >&5 14037$as_echo "$as_me: WARNING: Invalid esock counter size ($with_esock_counter_size), using default (64)" >&2;} 14038 14039$as_echo "#define ESOCK_COUNTER_SIZE 64" >>confdefs.h 14040 14041 ;; 14042esac 14043 14044 14045ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" 14046if test "x$ac_cv_func_if_nametoindex" = xyes; then : 14047 14048$as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h 14049 14050 14051fi 14052 14053ac_fn_c_check_func "$LINENO" "if_indextoname" "ac_cv_func_if_indextoname" 14054if test "x$ac_cv_func_if_indextoname" = xyes; then : 14055 14056$as_echo "#define HAVE_IF_INDEXTONAME 1" >>confdefs.h 14057 14058fi 14059 14060ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex" 14061if test "x$ac_cv_func_if_nameindex" = xyes; then : 14062 14063$as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h 14064 14065fi 14066 14067ac_fn_c_check_func "$LINENO" "if_freenameindex" "ac_cv_func_if_freenameindex" 14068if test "x$ac_cv_func_if_freenameindex" = xyes; then : 14069 14070$as_echo "#define HAVE_IF_FREENAMEINDEX 1" >>confdefs.h 14071 14072 14073fi 14074 14075ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" 14076if test "x$ac_cv_func_gethostname" = xyes; then : 14077 14078$as_echo "#define HAVE_GETHOSTNAME 1" >>confdefs.h 14079 14080 14081fi 14082 14083 14084 14085 14086# Check whether --enable-esock-socket-registry was given. 14087if test "${enable_esock_socket_registry+set}" = set; then : 14088 enableval=$enable_esock_socket_registry; 14089fi 14090 14091 14092if test "x$enable_esock_socket_registry" = "xno"; then : 14093 14094 14095$as_echo "#define ESOCK_USE_SOCKET_REGISTRY 0" >>confdefs.h 14096 14097else 14098 14099 14100$as_echo "#define ESOCK_USE_SOCKET_REGISTRY 1" >>confdefs.h 14101 14102fi 14103 14104 14105 14106#-------------------------------------------------------------------- 14107# Check for the existence of the -lsocket and -lnsl libraries. 14108# The order here is important, so that they end up in the right 14109# order in the command line generated by make. Here are some 14110# special considerations: 14111# 1. Use "connect" and "accept" to check for -lsocket, and 14112# "gethostbyname" to check for -lnsl. 14113# 2. Use each function name only once: can't redo a check because 14114# autoconf caches the results of the last check and won't redo it. 14115# 3. Use -lnsl and -lsocket only if they supply procedures that 14116# aren't already present in the normal libraries. This is because 14117# IRIX 5.2 has libraries, but they aren't needed and they're 14118# bogus: they goof up name resolution if used. 14119# 4. On some SVR4 systems, can't use -lsocket without -lnsl too. 14120# To get around this problem, check for both libraries together 14121# if -lsocket doesn't work by itself. 14122#-------------------------------------------------------------------- 14123 14124tk_oldLibs=$LIBS 14125erl_checkBoth=0 14126SOCKET_LIBS="" 14127ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" 14128if test "x$ac_cv_func_connect" = xyes; then : 14129 erl_checkSocket=0 14130else 14131 erl_checkSocket=1 14132fi 14133 14134if test "$erl_checkSocket" = 1; then 14135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5 14136$as_echo_n "checking for main in -lsocket... " >&6; } 14137if ${ac_cv_lib_socket_main+:} false; then : 14138 $as_echo_n "(cached) " >&6 14139else 14140 ac_check_lib_save_LIBS=$LIBS 14141LIBS="-lsocket $LIBS" 14142cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14143/* end confdefs.h. */ 14144 14145 14146int 14147main () 14148{ 14149return main (); 14150 ; 14151 return 0; 14152} 14153_ACEOF 14154if ac_fn_c_try_link "$LINENO"; then : 14155 ac_cv_lib_socket_main=yes 14156else 14157 ac_cv_lib_socket_main=no 14158fi 14159rm -f core conftest.err conftest.$ac_objext \ 14160 conftest$ac_exeext conftest.$ac_ext 14161LIBS=$ac_check_lib_save_LIBS 14162fi 14163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5 14164$as_echo "$ac_cv_lib_socket_main" >&6; } 14165if test "x$ac_cv_lib_socket_main" = xyes; then : 14166 SOCKET_LIBS="-lsocket" 14167else 14168 erl_checkBoth=1 14169fi 14170 14171fi 14172 14173if test "$erl_checkBoth" = 1; then 14174 LIBS="$LIBS -lsocket -lnsl" 14175 ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" 14176if test "x$ac_cv_func_accept" = xyes; then : 14177 SOCKET_LIBS="-lsocket -lnsl" 14178fi 14179 14180fi 14181 14182LIBS="$tk_oldLibs $SOCKET_LIBS" 14183ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" 14184if test "x$ac_cv_func_gethostbyname" = xyes; then : 14185 14186else 14187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 14188$as_echo_n "checking for main in -lnsl... " >&6; } 14189if ${ac_cv_lib_nsl_main+:} false; then : 14190 $as_echo_n "(cached) " >&6 14191else 14192 ac_check_lib_save_LIBS=$LIBS 14193LIBS="-lnsl $LIBS" 14194cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14195/* end confdefs.h. */ 14196 14197 14198int 14199main () 14200{ 14201return main (); 14202 ; 14203 return 0; 14204} 14205_ACEOF 14206if ac_fn_c_try_link "$LINENO"; then : 14207 ac_cv_lib_nsl_main=yes 14208else 14209 ac_cv_lib_nsl_main=no 14210fi 14211rm -f core conftest.err conftest.$ac_objext \ 14212 conftest$ac_exeext conftest.$ac_ext 14213LIBS=$ac_check_lib_save_LIBS 14214fi 14215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 14216$as_echo "$ac_cv_lib_nsl_main" >&6; } 14217if test "x$ac_cv_lib_nsl_main" = xyes; then : 14218 SOCKET_LIBS="$SOCKET_LIBS -lnsl" 14219fi 14220 14221fi 14222 14223ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" 14224if test "x$ac_cv_func_gethostbyname_r" = xyes; then : 14225 have_gethostbyname_r=yes 14226fi 14227 14228 14229LIBS="$tk_oldLibs $SOCKET_LIBS" 14230 14231 14232 14233 14234if test "$have_gethostbyname_r" = yes; then 14235 # OK, so we have gethostbyname_r() - but do we know how to call it...? 14236 # (if not, HAVE_GETHOSTBYNAME_R will not be defined at all) 14237 case $host_os in 14238 solaris2*) 14239 14240$as_echo "#define HAVE_GETHOSTBYNAME_R GHBN_R_SOLARIS" >>confdefs.h 14241 14242 ;; 14243 aix*|os400*) 14244 # AIX version also needs "struct hostent_data" defn 14245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14246/* end confdefs.h. */ 14247#include <netdb.h> 14248int 14249main () 14250{ 14251struct hostent_data hd; 14252 ; 14253 return 0; 14254} 14255_ACEOF 14256if ac_fn_c_try_compile "$LINENO"; then : 14257 14258$as_echo "#define HAVE_GETHOSTBYNAME_R GHBN_R_AIX" >>confdefs.h 14259 14260fi 14261rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14262 ;; 14263 *) 14264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14265/* end confdefs.h. */ 14266 14267#include <stdio.h> 14268#ifdef __GLIBC__ 14269yes 14270#endif 14271 14272_ACEOF 14273if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14274 $EGREP "^yes$" >/dev/null 2>&1; then : 14275 14276$as_echo "#define HAVE_GETHOSTBYNAME_R GHBN_R_GLIBC" >>confdefs.h 14277 14278fi 14279rm -f conftest* 14280 14281 ;; 14282 esac 14283fi 14284 14285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working posix_openpt implementation" >&5 14286$as_echo_n "checking for working posix_openpt implementation... " >&6; } 14287cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14288/* end confdefs.h. */ 14289 14290#define _XOPEN_SOURCE 600 14291#include <stdlib.h> 14292#include <fcntl.h> 14293 14294int 14295main () 14296{ 14297 14298 int mfd = posix_openpt(O_RDWR); 14299 ptsname(mfd); 14300 grantpt(mfd); 14301 unlockpt(mfd); 14302 return mfd; 14303 14304 ; 14305 return 0; 14306} 14307_ACEOF 14308if ac_fn_c_try_link "$LINENO"; then : 14309 working_posix_openpt=yes 14310else 14311 working_posix_openpt=no 14312fi 14313rm -f core conftest.err conftest.$ac_objext \ 14314 conftest$ac_exeext conftest.$ac_ext 14315 14316if test "X$working_posix_openpt" = "Xyes"; then 14317 14318$as_echo "#define HAVE_WORKING_POSIX_OPENPT 1" >>confdefs.h 14319 14320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 14321$as_echo "yes" >&6; } 14322else 14323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 14324$as_echo "no" >&6; } 14325fi 14326 14327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if netdb.h requires netinet/in.h to be previously included" >&5 14328$as_echo_n "checking if netdb.h requires netinet/in.h to be previously included... " >&6; } 14329cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14330/* end confdefs.h. */ 14331#include <netdb.h> 14332_ACEOF 14333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14334 $EGREP "sockaddr_in" >/dev/null 2>&1; then : 14335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14336/* end confdefs.h. */ 14337#include <netinet/in.h> 14338 #include <netdb.h> 14339int 14340main () 14341{ 14342return 0; 14343 ; 14344 return 0; 14345} 14346_ACEOF 14347if ac_fn_c_try_compile "$LINENO"; then : 14348 need_in_h=yes 14349else 14350 need_in_h=no 14351fi 14352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14353else 14354 need_in_h=no 14355fi 14356rm -f conftest* 14357 14358 14359if test $need_in_h = yes; then 14360 14361$as_echo "#define NETDB_H_NEEDS_IN_H 1" >>confdefs.h 14362 14363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 14364$as_echo "yes" >&6; } 14365else 14366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 14367$as_echo "no" >&6; } 14368fi 14369 14370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 14371$as_echo_n "checking for socklen_t... " >&6; } 14372cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14373/* end confdefs.h. */ 14374#include <sys/socket.h> 14375int 14376main () 14377{ 14378socklen_t test; 14379 ; 14380 return 0; 14381} 14382_ACEOF 14383if ac_fn_c_try_compile "$LINENO"; then : 14384 have_socklen_t=yes 14385else 14386 have_socklen_t=no 14387fi 14388rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext, 14389 14390if test $have_socklen_t = yes; then 14391 14392$as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h 14393 14394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 14395$as_echo "yes" >&6; } 14396else 14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 14398$as_echo "no" >&6; } 14399fi 14400 14401 14402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errno declaration in netdb.h" >&5 14403$as_echo_n "checking for h_errno declaration in netdb.h... " >&6; } 14404if ${ac_cv_decl_h_errno+:} false; then : 14405 $as_echo_n "(cached) " >&6 14406else 14407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14408/* end confdefs.h. */ 14409#include <netdb.h> 14410int 14411main () 14412{ 14413int err = h_errno; 14414 ; 14415 return 0; 14416} 14417_ACEOF 14418if ac_fn_c_try_compile "$LINENO"; then : 14419 ac_cv_decl_h_errno=yes 14420else 14421 ac_cv_decl_h_errno=no 14422fi 14423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14424fi 14425{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_h_errno" >&5 14426$as_echo "$ac_cv_decl_h_errno" >&6; } 14427if test $ac_cv_decl_h_errno = yes; then 14428 14429$as_echo "#define H_ERRNO_DECLARED 1" >>confdefs.h 14430 14431fi 14432 14433 14434 14435saved_cppflags=$CPPFLAGS 14436CPPFLAGS="$CPPFLAGS $EMU_THR_DEFS" 14437 14438ac_header_dirent=no 14439for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do 14440 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` 14441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 14442$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } 14443if eval \${$as_ac_Header+:} false; then : 14444 $as_echo_n "(cached) " >&6 14445else 14446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14447/* end confdefs.h. */ 14448#include <sys/types.h> 14449#include <$ac_hdr> 14450 14451int 14452main () 14453{ 14454if ((DIR *) 0) 14455return 0; 14456 ; 14457 return 0; 14458} 14459_ACEOF 14460if ac_fn_c_try_compile "$LINENO"; then : 14461 eval "$as_ac_Header=yes" 14462else 14463 eval "$as_ac_Header=no" 14464fi 14465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14466fi 14467eval ac_res=\$$as_ac_Header 14468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 14469$as_echo "$ac_res" >&6; } 14470if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 14471 cat >>confdefs.h <<_ACEOF 14472#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 14473_ACEOF 14474 14475ac_header_dirent=$ac_hdr; break 14476fi 14477 14478done 14479# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. 14480if test $ac_header_dirent = dirent.h; then 14481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 14482$as_echo_n "checking for library containing opendir... " >&6; } 14483if ${ac_cv_search_opendir+:} false; then : 14484 $as_echo_n "(cached) " >&6 14485else 14486 ac_func_search_save_LIBS=$LIBS 14487cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14488/* end confdefs.h. */ 14489 14490/* Override any GCC internal prototype to avoid an error. 14491 Use char because int might match the return type of a GCC 14492 builtin and then its argument prototype would still apply. */ 14493#ifdef __cplusplus 14494extern "C" 14495#endif 14496char opendir (); 14497int 14498main () 14499{ 14500return opendir (); 14501 ; 14502 return 0; 14503} 14504_ACEOF 14505for ac_lib in '' dir; do 14506 if test -z "$ac_lib"; then 14507 ac_res="none required" 14508 else 14509 ac_res=-l$ac_lib 14510 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 14511 fi 14512 if ac_fn_c_try_link "$LINENO"; then : 14513 ac_cv_search_opendir=$ac_res 14514fi 14515rm -f core conftest.err conftest.$ac_objext \ 14516 conftest$ac_exeext 14517 if ${ac_cv_search_opendir+:} false; then : 14518 break 14519fi 14520done 14521if ${ac_cv_search_opendir+:} false; then : 14522 14523else 14524 ac_cv_search_opendir=no 14525fi 14526rm conftest.$ac_ext 14527LIBS=$ac_func_search_save_LIBS 14528fi 14529{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 14530$as_echo "$ac_cv_search_opendir" >&6; } 14531ac_res=$ac_cv_search_opendir 14532if test "$ac_res" != no; then : 14533 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14534 14535fi 14536 14537else 14538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 14539$as_echo_n "checking for library containing opendir... " >&6; } 14540if ${ac_cv_search_opendir+:} false; then : 14541 $as_echo_n "(cached) " >&6 14542else 14543 ac_func_search_save_LIBS=$LIBS 14544cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14545/* end confdefs.h. */ 14546 14547/* Override any GCC internal prototype to avoid an error. 14548 Use char because int might match the return type of a GCC 14549 builtin and then its argument prototype would still apply. */ 14550#ifdef __cplusplus 14551extern "C" 14552#endif 14553char opendir (); 14554int 14555main () 14556{ 14557return opendir (); 14558 ; 14559 return 0; 14560} 14561_ACEOF 14562for ac_lib in '' x; do 14563 if test -z "$ac_lib"; then 14564 ac_res="none required" 14565 else 14566 ac_res=-l$ac_lib 14567 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 14568 fi 14569 if ac_fn_c_try_link "$LINENO"; then : 14570 ac_cv_search_opendir=$ac_res 14571fi 14572rm -f core conftest.err conftest.$ac_objext \ 14573 conftest$ac_exeext 14574 if ${ac_cv_search_opendir+:} false; then : 14575 break 14576fi 14577done 14578if ${ac_cv_search_opendir+:} false; then : 14579 14580else 14581 ac_cv_search_opendir=no 14582fi 14583rm conftest.$ac_ext 14584LIBS=$ac_func_search_save_LIBS 14585fi 14586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 14587$as_echo "$ac_cv_search_opendir" >&6; } 14588ac_res=$ac_cv_search_opendir 14589if test "$ac_res" != no; then : 14590 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14591 14592fi 14593 14594fi 14595 14596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 14597$as_echo_n "checking for ANSI C header files... " >&6; } 14598if ${ac_cv_header_stdc+:} false; then : 14599 $as_echo_n "(cached) " >&6 14600else 14601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14602/* end confdefs.h. */ 14603#include <stdlib.h> 14604#include <stdarg.h> 14605#include <string.h> 14606#include <float.h> 14607 14608int 14609main () 14610{ 14611 14612 ; 14613 return 0; 14614} 14615_ACEOF 14616if ac_fn_c_try_compile "$LINENO"; then : 14617 ac_cv_header_stdc=yes 14618else 14619 ac_cv_header_stdc=no 14620fi 14621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14622 14623if test $ac_cv_header_stdc = yes; then 14624 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 14625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14626/* end confdefs.h. */ 14627#include <string.h> 14628 14629_ACEOF 14630if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14631 $EGREP "memchr" >/dev/null 2>&1; then : 14632 14633else 14634 ac_cv_header_stdc=no 14635fi 14636rm -f conftest* 14637 14638fi 14639 14640if test $ac_cv_header_stdc = yes; then 14641 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 14642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14643/* end confdefs.h. */ 14644#include <stdlib.h> 14645 14646_ACEOF 14647if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 14648 $EGREP "free" >/dev/null 2>&1; then : 14649 14650else 14651 ac_cv_header_stdc=no 14652fi 14653rm -f conftest* 14654 14655fi 14656 14657if test $ac_cv_header_stdc = yes; then 14658 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 14659 if test "$cross_compiling" = yes; then : 14660 : 14661else 14662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14663/* end confdefs.h. */ 14664#include <ctype.h> 14665#include <stdlib.h> 14666#if ((' ' & 0x0FF) == 0x020) 14667# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 14668# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 14669#else 14670# define ISLOWER(c) \ 14671 (('a' <= (c) && (c) <= 'i') \ 14672 || ('j' <= (c) && (c) <= 'r') \ 14673 || ('s' <= (c) && (c) <= 'z')) 14674# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 14675#endif 14676 14677#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 14678int 14679main () 14680{ 14681 int i; 14682 for (i = 0; i < 256; i++) 14683 if (XOR (islower (i), ISLOWER (i)) 14684 || toupper (i) != TOUPPER (i)) 14685 return 2; 14686 return 0; 14687} 14688_ACEOF 14689if ac_fn_c_try_run "$LINENO"; then : 14690 14691else 14692 ac_cv_header_stdc=no 14693fi 14694rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 14695 conftest.$ac_objext conftest.beam conftest.$ac_ext 14696fi 14697 14698fi 14699fi 14700{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 14701$as_echo "$ac_cv_header_stdc" >&6; } 14702if test $ac_cv_header_stdc = yes; then 14703 14704$as_echo "#define STDC_HEADERS 1" >>confdefs.h 14705 14706fi 14707 14708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 14709$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } 14710if ${ac_cv_header_sys_wait_h+:} false; then : 14711 $as_echo_n "(cached) " >&6 14712else 14713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14714/* end confdefs.h. */ 14715#include <sys/types.h> 14716#include <sys/wait.h> 14717#ifndef WEXITSTATUS 14718# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) 14719#endif 14720#ifndef WIFEXITED 14721# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) 14722#endif 14723 14724int 14725main () 14726{ 14727 int s; 14728 wait (&s); 14729 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; 14730 ; 14731 return 0; 14732} 14733_ACEOF 14734if ac_fn_c_try_compile "$LINENO"; then : 14735 ac_cv_header_sys_wait_h=yes 14736else 14737 ac_cv_header_sys_wait_h=no 14738fi 14739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14740fi 14741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 14742$as_echo "$ac_cv_header_sys_wait_h" >&6; } 14743if test $ac_cv_header_sys_wait_h = yes; then 14744 14745$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h 14746 14747fi 14748 14749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 14750$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } 14751if ${ac_cv_header_time+:} false; then : 14752 $as_echo_n "(cached) " >&6 14753else 14754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14755/* end confdefs.h. */ 14756#include <sys/types.h> 14757#include <sys/time.h> 14758#include <time.h> 14759 14760int 14761main () 14762{ 14763if ((struct tm *) 0) 14764return 0; 14765 ; 14766 return 0; 14767} 14768_ACEOF 14769if ac_fn_c_try_compile "$LINENO"; then : 14770 ac_cv_header_time=yes 14771else 14772 ac_cv_header_time=no 14773fi 14774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14775fi 14776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 14777$as_echo "$ac_cv_header_time" >&6; } 14778if test $ac_cv_header_time = yes; then 14779 14780$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h 14781 14782fi 14783 14784 14785for ac_header in fcntl.h limits.h unistd.h syslog.h dlfcn.h ieeefp.h \ 14786 sys/types.h sys/stropts.h sys/sysctl.h \ 14787 sys/ioctl.h sys/time.h sys/uio.h sys/mman.h \ 14788 sys/socket.h sys/sockio.h sys/socketio.h \ 14789 net/errno.h malloc.h arpa/nameser.h libdlpi.h \ 14790 pty.h util.h libutil.h utmp.h langinfo.h poll.h sdkddkver.h \ 14791 elf.h 14792do : 14793 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 14794ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 14795if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 14796 cat >>confdefs.h <<_ACEOF 14797#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 14798_ACEOF 14799 14800fi 14801 14802done 14803 14804 14805ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "#ifdef __WIN32__ 14806 #else 14807 #include <net/if.h> 14808 #endif 14809 14810" 14811if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : 14812 14813cat >>confdefs.h <<_ACEOF 14814#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 14815_ACEOF 14816 14817 14818fi 14819 14820 14821ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_enaddr" "ac_cv_member_struct_ifreq_ifr_enaddr" "#ifdef __WIN32__ 14822 #else 14823 #include <net/if.h> 14824 #endif 14825 14826" 14827if test "x$ac_cv_member_struct_ifreq_ifr_enaddr" = xyes; then : 14828 14829cat >>confdefs.h <<_ACEOF 14830#define HAVE_STRUCT_IFREQ_IFR_ENADDR 1 14831_ACEOF 14832 14833 14834fi 14835 14836 14837if test x"$enable_systemd" != x"no"; then 14838 14839systemd_daemon_save_LIBS=$LIBS 14840LIBS= 14841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sd_listen_fds" >&5 14842$as_echo_n "checking for library containing sd_listen_fds... " >&6; } 14843if ${ac_cv_search_sd_listen_fds+:} false; then : 14844 $as_echo_n "(cached) " >&6 14845else 14846 ac_func_search_save_LIBS=$LIBS 14847cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14848/* end confdefs.h. */ 14849 14850/* Override any GCC internal prototype to avoid an error. 14851 Use char because int might match the return type of a GCC 14852 builtin and then its argument prototype would still apply. */ 14853#ifdef __cplusplus 14854extern "C" 14855#endif 14856char sd_listen_fds (); 14857int 14858main () 14859{ 14860return sd_listen_fds (); 14861 ; 14862 return 0; 14863} 14864_ACEOF 14865for ac_lib in '' systemd systemd-daemon; do 14866 if test -z "$ac_lib"; then 14867 ac_res="none required" 14868 else 14869 ac_res=-l$ac_lib 14870 LIBS="-l$ac_lib $systemd_daemon_save_LIBS $ac_func_search_save_LIBS" 14871 fi 14872 if ac_fn_c_try_link "$LINENO"; then : 14873 ac_cv_search_sd_listen_fds=$ac_res 14874fi 14875rm -f core conftest.err conftest.$ac_objext \ 14876 conftest$ac_exeext 14877 if ${ac_cv_search_sd_listen_fds+:} false; then : 14878 break 14879fi 14880done 14881if ${ac_cv_search_sd_listen_fds+:} false; then : 14882 14883else 14884 ac_cv_search_sd_listen_fds=no 14885fi 14886rm conftest.$ac_ext 14887LIBS=$ac_func_search_save_LIBS 14888fi 14889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sd_listen_fds" >&5 14890$as_echo "$ac_cv_search_sd_listen_fds" >&6; } 14891ac_res=$ac_cv_search_sd_listen_fds 14892if test "$ac_res" != no; then : 14893 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14894 have_sd_listen_fds=yes 14895else 14896 have_sd_listen_fds=no 14897fi 14898 14899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sd_notify" >&5 14900$as_echo_n "checking for library containing sd_notify... " >&6; } 14901if ${ac_cv_search_sd_notify+:} false; then : 14902 $as_echo_n "(cached) " >&6 14903else 14904 ac_func_search_save_LIBS=$LIBS 14905cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14906/* end confdefs.h. */ 14907 14908/* Override any GCC internal prototype to avoid an error. 14909 Use char because int might match the return type of a GCC 14910 builtin and then its argument prototype would still apply. */ 14911#ifdef __cplusplus 14912extern "C" 14913#endif 14914char sd_notify (); 14915int 14916main () 14917{ 14918return sd_notify (); 14919 ; 14920 return 0; 14921} 14922_ACEOF 14923for ac_lib in '' systemd systemd-daemon; do 14924 if test -z "$ac_lib"; then 14925 ac_res="none required" 14926 else 14927 ac_res=-l$ac_lib 14928 LIBS="-l$ac_lib $systemd_daemon_save_LIBS $ac_func_search_save_LIBS" 14929 fi 14930 if ac_fn_c_try_link "$LINENO"; then : 14931 ac_cv_search_sd_notify=$ac_res 14932fi 14933rm -f core conftest.err conftest.$ac_objext \ 14934 conftest$ac_exeext 14935 if ${ac_cv_search_sd_notify+:} false; then : 14936 break 14937fi 14938done 14939if ${ac_cv_search_sd_notify+:} false; then : 14940 14941else 14942 ac_cv_search_sd_notify=no 14943fi 14944rm conftest.$ac_ext 14945LIBS=$ac_func_search_save_LIBS 14946fi 14947{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sd_notify" >&5 14948$as_echo "$ac_cv_search_sd_notify" >&6; } 14949ac_res=$ac_cv_search_sd_notify 14950if test "$ac_res" != no; then : 14951 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14952 have_sd_notify=yes 14953else 14954 have_sd_notify=no 14955fi 14956 14957for ac_header in systemd/sd-daemon.h 14958do : 14959 ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default" 14960if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then : 14961 cat >>confdefs.h <<_ACEOF 14962#define HAVE_SYSTEMD_SD_DAEMON_H 1 14963_ACEOF 14964 have_systemd_sd_daemon_h=yes 14965else 14966 have_systemd_sd_daemon_h=no 14967fi 14968 14969done 14970 14971 14972if test x"$have_sd_listen_fds" = x"yes" && \ 14973 test x"$have_sd_notify" = x"yes" && \ 14974 test x"$have_systemd_sd_daemon_h" = x"yes"; then 14975 14976$as_echo "#define HAVE_SYSTEMD_DAEMON 1" >>confdefs.h 14977 14978 SYSTEMD_DAEMON_LIBS=$LIBS 14979elif test x"$enable_systemd" = x"yes"; then 14980 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 14981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 14982as_fn_error $? "--enable-systemd was given, but test for systemd failed 14983See \`config.log' for more details" "$LINENO" 5; } 14984fi 14985LIBS=$systemd_daemon_save_LIBS 14986fi 14987 14988 14989 14990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_open in -ldlpi" >&5 14991$as_echo_n "checking for dlpi_open in -ldlpi... " >&6; } 14992if ${ac_cv_lib_dlpi_dlpi_open+:} false; then : 14993 $as_echo_n "(cached) " >&6 14994else 14995 ac_check_lib_save_LIBS=$LIBS 14996LIBS="-ldlpi $LIBS" 14997cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14998/* end confdefs.h. */ 14999 15000/* Override any GCC internal prototype to avoid an error. 15001 Use char because int might match the return type of a GCC 15002 builtin and then its argument prototype would still apply. */ 15003#ifdef __cplusplus 15004extern "C" 15005#endif 15006char dlpi_open (); 15007int 15008main () 15009{ 15010return dlpi_open (); 15011 ; 15012 return 0; 15013} 15014_ACEOF 15015if ac_fn_c_try_link "$LINENO"; then : 15016 ac_cv_lib_dlpi_dlpi_open=yes 15017else 15018 ac_cv_lib_dlpi_dlpi_open=no 15019fi 15020rm -f core conftest.err conftest.$ac_objext \ 15021 conftest$ac_exeext conftest.$ac_ext 15022LIBS=$ac_check_lib_save_LIBS 15023fi 15024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_open" >&5 15025$as_echo "$ac_cv_lib_dlpi_dlpi_open" >&6; } 15026if test "x$ac_cv_lib_dlpi_dlpi_open" = xyes; then : 15027 cat >>confdefs.h <<_ACEOF 15028#define HAVE_LIBDLPI 1 15029_ACEOF 15030 15031 LIBS="-ldlpi $LIBS" 15032 15033fi 15034 15035if test x"$ac_cv_lib_dlpi_dlpi_open" = x"no"; then 15036 unset -v ac_cv_lib_dlpi_dlpi_open 15037 save_ldflags="$LDFLAGS" 15038 try_dlpi_lib=/lib 15039 if test x"$ac_cv_sizeof_void_p" = x"8"; then 15040 if test -d /lib64; then 15041 try_dlpi_lib=/lib64 15042 elif test -d /lib/64; then 15043 try_dlpi_lib=/lib/64 15044 fi 15045 fi 15046 if test ! -f "$try_dlpi_lib/libdlpi.so" && \ 15047 test -f "$try_dlpi_lib/libdlpi.so.1" 15048 then 15049 as_fn_error $? "Your OS installation is missing a symbolic link. 15050 Maybe it lacks some development package(s)... 15051 It can anyhow be fixed with the following command: 15052 # ln -s libdlpi.so.1 $try_dlpi_lib/libdlpi.so 15053 " "$LINENO" 5 15054 fi 15055 LDFLAGS="-L$try_dlpi_lib -R$try_dlpi_lib $LDFLAGS" 15056 unset -v try_dlpi_lib 15057 { $as_echo "$as_me:${as_lineno-$LINENO}: Extending the search to include /lib" >&5 15058$as_echo "$as_me: Extending the search to include /lib" >&6;} 15059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_open in -ldlpi" >&5 15060$as_echo_n "checking for dlpi_open in -ldlpi... " >&6; } 15061if ${ac_cv_lib_dlpi_dlpi_open+:} false; then : 15062 $as_echo_n "(cached) " >&6 15063else 15064 ac_check_lib_save_LIBS=$LIBS 15065LIBS="-ldlpi $LIBS" 15066cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15067/* end confdefs.h. */ 15068 15069/* Override any GCC internal prototype to avoid an error. 15070 Use char because int might match the return type of a GCC 15071 builtin and then its argument prototype would still apply. */ 15072#ifdef __cplusplus 15073extern "C" 15074#endif 15075char dlpi_open (); 15076int 15077main () 15078{ 15079return dlpi_open (); 15080 ; 15081 return 0; 15082} 15083_ACEOF 15084if ac_fn_c_try_link "$LINENO"; then : 15085 ac_cv_lib_dlpi_dlpi_open=yes 15086else 15087 ac_cv_lib_dlpi_dlpi_open=no 15088fi 15089rm -f core conftest.err conftest.$ac_objext \ 15090 conftest$ac_exeext conftest.$ac_ext 15091LIBS=$ac_check_lib_save_LIBS 15092fi 15093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_open" >&5 15094$as_echo "$ac_cv_lib_dlpi_dlpi_open" >&6; } 15095if test "x$ac_cv_lib_dlpi_dlpi_open" = xyes; then : 15096 cat >>confdefs.h <<_ACEOF 15097#define HAVE_LIBDLPI 1 15098_ACEOF 15099 15100 LIBS="-ldlpi $LIBS" 15101 15102fi 15103 15104 if test x"$ac_cv_lib_dlpi_dlpi_open" = x"no"; then 15105 LDFLAGS="$save_ldflags" 15106 fi 15107 unset -v save_ldflags 15108fi 15109 15110ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" 15111if test "x$ac_cv_header_sys_resource_h" = xyes; then : 15112 15113$as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h 15114 15115 ac_fn_c_check_decl "$LINENO" "getrlimit" "ac_cv_have_decl_getrlimit" "#include <sys/resource.h> 15116" 15117if test "x$ac_cv_have_decl_getrlimit" = xyes; then : 15118 ac_have_decl=1 15119else 15120 ac_have_decl=0 15121fi 15122 15123cat >>confdefs.h <<_ACEOF 15124#define HAVE_DECL_GETRLIMIT $ac_have_decl 15125_ACEOF 15126ac_fn_c_check_decl "$LINENO" "setrlimit" "ac_cv_have_decl_setrlimit" "#include <sys/resource.h> 15127" 15128if test "x$ac_cv_have_decl_setrlimit" = xyes; then : 15129 ac_have_decl=1 15130else 15131 ac_have_decl=0 15132fi 15133 15134cat >>confdefs.h <<_ACEOF 15135#define HAVE_DECL_SETRLIMIT $ac_have_decl 15136_ACEOF 15137ac_fn_c_check_decl "$LINENO" "RLIMIT_STACK" "ac_cv_have_decl_RLIMIT_STACK" "#include <sys/resource.h> 15138" 15139if test "x$ac_cv_have_decl_RLIMIT_STACK" = xyes; then : 15140 ac_have_decl=1 15141else 15142 ac_have_decl=0 15143fi 15144 15145cat >>confdefs.h <<_ACEOF 15146#define HAVE_DECL_RLIMIT_STACK $ac_have_decl 15147_ACEOF 15148 15149fi 15150 15151 15152 15153for ac_func in getrusage 15154do : 15155 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" 15156if test "x$ac_cv_func_getrusage" = xyes; then : 15157 cat >>confdefs.h <<_ACEOF 15158#define HAVE_GETRUSAGE 1 15159_ACEOF 15160 15161fi 15162done 15163 15164 15165have_kernel_poll=no 15166ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" 15167if test "x$ac_cv_header_sys_event_h" = xyes; then : 15168 have_kernel_poll=kqueue 15169fi 15170 15171 15172ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default" 15173if test "x$ac_cv_header_sys_epoll_h" = xyes; then : 15174 have_kernel_poll=epoll 15175fi 15176 15177 15178ac_fn_c_check_header_mongrel "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default" 15179if test "x$ac_cv_header_sys_devpoll_h" = xyes; then : 15180 have_kernel_poll=/dev/poll 15181fi 15182 15183 15184 15185for ac_header in sys/timerfd.h 15186do : 15187 ac_fn_c_check_header_mongrel "$LINENO" "sys/timerfd.h" "ac_cv_header_sys_timerfd_h" "$ac_includes_default" 15188if test "x$ac_cv_header_sys_timerfd_h" = xyes; then : 15189 cat >>confdefs.h <<_ACEOF 15190#define HAVE_SYS_TIMERFD_H 1 15191_ACEOF 15192 15193fi 15194 15195done 15196 15197 15198for ac_header in netpacket/packet.h 15199do : 15200 ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default" 15201if test "x$ac_cv_header_netpacket_packet_h" = xyes; then : 15202 cat >>confdefs.h <<_ACEOF 15203#define HAVE_NETPACKET_PACKET_H 1 15204_ACEOF 15205 have_netpacket_packet_h=yes 15206else 15207 have_netpacket_packet_h=no 15208fi 15209 15210done 15211 15212 15213 15214if test "x$enable_sctp" != "xno" ; then 15215 ac_fn_c_check_header_compile "$LINENO" "netinet/sctp.h" "ac_cv_header_netinet_sctp_h" "#if HAVE_SYS_SOCKET_H 15216 #include <sys/socket.h> 15217 #endif 15218 15219" 15220if test "x$ac_cv_header_netinet_sctp_h" = xyes; then : 15221 LIBSCTP=libsctp.so.1 15222 15223$as_echo "#define HAVE_SCTP_H 1" >>confdefs.h 15224 15225fi 15226 15227 15228fi 15229 15230case "x$enable_sctp" in 15231 xno|x) 15232 ;; 15233 *) 15234 if test "x$LIBSCTP" = "x" ; then 15235 as_fn_error $? "sctp support requested, but cannot be enabled since 'netinet/sctp.h' is missing" "$LINENO" 5 15236 fi;; 15237esac 15238 15239if test x"$ac_cv_header_netinet_sctp_h" = x"yes"; then 15240 if test "x$enable_sctp" = "xlib"; then : 15241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sctp_bindx in -lsctp" >&5 15242$as_echo_n "checking for sctp_bindx in -lsctp... " >&6; } 15243if ${ac_cv_lib_sctp_sctp_bindx+:} false; then : 15244 $as_echo_n "(cached) " >&6 15245else 15246 ac_check_lib_save_LIBS=$LIBS 15247LIBS="-lsctp $LIBS" 15248cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15249/* end confdefs.h. */ 15250 15251/* Override any GCC internal prototype to avoid an error. 15252 Use char because int might match the return type of a GCC 15253 builtin and then its argument prototype would still apply. */ 15254#ifdef __cplusplus 15255extern "C" 15256#endif 15257char sctp_bindx (); 15258int 15259main () 15260{ 15261return sctp_bindx (); 15262 ; 15263 return 0; 15264} 15265_ACEOF 15266if ac_fn_c_try_link "$LINENO"; then : 15267 ac_cv_lib_sctp_sctp_bindx=yes 15268else 15269 ac_cv_lib_sctp_sctp_bindx=no 15270fi 15271rm -f core conftest.err conftest.$ac_objext \ 15272 conftest$ac_exeext conftest.$ac_ext 15273LIBS=$ac_check_lib_save_LIBS 15274fi 15275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sctp_sctp_bindx" >&5 15276$as_echo "$ac_cv_lib_sctp_sctp_bindx" >&6; } 15277if test "x$ac_cv_lib_sctp_sctp_bindx" = xyes; then : 15278 cat >>confdefs.h <<_ACEOF 15279#define HAVE_LIBSCTP 1 15280_ACEOF 15281 15282 LIBS="-lsctp $LIBS" 15283 15284fi 15285 15286fi 15287 for ac_func in sctp_bindx sctp_peeloff sctp_getladdrs sctp_freeladdrs sctp_getpaddrs sctp_freepaddrs 15288do : 15289 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 15290ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 15291if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 15292 cat >>confdefs.h <<_ACEOF 15293#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 15294_ACEOF 15295 15296fi 15297done 15298 15299 ac_fn_c_check_member "$LINENO" "struct sctp_accoc_value" "assoc_id" "ac_cv_member_struct_sctp_accoc_value_assoc_id" "#if HAVE_SYS_SOCKET_H 15300 #include <sys/socket.h> 15301 #endif 15302 #include <netinet/sctp.h> 15303 15304" 15305if test "x$ac_cv_member_struct_sctp_accoc_value_assoc_id" = xyes; then : 15306 15307cat >>confdefs.h <<_ACEOF 15308#define HAVE_STRUCT_SCTP_ACCOC_VALUE_ASSOC_ID 1 15309_ACEOF 15310 15311 15312fi 15313 15314 ac_fn_c_check_decl "$LINENO" "SCTP_UNORDERED" "ac_cv_have_decl_SCTP_UNORDERED" "#if HAVE_SYS_SOCKET_H 15315 #include <sys/socket.h> 15316 #endif 15317 #include <netinet/sctp.h> 15318 15319" 15320if test "x$ac_cv_have_decl_SCTP_UNORDERED" = xyes; then : 15321 ac_have_decl=1 15322else 15323 ac_have_decl=0 15324fi 15325 15326cat >>confdefs.h <<_ACEOF 15327#define HAVE_DECL_SCTP_UNORDERED $ac_have_decl 15328_ACEOF 15329ac_fn_c_check_decl "$LINENO" "SCTP_ADDR_OVER" "ac_cv_have_decl_SCTP_ADDR_OVER" "#if HAVE_SYS_SOCKET_H 15330 #include <sys/socket.h> 15331 #endif 15332 #include <netinet/sctp.h> 15333 15334" 15335if test "x$ac_cv_have_decl_SCTP_ADDR_OVER" = xyes; then : 15336 ac_have_decl=1 15337else 15338 ac_have_decl=0 15339fi 15340 15341cat >>confdefs.h <<_ACEOF 15342#define HAVE_DECL_SCTP_ADDR_OVER $ac_have_decl 15343_ACEOF 15344ac_fn_c_check_decl "$LINENO" "SCTP_ABORT" "ac_cv_have_decl_SCTP_ABORT" "#if HAVE_SYS_SOCKET_H 15345 #include <sys/socket.h> 15346 #endif 15347 #include <netinet/sctp.h> 15348 15349" 15350if test "x$ac_cv_have_decl_SCTP_ABORT" = xyes; then : 15351 ac_have_decl=1 15352else 15353 ac_have_decl=0 15354fi 15355 15356cat >>confdefs.h <<_ACEOF 15357#define HAVE_DECL_SCTP_ABORT $ac_have_decl 15358_ACEOF 15359ac_fn_c_check_decl "$LINENO" "SCTP_EOF" "ac_cv_have_decl_SCTP_EOF" "#if HAVE_SYS_SOCKET_H 15360 #include <sys/socket.h> 15361 #endif 15362 #include <netinet/sctp.h> 15363 15364" 15365if test "x$ac_cv_have_decl_SCTP_EOF" = xyes; then : 15366 ac_have_decl=1 15367else 15368 ac_have_decl=0 15369fi 15370 15371cat >>confdefs.h <<_ACEOF 15372#define HAVE_DECL_SCTP_EOF $ac_have_decl 15373_ACEOF 15374ac_fn_c_check_decl "$LINENO" "SCTP_SENDALL" "ac_cv_have_decl_SCTP_SENDALL" "#if HAVE_SYS_SOCKET_H 15375 #include <sys/socket.h> 15376 #endif 15377 #include <netinet/sctp.h> 15378 15379" 15380if test "x$ac_cv_have_decl_SCTP_SENDALL" = xyes; then : 15381 ac_have_decl=1 15382else 15383 ac_have_decl=0 15384fi 15385 15386cat >>confdefs.h <<_ACEOF 15387#define HAVE_DECL_SCTP_SENDALL $ac_have_decl 15388_ACEOF 15389ac_fn_c_check_decl "$LINENO" "SCTP_ADDR_CONFIRMED" "ac_cv_have_decl_SCTP_ADDR_CONFIRMED" "#if HAVE_SYS_SOCKET_H 15390 #include <sys/socket.h> 15391 #endif 15392 #include <netinet/sctp.h> 15393 15394" 15395if test "x$ac_cv_have_decl_SCTP_ADDR_CONFIRMED" = xyes; then : 15396 ac_have_decl=1 15397else 15398 ac_have_decl=0 15399fi 15400 15401cat >>confdefs.h <<_ACEOF 15402#define HAVE_DECL_SCTP_ADDR_CONFIRMED $ac_have_decl 15403_ACEOF 15404ac_fn_c_check_decl "$LINENO" "SCTP_DELAYED_ACK_TIME" "ac_cv_have_decl_SCTP_DELAYED_ACK_TIME" "#if HAVE_SYS_SOCKET_H 15405 #include <sys/socket.h> 15406 #endif 15407 #include <netinet/sctp.h> 15408 15409" 15410if test "x$ac_cv_have_decl_SCTP_DELAYED_ACK_TIME" = xyes; then : 15411 ac_have_decl=1 15412else 15413 ac_have_decl=0 15414fi 15415 15416cat >>confdefs.h <<_ACEOF 15417#define HAVE_DECL_SCTP_DELAYED_ACK_TIME $ac_have_decl 15418_ACEOF 15419ac_fn_c_check_decl "$LINENO" "SCTP_EMPTY" "ac_cv_have_decl_SCTP_EMPTY" "#if HAVE_SYS_SOCKET_H 15420 #include <sys/socket.h> 15421 #endif 15422 #include <netinet/sctp.h> 15423 15424" 15425if test "x$ac_cv_have_decl_SCTP_EMPTY" = xyes; then : 15426 ac_have_decl=1 15427else 15428 ac_have_decl=0 15429fi 15430 15431cat >>confdefs.h <<_ACEOF 15432#define HAVE_DECL_SCTP_EMPTY $ac_have_decl 15433_ACEOF 15434ac_fn_c_check_decl "$LINENO" "SCTP_UNCONFIRMED" "ac_cv_have_decl_SCTP_UNCONFIRMED" "#if HAVE_SYS_SOCKET_H 15435 #include <sys/socket.h> 15436 #endif 15437 #include <netinet/sctp.h> 15438 15439" 15440if test "x$ac_cv_have_decl_SCTP_UNCONFIRMED" = xyes; then : 15441 ac_have_decl=1 15442else 15443 ac_have_decl=0 15444fi 15445 15446cat >>confdefs.h <<_ACEOF 15447#define HAVE_DECL_SCTP_UNCONFIRMED $ac_have_decl 15448_ACEOF 15449ac_fn_c_check_decl "$LINENO" "SCTP_CLOSED" "ac_cv_have_decl_SCTP_CLOSED" "#if HAVE_SYS_SOCKET_H 15450 #include <sys/socket.h> 15451 #endif 15452 #include <netinet/sctp.h> 15453 15454" 15455if test "x$ac_cv_have_decl_SCTP_CLOSED" = xyes; then : 15456 ac_have_decl=1 15457else 15458 ac_have_decl=0 15459fi 15460 15461cat >>confdefs.h <<_ACEOF 15462#define HAVE_DECL_SCTP_CLOSED $ac_have_decl 15463_ACEOF 15464ac_fn_c_check_decl "$LINENO" "SCTPS_IDLE" "ac_cv_have_decl_SCTPS_IDLE" "#if HAVE_SYS_SOCKET_H 15465 #include <sys/socket.h> 15466 #endif 15467 #include <netinet/sctp.h> 15468 15469" 15470if test "x$ac_cv_have_decl_SCTPS_IDLE" = xyes; then : 15471 ac_have_decl=1 15472else 15473 ac_have_decl=0 15474fi 15475 15476cat >>confdefs.h <<_ACEOF 15477#define HAVE_DECL_SCTPS_IDLE $ac_have_decl 15478_ACEOF 15479ac_fn_c_check_decl "$LINENO" "SCTP_BOUND" "ac_cv_have_decl_SCTP_BOUND" "#if HAVE_SYS_SOCKET_H 15480 #include <sys/socket.h> 15481 #endif 15482 #include <netinet/sctp.h> 15483 15484" 15485if test "x$ac_cv_have_decl_SCTP_BOUND" = xyes; then : 15486 ac_have_decl=1 15487else 15488 ac_have_decl=0 15489fi 15490 15491cat >>confdefs.h <<_ACEOF 15492#define HAVE_DECL_SCTP_BOUND $ac_have_decl 15493_ACEOF 15494ac_fn_c_check_decl "$LINENO" "SCTPS_BOUND" "ac_cv_have_decl_SCTPS_BOUND" "#if HAVE_SYS_SOCKET_H 15495 #include <sys/socket.h> 15496 #endif 15497 #include <netinet/sctp.h> 15498 15499" 15500if test "x$ac_cv_have_decl_SCTPS_BOUND" = xyes; then : 15501 ac_have_decl=1 15502else 15503 ac_have_decl=0 15504fi 15505 15506cat >>confdefs.h <<_ACEOF 15507#define HAVE_DECL_SCTPS_BOUND $ac_have_decl 15508_ACEOF 15509ac_fn_c_check_decl "$LINENO" "SCTP_LISTEN" "ac_cv_have_decl_SCTP_LISTEN" "#if HAVE_SYS_SOCKET_H 15510 #include <sys/socket.h> 15511 #endif 15512 #include <netinet/sctp.h> 15513 15514" 15515if test "x$ac_cv_have_decl_SCTP_LISTEN" = xyes; then : 15516 ac_have_decl=1 15517else 15518 ac_have_decl=0 15519fi 15520 15521cat >>confdefs.h <<_ACEOF 15522#define HAVE_DECL_SCTP_LISTEN $ac_have_decl 15523_ACEOF 15524ac_fn_c_check_decl "$LINENO" "SCTPS_LISTEN" "ac_cv_have_decl_SCTPS_LISTEN" "#if HAVE_SYS_SOCKET_H 15525 #include <sys/socket.h> 15526 #endif 15527 #include <netinet/sctp.h> 15528 15529" 15530if test "x$ac_cv_have_decl_SCTPS_LISTEN" = xyes; then : 15531 ac_have_decl=1 15532else 15533 ac_have_decl=0 15534fi 15535 15536cat >>confdefs.h <<_ACEOF 15537#define HAVE_DECL_SCTPS_LISTEN $ac_have_decl 15538_ACEOF 15539ac_fn_c_check_decl "$LINENO" "SCTP_COOKIE_WAIT" "ac_cv_have_decl_SCTP_COOKIE_WAIT" "#if HAVE_SYS_SOCKET_H 15540 #include <sys/socket.h> 15541 #endif 15542 #include <netinet/sctp.h> 15543 15544" 15545if test "x$ac_cv_have_decl_SCTP_COOKIE_WAIT" = xyes; then : 15546 ac_have_decl=1 15547else 15548 ac_have_decl=0 15549fi 15550 15551cat >>confdefs.h <<_ACEOF 15552#define HAVE_DECL_SCTP_COOKIE_WAIT $ac_have_decl 15553_ACEOF 15554ac_fn_c_check_decl "$LINENO" "SCTPS_COOKIE_WAIT" "ac_cv_have_decl_SCTPS_COOKIE_WAIT" "#if HAVE_SYS_SOCKET_H 15555 #include <sys/socket.h> 15556 #endif 15557 #include <netinet/sctp.h> 15558 15559" 15560if test "x$ac_cv_have_decl_SCTPS_COOKIE_WAIT" = xyes; then : 15561 ac_have_decl=1 15562else 15563 ac_have_decl=0 15564fi 15565 15566cat >>confdefs.h <<_ACEOF 15567#define HAVE_DECL_SCTPS_COOKIE_WAIT $ac_have_decl 15568_ACEOF 15569ac_fn_c_check_decl "$LINENO" "SCTP_COOKIE_ECHOED" "ac_cv_have_decl_SCTP_COOKIE_ECHOED" "#if HAVE_SYS_SOCKET_H 15570 #include <sys/socket.h> 15571 #endif 15572 #include <netinet/sctp.h> 15573 15574" 15575if test "x$ac_cv_have_decl_SCTP_COOKIE_ECHOED" = xyes; then : 15576 ac_have_decl=1 15577else 15578 ac_have_decl=0 15579fi 15580 15581cat >>confdefs.h <<_ACEOF 15582#define HAVE_DECL_SCTP_COOKIE_ECHOED $ac_have_decl 15583_ACEOF 15584ac_fn_c_check_decl "$LINENO" "SCTPS_COOKIE_ECHOED" "ac_cv_have_decl_SCTPS_COOKIE_ECHOED" "#if HAVE_SYS_SOCKET_H 15585 #include <sys/socket.h> 15586 #endif 15587 #include <netinet/sctp.h> 15588 15589" 15590if test "x$ac_cv_have_decl_SCTPS_COOKIE_ECHOED" = xyes; then : 15591 ac_have_decl=1 15592else 15593 ac_have_decl=0 15594fi 15595 15596cat >>confdefs.h <<_ACEOF 15597#define HAVE_DECL_SCTPS_COOKIE_ECHOED $ac_have_decl 15598_ACEOF 15599ac_fn_c_check_decl "$LINENO" "SCTP_ESTABLISHED" "ac_cv_have_decl_SCTP_ESTABLISHED" "#if HAVE_SYS_SOCKET_H 15600 #include <sys/socket.h> 15601 #endif 15602 #include <netinet/sctp.h> 15603 15604" 15605if test "x$ac_cv_have_decl_SCTP_ESTABLISHED" = xyes; then : 15606 ac_have_decl=1 15607else 15608 ac_have_decl=0 15609fi 15610 15611cat >>confdefs.h <<_ACEOF 15612#define HAVE_DECL_SCTP_ESTABLISHED $ac_have_decl 15613_ACEOF 15614ac_fn_c_check_decl "$LINENO" "SCTPS_ESTABLISHED" "ac_cv_have_decl_SCTPS_ESTABLISHED" "#if HAVE_SYS_SOCKET_H 15615 #include <sys/socket.h> 15616 #endif 15617 #include <netinet/sctp.h> 15618 15619" 15620if test "x$ac_cv_have_decl_SCTPS_ESTABLISHED" = xyes; then : 15621 ac_have_decl=1 15622else 15623 ac_have_decl=0 15624fi 15625 15626cat >>confdefs.h <<_ACEOF 15627#define HAVE_DECL_SCTPS_ESTABLISHED $ac_have_decl 15628_ACEOF 15629ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_PENDING" "ac_cv_have_decl_SCTP_SHUTDOWN_PENDING" "#if HAVE_SYS_SOCKET_H 15630 #include <sys/socket.h> 15631 #endif 15632 #include <netinet/sctp.h> 15633 15634" 15635if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_PENDING" = xyes; then : 15636 ac_have_decl=1 15637else 15638 ac_have_decl=0 15639fi 15640 15641cat >>confdefs.h <<_ACEOF 15642#define HAVE_DECL_SCTP_SHUTDOWN_PENDING $ac_have_decl 15643_ACEOF 15644ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_PENDING" "ac_cv_have_decl_SCTPS_SHUTDOWN_PENDING" "#if HAVE_SYS_SOCKET_H 15645 #include <sys/socket.h> 15646 #endif 15647 #include <netinet/sctp.h> 15648 15649" 15650if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_PENDING" = xyes; then : 15651 ac_have_decl=1 15652else 15653 ac_have_decl=0 15654fi 15655 15656cat >>confdefs.h <<_ACEOF 15657#define HAVE_DECL_SCTPS_SHUTDOWN_PENDING $ac_have_decl 15658_ACEOF 15659ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_SENT" "ac_cv_have_decl_SCTP_SHUTDOWN_SENT" "#if HAVE_SYS_SOCKET_H 15660 #include <sys/socket.h> 15661 #endif 15662 #include <netinet/sctp.h> 15663 15664" 15665if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_SENT" = xyes; then : 15666 ac_have_decl=1 15667else 15668 ac_have_decl=0 15669fi 15670 15671cat >>confdefs.h <<_ACEOF 15672#define HAVE_DECL_SCTP_SHUTDOWN_SENT $ac_have_decl 15673_ACEOF 15674ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_SENT" "ac_cv_have_decl_SCTPS_SHUTDOWN_SENT" "#if HAVE_SYS_SOCKET_H 15675 #include <sys/socket.h> 15676 #endif 15677 #include <netinet/sctp.h> 15678 15679" 15680if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_SENT" = xyes; then : 15681 ac_have_decl=1 15682else 15683 ac_have_decl=0 15684fi 15685 15686cat >>confdefs.h <<_ACEOF 15687#define HAVE_DECL_SCTPS_SHUTDOWN_SENT $ac_have_decl 15688_ACEOF 15689ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_RECEIVED" "ac_cv_have_decl_SCTP_SHUTDOWN_RECEIVED" "#if HAVE_SYS_SOCKET_H 15690 #include <sys/socket.h> 15691 #endif 15692 #include <netinet/sctp.h> 15693 15694" 15695if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_RECEIVED" = xyes; then : 15696 ac_have_decl=1 15697else 15698 ac_have_decl=0 15699fi 15700 15701cat >>confdefs.h <<_ACEOF 15702#define HAVE_DECL_SCTP_SHUTDOWN_RECEIVED $ac_have_decl 15703_ACEOF 15704ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_RECEIVED" "ac_cv_have_decl_SCTPS_SHUTDOWN_RECEIVED" "#if HAVE_SYS_SOCKET_H 15705 #include <sys/socket.h> 15706 #endif 15707 #include <netinet/sctp.h> 15708 15709" 15710if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_RECEIVED" = xyes; then : 15711 ac_have_decl=1 15712else 15713 ac_have_decl=0 15714fi 15715 15716cat >>confdefs.h <<_ACEOF 15717#define HAVE_DECL_SCTPS_SHUTDOWN_RECEIVED $ac_have_decl 15718_ACEOF 15719ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_ACK_SENT" "ac_cv_have_decl_SCTP_SHUTDOWN_ACK_SENT" "#if HAVE_SYS_SOCKET_H 15720 #include <sys/socket.h> 15721 #endif 15722 #include <netinet/sctp.h> 15723 15724" 15725if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_ACK_SENT" = xyes; then : 15726 ac_have_decl=1 15727else 15728 ac_have_decl=0 15729fi 15730 15731cat >>confdefs.h <<_ACEOF 15732#define HAVE_DECL_SCTP_SHUTDOWN_ACK_SENT $ac_have_decl 15733_ACEOF 15734ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_ACK_SENT" "ac_cv_have_decl_SCTPS_SHUTDOWN_ACK_SENT" "#if HAVE_SYS_SOCKET_H 15735 #include <sys/socket.h> 15736 #endif 15737 #include <netinet/sctp.h> 15738 15739" 15740if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_ACK_SENT" = xyes; then : 15741 ac_have_decl=1 15742else 15743 ac_have_decl=0 15744fi 15745 15746cat >>confdefs.h <<_ACEOF 15747#define HAVE_DECL_SCTPS_SHUTDOWN_ACK_SENT $ac_have_decl 15748_ACEOF 15749 15750 ac_fn_c_check_member "$LINENO" "struct sctp_paddrparams" "spp_pathmtu" "ac_cv_member_struct_sctp_paddrparams_spp_pathmtu" "#if HAVE_SYS_SOCKET_H 15751 #include <sys/socket.h> 15752 #endif 15753 #include <netinet/sctp.h> 15754 15755" 15756if test "x$ac_cv_member_struct_sctp_paddrparams_spp_pathmtu" = xyes; then : 15757 15758cat >>confdefs.h <<_ACEOF 15759#define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_PATHMTU 1 15760_ACEOF 15761 15762 15763fi 15764ac_fn_c_check_member "$LINENO" "struct sctp_paddrparams" "spp_sackdelay" "ac_cv_member_struct_sctp_paddrparams_spp_sackdelay" "#if HAVE_SYS_SOCKET_H 15765 #include <sys/socket.h> 15766 #endif 15767 #include <netinet/sctp.h> 15768 15769" 15770if test "x$ac_cv_member_struct_sctp_paddrparams_spp_sackdelay" = xyes; then : 15771 15772cat >>confdefs.h <<_ACEOF 15773#define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY 1 15774_ACEOF 15775 15776 15777fi 15778ac_fn_c_check_member "$LINENO" "struct sctp_paddrparams" "spp_flags" "ac_cv_member_struct_sctp_paddrparams_spp_flags" "#if HAVE_SYS_SOCKET_H 15779 #include <sys/socket.h> 15780 #endif 15781 #include <netinet/sctp.h> 15782 15783" 15784if test "x$ac_cv_member_struct_sctp_paddrparams_spp_flags" = xyes; then : 15785 15786cat >>confdefs.h <<_ACEOF 15787#define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_FLAGS 1 15788_ACEOF 15789 15790 15791fi 15792ac_fn_c_check_member "$LINENO" "struct sctp_remote_error" "sre_data" "ac_cv_member_struct_sctp_remote_error_sre_data" "#if HAVE_SYS_SOCKET_H 15793 #include <sys/socket.h> 15794 #endif 15795 #include <netinet/sctp.h> 15796 15797" 15798if test "x$ac_cv_member_struct_sctp_remote_error_sre_data" = xyes; then : 15799 15800cat >>confdefs.h <<_ACEOF 15801#define HAVE_STRUCT_SCTP_REMOTE_ERROR_SRE_DATA 1 15802_ACEOF 15803 15804 15805fi 15806ac_fn_c_check_member "$LINENO" "struct sctp_send_failed" "ssf_data" "ac_cv_member_struct_sctp_send_failed_ssf_data" "#if HAVE_SYS_SOCKET_H 15807 #include <sys/socket.h> 15808 #endif 15809 #include <netinet/sctp.h> 15810 15811" 15812if test "x$ac_cv_member_struct_sctp_send_failed_ssf_data" = xyes; then : 15813 15814cat >>confdefs.h <<_ACEOF 15815#define HAVE_STRUCT_SCTP_SEND_FAILED_SSF_DATA 1 15816_ACEOF 15817 15818 15819fi 15820ac_fn_c_check_member "$LINENO" "struct sctp_event_subscribe" "sctp_authentication_event" "ac_cv_member_struct_sctp_event_subscribe_sctp_authentication_event" "#if HAVE_SYS_SOCKET_H 15821 #include <sys/socket.h> 15822 #endif 15823 #include <netinet/sctp.h> 15824 15825" 15826if test "x$ac_cv_member_struct_sctp_event_subscribe_sctp_authentication_event" = xyes; then : 15827 15828cat >>confdefs.h <<_ACEOF 15829#define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_AUTHENTICATION_EVENT 1 15830_ACEOF 15831 15832 15833fi 15834ac_fn_c_check_member "$LINENO" "struct sctp_event_subscribe" "sctp_sender_dry_event" "ac_cv_member_struct_sctp_event_subscribe_sctp_sender_dry_event" "#if HAVE_SYS_SOCKET_H 15835 #include <sys/socket.h> 15836 #endif 15837 #include <netinet/sctp.h> 15838 15839" 15840if test "x$ac_cv_member_struct_sctp_event_subscribe_sctp_sender_dry_event" = xyes; then : 15841 15842cat >>confdefs.h <<_ACEOF 15843#define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_SENDER_DRY_EVENT 1 15844_ACEOF 15845 15846 15847fi 15848 15849fi 15850 15851for ac_header in sched.h setns.h 15852do : 15853 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 15854ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 15855if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 15856 cat >>confdefs.h <<_ACEOF 15857#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 15858_ACEOF 15859 15860fi 15861 15862done 15863 15864for ac_func in setns 15865do : 15866 ac_fn_c_check_func "$LINENO" "setns" "ac_cv_func_setns" 15867if test "x$ac_cv_func_setns" = xyes; then : 15868 cat >>confdefs.h <<_ACEOF 15869#define HAVE_SETNS 1 15870_ACEOF 15871 15872fi 15873done 15874 15875 15876for ac_header in linux/types.h linux/errqueue.h 15877do : 15878 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 15879ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TIME_H 15880# include <sys/time.h> 15881#endif 15882#ifdef HAVE_LINUX_TYPES_H 15883# include <linux/types.h> 15884#endif 15885 15886" 15887if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 15888 cat >>confdefs.h <<_ACEOF 15889#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 15890_ACEOF 15891 15892fi 15893 15894done 15895 15896 15897HAVE_VALGRIND=no 15898ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" 15899if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : 15900 HAVE_VALGRIND=yes 15901fi 15902 15903 15904 15905 15906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_BSDCOMPAT declaration" >&5 15907$as_echo_n "checking for SO_BSDCOMPAT declaration... " >&6; } 15908if ${ac_cv_decl_so_bsdcompat+:} false; then : 15909 $as_echo_n "(cached) " >&6 15910else 15911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15912/* end confdefs.h. */ 15913#include <sys/socket.h> 15914int 15915main () 15916{ 15917int i = SO_BSDCOMPAT; 15918 ; 15919 return 0; 15920} 15921_ACEOF 15922if ac_fn_c_try_compile "$LINENO"; then : 15923 ac_cv_decl_so_bsdcompat=yes 15924else 15925 ac_cv_decl_so_bsdcompat=no 15926fi 15927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15928fi 15929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_so_bsdcompat" >&5 15930$as_echo "$ac_cv_decl_so_bsdcompat" >&6; } 15931 15932case "${ac_cv_decl_so_bsdcompat}" in 15933 "yes" ) 15934$as_echo "#define HAVE_SO_BSDCOMPAT /**/" >>confdefs.h 15935 ;; 15936 * ) ;; 15937esac 15938 15939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in netinet/in.h" >&5 15940$as_echo_n "checking for INADDR_LOOPBACK in netinet/in.h... " >&6; } 15941if ${ac_cv_decl_inaddr_loopback+:} false; then : 15942 $as_echo_n "(cached) " >&6 15943else 15944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15945/* end confdefs.h. */ 15946#include <sys/types.h> 15947#include <netinet/in.h> 15948int 15949main () 15950{ 15951int i = INADDR_LOOPBACK; 15952 ; 15953 return 0; 15954} 15955_ACEOF 15956if ac_fn_c_try_compile "$LINENO"; then : 15957 ac_cv_decl_inaddr_loopback=yes 15958else 15959 ac_cv_decl_inaddr_loopback=no 15960fi 15961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15962 15963fi 15964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback" >&5 15965$as_echo "$ac_cv_decl_inaddr_loopback" >&6; } 15966 15967if test ${ac_cv_decl_inaddr_loopback} = no; then 15968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in rpc/types.h" >&5 15969$as_echo_n "checking for INADDR_LOOPBACK in rpc/types.h... " >&6; } 15970if ${ac_cv_decl_inaddr_loopback_rpc+:} false; then : 15971 $as_echo_n "(cached) " >&6 15972else 15973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15974/* end confdefs.h. */ 15975#include <rpc/types.h> 15976int 15977main () 15978{ 15979int i = INADDR_LOOPBACK; 15980 ; 15981 return 0; 15982} 15983_ACEOF 15984if ac_fn_c_try_compile "$LINENO"; then : 15985 ac_cv_decl_inaddr_loopback_rpc=yes 15986else 15987 ac_cv_decl_inaddr_loopback_rpc=no 15988fi 15989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15990fi 15991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback_rpc" >&5 15992$as_echo "$ac_cv_decl_inaddr_loopback_rpc" >&6; } 15993 15994 case "${ac_cv_decl_inaddr_loopback_rpc}" in 15995 "yes" ) 15996 15997$as_echo "#define DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H /**/" >>confdefs.h 15998 ;; 15999 * ) 16000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in winsock2.h" >&5 16001$as_echo_n "checking for INADDR_LOOPBACK in winsock2.h... " >&6; } 16002if ${ac_cv_decl_inaddr_loopback_winsock2+:} false; then : 16003 $as_echo_n "(cached) " >&6 16004else 16005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16006/* end confdefs.h. */ 16007#define WIN32_LEAN_AND_MEAN 16008 #include <winsock2.h> 16009int 16010main () 16011{ 16012int i = INADDR_LOOPBACK; 16013 ; 16014 return 0; 16015} 16016_ACEOF 16017if ac_fn_c_try_compile "$LINENO"; then : 16018 ac_cv_decl_inaddr_loopback_winsock2=yes 16019else 16020 ac_cv_decl_inaddr_loopback_winsock2=no 16021fi 16022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16023fi 16024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback_winsock2" >&5 16025$as_echo "$ac_cv_decl_inaddr_loopback_winsock2" >&6; } 16026 case "${ac_cv_decl_inaddr_loopback_winsock2}" in 16027 "yes" ) 16028 16029$as_echo "#define DEF_INADDR_LOOPBACK_IN_WINSOCK2_H /**/" >>confdefs.h 16030 ;; 16031 * ) 16032 # couldn't find it anywhere 16033 16034$as_echo "#define HAVE_NO_INADDR_LOOPBACK /**/" >>confdefs.h 16035 ;; 16036 esac;; 16037 esac 16038fi 16039 16040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist declaration in stdio.h or errno.h" >&5 16041$as_echo_n "checking for sys_errlist declaration in stdio.h or errno.h... " >&6; } 16042if ${ac_cv_decl_sys_errlist+:} false; then : 16043 $as_echo_n "(cached) " >&6 16044else 16045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16046/* end confdefs.h. */ 16047#include <stdio.h> 16048#include <errno.h> 16049int 16050main () 16051{ 16052char *msg = *(sys_errlist + 1); 16053 ; 16054 return 0; 16055} 16056_ACEOF 16057if ac_fn_c_try_compile "$LINENO"; then : 16058 ac_cv_decl_sys_errlist=yes 16059else 16060 ac_cv_decl_sys_errlist=no 16061fi 16062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16063fi 16064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_sys_errlist" >&5 16065$as_echo "$ac_cv_decl_sys_errlist" >&6; } 16066if test $ac_cv_decl_sys_errlist = yes; then 16067 16068$as_echo "#define SYS_ERRLIST_DECLARED /**/" >>confdefs.h 16069 16070fi 16071 16072 16073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if windows.h includes winsock2.h" >&5 16074$as_echo_n "checking if windows.h includes winsock2.h... " >&6; } 16075if ${erts_cv_windows_h_includes_winsock2_h+:} false; then : 16076 $as_echo_n "(cached) " >&6 16077else 16078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16079/* end confdefs.h. */ 16080#include <windows.h> 16081 16082int 16083main () 16084{ 16085#ifndef _WINSOCK2API_ 16086 #error winsock2.h not included 16087 #endif 16088 int i = 1; 16089 16090 ; 16091 return 0; 16092} 16093_ACEOF 16094if ac_fn_c_try_compile "$LINENO"; then : 16095 erts_cv_windows_h_includes_winsock2_h=yes 16096else 16097 erts_cv_windows_h_includes_winsock2_h=no 16098fi 16099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16100fi 16101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_windows_h_includes_winsock2_h" >&5 16102$as_echo "$erts_cv_windows_h_includes_winsock2_h" >&6; } 16103if test $erts_cv_windows_h_includes_winsock2_h = yes; then 16104 16105$as_echo "#define WINDOWS_H_INCLUDES_WINSOCK2_H 1" >>confdefs.h 16106 16107fi 16108 16109CPPFLAGS=$saved_cppflags 16110 16111 16112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 16113$as_echo_n "checking for an ANSI C-conforming const... " >&6; } 16114if ${ac_cv_c_const+:} false; then : 16115 $as_echo_n "(cached) " >&6 16116else 16117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16118/* end confdefs.h. */ 16119 16120int 16121main () 16122{ 16123 16124#ifndef __cplusplus 16125 /* Ultrix mips cc rejects this sort of thing. */ 16126 typedef int charset[2]; 16127 const charset cs = { 0, 0 }; 16128 /* SunOS 4.1.1 cc rejects this. */ 16129 char const *const *pcpcc; 16130 char **ppc; 16131 /* NEC SVR4.0.2 mips cc rejects this. */ 16132 struct point {int x, y;}; 16133 static struct point const zero = {0,0}; 16134 /* AIX XL C 1.02.0.0 rejects this. 16135 It does not let you subtract one const X* pointer from another in 16136 an arm of an if-expression whose if-part is not a constant 16137 expression */ 16138 const char *g = "string"; 16139 pcpcc = &g + (g ? g-g : 0); 16140 /* HPUX 7.0 cc rejects these. */ 16141 ++pcpcc; 16142 ppc = (char**) pcpcc; 16143 pcpcc = (char const *const *) ppc; 16144 { /* SCO 3.2v4 cc rejects this sort of thing. */ 16145 char tx; 16146 char *t = &tx; 16147 char const *s = 0 ? (char *) 0 : (char const *) 0; 16148 16149 *t++ = 0; 16150 if (s) return 0; 16151 } 16152 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ 16153 int x[] = {25, 17}; 16154 const int *foo = &x[0]; 16155 ++foo; 16156 } 16157 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ 16158 typedef const int *iptr; 16159 iptr p = 0; 16160 ++p; 16161 } 16162 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying 16163 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ 16164 struct s { int j; const int *ap[3]; } bx; 16165 struct s *b = &bx; b->j = 5; 16166 } 16167 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ 16168 const int foo = 10; 16169 if (!foo) return 0; 16170 } 16171 return !cs[0] && !zero.x; 16172#endif 16173 16174 ; 16175 return 0; 16176} 16177_ACEOF 16178if ac_fn_c_try_compile "$LINENO"; then : 16179 ac_cv_c_const=yes 16180else 16181 ac_cv_c_const=no 16182fi 16183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16184fi 16185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 16186$as_echo "$ac_cv_c_const" >&6; } 16187if test $ac_cv_c_const = no; then 16188 16189$as_echo "#define const /**/" >>confdefs.h 16190 16191fi 16192 16193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 16194$as_echo_n "checking return type of signal handlers... " >&6; } 16195if ${ac_cv_type_signal+:} false; then : 16196 $as_echo_n "(cached) " >&6 16197else 16198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16199/* end confdefs.h. */ 16200#include <sys/types.h> 16201#include <signal.h> 16202 16203int 16204main () 16205{ 16206return *(signal (0, 0)) (0) == 1; 16207 ; 16208 return 0; 16209} 16210_ACEOF 16211if ac_fn_c_try_compile "$LINENO"; then : 16212 ac_cv_type_signal=int 16213else 16214 ac_cv_type_signal=void 16215fi 16216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16217fi 16218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 16219$as_echo "$ac_cv_type_signal" >&6; } 16220 16221cat >>confdefs.h <<_ACEOF 16222#define RETSIGTYPE $ac_cv_type_signal 16223_ACEOF 16224 16225 16226ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" 16227if test "x$ac_cv_type_off_t" = xyes; then : 16228 16229else 16230 16231cat >>confdefs.h <<_ACEOF 16232#define off_t long int 16233_ACEOF 16234 16235fi 16236 16237ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" 16238if test "x$ac_cv_type_pid_t" = xyes; then : 16239 16240else 16241 16242cat >>confdefs.h <<_ACEOF 16243#define pid_t int 16244_ACEOF 16245 16246fi 16247 16248ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" 16249if test "x$ac_cv_type_size_t" = xyes; then : 16250 16251else 16252 16253cat >>confdefs.h <<_ACEOF 16254#define size_t unsigned int 16255_ACEOF 16256 16257fi 16258 16259 16260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 16261$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } 16262if ${ac_cv_struct_tm+:} false; then : 16263 $as_echo_n "(cached) " >&6 16264else 16265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16266/* end confdefs.h. */ 16267#include <sys/types.h> 16268#include <time.h> 16269 16270int 16271main () 16272{ 16273struct tm tm; 16274 int *p = &tm.tm_sec; 16275 return !p; 16276 ; 16277 return 0; 16278} 16279_ACEOF 16280if ac_fn_c_try_compile "$LINENO"; then : 16281 ac_cv_struct_tm=time.h 16282else 16283 ac_cv_struct_tm=sys/time.h 16284fi 16285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16286fi 16287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 16288$as_echo "$ac_cv_struct_tm" >&6; } 16289if test $ac_cv_struct_tm = sys/time.h; then 16290 16291$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h 16292 16293fi 16294 16295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct sockaddr has sa_len field" >&5 16296$as_echo_n "checking whether struct sockaddr has sa_len field... " >&6; } 16297if ${ac_cv_struct_sockaddr_sa_len+:} false; then : 16298 $as_echo_n "(cached) " >&6 16299else 16300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16301/* end confdefs.h. */ 16302#include <sys/types.h> 16303#include <sys/socket.h> 16304int 16305main () 16306{ 16307struct sockaddr s; s.sa_len = 10; 16308 ; 16309 return 0; 16310} 16311_ACEOF 16312if ac_fn_c_try_compile "$LINENO"; then : 16313 ac_cv_struct_sockaddr_sa_len=yes 16314else 16315 ac_cv_struct_sockaddr_sa_len=no 16316fi 16317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16318fi 16319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_sa_len" >&5 16320$as_echo "$ac_cv_struct_sockaddr_sa_len" >&6; } 16321 16322case ${ac_cv_struct_sockaddr_sa_len} in 16323 "no" ) 16324$as_echo "#define NO_SA_LEN 1" >>confdefs.h 16325 ;; 16326 *) ;; 16327esac 16328 16329 16330# The cast to long int works around a bug in the HP C Compiler 16331# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16332# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16333# This bug is HP SR number 8606223364. 16334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 16335$as_echo_n "checking size of char... " >&6; } 16336if ${ac_cv_sizeof_char+:} false; then : 16337 $as_echo_n "(cached) " >&6 16338else 16339 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : 16340 16341else 16342 if test "$ac_cv_type_char" = yes; then 16343 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16345as_fn_error 77 "cannot compute sizeof (char) 16346See \`config.log' for more details" "$LINENO" 5; } 16347 else 16348 ac_cv_sizeof_char=0 16349 fi 16350fi 16351 16352fi 16353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 16354$as_echo "$ac_cv_sizeof_char" >&6; } 16355 16356 16357 16358cat >>confdefs.h <<_ACEOF 16359#define SIZEOF_CHAR $ac_cv_sizeof_char 16360_ACEOF 16361 16362 16363# The cast to long int works around a bug in the HP C Compiler 16364# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16365# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16366# This bug is HP SR number 8606223364. 16367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 16368$as_echo_n "checking size of short... " >&6; } 16369if ${ac_cv_sizeof_short+:} false; then : 16370 $as_echo_n "(cached) " >&6 16371else 16372 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : 16373 16374else 16375 if test "$ac_cv_type_short" = yes; then 16376 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16378as_fn_error 77 "cannot compute sizeof (short) 16379See \`config.log' for more details" "$LINENO" 5; } 16380 else 16381 ac_cv_sizeof_short=0 16382 fi 16383fi 16384 16385fi 16386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 16387$as_echo "$ac_cv_sizeof_short" >&6; } 16388 16389 16390 16391cat >>confdefs.h <<_ACEOF 16392#define SIZEOF_SHORT $ac_cv_sizeof_short 16393_ACEOF 16394 16395 16396# The cast to long int works around a bug in the HP C Compiler 16397# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16398# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16399# This bug is HP SR number 8606223364. 16400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 16401$as_echo_n "checking size of int... " >&6; } 16402if ${ac_cv_sizeof_int+:} false; then : 16403 $as_echo_n "(cached) " >&6 16404else 16405 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : 16406 16407else 16408 if test "$ac_cv_type_int" = yes; then 16409 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16410$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16411as_fn_error 77 "cannot compute sizeof (int) 16412See \`config.log' for more details" "$LINENO" 5; } 16413 else 16414 ac_cv_sizeof_int=0 16415 fi 16416fi 16417 16418fi 16419{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 16420$as_echo "$ac_cv_sizeof_int" >&6; } 16421 16422 16423 16424cat >>confdefs.h <<_ACEOF 16425#define SIZEOF_INT $ac_cv_sizeof_int 16426_ACEOF 16427 16428 16429# The cast to long int works around a bug in the HP C Compiler 16430# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16431# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16432# This bug is HP SR number 8606223364. 16433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 16434$as_echo_n "checking size of long... " >&6; } 16435if ${ac_cv_sizeof_long+:} false; then : 16436 $as_echo_n "(cached) " >&6 16437else 16438 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : 16439 16440else 16441 if test "$ac_cv_type_long" = yes; then 16442 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16443$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16444as_fn_error 77 "cannot compute sizeof (long) 16445See \`config.log' for more details" "$LINENO" 5; } 16446 else 16447 ac_cv_sizeof_long=0 16448 fi 16449fi 16450 16451fi 16452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 16453$as_echo "$ac_cv_sizeof_long" >&6; } 16454 16455 16456 16457cat >>confdefs.h <<_ACEOF 16458#define SIZEOF_LONG $ac_cv_sizeof_long 16459_ACEOF 16460 16461 16462# The cast to long int works around a bug in the HP C Compiler 16463# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16464# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16465# This bug is HP SR number 8606223364. 16466{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 16467$as_echo_n "checking size of void *... " >&6; } 16468if ${ac_cv_sizeof_void_p+:} false; then : 16469 $as_echo_n "(cached) " >&6 16470else 16471 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : 16472 16473else 16474 if test "$ac_cv_type_void_p" = yes; then 16475 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16476$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16477as_fn_error 77 "cannot compute sizeof (void *) 16478See \`config.log' for more details" "$LINENO" 5; } 16479 else 16480 ac_cv_sizeof_void_p=0 16481 fi 16482fi 16483 16484fi 16485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 16486$as_echo "$ac_cv_sizeof_void_p" >&6; } 16487 16488 16489 16490cat >>confdefs.h <<_ACEOF 16491#define SIZEOF_VOID_P $ac_cv_sizeof_void_p 16492_ACEOF 16493 16494 16495# The cast to long int works around a bug in the HP C Compiler 16496# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16497# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16498# This bug is HP SR number 8606223364. 16499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 16500$as_echo_n "checking size of long long... " >&6; } 16501if ${ac_cv_sizeof_long_long+:} false; then : 16502 $as_echo_n "(cached) " >&6 16503else 16504 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : 16505 16506else 16507 if test "$ac_cv_type_long_long" = yes; then 16508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16510as_fn_error 77 "cannot compute sizeof (long long) 16511See \`config.log' for more details" "$LINENO" 5; } 16512 else 16513 ac_cv_sizeof_long_long=0 16514 fi 16515fi 16516 16517fi 16518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 16519$as_echo "$ac_cv_sizeof_long_long" >&6; } 16520 16521 16522 16523cat >>confdefs.h <<_ACEOF 16524#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long 16525_ACEOF 16526 16527 16528# The cast to long int works around a bug in the HP C Compiler 16529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16531# This bug is HP SR number 8606223364. 16532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 16533$as_echo_n "checking size of size_t... " >&6; } 16534if ${ac_cv_sizeof_size_t+:} false; then : 16535 $as_echo_n "(cached) " >&6 16536else 16537 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : 16538 16539else 16540 if test "$ac_cv_type_size_t" = yes; then 16541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16543as_fn_error 77 "cannot compute sizeof (size_t) 16544See \`config.log' for more details" "$LINENO" 5; } 16545 else 16546 ac_cv_sizeof_size_t=0 16547 fi 16548fi 16549 16550fi 16551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 16552$as_echo "$ac_cv_sizeof_size_t" >&6; } 16553 16554 16555 16556cat >>confdefs.h <<_ACEOF 16557#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t 16558_ACEOF 16559 16560 16561# The cast to long int works around a bug in the HP C Compiler 16562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16564# This bug is HP SR number 8606223364. 16565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 16566$as_echo_n "checking size of off_t... " >&6; } 16567if ${ac_cv_sizeof_off_t+:} false; then : 16568 $as_echo_n "(cached) " >&6 16569else 16570 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : 16571 16572else 16573 if test "$ac_cv_type_off_t" = yes; then 16574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16576as_fn_error 77 "cannot compute sizeof (off_t) 16577See \`config.log' for more details" "$LINENO" 5; } 16578 else 16579 ac_cv_sizeof_off_t=0 16580 fi 16581fi 16582 16583fi 16584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 16585$as_echo "$ac_cv_sizeof_off_t" >&6; } 16586 16587 16588 16589cat >>confdefs.h <<_ACEOF 16590#define SIZEOF_OFF_T $ac_cv_sizeof_off_t 16591_ACEOF 16592 16593 16594# The cast to long int works around a bug in the HP C Compiler 16595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16597# This bug is HP SR number 8606223364. 16598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 16599$as_echo_n "checking size of time_t... " >&6; } 16600if ${ac_cv_sizeof_time_t+:} false; then : 16601 $as_echo_n "(cached) " >&6 16602else 16603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : 16604 16605else 16606 if test "$ac_cv_type_time_t" = yes; then 16607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16609as_fn_error 77 "cannot compute sizeof (time_t) 16610See \`config.log' for more details" "$LINENO" 5; } 16611 else 16612 ac_cv_sizeof_time_t=0 16613 fi 16614fi 16615 16616fi 16617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 16618$as_echo "$ac_cv_sizeof_time_t" >&6; } 16619 16620 16621 16622cat >>confdefs.h <<_ACEOF 16623#define SIZEOF_TIME_T $ac_cv_sizeof_time_t 16624_ACEOF 16625 16626 16627# The cast to long int works around a bug in the HP C Compiler 16628# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16629# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16630# This bug is HP SR number 8606223364. 16631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of suseconds_t" >&5 16632$as_echo_n "checking size of suseconds_t... " >&6; } 16633if ${ac_cv_sizeof_suseconds_t+:} false; then : 16634 $as_echo_n "(cached) " >&6 16635else 16636 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (suseconds_t))" "ac_cv_sizeof_suseconds_t" "$ac_includes_default"; then : 16637 16638else 16639 if test "$ac_cv_type_suseconds_t" = yes; then 16640 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16641$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16642as_fn_error 77 "cannot compute sizeof (suseconds_t) 16643See \`config.log' for more details" "$LINENO" 5; } 16644 else 16645 ac_cv_sizeof_suseconds_t=0 16646 fi 16647fi 16648 16649fi 16650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_suseconds_t" >&5 16651$as_echo "$ac_cv_sizeof_suseconds_t" >&6; } 16652 16653 16654 16655cat >>confdefs.h <<_ACEOF 16656#define SIZEOF_SUSECONDS_T $ac_cv_sizeof_suseconds_t 16657_ACEOF 16658 16659 16660# The cast to long int works around a bug in the HP C Compiler 16661# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 16662# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 16663# This bug is HP SR number 8606223364. 16664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Float16" >&5 16665$as_echo_n "checking size of _Float16... " >&6; } 16666if ${ac_cv_sizeof__Float16+:} false; then : 16667 $as_echo_n "(cached) " >&6 16668else 16669 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Float16))" "ac_cv_sizeof__Float16" "$ac_includes_default"; then : 16670 16671else 16672 if test "$ac_cv_type__Float16" = yes; then 16673 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 16674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 16675as_fn_error 77 "cannot compute sizeof (_Float16) 16676See \`config.log' for more details" "$LINENO" 5; } 16677 else 16678 ac_cv_sizeof__Float16=0 16679 fi 16680fi 16681 16682fi 16683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Float16" >&5 16684$as_echo "$ac_cv_sizeof__Float16" >&6; } 16685 16686 16687 16688cat >>confdefs.h <<_ACEOF 16689#define SIZEOF__FLOAT16 $ac_cv_sizeof__Float16 16690_ACEOF 16691 16692 16693 16694BITS64= 16695 16696if test $ac_cv_sizeof_void_p = 8; then 16697 BITS64=yes 16698fi 16699 16700 16701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler 'restrict' support" >&5 16702$as_echo_n "checking for C compiler 'restrict' support... " >&6; } 16703restrict_keyword="" 16704for x in restrict __restrict; do 16705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16706/* end confdefs.h. */ 16707int * $x foo(int * $x arg); 16708 int * $x foo(int * $x arg) 16709 { int * $x var=arg; return var;} 16710 16711int 16712main () 16713{ 16714 16715 ; 16716 return 0; 16717} 16718_ACEOF 16719if ac_fn_c_try_compile "$LINENO"; then : 16720 restrict_keyword=$x 16721fi 16722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16723 if test "x$restrict_keyword" != "x"; then 16724 break 16725 fi 16726done 16727 16728cat >>confdefs.h <<_ACEOF 16729#define ERTS_RESTRICT $restrict_keyword 16730_ACEOF 16731 16732if test "x$restrict_keyword" != "x"; then 16733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 16734$as_echo "yes" >&6; } 16735else 16736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16737$as_echo "no" >&6; } 16738fi 16739 16740if test "x$ac_compiler_gnu" = "xyes"; then 16741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly" >&5 16742$as_echo_n "checking if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly... " >&6; } 16743## tree-copyrename was broken in gcc 4.3 and then removed in gcc 6 16744cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16745/* end confdefs.h. */ 16746 16747int 16748main () 16749{ 16750 16751 #if (__GNUC__ > 4 && __GNUC__ < 6) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) 16752 ; 16753 #else 16754 #error old and ok 16755 #endif 16756 16757 ; 16758 return 0; 16759} 16760_ACEOF 16761if ac_fn_c_try_compile "$LINENO"; then : 16762 no_tree_copyrename=yes 16763else 16764 no_tree_copyrename=no 16765fi 16766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16767 16768if test "x$no_tree_copyrename" = "xyes"; then 16769 CFLAGS="$CFLAGS -fno-tree-copyrename" 16770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 16771$as_echo "yes" >&6; } 16772else 16773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16774$as_echo "no" >&6; } 16775fi 16776 16777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken gcc-4.3.0 compiler" >&5 16778$as_echo_n "checking for broken gcc-4.3.0 compiler... " >&6; } 16779if test "$cross_compiling" = yes; then : 16780 gcc_4_3_0_bug=cross 16781else 16782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16783/* end confdefs.h. */ 16784 16785/* pr36339.c */ 16786extern void abort (void); 16787 16788typedef unsigned long my_uintptr_t; 16789 16790int check_a(my_uintptr_t tagged_ptr); 16791 16792int __attribute__((noinline)) try_a(my_uintptr_t x) 16793{ 16794 my_uintptr_t heap[2]; 16795 my_uintptr_t *hp = heap; 16796 16797 hp[0] = x; 16798 hp[1] = 0; 16799 return check_a((my_uintptr_t)(void*)((char*)hp + 1)); 16800} 16801 16802int __attribute__((noinline)) check_a(my_uintptr_t tagged_ptr) 16803{ 16804 my_uintptr_t *hp = (my_uintptr_t*)(void*)((char*)tagged_ptr - 1); 16805 16806 if (hp[0] == 42 && hp[1] == 0) 16807 return 0; 16808 return -1; 16809} 16810 16811int main(void) 16812{ 16813 if (try_a(42) < 0) 16814 abort (); 16815 return 0; 16816} 16817 16818_ACEOF 16819if ac_fn_c_try_run "$LINENO"; then : 16820 gcc_4_3_0_bug=no 16821else 16822 gcc_4_3_0_bug=yes 16823fi 16824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 16825 conftest.$ac_objext conftest.beam conftest.$ac_ext 16826fi 16827 16828 16829case $gcc_4_3_0_bug in 16830 yes|no) 16831 gcc_4_3_0_bug_result=$gcc_4_3_0_bug;; 16832 cross) 16833 gcc_dumped_vsn=`$CC -dumpversion 2>/dev/null` 16834 case gcc-$gcc_dumped_vsn in 16835 gcc-4.3.0) gcc_4_3_0_bug=yes;; 16836 *) gcc_4_3_0_bug=no;; 16837 esac 16838 gcc_4_3_0_bug_result="$gcc_4_3_0_bug; could not run test since cross compiling, checked version number ($gcc_dumped_vsn) instead";; 16839esac 16840 16841{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_4_3_0_bug_result" >&5 16842$as_echo "$gcc_4_3_0_bug_result" >&6; } 16843if test $gcc_4_3_0_bug = yes; then 16844 as_fn_error $? "This gcc miscompiles the Erlang runtime system; please use a different version" "$LINENO" 5 16845fi 16846 16847fi 16848 16849case X$erl_xcomp_bigendian in 16850 X) ;; 16851 Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;; 16852 *) as_fn_error $? "Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" "$LINENO" 5;; 16853esac 16854 16855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 16856$as_echo_n "checking whether byte ordering is bigendian... " >&6; } 16857if ${ac_cv_c_bigendian+:} false; then : 16858 $as_echo_n "(cached) " >&6 16859else 16860 ac_cv_c_bigendian=unknown 16861 # See if we're dealing with a universal compiler. 16862 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16863/* end confdefs.h. */ 16864#ifndef __APPLE_CC__ 16865 not a universal capable compiler 16866 #endif 16867 typedef int dummy; 16868 16869_ACEOF 16870if ac_fn_c_try_compile "$LINENO"; then : 16871 16872 # Check for potential -arch flags. It is not universal unless 16873 # there are at least two -arch flags with different values. 16874 ac_arch= 16875 ac_prev= 16876 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 16877 if test -n "$ac_prev"; then 16878 case $ac_word in 16879 i?86 | x86_64 | ppc | ppc64) 16880 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 16881 ac_arch=$ac_word 16882 else 16883 ac_cv_c_bigendian=universal 16884 break 16885 fi 16886 ;; 16887 esac 16888 ac_prev= 16889 elif test "x$ac_word" = "x-arch"; then 16890 ac_prev=arch 16891 fi 16892 done 16893fi 16894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16895 if test $ac_cv_c_bigendian = unknown; then 16896 # See if sys/param.h defines the BYTE_ORDER macro. 16897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16898/* end confdefs.h. */ 16899#include <sys/types.h> 16900 #include <sys/param.h> 16901 16902int 16903main () 16904{ 16905#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 16906 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 16907 && LITTLE_ENDIAN) 16908 bogus endian macros 16909 #endif 16910 16911 ; 16912 return 0; 16913} 16914_ACEOF 16915if ac_fn_c_try_compile "$LINENO"; then : 16916 # It does; now see whether it defined to BIG_ENDIAN or not. 16917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16918/* end confdefs.h. */ 16919#include <sys/types.h> 16920 #include <sys/param.h> 16921 16922int 16923main () 16924{ 16925#if BYTE_ORDER != BIG_ENDIAN 16926 not big endian 16927 #endif 16928 16929 ; 16930 return 0; 16931} 16932_ACEOF 16933if ac_fn_c_try_compile "$LINENO"; then : 16934 ac_cv_c_bigendian=yes 16935else 16936 ac_cv_c_bigendian=no 16937fi 16938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16939fi 16940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16941 fi 16942 if test $ac_cv_c_bigendian = unknown; then 16943 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 16944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16945/* end confdefs.h. */ 16946#include <limits.h> 16947 16948int 16949main () 16950{ 16951#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 16952 bogus endian macros 16953 #endif 16954 16955 ; 16956 return 0; 16957} 16958_ACEOF 16959if ac_fn_c_try_compile "$LINENO"; then : 16960 # It does; now see whether it defined to _BIG_ENDIAN or not. 16961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16962/* end confdefs.h. */ 16963#include <limits.h> 16964 16965int 16966main () 16967{ 16968#ifndef _BIG_ENDIAN 16969 not big endian 16970 #endif 16971 16972 ; 16973 return 0; 16974} 16975_ACEOF 16976if ac_fn_c_try_compile "$LINENO"; then : 16977 ac_cv_c_bigendian=yes 16978else 16979 ac_cv_c_bigendian=no 16980fi 16981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16982fi 16983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16984 fi 16985 if test $ac_cv_c_bigendian = unknown; then 16986 # Compile a test program. 16987 if test "$cross_compiling" = yes; then : 16988 # Try to guess by grepping values from an object file. 16989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16990/* end confdefs.h. */ 16991short int ascii_mm[] = 16992 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 16993 short int ascii_ii[] = 16994 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 16995 int use_ascii (int i) { 16996 return ascii_mm[i] + ascii_ii[i]; 16997 } 16998 short int ebcdic_ii[] = 16999 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 17000 short int ebcdic_mm[] = 17001 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 17002 int use_ebcdic (int i) { 17003 return ebcdic_mm[i] + ebcdic_ii[i]; 17004 } 17005 extern int foo; 17006 17007int 17008main () 17009{ 17010return use_ascii (foo) == use_ebcdic (foo); 17011 ; 17012 return 0; 17013} 17014_ACEOF 17015if ac_fn_c_try_compile "$LINENO"; then : 17016 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 17017 ac_cv_c_bigendian=yes 17018 fi 17019 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 17020 if test "$ac_cv_c_bigendian" = unknown; then 17021 ac_cv_c_bigendian=no 17022 else 17023 # finding both strings is unlikely to happen, but who knows? 17024 ac_cv_c_bigendian=unknown 17025 fi 17026 fi 17027fi 17028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 17029else 17030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17031/* end confdefs.h. */ 17032$ac_includes_default 17033int 17034main () 17035{ 17036 17037 /* Are we little or big endian? From Harbison&Steele. */ 17038 union 17039 { 17040 long int l; 17041 char c[sizeof (long int)]; 17042 } u; 17043 u.l = 1; 17044 return u.c[sizeof (long int) - 1] == 1; 17045 17046 ; 17047 return 0; 17048} 17049_ACEOF 17050if ac_fn_c_try_run "$LINENO"; then : 17051 ac_cv_c_bigendian=no 17052else 17053 ac_cv_c_bigendian=yes 17054fi 17055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 17056 conftest.$ac_objext conftest.beam conftest.$ac_ext 17057fi 17058 17059 fi 17060fi 17061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 17062$as_echo "$ac_cv_c_bigendian" >&6; } 17063 case $ac_cv_c_bigendian in #( 17064 yes) 17065 17066 17067$as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h 17068 17069 17070$as_echo "#define ERTS_ENDIANNESS 1" >>confdefs.h 17071 17072 ;; #( 17073 no) 17074 17075 17076$as_echo "#define ERTS_ENDIANNESS -1" >>confdefs.h 17077 17078 ;; #( 17079 universal) 17080 17081$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h 17082 17083 ;; #( 17084 *) 17085 17086 case "$erl_xcomp_bigendian" in 17087 yes) 17088 17089$as_echo "#define ERTS_ENDIANNESS 1" >>confdefs.h 17090;; 17091 no) 17092 17093$as_echo "#define ERTS_ENDIANNESS -1" >>confdefs.h 17094;; 17095 *) 17096 17097$as_echo "#define ERTS_ENDIANNESS 0" >>confdefs.h 17098;; 17099 esac 17100 ;; 17101 esac 17102 17103 17104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether double word ordering is middle-endian" >&5 17105$as_echo_n "checking whether double word ordering is middle-endian... " >&6; } 17106if ${ac_cv_c_double_middle_endian+:} false; then : 17107 $as_echo_n "(cached) " >&6 17108else 17109 # It does not; compile a test program. 17110if test "$cross_compiling" = yes; then : 17111 ac_cv_c_double_middle=unknown 17112else 17113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17114/* end confdefs.h. */ 17115#include <stdlib.h> 17116 17117int 17118main(void) 17119{ 17120 int i = 0; 17121 int zero = 0; 17122 int bigendian; 17123 int zero_index = 0; 17124 17125 union 17126 { 17127 long int l; 17128 char c[sizeof (long int)]; 17129 } u; 17130 17131 /* we'll use the one with 32-bit words */ 17132 union 17133 { 17134 double d; 17135 unsigned int c[2]; 17136 } vint; 17137 17138 union 17139 { 17140 double d; 17141 unsigned long c[2]; 17142 } vlong; 17143 17144 union 17145 { 17146 double d; 17147 unsigned short c[2]; 17148 } vshort; 17149 17150 17151 /* Are we little or big endian? From Harbison&Steele. */ 17152 u.l = 1; 17153 bigendian = (u.c[sizeof (long int) - 1] == 1); 17154 17155 zero_index = bigendian ? 1 : 0; 17156 17157 vint.d = 1.0; 17158 vlong.d = 1.0; 17159 vshort.d = 1.0; 17160 17161 if (sizeof(unsigned int) == 4) 17162 { 17163 if (vint.c[zero_index] != 0) 17164 zero = 1; 17165 } 17166 else if (sizeof(unsigned long) == 4) 17167 { 17168 if (vlong.c[zero_index] != 0) 17169 zero = 1; 17170 } 17171 else if (sizeof(unsigned short) == 4) 17172 { 17173 if (vshort.c[zero_index] != 0) 17174 zero = 1; 17175 } 17176 17177 exit (zero); 17178} 17179 17180_ACEOF 17181if ac_fn_c_try_run "$LINENO"; then : 17182 ac_cv_c_double_middle_endian=no 17183else 17184 ac_cv_c_double_middle_endian=yes 17185fi 17186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 17187 conftest.$ac_objext conftest.beam conftest.$ac_ext 17188fi 17189 17190fi 17191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_double_middle_endian" >&5 17192$as_echo "$ac_cv_c_double_middle_endian" >&6; } 17193case $ac_cv_c_double_middle_endian in 17194 yes) 17195 17196$as_echo "#define DOUBLE_MIDDLE_ENDIAN 1" >>confdefs.h 17197 ;; 17198 no) 17199 ;; 17200 *) 17201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown double endianness 17202presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&5 17203$as_echo "$as_me: WARNING: unknown double endianness 17204presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&2;} ;; 17205esac 17206 17207 17208for ac_func in fdatasync 17209do : 17210 ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" 17211if test "x$ac_cv_func_fdatasync" = xyes; then : 17212 cat >>confdefs.h <<_ACEOF 17213#define HAVE_FDATASYNC 1 17214_ACEOF 17215 17216fi 17217done 17218 17219 17220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 17221$as_echo_n "checking for library containing fdatasync... " >&6; } 17222if ${ac_cv_search_fdatasync+:} false; then : 17223 $as_echo_n "(cached) " >&6 17224else 17225 ac_func_search_save_LIBS=$LIBS 17226cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17227/* end confdefs.h. */ 17228 17229/* Override any GCC internal prototype to avoid an error. 17230 Use char because int might match the return type of a GCC 17231 builtin and then its argument prototype would still apply. */ 17232#ifdef __cplusplus 17233extern "C" 17234#endif 17235char fdatasync (); 17236int 17237main () 17238{ 17239return fdatasync (); 17240 ; 17241 return 0; 17242} 17243_ACEOF 17244for ac_lib in '' rt; do 17245 if test -z "$ac_lib"; then 17246 ac_res="none required" 17247 else 17248 ac_res=-l$ac_lib 17249 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 17250 fi 17251 if ac_fn_c_try_link "$LINENO"; then : 17252 ac_cv_search_fdatasync=$ac_res 17253fi 17254rm -f core conftest.err conftest.$ac_objext \ 17255 conftest$ac_exeext 17256 if ${ac_cv_search_fdatasync+:} false; then : 17257 break 17258fi 17259done 17260if ${ac_cv_search_fdatasync+:} false; then : 17261 17262else 17263 ac_cv_search_fdatasync=no 17264fi 17265rm conftest.$ac_ext 17266LIBS=$ac_func_search_save_LIBS 17267fi 17268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5 17269$as_echo "$ac_cv_search_fdatasync" >&6; } 17270ac_res=$ac_cv_search_fdatasync 17271if test "$ac_res" != no; then : 17272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 17273 17274fi 17275 17276 17277 17278case $host_os in 17279 linux*|freebsd*|dragonfly*|darwin*) 17280 for ac_func in sendfile 17281do : 17282 ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile" 17283if test "x$ac_cv_func_sendfile" = xyes; then : 17284 cat >>confdefs.h <<_ACEOF 17285#define HAVE_SENDFILE 1 17286_ACEOF 17287 17288fi 17289done 17290 17291 ;; 17292 solaris*) 17293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sendfilev" >&5 17294$as_echo_n "checking for library containing sendfilev... " >&6; } 17295if ${ac_cv_search_sendfilev+:} false; then : 17296 $as_echo_n "(cached) " >&6 17297else 17298 ac_func_search_save_LIBS=$LIBS 17299cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17300/* end confdefs.h. */ 17301 17302/* Override any GCC internal prototype to avoid an error. 17303 Use char because int might match the return type of a GCC 17304 builtin and then its argument prototype would still apply. */ 17305#ifdef __cplusplus 17306extern "C" 17307#endif 17308char sendfilev (); 17309int 17310main () 17311{ 17312return sendfilev (); 17313 ; 17314 return 0; 17315} 17316_ACEOF 17317for ac_lib in '' sendfile; do 17318 if test -z "$ac_lib"; then 17319 ac_res="none required" 17320 else 17321 ac_res=-l$ac_lib 17322 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 17323 fi 17324 if ac_fn_c_try_link "$LINENO"; then : 17325 ac_cv_search_sendfilev=$ac_res 17326fi 17327rm -f core conftest.err conftest.$ac_objext \ 17328 conftest$ac_exeext 17329 if ${ac_cv_search_sendfilev+:} false; then : 17330 break 17331fi 17332done 17333if ${ac_cv_search_sendfilev+:} false; then : 17334 17335else 17336 ac_cv_search_sendfilev=no 17337fi 17338rm conftest.$ac_ext 17339LIBS=$ac_func_search_save_LIBS 17340fi 17341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sendfilev" >&5 17342$as_echo "$ac_cv_search_sendfilev" >&6; } 17343ac_res=$ac_cv_search_sendfilev 17344if test "$ac_res" != no; then : 17345 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 17346 17347$as_echo "#define HAVE_SENDFILEV 1" >>confdefs.h 17348 17349fi 17350 17351 ;; 17352 win32) 17353 LIBS="$LIBS -lmswsock" 17354 ;; 17355 *) 17356 ;; 17357esac 17358 17359 17360saved_cppflags=$CPPFLAGS 17361CPPFLAGS="$CPPFLAGS $EMU_THR_DEFS" 17362saved_libs=$LIBS 17363LIBS="$LIBS $EMU_THR_X_LIBS" 17364 17365for ac_header in windows.h 17366do : 17367 ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" 17368if test "x$ac_cv_header_windows_h" = xyes; then : 17369 cat >>confdefs.h <<_ACEOF 17370#define HAVE_WINDOWS_H 1 17371_ACEOF 17372 17373fi 17374 17375done 17376 17377for ac_header in winsock2.h 17378do : 17379 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 17380if test "x$ac_cv_header_winsock2_h" = xyes; then : 17381 cat >>confdefs.h <<_ACEOF 17382#define HAVE_WINSOCK2_H 1 17383_ACEOF 17384 17385fi 17386 17387done 17388 17389for ac_header in ws2tcpip.h 17390do : 17391 ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" " 17392#ifdef HAVE_WINSOCK2_H 17393#include <winsock2.h> 17394#endif 17395#ifdef HAVE_WINDOWS_H 17396#include <windows.h> 17397#endif 17398 17399" 17400if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : 17401 cat >>confdefs.h <<_ACEOF 17402#define HAVE_WS2TCPIP_H 1 17403_ACEOF 17404 17405fi 17406 17407done 17408 17409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 17410$as_echo_n "checking for getaddrinfo... " >&6; } 17411cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17412/* end confdefs.h. */ 17413 17414#include <stdlib.h> 17415#include <string.h> 17416#ifdef HAVE_WINSOCK2_H 17417#include <winsock2.h> 17418#endif 17419#ifdef HAVE_WINDOWS_H 17420#include <windows.h> 17421#endif 17422#ifdef HAVE_WS2TCPIP_H 17423#include <ws2tcpip.h> 17424#endif 17425#ifndef __WIN32__ 17426#include <sys/socket.h> 17427#include <netdb.h> 17428#endif 17429 17430int 17431main () 17432{ 17433 17434getaddrinfo("","",NULL,NULL); 17435 17436 ; 17437 return 0; 17438} 17439_ACEOF 17440if ac_fn_c_try_link "$LINENO"; then : 17441 have_getaddrinfo=yes 17442else 17443 have_getaddrinfo=no 17444fi 17445rm -f core conftest.err conftest.$ac_objext \ 17446 conftest$ac_exeext conftest.$ac_ext 17447if test $have_getaddrinfo = yes; then 17448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 17449$as_echo "yes" >&6; } 17450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getaddrinfo accepts enough flags" >&5 17451$as_echo_n "checking whether getaddrinfo accepts enough flags... " >&6; } 17452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17453/* end confdefs.h. */ 17454 17455#include <stdlib.h> 17456#include <string.h> 17457#ifdef HAVE_WINSOCK2_H 17458#include <winsock2.h> 17459#endif 17460#ifdef HAVE_WINDOWS_H 17461#include <windows.h> 17462#endif 17463#ifdef HAVE_WS2TCPIP_H 17464#include <ws2tcpip.h> 17465#endif 17466#ifndef __WIN32__ 17467#include <sys/socket.h> 17468#include <netdb.h> 17469#endif 17470 17471int 17472main () 17473{ 17474 17475 struct addrinfo hints, *ai; 17476 memset(&hints, 0, sizeof(hints)); 17477 hints.ai_flags = AI_CANONNAME; 17478 hints.ai_socktype = SOCK_STREAM; 17479 hints.ai_family = AF_INET6; 17480 if (getaddrinfo("::", NULL, &hints, &ai) == 0) { 17481 freeaddrinfo(ai); 17482 exit(0); 17483 } else { 17484 exit(1); 17485 } 17486 17487 ; 17488 return 0; 17489} 17490_ACEOF 17491if ac_fn_c_try_link "$LINENO"; then : 17492 17493else 17494 have_getaddrinfo=no 17495fi 17496rm -f core conftest.err conftest.$ac_objext \ 17497 conftest$ac_exeext conftest.$ac_ext 17498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5 17499$as_echo "$have_getaddrinfo" >&6; } 17500 case $have_getaddrinfo in 17501 yes) 17502 17503$as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h 17504;; 17505 *) ;; 17506 esac 17507else 17508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17509$as_echo "no" >&6; } 17510fi 17511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo" >&5 17512$as_echo_n "checking for getnameinfo... " >&6; } 17513cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17514/* end confdefs.h. */ 17515 17516#include <stdlib.h> 17517#include <string.h> 17518#ifdef HAVE_WINSOCK2_H 17519#include <winsock2.h> 17520#endif 17521#ifdef HAVE_WINDOWS_H 17522#include <windows.h> 17523#endif 17524#ifdef HAVE_WS2TCPIP_H 17525#include <ws2tcpip.h> 17526#endif 17527#ifndef __WIN32__ 17528#include <sys/socket.h> 17529#include <netdb.h> 17530#endif 17531 17532int 17533main () 17534{ 17535 17536getnameinfo(NULL,0,NULL,0,NULL,0,0); 17537 17538 ; 17539 return 0; 17540} 17541_ACEOF 17542if ac_fn_c_try_link "$LINENO"; then : 17543 have_getnameinfo=yes 17544else 17545 have_getnameinfo=no 17546fi 17547rm -f core conftest.err conftest.$ac_objext \ 17548 conftest$ac_exeext conftest.$ac_ext 17549if test $have_getnameinfo = yes; then 17550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 17551$as_echo "yes" >&6; } 17552 17553$as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h 17554 17555else 17556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17557$as_echo "no" >&6; } 17558fi 17559 17560 17561for ac_func in getipnodebyname getipnodebyaddr gethostbyname2 17562do : 17563 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17564ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 17565if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 17566 cat >>confdefs.h <<_ACEOF 17567#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17568_ACEOF 17569 17570fi 17571done 17572 17573 17574for ac_func in ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \ 17575 pread pwrite memmove strerror strerror_r strncasecmp \ 17576 gethrtime localtime_r gmtime_r mprotect madvise posix_madvise \ 17577 mmap mremap memcpy mallopt sbrk _sbrk __sbrk brk _brk __brk \ 17578 flockfile fstat strlcpy strlcat setsid posix2time time2posix \ 17579 setlocale nl_langinfo poll mlockall ppoll vsyslog 17580do : 17581 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 17582ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 17583if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 17584 cat >>confdefs.h <<_ACEOF 17585#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 17586_ACEOF 17587 17588fi 17589done 17590 17591 17592## We have a special check for inet_pton as AC_CHECK_FUCNS does not work 17593## on windows 32-bit as there a macro is used to rename the symbol... 17594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 17595$as_echo_n "checking for inet_pton... " >&6; } 17596cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17597/* end confdefs.h. */ 17598 17599#ifdef WIN32 17600#include <ws2tcpip.h> 17601#else 17602#include <arpa/inet.h> 17603#endif 17604 17605int 17606main () 17607{ 17608inet_pton(2,"",(void*)0) 17609 ; 17610 return 0; 17611} 17612_ACEOF 17613if ac_fn_c_try_link "$LINENO"; then : 17614 have_inet_pton=yes 17615else 17616 have_inet_pton=no 17617fi 17618rm -f core conftest.err conftest.$ac_objext \ 17619 conftest$ac_exeext conftest.$ac_ext 17620 17621if test $have_inet_pton = yes; then 17622 17623$as_echo "#define HAVE_INET_PTON 1" >>confdefs.h 17624 17625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 17626$as_echo "yes" >&6; } 17627else 17628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17629$as_echo "no" >&6; } 17630fi 17631 17632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite" >&5 17633$as_echo_n "checking for isfinite... " >&6; } 17634cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17635/* end confdefs.h. */ 17636#include <math.h> 17637int 17638main () 17639{ 17640isfinite(0); 17641 ; 17642 return 0; 17643} 17644_ACEOF 17645if ac_fn_c_try_link "$LINENO"; then : 17646 have_isfinite=yes 17647else 17648 have_isfinite=no 17649fi 17650rm -f core conftest.err conftest.$ac_objext \ 17651 conftest$ac_exeext conftest.$ac_ext 17652 17653if test $have_isfinite = yes; then 17654 17655$as_echo "#define HAVE_ISFINITE 1" >>confdefs.h 17656 17657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 17658$as_echo "yes" >&6; } 17659else 17660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17661$as_echo "no" >&6; } 17662fi 17663 17664case X$erl_xcomp_posix_memalign in 17665 Xno) ;; 17666 Xyes) have_posix_memalign=yes ;; 17667 *) 17668 ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" 17669if test "x$ac_cv_func_posix_memalign" = xyes; then : 17670 if test "$cross_compiling" != yes; then 17671if test "$cross_compiling" = yes; then : 17672 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 17673$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 17674as_fn_error $? "cannot run test program while cross compiling 17675See \`config.log' for more details" "$LINENO" 5; } 17676else 17677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17678/* end confdefs.h. */ 17679 17680#include <stdlib.h> 17681int main(void) { 17682 void *ptr = NULL; 17683 int error; 17684 size_t alignment = 0x40000, size = 0x20028; 17685 if ((error = posix_memalign(&ptr, alignment, size)) != 0 || ptr == NULL) 17686 return error; 17687 return 0; 17688} 17689 17690_ACEOF 17691if ac_fn_c_try_run "$LINENO"; then : 17692 have_posix_memalign=yes 17693 17694fi 17695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 17696 conftest.$ac_objext conftest.beam conftest.$ac_ext 17697fi 17698 17699 else 17700 have_posix_memalign=yes 17701 fi 17702fi 17703;; 17704esac 17705 17706if test "$have_posix_memalign" = "yes"; then 17707 17708$as_echo "#define HAVE_POSIX_MEMALIGN 1" >>confdefs.h 17709 17710fi 17711 17712 17713case $host_os in 17714 darwin10.8.0) 17715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for writev" >&5 17716$as_echo_n "checking for writev... " >&6; } 17717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17718$as_echo "no" >&6; } ;; 17719 *) 17720 for ac_func in writev 17721do : 17722 ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" 17723if test "x$ac_cv_func_writev" = xyes; then : 17724 cat >>confdefs.h <<_ACEOF 17725#define HAVE_WRITEV 1 17726_ACEOF 17727 17728fi 17729done 17730 ;; 17731esac 17732 17733ac_fn_c_check_decl "$LINENO" "posix2time" "ac_cv_have_decl_posix2time" "#include <time.h> 17734" 17735if test "x$ac_cv_have_decl_posix2time" = xyes; then : 17736 ac_have_decl=1 17737else 17738 ac_have_decl=0 17739fi 17740 17741cat >>confdefs.h <<_ACEOF 17742#define HAVE_DECL_POSIX2TIME $ac_have_decl 17743_ACEOF 17744ac_fn_c_check_decl "$LINENO" "time2posix" "ac_cv_have_decl_time2posix" "#include <time.h> 17745" 17746if test "x$ac_cv_have_decl_time2posix" = xyes; then : 17747 ac_have_decl=1 17748else 17749 ac_have_decl=0 17750fi 17751 17752cat >>confdefs.h <<_ACEOF 17753#define HAVE_DECL_TIME2POSIX $ac_have_decl 17754_ACEOF 17755 17756 17757for ac_func in vprintf 17758do : 17759 ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" 17760if test "x$ac_cv_func_vprintf" = xyes; then : 17761 cat >>confdefs.h <<_ACEOF 17762#define HAVE_VPRINTF 1 17763_ACEOF 17764 17765ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" 17766if test "x$ac_cv_func__doprnt" = xyes; then : 17767 17768$as_echo "#define HAVE_DOPRNT 1" >>confdefs.h 17769 17770fi 17771 17772fi 17773done 17774 17775 17776 17777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting declaration of fread" >&5 17778$as_echo_n "checking for conflicting declaration of fread... " >&6; } 17779if ${ac_cv_func_decl_fread+:} false; then : 17780 $as_echo_n "(cached) " >&6 17781else 17782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17783/* end confdefs.h. */ 17784#include <stdio.h> 17785 17786int 17787main () 17788{ 17789extern int fread(); 17790char *c = (char *)fread; 17791 17792 ; 17793 return 0; 17794} 17795_ACEOF 17796if ac_fn_c_try_compile "$LINENO"; then : 17797 eval "ac_cv_func_decl_fread=no" 17798else 17799 eval "ac_cv_func_decl_fread=yes" 17800fi 17801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 17802fi 17803 17804if eval "test \"`echo '$ac_cv_func_decl_'fread`\" = yes"; then 17805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 17806$as_echo "yes" >&6; } 17807 17808$as_echo "#define HAVE_CONFLICTING_FREAD_DECLARATION 1" >>confdefs.h 17809 17810else 17811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 17812$as_echo "no" >&6; } 17813fi 17814 17815 17816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for putc_unlocked" >&5 17817$as_echo_n "checking for putc_unlocked... " >&6; } 17818if ${erts_cv_putc_unlocked+:} false; then : 17819 $as_echo_n "(cached) " >&6 17820else 17821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17822/* end confdefs.h. */ 17823#include <stdio.h> 17824int 17825main () 17826{ 17827int res = putc_unlocked('x',stdout); 17828 ; 17829 return 0; 17830} 17831_ACEOF 17832if ac_fn_c_try_link "$LINENO"; then : 17833 erts_cv_putc_unlocked=yes 17834else 17835 erts_cv_putc_unlocked=no 17836fi 17837rm -f core conftest.err conftest.$ac_objext \ 17838 conftest$ac_exeext conftest.$ac_ext 17839fi 17840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_putc_unlocked" >&5 17841$as_echo "$erts_cv_putc_unlocked" >&6; } 17842if test $erts_cv_putc_unlocked = yes; then 17843 17844$as_echo "#define HAVE_PUTC_UNLOCKED 1" >>confdefs.h 17845 17846fi 17847 17848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fwrite_unlocked" >&5 17849$as_echo_n "checking for fwrite_unlocked... " >&6; } 17850if ${erts_cv_fwrite_unlocked+:} false; then : 17851 $as_echo_n "(cached) " >&6 17852else 17853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17854/* end confdefs.h. */ 17855#include <stdio.h> 17856int 17857main () 17858{ 17859size_t res = fwrite_unlocked(NULL,sizeof(char),0,stdout); 17860 ; 17861 return 0; 17862} 17863_ACEOF 17864if ac_fn_c_try_link "$LINENO"; then : 17865 erts_cv_fwrite_unlocked=yes 17866else 17867 erts_cv_fwrite_unlocked=no 17868fi 17869rm -f core conftest.err conftest.$ac_objext \ 17870 conftest$ac_exeext conftest.$ac_ext 17871fi 17872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_fwrite_unlocked" >&5 17873$as_echo "$erts_cv_fwrite_unlocked" >&6; } 17874if test $erts_cv_fwrite_unlocked = yes; then 17875 17876$as_echo "#define HAVE_FWRITE_UNLOCKED 1" >>confdefs.h 17877 17878fi 17879 17880for ac_func in openpty 17881do : 17882 ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" 17883if test "x$ac_cv_func_openpty" = xyes; then : 17884 cat >>confdefs.h <<_ACEOF 17885#define HAVE_OPENPTY 1 17886_ACEOF 17887 17888fi 17889done 17890 17891 17892for ac_header in net/if_dl.h ifaddrs.h netpacket/packet.h sys/un.h 17893do : 17894 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 17895ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 17896if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 17897 cat >>confdefs.h <<_ACEOF 17898#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 17899_ACEOF 17900 17901fi 17902 17903done 17904 17905for ac_func in getifaddrs 17906do : 17907 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" 17908if test "x$ac_cv_func_getifaddrs" = xyes; then : 17909 cat >>confdefs.h <<_ACEOF 17910#define HAVE_GETIFADDRS 1 17911_ACEOF 17912 17913fi 17914done 17915 17916ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_path" "ac_cv_member_struct_sockaddr_un_sun_path" "#include <sys/un.h> 17917" 17918if test "x$ac_cv_member_struct_sockaddr_un_sun_path" = xyes; then : 17919 17920cat >>confdefs.h <<_ACEOF 17921#define HAVE_STRUCT_SOCKADDR_UN_SUN_PATH 1 17922_ACEOF 17923 17924 17925fi 17926 17927 17928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether in6addr_any is declared" >&5 17929$as_echo_n "checking whether in6addr_any is declared... " >&6; } 17930if ${erts_cv_have_in6addr_any+:} false; then : 17931 $as_echo_n "(cached) " >&6 17932else 17933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17934/* end confdefs.h. */ 17935 17936 #include <sys/types.h> 17937 #include <sys/socket.h> 17938 #include <netinet/in.h> 17939 #include <stdio.h> 17940 17941int 17942main () 17943{ 17944printf("%d", in6addr_any.s6_addr[16]); 17945 17946 ; 17947 return 0; 17948} 17949_ACEOF 17950if ac_fn_c_try_link "$LINENO"; then : 17951 erts_cv_have_in6addr_any=yes 17952else 17953 erts_cv_have_in6addr_any=no 17954 17955fi 17956rm -f core conftest.err conftest.$ac_objext \ 17957 conftest$ac_exeext conftest.$ac_ext 17958 17959fi 17960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_in6addr_any" >&5 17961$as_echo "$erts_cv_have_in6addr_any" >&6; } 17962 17963case "$erts_cv_have_in6addr_any" in 17964 yes) 17965 17966$as_echo "#define HAVE_IN6ADDR_ANY 1" >>confdefs.h 17967 17968esac 17969 17970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether in6addr_loopback is declared" >&5 17971$as_echo_n "checking whether in6addr_loopback is declared... " >&6; } 17972if ${erts_cv_have_in6addr_loopback+:} false; then : 17973 $as_echo_n "(cached) " >&6 17974else 17975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17976/* end confdefs.h. */ 17977 17978 #include <sys/types.h> 17979 #include <sys/socket.h> 17980 #include <netinet/in.h> 17981 #include <stdio.h> 17982 17983int 17984main () 17985{ 17986printf("%d", in6addr_loopback.s6_addr[16]); 17987 17988 ; 17989 return 0; 17990} 17991_ACEOF 17992if ac_fn_c_try_link "$LINENO"; then : 17993 erts_cv_have_in6addr_loopback=yes 17994else 17995 erts_cv_have_in6addr_loopback=no 17996 17997fi 17998rm -f core conftest.err conftest.$ac_objext \ 17999 conftest$ac_exeext conftest.$ac_ext 18000 18001fi 18002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_in6addr_loopback" >&5 18003$as_echo "$erts_cv_have_in6addr_loopback" >&6; } 18004 18005case "$erts_cv_have_in6addr_loopback" in 18006 yes) 18007 18008$as_echo "#define HAVE_IN6ADDR_LOOPBACK 1" >>confdefs.h 18009 18010esac 18011 18012ac_fn_c_check_decl "$LINENO" "IN6ADDR_ANY_INIT" "ac_cv_have_decl_IN6ADDR_ANY_INIT" " 18013 #include <sys/types.h> 18014 #include <sys/socket.h> 18015 #include <netinet/in.h> 18016 18017" 18018if test "x$ac_cv_have_decl_IN6ADDR_ANY_INIT" = xyes; then : 18019 ac_have_decl=1 18020else 18021 ac_have_decl=0 18022fi 18023 18024cat >>confdefs.h <<_ACEOF 18025#define HAVE_DECL_IN6ADDR_ANY_INIT $ac_have_decl 18026_ACEOF 18027ac_fn_c_check_decl "$LINENO" "IN6ADDR_LOOPBACK_INIT" "ac_cv_have_decl_IN6ADDR_LOOPBACK_INIT" " 18028 #include <sys/types.h> 18029 #include <sys/socket.h> 18030 #include <netinet/in.h> 18031 18032" 18033if test "x$ac_cv_have_decl_IN6ADDR_LOOPBACK_INIT" = xyes; then : 18034 ac_have_decl=1 18035else 18036 ac_have_decl=0 18037fi 18038 18039cat >>confdefs.h <<_ACEOF 18040#define HAVE_DECL_IN6ADDR_LOOPBACK_INIT $ac_have_decl 18041_ACEOF 18042ac_fn_c_check_decl "$LINENO" "IPV6_V6ONLY" "ac_cv_have_decl_IPV6_V6ONLY" " 18043 #include <sys/types.h> 18044 #include <sys/socket.h> 18045 #include <netinet/in.h> 18046 18047" 18048if test "x$ac_cv_have_decl_IPV6_V6ONLY" = xyes; then : 18049 ac_have_decl=1 18050else 18051 ac_have_decl=0 18052fi 18053 18054cat >>confdefs.h <<_ACEOF 18055#define HAVE_DECL_IPV6_V6ONLY $ac_have_decl 18056_ACEOF 18057 18058 18059 18060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_getaffinity/sched_setaffinity" >&5 18061$as_echo_n "checking for sched_getaffinity/sched_setaffinity... " >&6; } 18062cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18063/* end confdefs.h. */ 18064#include <sched.h> 18065int 18066main () 18067{ 18068 18069#ifndef CPU_SETSIZE 18070#error no CPU_SETSIZE 18071#endif 18072 int res; 18073 cpu_set_t cpuset; 18074 CPU_ZERO(&cpuset); 18075 CPU_SET(1, &cpuset); 18076 res = sched_setaffinity(0, sizeof(cpu_set_t), &cpuset); 18077 res = sched_getaffinity(0, sizeof(cpu_set_t), &cpuset); 18078 res = CPU_ISSET(1, &cpuset); 18079 CPU_CLR(1, &cpuset); 18080 18081 ; 18082 return 0; 18083} 18084_ACEOF 18085if ac_fn_c_try_link "$LINENO"; then : 18086 sched_xetaffinity=yes 18087else 18088 sched_xetaffinity=no 18089fi 18090rm -f core conftest.err conftest.$ac_objext \ 18091 conftest$ac_exeext conftest.$ac_ext 18092{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sched_xetaffinity" >&5 18093$as_echo "$sched_xetaffinity" >&6; } 18094if test $sched_xetaffinity = yes; then 18095 18096$as_echo "#define HAVE_SCHED_xETAFFINITY 1" >>confdefs.h 18097 18098fi 18099 18100 18101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pset functionality" >&5 18102$as_echo_n "checking for pset functionality... " >&6; } 18103cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18104/* end confdefs.h. */ 18105#include <sys/pset.h> 18106int 18107main () 18108{ 18109 18110 int res; 18111 psetid_t id = PS_MYID; 18112 int type = PS_PRIVATE; 18113 uint_t numcpus = 1024; 18114 processorid_t cpulist[1024]; 18115 18116 res = pset_info(id, &type, &numcpus, &cpulist[0]); 18117 18118 ; 18119 return 0; 18120} 18121_ACEOF 18122if ac_fn_c_try_link "$LINENO"; then : 18123 pset_functionality=yes 18124else 18125 pset_functionality=no 18126fi 18127rm -f core conftest.err conftest.$ac_objext \ 18128 conftest$ac_exeext conftest.$ac_ext 18129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $pset_functionality" >&5 18130$as_echo "$pset_functionality" >&6; } 18131if test $pset_functionality = yes; then 18132 18133$as_echo "#define HAVE_PSET 1" >>confdefs.h 18134 18135fi 18136 18137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for processor_bind functionality" >&5 18138$as_echo_n "checking for processor_bind functionality... " >&6; } 18139cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18140/* end confdefs.h. */ 18141 18142#include <sys/types.h> 18143#include <sys/processor.h> 18144#include <sys/procset.h> 18145 18146int 18147main () 18148{ 18149 18150 int res = processor_bind(P_LWPID, P_MYID, PBIND_NONE, NULL); 18151 18152 ; 18153 return 0; 18154} 18155_ACEOF 18156if ac_fn_c_try_link "$LINENO"; then : 18157 processor_bind_functionality=yes 18158else 18159 processor_bind_functionality=no 18160fi 18161rm -f core conftest.err conftest.$ac_objext \ 18162 conftest$ac_exeext conftest.$ac_ext 18163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $processor_bind_functionality" >&5 18164$as_echo "$processor_bind_functionality" >&6; } 18165if test $processor_bind_functionality = yes; then 18166 18167$as_echo "#define HAVE_PROCESSOR_BIND 1" >>confdefs.h 18168 18169fi 18170 18171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpuset_getaffinity/cpuset_setaffinity" >&5 18172$as_echo_n "checking for cpuset_getaffinity/cpuset_setaffinity... " >&6; } 18173cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18174/* end confdefs.h. */ 18175 18176#include <sys/param.h> 18177#include <sys/cpuset.h> 18178 18179int 18180main () 18181{ 18182 18183 int res; 18184 cpuset_t cpuset; 18185 CPU_ZERO(&cpuset); 18186 CPU_SET(1, &cpuset); 18187 res = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset); 18188 res = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset); 18189 res = CPU_ISSET(1, &cpuset); 18190 CPU_CLR(1, &cpuset); 18191 18192 ; 18193 return 0; 18194} 18195_ACEOF 18196if ac_fn_c_try_link "$LINENO"; then : 18197 cpuset_xetaffinity=yes 18198else 18199 cpuset_xetaffinity=no 18200fi 18201rm -f core conftest.err conftest.$ac_objext \ 18202 conftest$ac_exeext conftest.$ac_ext 18203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpuset_xetaffinity" >&5 18204$as_echo "$cpuset_xetaffinity" >&6; } 18205if test $cpuset_xetaffinity = yes; then 18206 18207$as_echo "#define HAVE_CPUSET_xETAFFINITY 1" >>confdefs.h 18208 18209fi 18210 18211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for 'end' symbol" >&5 18212$as_echo_n "checking for 'end' symbol... " >&6; } 18213if ${erts_cv_have_end_symbol+:} false; then : 18214 $as_echo_n "(cached) " >&6 18215else 18216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18217/* end confdefs.h. */ 18218 18219int 18220main () 18221{ 18222extern char end; {char *x = &end; *x= 0;} 18223 ; 18224 return 0; 18225} 18226_ACEOF 18227if ac_fn_c_try_link "$LINENO"; then : 18228 erts_cv_have_end_symbol=yes 18229else 18230 erts_cv_have_end_symbol=no 18231fi 18232rm -f core conftest.err conftest.$ac_objext \ 18233 conftest$ac_exeext conftest.$ac_ext 18234fi 18235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_end_symbol" >&5 18236$as_echo "$erts_cv_have_end_symbol" >&6; } 18237if test $erts_cv_have_end_symbol = yes; then 18238 18239$as_echo "#define HAVE_END_SYMBOL 1" >>confdefs.h 18240 18241fi 18242 18243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for '_end' symbol" >&5 18244$as_echo_n "checking for '_end' symbol... " >&6; } 18245if ${erts_cv_have__end_symbol+:} false; then : 18246 $as_echo_n "(cached) " >&6 18247else 18248 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18249/* end confdefs.h. */ 18250 18251int 18252main () 18253{ 18254extern char _end; {char *x = &_end; *x= 0;} 18255 ; 18256 return 0; 18257} 18258_ACEOF 18259if ac_fn_c_try_link "$LINENO"; then : 18260 erts_cv_have__end_symbol=yes 18261else 18262 erts_cv_have__end_symbol=no 18263fi 18264rm -f core conftest.err conftest.$ac_objext \ 18265 conftest$ac_exeext conftest.$ac_ext 18266fi 18267{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have__end_symbol" >&5 18268$as_echo "$erts_cv_have__end_symbol" >&6; } 18269if test $erts_cv_have__end_symbol = yes; then 18270 18271$as_echo "#define HAVE__END_SYMBOL 1" >>confdefs.h 18272 18273fi 18274 18275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if __after_morecore_hook can track malloc()s core memory use" >&5 18276$as_echo_n "checking if __after_morecore_hook can track malloc()s core memory use... " >&6; } 18277if ${erts_cv___after_morecore_hook_can_track_malloc+:} false; then : 18278 $as_echo_n "(cached) " >&6 18279else 18280 if test "$cross_compiling" = yes; then : 18281 18282 case X$erl_xcomp_after_morecore_hook in 18283 X) erts_cv___after_morecore_hook_can_track_malloc=cross;; 18284 Xyes|Xno) erts_cv___after_morecore_hook_can_track_malloc=$erl_xcomp_after_morecore_hook;; 18285 *) as_fn_error $? "Bad erl_xcomp_after_morecore_hook value: $erl_xcomp_after_morecore_hook" "$LINENO" 5;; 18286 esac 18287 18288 18289else 18290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18291/* end confdefs.h. */ 18292 18293#include <stdlib.h> 18294#ifdef HAVE_MALLOC_H 18295# include <malloc.h> 18296#endif 18297#if defined(HAVE_END_SYMBOL) 18298extern char end; 18299#elif defined(HAVE__END_SYMBOL) 18300extern char _end; 18301#endif 18302 18303#ifdef ETHR_PTHREADS 18304# ifdef ETHR_HAVE_PTHREAD_H 18305# include <pthread.h> 18306# else 18307# ifdef ETHR_HAVE_MIT_PTHREAD_H 18308# include <pthread/mit/pthread.h> 18309# endif 18310# endif 18311# define N_THR 5 18312#else 18313# define N_THR 1 18314#endif 18315 18316static char *heap_start = NULL; 18317static char *heap_end = NULL; 18318 18319void update_heap_size(void) 18320{ 18321 heap_end = (char *) sbrk(0); 18322} 18323 18324void init_hook(void) 18325{ 18326#if defined(HAVE_END_SYMBOL) 18327 heap_start = &end; 18328#elif defined(HAVE__END_SYMBOL) 18329 heap_start = &_end; 18330#else 18331 heap_start = sbrk(0); 18332#endif 18333 __after_morecore_hook = update_heap_size; 18334} 18335 18336void (*__malloc_initialize_hook) (void) = init_hook; 18337 18338static int 18339check_malloc(int size) 18340{ 18341 char *p = (char *) malloc(size); 18342 if (!heap_start || !heap_end) return 0; 18343 if (!p) return 0; 18344 if (p < heap_start || heap_end <= p) return 0; 18345 if (p + size < heap_start || heap_end < p + size) return 0; 18346 return 1; 18347} 18348 18349#ifdef ETHR_PTHREADS 18350pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; 18351#endif 18352 18353static void * 18354do_tests(void *vresp) 18355{ 18356 int i, ok = 0; 18357#ifdef ETHR_PTHREADS 18358 if (pthread_mutex_lock(&mutex) != 0) 18359 return NULL; 18360#endif 18361 18362 for (i = 0; i < 10; i++) 18363 if (!check_malloc(1000)) 18364 goto failed; 18365 for (i = 0; i < 100; i++) 18366 if (!check_malloc(1)) 18367 goto failed; 18368 if (!check_malloc(1024*1024+1)) 18369 goto failed; 18370 if (!check_malloc(10*1024*1024+1)) 18371 goto failed; 18372 ok = 1; 18373 18374 failed: 18375#ifdef ETHR_PTHREADS 18376 if (pthread_mutex_unlock(&mutex) != 0) 18377 return NULL; 18378#endif 18379 if (ok) 18380 *((int *) vresp) = 0; 18381 return NULL; 18382} 18383 18384 18385int main(void) 18386{ 18387 int res[N_THR], i; 18388#ifdef ETHR_PTHREADS 18389 pthread_t tid[N_THR]; 18390#endif 18391 18392#if defined(HAVE_MALLOPT) && defined(M_MMAP_MAX) 18393 (void) mallopt(M_MMAP_MAX, 0); 18394#endif 18395 18396 for (i = 0; i < N_THR; i++) 18397 res[i] = 1; 18398#ifdef ETHR_PTHREADS 18399 for (i = 1; i < N_THR; i++) 18400 if (pthread_create(&tid[i], NULL, do_tests, &res[i]) != 0) 18401 return 1; 18402#endif 18403 (void) do_tests(&res[0]); 18404#ifdef ETHR_PTHREADS 18405 for (i = 1; i < N_THR; i++) 18406 if (pthread_join(tid[i], NULL) != 0) 18407 return 1; 18408#endif 18409 for (i = 0; i < N_THR; i++) 18410 if (res[i]) 18411 return 1; 18412 return 0; 18413} 18414 18415_ACEOF 18416if ac_fn_c_try_run "$LINENO"; then : 18417 erts_cv___after_morecore_hook_can_track_malloc=yes 18418else 18419 erts_cv___after_morecore_hook_can_track_malloc=no 18420fi 18421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18422 conftest.$ac_objext conftest.beam conftest.$ac_ext 18423fi 18424 18425fi 18426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv___after_morecore_hook_can_track_malloc" >&5 18427$as_echo "$erts_cv___after_morecore_hook_can_track_malloc" >&6; } 18428 18429case $erts_cv___after_morecore_hook_can_track_malloc in 18430 yes) 18431$as_echo "#define ERTS___AFTER_MORECORE_HOOK_CAN_TRACK_MALLOC 1" >>confdefs.h 18432;; 18433 cross) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 18434$as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; 18435 *) ;; 18436esac 18437 18438if test "x$ac_cv_func_sbrk" = "xyes"; then 18439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of sbrk()s return value and argument" >&5 18440$as_echo_n "checking types of sbrk()s return value and argument... " >&6; } 18441if ${erts_cv_sbrk_ret_arg_types+:} false; then : 18442 $as_echo_n "(cached) " >&6 18443else 18444 18445 18446 erts_cv_sbrk_ret_arg_types=unknown 18447 ret_types="void *,char *" 18448 arg_types="intptr_t,ptrdiff_t,int,long" 18449 save_ifs="$IFS"; IFS="," 18450 for rtype in $ret_types; do 18451 for atype in $arg_types; do 18452 IFS=$save_ifs 18453 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18454/* end confdefs.h. */ 18455#include <sys/types.h> 18456 #include <unistd.h> 18457int 18458main () 18459{ 18460$rtype sbrk($atype incr); 18461 ; 18462 return 0; 18463} 18464_ACEOF 18465if ac_fn_c_try_link "$LINENO"; then : 18466 erts_cv_sbrk_ret_arg_types="$rtype,$atype" 18467fi 18468rm -f core conftest.err conftest.$ac_objext \ 18469 conftest$ac_exeext conftest.$ac_ext 18470 IFS="," 18471 if test "$erts_cv_sbrk_ret_arg_types" != "unknown"; then 18472 break 2 18473 fi 18474 done 18475 done 18476 IFS=$save_ifs 18477fi 18478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_sbrk_ret_arg_types" >&5 18479$as_echo "$erts_cv_sbrk_ret_arg_types" >&6; } 18480 18481 if test "$erts_cv_sbrk_ret_arg_types" != "unknown"; then 18482 save_ifs="$IFS"; IFS="," 18483 read ret_type arg_type <<EOF 18484$erts_cv_sbrk_ret_arg_types 18485EOF 18486 IFS=$save_ifs 18487 18488cat >>confdefs.h <<_ACEOF 18489#define SBRK_RET_TYPE $ret_type 18490_ACEOF 18491 18492 18493cat >>confdefs.h <<_ACEOF 18494#define SBRK_ARG_TYPE $arg_type 18495_ACEOF 18496 18497 fi 18498fi 18499 18500if test $ac_cv_func_brk = yes; then 18501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of brk()s return value and argument" >&5 18502$as_echo_n "checking types of brk()s return value and argument... " >&6; } 18503if ${erts_cv_brk_ret_arg_types+:} false; then : 18504 $as_echo_n "(cached) " >&6 18505else 18506 18507 18508 erts_cv_brk_ret_arg_types=unknown 18509 ret_types="int,long,char *,void *" 18510 arg_types="void *,const void *,char *,const char *" 18511 save_ifs="$IFS"; IFS="," 18512 for rtype in $ret_types; do 18513 for atype in $arg_types; do 18514 IFS=$save_ifs 18515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18516/* end confdefs.h. */ 18517#include <sys/types.h> 18518 #include <unistd.h> 18519int 18520main () 18521{ 18522$rtype brk($atype endds); 18523 ; 18524 return 0; 18525} 18526_ACEOF 18527if ac_fn_c_try_link "$LINENO"; then : 18528 erts_cv_brk_ret_arg_types="$rtype,$atype" 18529fi 18530rm -f core conftest.err conftest.$ac_objext \ 18531 conftest$ac_exeext conftest.$ac_ext 18532 IFS="," 18533 if test "$erts_cv_brk_ret_arg_types" != "unknown"; then 18534 break 2 18535 fi 18536 done 18537 done 18538 IFS=$save_ifs 18539fi 18540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_brk_ret_arg_types" >&5 18541$as_echo "$erts_cv_brk_ret_arg_types" >&6; } 18542 18543 if test "$erts_cv_brk_ret_arg_types" != "unknown"; then 18544 save_ifs="$IFS"; IFS="," 18545 read ret_type arg_type <<EOF 18546$erts_cv_brk_ret_arg_types 18547EOF 18548 IFS=$save_ifs 18549 18550cat >>confdefs.h <<_ACEOF 18551#define BRK_RET_TYPE $ret_type 18552_ACEOF 18553 18554 18555cat >>confdefs.h <<_ACEOF 18556#define BRK_ARG_TYPE $arg_type 18557_ACEOF 18558 18559 fi 18560 18561fi 18562 18563if test $ac_cv_func_sbrk = yes; then 18564 18565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sbrk()/brk() wrappers can track malloc()s core memory use" >&5 18566$as_echo_n "checking if sbrk()/brk() wrappers can track malloc()s core memory use... " >&6; } 18567if ${erts_cv_brk_wrappers_can_track_malloc+:} false; then : 18568 $as_echo_n "(cached) " >&6 18569else 18570 if test "$cross_compiling" = yes; then : 18571 18572 case X$erl_xcomp_dlsym_brk_wrappers in 18573 X) erts_cv_brk_wrappers_can_track_malloc=cross;; 18574 Xyes|Xno) erts_cv_brk_wrappers_can_track_malloc=$erl_xcomp_dlsym_brk_wrappers;; 18575 *) as_fn_error $? "Bad erl_xcomp_dlsym_brk_wrappers value: $erl_xcomp_dlsym_brk_wrappers" "$LINENO" 5;; 18576 esac 18577 18578else 18579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18580/* end confdefs.h. */ 18581 18582#include <stdlib.h> 18583#include <sys/types.h> 18584#include <unistd.h> 18585#ifdef HAVE_DLFCN_H 18586# include <dlfcn.h> 18587#endif 18588 18589/* 18590 * Our implementation requires that we have sbrk(), and 'end' or '_end'. 18591 */ 18592 18593#if !defined(HAVE_SBRK) 18594# error no sbrk() 18595#endif 18596#if defined(HAVE_END_SYMBOL) 18597extern char end; 18598#elif defined(HAVE__END_SYMBOL) 18599extern char _end; 18600#else 18601# error no 'end' nor '_end' 18602#endif 18603 18604#ifdef ETHR_PTHREADS 18605# ifdef ETHR_HAVE_PTHREAD_H 18606# include <pthread.h> 18607# else 18608# ifdef ETHR_HAVE_MIT_PTHREAD_H 18609# include <pthread/mit/pthread.h> 18610# endif 18611# endif 18612# define N_THR 5 18613#else 18614# define N_THR 1 18615#endif 18616 18617#define SBRK_IMPL(RET_TYPE, SBRK, ARG_TYPE) \ 18618RET_TYPE SBRK (ARG_TYPE); \ 18619static RET_TYPE (*real_ ## SBRK)(ARG_TYPE) = NULL; \ 18620RET_TYPE \ 18621SBRK (ARG_TYPE arg) \ 18622{ \ 18623 RET_TYPE res; \ 18624 if (!real_ ## SBRK) real_ ## SBRK = dlsym(RTLD_NEXT, #SBRK); \ 18625 res = (*real_ ## SBRK)(arg); \ 18626 if (res != (RET_TYPE) -1) heap_end = (char *) (*real_ ## SBRK)(0); \ 18627 return res; \ 18628} 18629 18630#define BRK_IMPL(RET_TYPE, BRK, ARG_TYPE) \ 18631RET_TYPE BRK (ARG_TYPE); \ 18632static RET_TYPE (*real_ ## BRK)(ARG_TYPE) = NULL; \ 18633RET_TYPE \ 18634BRK (ARG_TYPE arg) \ 18635{ \ 18636 RET_TYPE res; \ 18637 if (!real_ ## BRK) real_ ## BRK = dlsym(RTLD_NEXT, #BRK); \ 18638 res = (*real_ ## BRK)(arg); \ 18639 if (res != (RET_TYPE) -1) heap_end = (char *) arg; \ 18640 return res; \ 18641} 18642 18643static char *heap_start = NULL; 18644static char *heap_end = NULL; 18645 18646SBRK_IMPL(SBRK_RET_TYPE, sbrk, SBRK_ARG_TYPE) 18647#ifdef HAVE_BRK 18648 BRK_IMPL(BRK_RET_TYPE, brk, BRK_ARG_TYPE) 18649#endif 18650 18651#ifdef HAVE__SBRK 18652 SBRK_IMPL(SBRK_RET_TYPE, _sbrk, SBRK_ARG_TYPE) 18653#endif 18654#ifdef HAVE__BRK 18655 BRK_IMPL(BRK_RET_TYPE, _brk, BRK_ARG_TYPE) 18656#endif 18657 18658#ifdef HAVE___SBRK 18659 SBRK_IMPL(SBRK_RET_TYPE, __sbrk, SBRK_ARG_TYPE) 18660#endif 18661#ifdef HAVE___BRK 18662 BRK_IMPL(BRK_RET_TYPE, __brk, BRK_ARG_TYPE) 18663#endif 18664 18665static int 18666check_malloc(int size) 18667{ 18668 char *p = (char *) malloc(size); 18669 if (!heap_start || !heap_end) return 0; 18670 if (!p) return 0; 18671 if (p < heap_start || heap_end <= p) return 0; 18672 if (p + size < heap_start || heap_end < p + size) return 0; 18673 return 1; 18674} 18675 18676#ifdef ETHR_PTHREADS 18677pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; 18678#endif 18679 18680static void * 18681do_tests(void *vresp) 18682{ 18683 int i, ok = 0; 18684#ifdef ETHR_PTHREADS 18685 if (pthread_mutex_lock(&mutex) != 0) 18686 return NULL; 18687#endif 18688 18689 for (i = 0; i < 10; i++) 18690 if (!check_malloc(1000)) 18691 goto failed; 18692 for (i = 0; i < 100; i++) 18693 if (!check_malloc(1)) 18694 goto failed; 18695 if (!check_malloc(1024*1024+1)) 18696 goto failed; 18697 if (!check_malloc(10*1024*1024+1)) 18698 goto failed; 18699 ok = 1; 18700 18701 failed: 18702#ifdef ETHR_PTHREADS 18703 if (pthread_mutex_unlock(&mutex) != 0) 18704 return NULL; 18705#endif 18706 if (ok) 18707 *((int *) vresp) = 0; 18708 return NULL; 18709} 18710 18711 18712int main(void) 18713{ 18714 int res[N_THR], i; 18715#ifdef ETHR_PTHREADS 18716 pthread_t tid[N_THR]; 18717#endif 18718#if defined(HAVE_END_SYMBOL) 18719 heap_start = &end; 18720#elif defined(HAVE__END_SYMBOL) 18721 heap_start = &_end; 18722#endif 18723 18724#if defined(HAVE_MALLOPT) && defined(M_MMAP_MAX) 18725 (void) mallopt(M_MMAP_MAX, 0); 18726#endif 18727 18728 for (i = 0; i < N_THR; i++) 18729 res[i] = 1; 18730#ifdef ETHR_PTHREADS 18731 for (i = 1; i < N_THR; i++) 18732 if (pthread_create(&tid[i], NULL, do_tests, &res[i]) != 0) 18733 return 1; 18734#endif 18735 (void) do_tests(&res[0]); 18736#ifdef ETHR_PTHREADS 18737 for (i = 1; i < N_THR; i++) 18738 if (pthread_join(tid[i], NULL) != 0) 18739 return 1; 18740#endif 18741 for (i = 0; i < N_THR; i++) 18742 if (res[i]) 18743 return 1; 18744 return 0; 18745} 18746 18747_ACEOF 18748if ac_fn_c_try_run "$LINENO"; then : 18749 erts_cv_brk_wrappers_can_track_malloc=yes 18750else 18751 erts_cv_brk_wrappers_can_track_malloc=no 18752fi 18753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18754 conftest.$ac_objext conftest.beam conftest.$ac_ext 18755fi 18756 18757fi 18758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_brk_wrappers_can_track_malloc" >&5 18759$as_echo "$erts_cv_brk_wrappers_can_track_malloc" >&6; } 18760 case $erts_cv_brk_wrappers_can_track_malloc in 18761 yes) 18762 18763$as_echo "#define ERTS_BRK_WRAPPERS_CAN_TRACK_MALLOC 1" >>confdefs.h 18764;; 18765 cross) 18766 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 18767$as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; 18768 *) ;; 18769 esac 18770fi 18771 18772LIBS=$saved_libs 18773CPPFLAGS=$saved_cppflags 18774 18775case $ARCH in 18776 x86|amd64) 18777 18778$as_echo "#define ERTS_STRUCTURE_ALIGNED_ALLOC 1" >>confdefs.h 18779;; 18780 *) 18781 ;; 18782esac 18783 18784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IP version 6 support" >&5 18785$as_echo_n "checking for IP version 6 support... " >&6; } 18786if ${ac_cv_sys_ipv6_support+:} false; then : 18787 $as_echo_n "(cached) " >&6 18788else 18789 ok_so_far=yes 18790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18791/* end confdefs.h. */ 18792#include <sys/types.h> 18793#ifdef __WIN32__ 18794#include <winsock2.h> 18795#include <ws2tcpip.h> 18796#else 18797#include <netinet/in.h> 18798#endif 18799int 18800main () 18801{ 18802struct in6_addr a6; struct sockaddr_in6 s6; 18803 ; 18804 return 0; 18805} 18806_ACEOF 18807if ac_fn_c_try_compile "$LINENO"; then : 18808 ok_so_far=yes 18809else 18810 ok_so_far=no 18811fi 18812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 18813 18814if test $ok_so_far = yes; then 18815 ac_cv_sys_ipv6_support=yes 18816else 18817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18818/* end confdefs.h. */ 18819#include <sys/types.h> 18820#ifdef __WIN32__ 18821#include <winsock2.h> 18822#include <ws2tcpip.h> 18823#else 18824#include <netinet/in.h> 18825#endif 18826int 18827main () 18828{ 18829struct in_addr6 a6; struct sockaddr_in6 s6; 18830 ; 18831 return 0; 18832} 18833_ACEOF 18834if ac_fn_c_try_compile "$LINENO"; then : 18835 ac_cv_sys_ipv6_support=in_addr6 18836else 18837 ac_cv_sys_ipv6_support=no 18838fi 18839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 18840fi 18841 18842fi 18843 18844 18845case ${ac_cv_sys_ipv6_support} in 18846 yes) 18847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 18848$as_echo "yes" >&6; } 18849 18850$as_echo "#define HAVE_IN6 1" >>confdefs.h 18851 18852 ;; 18853 in_addr6) 18854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (but I am redefining in_addr6 to in6_addr)" >&5 18855$as_echo "yes (but I am redefining in_addr6 to in6_addr)" >&6; } 18856 18857$as_echo "#define HAVE_IN6 1" >>confdefs.h 18858 18859 18860$as_echo "#define HAVE_IN_ADDR6_STRUCT /**/" >>confdefs.h 18861 18862 ;; 18863 *) 18864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 18865$as_echo "no" >&6; } 18866 ;; 18867esac 18868 18869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast support" >&5 18870$as_echo_n "checking for multicast support... " >&6; } 18871if ${ac_cv_sys_multicast_support+:} false; then : 18872 $as_echo_n "(cached) " >&6 18873else 18874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18875/* end confdefs.h. */ 18876#include <sys/types.h> 18877#include <sys/socket.h> 18878#include <netinet/in.h> 18879#if defined(IP_MULTICAST_TTL) && defined(IP_MULTICAST_LOOP) && defined(IP_MULTICAST_IF) && defined(IP_ADD_MEMBERSHIP) && defined(IP_DROP_MEMBERSHIP) 18880yes 18881#endif 18882 18883_ACEOF 18884if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 18885 $EGREP "^yes$" >/dev/null 2>&1; then : 18886 ac_cv_sys_multicast_support=yes 18887else 18888 ac_cv_sys_multicast_support=no 18889fi 18890rm -f conftest* 18891 18892fi 18893{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_multicast_support" >&5 18894$as_echo "$ac_cv_sys_multicast_support" >&6; } 18895if test $ac_cv_sys_multicast_support = yes; then 18896 18897$as_echo "#define HAVE_MULTICAST_SUPPORT 1" >>confdefs.h 18898 18899fi 18900 18901 18902 18903 18904# Check whether --with-clock-resolution was given. 18905if test "${with_clock_resolution+set}" = set; then : 18906 withval=$with_clock_resolution; 18907fi 18908 18909 18910 18911# Check whether --with-clock-gettime-realtime-id was given. 18912if test "${with_clock_gettime_realtime_id+set}" = set; then : 18913 withval=$with_clock_gettime_realtime_id; 18914fi 18915 18916 18917 18918# Check whether --with-clock-gettime-monotonic-id was given. 18919if test "${with_clock_gettime_monotonic_id+set}" = set; then : 18920 withval=$with_clock_gettime_monotonic_id; 18921fi 18922 18923 18924# Check whether --enable-prefer-elapsed-monotonic-time-during-suspend was given. 18925if test "${enable_prefer_elapsed_monotonic_time_during_suspend+set}" = set; then : 18926 enableval=$enable_prefer_elapsed_monotonic_time_during_suspend; case "$enableval" in 18927 yes) prefer_elapsed_monotonic_time_during_suspend=yes ;; 18928 *) prefer_elapsed_monotonic_time_during_suspend=no ;; 18929 esac 18930else 18931 prefer_elapsed_monotonic_time_during_suspend=no 18932fi 18933 18934 18935# Check whether --enable-gettimeofday-as-os-system-time was given. 18936if test "${enable_gettimeofday_as_os_system_time+set}" = set; then : 18937 enableval=$enable_gettimeofday_as_os_system_time; case "$enableval" in 18938 yes) force_gettimeofday_os_system_time=yes ;; 18939 *) force_gettimeofday_os_system_time=no ;; 18940 esac 18941else 18942 force_gettimeofday_os_system_time=no 18943fi 18944 18945 18946case "$with_clock_resolution" in 18947 ""|no|yes) 18948 with_clock_resolution=default;; 18949 high|low|default) 18950 ;; 18951 *) 18952 as_fn_error $? "Invalid wanted clock resolution: $with_clock_resolution" "$LINENO" 5 18953 ;; 18954esac 18955 18956if test "$force_gettimeofday_os_system_time" = "yes"; then 18957 18958 for ac_func in gettimeofday 18959do : 18960 ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" 18961if test "x$ac_cv_func_gettimeofday" = xyes; then : 18962 cat >>confdefs.h <<_ACEOF 18963#define HAVE_GETTIMEOFDAY 1 18964_ACEOF 18965 18966fi 18967done 18968 18969 if test "$ac_cv_func_gettimeofday" = "yes"; then 18970 18971$as_echo "#define OS_SYSTEM_TIME_GETTIMEOFDAY 1" >>confdefs.h 18972 18973 else 18974 as_fn_error $? "No gettimeofday() available" "$LINENO" 5 18975 fi 18976 18977else # $force_gettimeofday_os_system_time != yes 18978 18979case "$with_clock_gettime_realtime_id" in 18980 ""|no) 18981 with_clock_gettime_realtime_id=no 18982 ;; 18983 CLOCK_*CPUTIME*) 18984 as_fn_error $? "Invalid clock_gettime() realtime clock id: Refusing to use the cputime clock id $with_clock_gettime_realtime_id as realtime clock id" "$LINENO" 5 18985 ;; 18986 CLOCK_MONOTONIC*|CLOCK_BOOTTIME*|CLOCK_UPTIME*|CLOCK_HIGHRES*) 18987 as_fn_error $? "Invalid clock_gettime() realtime clock id: Refusing to use the monotonic clock id $with_clock_gettime_realtime_id as realtime clock id" "$LINENO" 5 18988 ;; 18989 CLOCK_*) 18990 ;; 18991 *) 18992 as_fn_error $? "Invalid clock_gettime() clock id: $with_clock_gettime_realtime_id" "$LINENO" 5 18993 ;; 18994esac 18995 18996case "$with_clock_resolution-$with_clock_gettime_realtime_id" in 18997 high-no) 18998 18999 default_resolution_clock_gettime_wall="CLOCK_REALTIME" 19000 low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" 19001 high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" 19002 19003 case "high_resolution" in 19004 high_resolution) 19005 check_msg="high resolution " 19006 prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" 19007 ;; 19008 low_resolution) 19009 check_msg="low resolution " 19010 prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" 19011 ;; 19012 custom_resolution) 19013 check_msg="custom resolution " 19014 prefer_resolution_clock_gettime_wall="" 19015 ;; 19016 *) 19017 check_msg="" 19018 prefer_resolution_clock_gettime_wall= 19019 ;; 19020 esac 19021 19022 clock_gettime_lib="" 19023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 19024$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 19025if ${ac_cv_lib_rt_clock_gettime+:} false; then : 19026 $as_echo_n "(cached) " >&6 19027else 19028 ac_check_lib_save_LIBS=$LIBS 19029LIBS="-lrt $LIBS" 19030cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19031/* end confdefs.h. */ 19032 19033/* Override any GCC internal prototype to avoid an error. 19034 Use char because int might match the return type of a GCC 19035 builtin and then its argument prototype would still apply. */ 19036#ifdef __cplusplus 19037extern "C" 19038#endif 19039char clock_gettime (); 19040int 19041main () 19042{ 19043return clock_gettime (); 19044 ; 19045 return 0; 19046} 19047_ACEOF 19048if ac_fn_c_try_link "$LINENO"; then : 19049 ac_cv_lib_rt_clock_gettime=yes 19050else 19051 ac_cv_lib_rt_clock_gettime=no 19052fi 19053rm -f core conftest.err conftest.$ac_objext \ 19054 conftest$ac_exeext conftest.$ac_ext 19055LIBS=$ac_check_lib_save_LIBS 19056fi 19057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 19058$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 19059if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 19060 clock_gettime_lib="-lrt" 19061fi 19062 19063 19064 save_LIBS="$LIBS" 19065 LIBS="$LIBS $clock_gettime_lib" 19066 19067 if test "$LD_MAY_BE_WEAK" != "no"; then 19068 trust_test="#error May not be there due to weak linking" 19069 else 19070 trust_test="" 19071 fi 19072 19073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 19074$as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } 19075if ${erl_cv_clock_gettime_wall_high_resolution+:} false; then : 19076 $as_echo_n "(cached) " >&6 19077else 19078 19079 for clock_type in $prefer_resolution_clock_gettime_wall $default_resolution_clock_gettime_wall $high_resolution_clock_gettime_wall $low_resolution_clock_gettime_wall; do 19080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19081/* end confdefs.h. */ 19082 19083#include <time.h> 19084$trust_test 19085 19086int 19087main () 19088{ 19089 19090 struct timespec ts; 19091 long long result; 19092 clock_gettime($clock_type,&ts); 19093 result = ((long long) ts.tv_sec) * 1000000000LL + 19094 ((long long) ts.tv_nsec); 19095 19096 ; 19097 return 0; 19098} 19099_ACEOF 19100if ac_fn_c_try_link "$LINENO"; then : 19101 erl_cv_clock_gettime_wall_high_resolution=$clock_type 19102else 19103 erl_cv_clock_gettime_wall_high_resolution=no 19104fi 19105rm -f core conftest.err conftest.$ac_objext \ 19106 conftest$ac_exeext conftest.$ac_ext 19107 test $erl_cv_clock_gettime_wall_high_resolution = no || break 19108 done 19109 19110fi 19111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_high_resolution" >&5 19112$as_echo "$erl_cv_clock_gettime_wall_high_resolution" >&6; } 19113 19114 LIBS="$save_LIBS" 19115 19116 if test "$LD_MAY_BE_WEAK" != "no"; then 19117 check_for_clock_getres= 19118 else 19119 check_for_clock_getres=clock_getres 19120 fi 19121 19122 for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday 19123do : 19124 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 19125ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 19126if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 19127 cat >>confdefs.h <<_ACEOF 19128#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 19129_ACEOF 19130 19131fi 19132done 19133 19134 19135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 19136$as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } 19137if ${erl_cv_mach_clock_get_time_wall+:} false; then : 19138 $as_echo_n "(cached) " >&6 19139else 19140 19141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19142/* end confdefs.h. */ 19143 19144#include <mach/clock.h> 19145#include <mach/mach.h> 19146 19147int 19148main () 19149{ 19150 19151 kern_return_t res; 19152 clock_serv_t clk_srv; 19153 mach_timespec_t time_spec; 19154 19155 host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); 19156 res = clock_get_time(clk_srv, &time_spec); 19157 mach_port_deallocate(mach_task_self(), clk_srv); 19158 19159 ; 19160 return 0; 19161} 19162_ACEOF 19163if ac_fn_c_try_compile "$LINENO"; then : 19164 erl_cv_mach_clock_get_time_wall=yes 19165else 19166 erl_cv_mach_clock_get_time_wall=no 19167fi 19168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19169 19170fi 19171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 19172$as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } 19173 19174 erl_wall_clock_lib= 19175 erl_wall_clock_low_resolution=no 19176 erl_wall_clock_id= 19177 case high_resolution-$erl_cv_clock_gettime_wall_high_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in 19178 *-*-*-*-win32) 19179 erl_wall_clock_func=WindowsAPI 19180 erl_wall_clock_low_resolution=yes 19181 ;; 19182 high_resolution-no-yes-*-*) 19183 erl_wall_clock_func=mach_clock_get_time 19184 erl_wall_clock_id=CALENDAR_CLOCK 19185 ;; 19186 *-CLOCK_*-*-*-*) 19187 erl_wall_clock_func=clock_gettime 19188 erl_wall_clock_lib=$clock_gettime_lib 19189 erl_wall_clock_id=$erl_cv_clock_gettime_wall_high_resolution 19190 for low_res_id in $low_resolution_clock_gettime_wall; do 19191 if test $erl_wall_clock_id = $low_res_id; then 19192 erl_wall_clock_low_resolution=yes 19193 break 19194 fi 19195 done 19196 ;; 19197 *-no-*-yes-*) 19198 erl_wall_clock_func=gettimeofday 19199 ;; 19200 *) 19201 erl_wall_clock_func=none 19202 ;; 19203 esac 19204;; 19205 low-no) 19206 19207 default_resolution_clock_gettime_wall="CLOCK_REALTIME" 19208 low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" 19209 high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" 19210 19211 case "low_resolution" in 19212 high_resolution) 19213 check_msg="high resolution " 19214 prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" 19215 ;; 19216 low_resolution) 19217 check_msg="low resolution " 19218 prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" 19219 ;; 19220 custom_resolution) 19221 check_msg="custom resolution " 19222 prefer_resolution_clock_gettime_wall="" 19223 ;; 19224 *) 19225 check_msg="" 19226 prefer_resolution_clock_gettime_wall= 19227 ;; 19228 esac 19229 19230 clock_gettime_lib="" 19231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 19232$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 19233if ${ac_cv_lib_rt_clock_gettime+:} false; then : 19234 $as_echo_n "(cached) " >&6 19235else 19236 ac_check_lib_save_LIBS=$LIBS 19237LIBS="-lrt $LIBS" 19238cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19239/* end confdefs.h. */ 19240 19241/* Override any GCC internal prototype to avoid an error. 19242 Use char because int might match the return type of a GCC 19243 builtin and then its argument prototype would still apply. */ 19244#ifdef __cplusplus 19245extern "C" 19246#endif 19247char clock_gettime (); 19248int 19249main () 19250{ 19251return clock_gettime (); 19252 ; 19253 return 0; 19254} 19255_ACEOF 19256if ac_fn_c_try_link "$LINENO"; then : 19257 ac_cv_lib_rt_clock_gettime=yes 19258else 19259 ac_cv_lib_rt_clock_gettime=no 19260fi 19261rm -f core conftest.err conftest.$ac_objext \ 19262 conftest$ac_exeext conftest.$ac_ext 19263LIBS=$ac_check_lib_save_LIBS 19264fi 19265{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 19266$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 19267if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 19268 clock_gettime_lib="-lrt" 19269fi 19270 19271 19272 save_LIBS="$LIBS" 19273 LIBS="$LIBS $clock_gettime_lib" 19274 19275 if test "$LD_MAY_BE_WEAK" != "no"; then 19276 trust_test="#error May not be there due to weak linking" 19277 else 19278 trust_test="" 19279 fi 19280 19281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 19282$as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } 19283if ${erl_cv_clock_gettime_wall_low_resolution+:} false; then : 19284 $as_echo_n "(cached) " >&6 19285else 19286 19287 for clock_type in $prefer_resolution_clock_gettime_wall $default_resolution_clock_gettime_wall $high_resolution_clock_gettime_wall $low_resolution_clock_gettime_wall; do 19288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19289/* end confdefs.h. */ 19290 19291#include <time.h> 19292$trust_test 19293 19294int 19295main () 19296{ 19297 19298 struct timespec ts; 19299 long long result; 19300 clock_gettime($clock_type,&ts); 19301 result = ((long long) ts.tv_sec) * 1000000000LL + 19302 ((long long) ts.tv_nsec); 19303 19304 ; 19305 return 0; 19306} 19307_ACEOF 19308if ac_fn_c_try_link "$LINENO"; then : 19309 erl_cv_clock_gettime_wall_low_resolution=$clock_type 19310else 19311 erl_cv_clock_gettime_wall_low_resolution=no 19312fi 19313rm -f core conftest.err conftest.$ac_objext \ 19314 conftest$ac_exeext conftest.$ac_ext 19315 test $erl_cv_clock_gettime_wall_low_resolution = no || break 19316 done 19317 19318fi 19319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_low_resolution" >&5 19320$as_echo "$erl_cv_clock_gettime_wall_low_resolution" >&6; } 19321 19322 LIBS="$save_LIBS" 19323 19324 if test "$LD_MAY_BE_WEAK" != "no"; then 19325 check_for_clock_getres= 19326 else 19327 check_for_clock_getres=clock_getres 19328 fi 19329 19330 for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday 19331do : 19332 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 19333ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 19334if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 19335 cat >>confdefs.h <<_ACEOF 19336#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 19337_ACEOF 19338 19339fi 19340done 19341 19342 19343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 19344$as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } 19345if ${erl_cv_mach_clock_get_time_wall+:} false; then : 19346 $as_echo_n "(cached) " >&6 19347else 19348 19349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19350/* end confdefs.h. */ 19351 19352#include <mach/clock.h> 19353#include <mach/mach.h> 19354 19355int 19356main () 19357{ 19358 19359 kern_return_t res; 19360 clock_serv_t clk_srv; 19361 mach_timespec_t time_spec; 19362 19363 host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); 19364 res = clock_get_time(clk_srv, &time_spec); 19365 mach_port_deallocate(mach_task_self(), clk_srv); 19366 19367 ; 19368 return 0; 19369} 19370_ACEOF 19371if ac_fn_c_try_compile "$LINENO"; then : 19372 erl_cv_mach_clock_get_time_wall=yes 19373else 19374 erl_cv_mach_clock_get_time_wall=no 19375fi 19376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19377 19378fi 19379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 19380$as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } 19381 19382 erl_wall_clock_lib= 19383 erl_wall_clock_low_resolution=no 19384 erl_wall_clock_id= 19385 case low_resolution-$erl_cv_clock_gettime_wall_low_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in 19386 *-*-*-*-win32) 19387 erl_wall_clock_func=WindowsAPI 19388 erl_wall_clock_low_resolution=yes 19389 ;; 19390 high_resolution-no-yes-*-*) 19391 erl_wall_clock_func=mach_clock_get_time 19392 erl_wall_clock_id=CALENDAR_CLOCK 19393 ;; 19394 *-CLOCK_*-*-*-*) 19395 erl_wall_clock_func=clock_gettime 19396 erl_wall_clock_lib=$clock_gettime_lib 19397 erl_wall_clock_id=$erl_cv_clock_gettime_wall_low_resolution 19398 for low_res_id in $low_resolution_clock_gettime_wall; do 19399 if test $erl_wall_clock_id = $low_res_id; then 19400 erl_wall_clock_low_resolution=yes 19401 break 19402 fi 19403 done 19404 ;; 19405 *-no-*-yes-*) 19406 erl_wall_clock_func=gettimeofday 19407 ;; 19408 *) 19409 erl_wall_clock_func=none 19410 ;; 19411 esac 19412;; 19413 default-no) 19414 19415 default_resolution_clock_gettime_wall="CLOCK_REALTIME" 19416 low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" 19417 high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" 19418 19419 case "default_resolution" in 19420 high_resolution) 19421 check_msg="high resolution " 19422 prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" 19423 ;; 19424 low_resolution) 19425 check_msg="low resolution " 19426 prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" 19427 ;; 19428 custom_resolution) 19429 check_msg="custom resolution " 19430 prefer_resolution_clock_gettime_wall="" 19431 ;; 19432 *) 19433 check_msg="" 19434 prefer_resolution_clock_gettime_wall= 19435 ;; 19436 esac 19437 19438 clock_gettime_lib="" 19439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 19440$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 19441if ${ac_cv_lib_rt_clock_gettime+:} false; then : 19442 $as_echo_n "(cached) " >&6 19443else 19444 ac_check_lib_save_LIBS=$LIBS 19445LIBS="-lrt $LIBS" 19446cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19447/* end confdefs.h. */ 19448 19449/* Override any GCC internal prototype to avoid an error. 19450 Use char because int might match the return type of a GCC 19451 builtin and then its argument prototype would still apply. */ 19452#ifdef __cplusplus 19453extern "C" 19454#endif 19455char clock_gettime (); 19456int 19457main () 19458{ 19459return clock_gettime (); 19460 ; 19461 return 0; 19462} 19463_ACEOF 19464if ac_fn_c_try_link "$LINENO"; then : 19465 ac_cv_lib_rt_clock_gettime=yes 19466else 19467 ac_cv_lib_rt_clock_gettime=no 19468fi 19469rm -f core conftest.err conftest.$ac_objext \ 19470 conftest$ac_exeext conftest.$ac_ext 19471LIBS=$ac_check_lib_save_LIBS 19472fi 19473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 19474$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 19475if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 19476 clock_gettime_lib="-lrt" 19477fi 19478 19479 19480 save_LIBS="$LIBS" 19481 LIBS="$LIBS $clock_gettime_lib" 19482 19483 if test "$LD_MAY_BE_WEAK" != "no"; then 19484 trust_test="#error May not be there due to weak linking" 19485 else 19486 trust_test="" 19487 fi 19488 19489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 19490$as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } 19491if ${erl_cv_clock_gettime_wall_default_resolution+:} false; then : 19492 $as_echo_n "(cached) " >&6 19493else 19494 19495 for clock_type in $prefer_resolution_clock_gettime_wall $default_resolution_clock_gettime_wall $high_resolution_clock_gettime_wall $low_resolution_clock_gettime_wall; do 19496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19497/* end confdefs.h. */ 19498 19499#include <time.h> 19500$trust_test 19501 19502int 19503main () 19504{ 19505 19506 struct timespec ts; 19507 long long result; 19508 clock_gettime($clock_type,&ts); 19509 result = ((long long) ts.tv_sec) * 1000000000LL + 19510 ((long long) ts.tv_nsec); 19511 19512 ; 19513 return 0; 19514} 19515_ACEOF 19516if ac_fn_c_try_link "$LINENO"; then : 19517 erl_cv_clock_gettime_wall_default_resolution=$clock_type 19518else 19519 erl_cv_clock_gettime_wall_default_resolution=no 19520fi 19521rm -f core conftest.err conftest.$ac_objext \ 19522 conftest$ac_exeext conftest.$ac_ext 19523 test $erl_cv_clock_gettime_wall_default_resolution = no || break 19524 done 19525 19526fi 19527{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_default_resolution" >&5 19528$as_echo "$erl_cv_clock_gettime_wall_default_resolution" >&6; } 19529 19530 LIBS="$save_LIBS" 19531 19532 if test "$LD_MAY_BE_WEAK" != "no"; then 19533 check_for_clock_getres= 19534 else 19535 check_for_clock_getres=clock_getres 19536 fi 19537 19538 for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday 19539do : 19540 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 19541ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 19542if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 19543 cat >>confdefs.h <<_ACEOF 19544#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 19545_ACEOF 19546 19547fi 19548done 19549 19550 19551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 19552$as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } 19553if ${erl_cv_mach_clock_get_time_wall+:} false; then : 19554 $as_echo_n "(cached) " >&6 19555else 19556 19557 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19558/* end confdefs.h. */ 19559 19560#include <mach/clock.h> 19561#include <mach/mach.h> 19562 19563int 19564main () 19565{ 19566 19567 kern_return_t res; 19568 clock_serv_t clk_srv; 19569 mach_timespec_t time_spec; 19570 19571 host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); 19572 res = clock_get_time(clk_srv, &time_spec); 19573 mach_port_deallocate(mach_task_self(), clk_srv); 19574 19575 ; 19576 return 0; 19577} 19578_ACEOF 19579if ac_fn_c_try_compile "$LINENO"; then : 19580 erl_cv_mach_clock_get_time_wall=yes 19581else 19582 erl_cv_mach_clock_get_time_wall=no 19583fi 19584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19585 19586fi 19587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 19588$as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } 19589 19590 erl_wall_clock_lib= 19591 erl_wall_clock_low_resolution=no 19592 erl_wall_clock_id= 19593 case default_resolution-$erl_cv_clock_gettime_wall_default_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in 19594 *-*-*-*-win32) 19595 erl_wall_clock_func=WindowsAPI 19596 erl_wall_clock_low_resolution=yes 19597 ;; 19598 high_resolution-no-yes-*-*) 19599 erl_wall_clock_func=mach_clock_get_time 19600 erl_wall_clock_id=CALENDAR_CLOCK 19601 ;; 19602 *-CLOCK_*-*-*-*) 19603 erl_wall_clock_func=clock_gettime 19604 erl_wall_clock_lib=$clock_gettime_lib 19605 erl_wall_clock_id=$erl_cv_clock_gettime_wall_default_resolution 19606 for low_res_id in $low_resolution_clock_gettime_wall; do 19607 if test $erl_wall_clock_id = $low_res_id; then 19608 erl_wall_clock_low_resolution=yes 19609 break 19610 fi 19611 done 19612 ;; 19613 *-no-*-yes-*) 19614 erl_wall_clock_func=gettimeofday 19615 ;; 19616 *) 19617 erl_wall_clock_func=none 19618 ;; 19619 esac 19620;; 19621 *) 19622 19623 default_resolution_clock_gettime_wall="CLOCK_REALTIME" 19624 low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" 19625 high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" 19626 19627 case "custom_resolution" in 19628 high_resolution) 19629 check_msg="high resolution " 19630 prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" 19631 ;; 19632 low_resolution) 19633 check_msg="low resolution " 19634 prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" 19635 ;; 19636 custom_resolution) 19637 check_msg="custom resolution " 19638 prefer_resolution_clock_gettime_wall="$with_clock_gettime_realtime_id" 19639 ;; 19640 *) 19641 check_msg="" 19642 prefer_resolution_clock_gettime_wall= 19643 ;; 19644 esac 19645 19646 clock_gettime_lib="" 19647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 19648$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 19649if ${ac_cv_lib_rt_clock_gettime+:} false; then : 19650 $as_echo_n "(cached) " >&6 19651else 19652 ac_check_lib_save_LIBS=$LIBS 19653LIBS="-lrt $LIBS" 19654cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19655/* end confdefs.h. */ 19656 19657/* Override any GCC internal prototype to avoid an error. 19658 Use char because int might match the return type of a GCC 19659 builtin and then its argument prototype would still apply. */ 19660#ifdef __cplusplus 19661extern "C" 19662#endif 19663char clock_gettime (); 19664int 19665main () 19666{ 19667return clock_gettime (); 19668 ; 19669 return 0; 19670} 19671_ACEOF 19672if ac_fn_c_try_link "$LINENO"; then : 19673 ac_cv_lib_rt_clock_gettime=yes 19674else 19675 ac_cv_lib_rt_clock_gettime=no 19676fi 19677rm -f core conftest.err conftest.$ac_objext \ 19678 conftest$ac_exeext conftest.$ac_ext 19679LIBS=$ac_check_lib_save_LIBS 19680fi 19681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 19682$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 19683if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 19684 clock_gettime_lib="-lrt" 19685fi 19686 19687 19688 save_LIBS="$LIBS" 19689 LIBS="$LIBS $clock_gettime_lib" 19690 19691 if test "$LD_MAY_BE_WEAK" != "no"; then 19692 trust_test="#error May not be there due to weak linking" 19693 else 19694 trust_test="" 19695 fi 19696 19697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 19698$as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } 19699if ${erl_cv_clock_gettime_wall_custom_resolution+:} false; then : 19700 $as_echo_n "(cached) " >&6 19701else 19702 19703 for clock_type in $prefer_resolution_clock_gettime_wall $default_resolution_clock_gettime_wall $high_resolution_clock_gettime_wall $low_resolution_clock_gettime_wall; do 19704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19705/* end confdefs.h. */ 19706 19707#include <time.h> 19708$trust_test 19709 19710int 19711main () 19712{ 19713 19714 struct timespec ts; 19715 long long result; 19716 clock_gettime($clock_type,&ts); 19717 result = ((long long) ts.tv_sec) * 1000000000LL + 19718 ((long long) ts.tv_nsec); 19719 19720 ; 19721 return 0; 19722} 19723_ACEOF 19724if ac_fn_c_try_link "$LINENO"; then : 19725 erl_cv_clock_gettime_wall_custom_resolution=$clock_type 19726else 19727 erl_cv_clock_gettime_wall_custom_resolution=no 19728fi 19729rm -f core conftest.err conftest.$ac_objext \ 19730 conftest$ac_exeext conftest.$ac_ext 19731 test $erl_cv_clock_gettime_wall_custom_resolution = no || break 19732 done 19733 19734fi 19735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_custom_resolution" >&5 19736$as_echo "$erl_cv_clock_gettime_wall_custom_resolution" >&6; } 19737 19738 LIBS="$save_LIBS" 19739 19740 if test "$LD_MAY_BE_WEAK" != "no"; then 19741 check_for_clock_getres= 19742 else 19743 check_for_clock_getres=clock_getres 19744 fi 19745 19746 for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday 19747do : 19748 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 19749ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 19750if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 19751 cat >>confdefs.h <<_ACEOF 19752#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 19753_ACEOF 19754 19755fi 19756done 19757 19758 19759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 19760$as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } 19761if ${erl_cv_mach_clock_get_time_wall+:} false; then : 19762 $as_echo_n "(cached) " >&6 19763else 19764 19765 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19766/* end confdefs.h. */ 19767 19768#include <mach/clock.h> 19769#include <mach/mach.h> 19770 19771int 19772main () 19773{ 19774 19775 kern_return_t res; 19776 clock_serv_t clk_srv; 19777 mach_timespec_t time_spec; 19778 19779 host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); 19780 res = clock_get_time(clk_srv, &time_spec); 19781 mach_port_deallocate(mach_task_self(), clk_srv); 19782 19783 ; 19784 return 0; 19785} 19786_ACEOF 19787if ac_fn_c_try_compile "$LINENO"; then : 19788 erl_cv_mach_clock_get_time_wall=yes 19789else 19790 erl_cv_mach_clock_get_time_wall=no 19791fi 19792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19793 19794fi 19795{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 19796$as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } 19797 19798 erl_wall_clock_lib= 19799 erl_wall_clock_low_resolution=no 19800 erl_wall_clock_id= 19801 case custom_resolution-$erl_cv_clock_gettime_wall_custom_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in 19802 *-*-*-*-win32) 19803 erl_wall_clock_func=WindowsAPI 19804 erl_wall_clock_low_resolution=yes 19805 ;; 19806 high_resolution-no-yes-*-*) 19807 erl_wall_clock_func=mach_clock_get_time 19808 erl_wall_clock_id=CALENDAR_CLOCK 19809 ;; 19810 *-CLOCK_*-*-*-*) 19811 erl_wall_clock_func=clock_gettime 19812 erl_wall_clock_lib=$clock_gettime_lib 19813 erl_wall_clock_id=$erl_cv_clock_gettime_wall_custom_resolution 19814 for low_res_id in $low_resolution_clock_gettime_wall; do 19815 if test $erl_wall_clock_id = $low_res_id; then 19816 erl_wall_clock_low_resolution=yes 19817 break 19818 fi 19819 done 19820 ;; 19821 *-no-*-yes-*) 19822 erl_wall_clock_func=gettimeofday 19823 ;; 19824 *) 19825 erl_wall_clock_func=none 19826 ;; 19827 esac 19828;; 19829esac 19830 19831case "$erl_wall_clock_func-$erl_wall_clock_id-$with_clock_gettime_realtime_id" in 19832 *-*-no) 19833 ;; 19834 clock_gettime-$with_clock_gettime_realtime_id-$with_clock_gettime_realtime_id) 19835 ;; 19836 *) 19837 as_fn_error $? "$with_clock_gettime_realtime_id as clock id to clock_gettime() doesn't compile" "$LINENO" 5 19838 ;; 19839esac 19840 19841case $erl_wall_clock_func in 19842 none) 19843 as_fn_error $? "No wall clock source found" "$LINENO" 5 19844 ;; 19845 mach_clock_get_time) 19846 19847$as_echo "#define OS_SYSTEM_TIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h 19848 19849 ;; 19850 clock_gettime) 19851 19852$as_echo "#define OS_SYSTEM_TIME_USING_CLOCK_GETTIME 1" >>confdefs.h 19853 19854 ;; 19855 gettimeofday) 19856 19857$as_echo "#define OS_SYSTEM_TIME_GETTIMEOFDAY 1" >>confdefs.h 19858 19859 ;; 19860 *) 19861 ;; 19862esac 19863 19864if test "x$erl_wall_clock_id" != "x"; then 19865 19866cat >>confdefs.h <<_ACEOF 19867#define WALL_CLOCK_ID_STR "$erl_wall_clock_id" 19868_ACEOF 19869 19870 19871cat >>confdefs.h <<_ACEOF 19872#define WALL_CLOCK_ID $erl_wall_clock_id 19873_ACEOF 19874 19875fi 19876 19877fi # $force_gettimeofday_os_system_time != yes 19878 19879case "$with_clock_gettime_monotonic_id" in 19880 ""|no) 19881 with_clock_gettime_monotonic_id=no 19882 ;; 19883 CLOCK_*CPUTIME*) 19884 as_fn_error $? "Invalid clock_gettime() monotonic clock id: Refusing to use the cputime clock id $with_clock_gettime_monotonic_id as monotonic clock id" "$LINENO" 5 19885 ;; 19886 CLOCK_REALTIME*|CLOCK_TAI*) 19887 as_fn_error $? "Invalid clock_gettime() monotonic clock id: Refusing to use the realtime clock id $with_clock_gettime_monotonic_id as monotonic clock id" "$LINENO" 5 19888 ;; 19889 CLOCK_*) 19890 ;; 19891 *) 19892 as_fn_error $? "Invalid clock_gettime() clock id: $with_clock_gettime_monotonic_id" "$LINENO" 5 19893 ;; 19894esac 19895 19896case "$with_clock_resolution-$with_clock_gettime_monotonic_id" in 19897 high-no) 19898 19899 if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then 19900 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" 19901 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" 19902 high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" 19903 else 19904 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" 19905 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" 19906 high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" 19907 fi 19908 19909 case "high_resolution" in 19910 high_resolution) 19911 check_msg="high resolution " 19912 prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" 19913 ;; 19914 low_resolution) 19915 check_msg="low resolution " 19916 prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" 19917 ;; 19918 custom_resolution) 19919 check_msg="custom resolution " 19920 prefer_resolution_clock_gettime_monotonic="undefined" 19921 ;; 19922 *) 19923 check_msg="custom " 19924 prefer_resolution_clock_gettime_monotonic="undefined" 19925 ;; 19926 esac 19927 19928 clock_gettime_lib="" 19929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 19930$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 19931if ${ac_cv_lib_rt_clock_gettime+:} false; then : 19932 $as_echo_n "(cached) " >&6 19933else 19934 ac_check_lib_save_LIBS=$LIBS 19935LIBS="-lrt $LIBS" 19936cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19937/* end confdefs.h. */ 19938 19939/* Override any GCC internal prototype to avoid an error. 19940 Use char because int might match the return type of a GCC 19941 builtin and then its argument prototype would still apply. */ 19942#ifdef __cplusplus 19943extern "C" 19944#endif 19945char clock_gettime (); 19946int 19947main () 19948{ 19949return clock_gettime (); 19950 ; 19951 return 0; 19952} 19953_ACEOF 19954if ac_fn_c_try_link "$LINENO"; then : 19955 ac_cv_lib_rt_clock_gettime=yes 19956else 19957 ac_cv_lib_rt_clock_gettime=no 19958fi 19959rm -f core conftest.err conftest.$ac_objext \ 19960 conftest$ac_exeext conftest.$ac_ext 19961LIBS=$ac_check_lib_save_LIBS 19962fi 19963{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 19964$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 19965if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 19966 clock_gettime_lib="-lrt" 19967fi 19968 19969 19970 save_LIBS="$LIBS" 19971 LIBS="$LIBS $clock_gettime_lib" 19972 19973 if test "$LD_MAY_BE_WEAK" != "no"; then 19974 trust_test="#error May not be there due to weak linking" 19975 else 19976 trust_test="" 19977 fi 19978 19979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 19980$as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } 19981if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : 19982 $as_echo_n "(cached) " >&6 19983else 19984 19985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19986/* end confdefs.h. */ 19987 19988#include <time.h> 19989$trust_test 19990 19991int 19992main () 19993{ 19994 19995 struct timespec ts; 19996 long long result; 19997 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); 19998 result = ((long long) ts.tv_sec) * 1000000000LL + 19999 ((long long) ts.tv_nsec); 20000 20001 ; 20002 return 0; 20003} 20004_ACEOF 20005if ac_fn_c_try_link "$LINENO"; then : 20006 erl_cv_clock_gettime_monotonic_raw=yes 20007else 20008 erl_cv_clock_gettime_monotonic_raw=no 20009fi 20010rm -f core conftest.err conftest.$ac_objext \ 20011 conftest$ac_exeext conftest.$ac_ext 20012 20013fi 20014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 20015$as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } 20016 20017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 20018$as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } 20019if ${erl_cv_clock_gettime_monotonic_high_resolution+:} false; then : 20020 $as_echo_n "(cached) " >&6 20021else 20022 20023 for clock_type in $prefer_resolution_clock_gettime_monotonic $default_resolution_clock_gettime_monotonic $high_resolution_clock_gettime_monotonic $low_resolution_clock_gettime_monotonic; do 20024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20025/* end confdefs.h. */ 20026 20027#include <time.h> 20028$trust_test 20029 20030int 20031main () 20032{ 20033 20034 struct timespec ts; 20035 long long result; 20036 clock_gettime($clock_type,&ts); 20037 result = ((long long) ts.tv_sec) * 1000000000LL + 20038 ((long long) ts.tv_nsec); 20039 20040 ; 20041 return 0; 20042} 20043_ACEOF 20044if ac_fn_c_try_link "$LINENO"; then : 20045 erl_cv_clock_gettime_monotonic_high_resolution=$clock_type 20046else 20047 erl_cv_clock_gettime_monotonic_high_resolution=no 20048fi 20049rm -f core conftest.err conftest.$ac_objext \ 20050 conftest$ac_exeext conftest.$ac_ext 20051 test $erl_cv_clock_gettime_monotonic_high_resolution = no || break 20052 done 20053 20054fi 20055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_high_resolution" >&5 20056$as_echo "$erl_cv_clock_gettime_monotonic_high_resolution" >&6; } 20057 20058 LIBS="$save_LIBS" 20059 20060 if test "$LD_MAY_BE_WEAK" != "no"; then 20061 for ac_func in clock_get_attributes gethrtime 20062do : 20063 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20064ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20065if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20066 cat >>confdefs.h <<_ACEOF 20067#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20068_ACEOF 20069 20070fi 20071done 20072 20073 else 20074 for ac_func in clock_getres clock_get_attributes gethrtime 20075do : 20076 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20077ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20078if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20079 cat >>confdefs.h <<_ACEOF 20080#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20081_ACEOF 20082 20083fi 20084done 20085 20086 fi 20087 20088 20089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 20090$as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } 20091if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : 20092 $as_echo_n "(cached) " >&6 20093else 20094 20095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20096/* end confdefs.h. */ 20097 20098#include <mach/clock.h> 20099#include <mach/mach.h> 20100 20101int 20102main () 20103{ 20104 20105 kern_return_t res; 20106 clock_serv_t clk_srv; 20107 mach_timespec_t time_spec; 20108 20109 host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); 20110 res = clock_get_time(clk_srv, &time_spec); 20111 mach_port_deallocate(mach_task_self(), clk_srv); 20112 20113 ; 20114 return 0; 20115} 20116_ACEOF 20117if ac_fn_c_try_compile "$LINENO"; then : 20118 erl_cv_mach_clock_get_time_monotonic=yes 20119else 20120 erl_cv_mach_clock_get_time_monotonic=no 20121fi 20122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20123 20124fi 20125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 20126$as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } 20127 20128 erl_corrected_monotonic_clock=no 20129 case $erl_cv_clock_gettime_monotonic_high_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in 20130 *-*-*-win32) 20131 erl_monotonic_clock_func=WindowsAPI 20132 ;; 20133 CLOCK_*-*-*-linux*) 20134 case $erl_cv_clock_gettime_monotonic_high_resolution-$erl_cv_clock_gettime_monotonic_raw in 20135 CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) 20136 erl_corrected_monotonic_clock=yes 20137 ;; 20138 *) 20139 # We don't trust CLOCK_MONOTONIC to be NTP 20140 # adjusted on linux systems that do not have 20141 # CLOCK_MONOTONIC_RAW (although it seems to 20142 # be...) 20143 ;; 20144 esac 20145 erl_monotonic_clock_func=clock_gettime 20146 ;; 20147 no-no-no-linux*) 20148 erl_monotonic_clock_func=times 20149 ;; 20150 CLOCK_*-*-*-*) 20151 erl_monotonic_clock_func=clock_gettime 20152 ;; 20153 no-yes-*-*) 20154 erl_monotonic_clock_func=gethrtime 20155 ;; 20156 no-no-yes-*) 20157 erl_monotonic_clock_func=mach_clock_get_time 20158 ;; 20159 no-no-no-*) 20160 erl_monotonic_clock_func=none 20161 ;; 20162 esac 20163 20164 erl_monotonic_clock_low_resolution=no 20165 erl_monotonic_clock_lib= 20166 erl_monotonic_clock_id= 20167 case $erl_monotonic_clock_func in 20168 clock_gettime) 20169 erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_high_resolution 20170 for low_res_id in $low_resolution_clock_gettime_monotonic; do 20171 if test $erl_monotonic_clock_id = $low_res_id; then 20172 erl_monotonic_clock_low_resolution=yes 20173 break 20174 fi 20175 done 20176 erl_monotonic_clock_lib=$clock_gettime_lib 20177 ;; 20178 mach_clock_get_time) 20179 erl_monotonic_clock_id=SYSTEM_CLOCK 20180 ;; 20181 times) 20182 erl_monotonic_clock_low_resolution=yes 20183 ;; 20184 *) 20185 ;; 20186 esac 20187 20188;; 20189 low-no) 20190 20191 if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then 20192 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" 20193 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" 20194 high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" 20195 else 20196 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" 20197 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" 20198 high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" 20199 fi 20200 20201 case "low_resolution" in 20202 high_resolution) 20203 check_msg="high resolution " 20204 prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" 20205 ;; 20206 low_resolution) 20207 check_msg="low resolution " 20208 prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" 20209 ;; 20210 custom_resolution) 20211 check_msg="custom resolution " 20212 prefer_resolution_clock_gettime_monotonic="undefined" 20213 ;; 20214 *) 20215 check_msg="custom " 20216 prefer_resolution_clock_gettime_monotonic="undefined" 20217 ;; 20218 esac 20219 20220 clock_gettime_lib="" 20221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 20222$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 20223if ${ac_cv_lib_rt_clock_gettime+:} false; then : 20224 $as_echo_n "(cached) " >&6 20225else 20226 ac_check_lib_save_LIBS=$LIBS 20227LIBS="-lrt $LIBS" 20228cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20229/* end confdefs.h. */ 20230 20231/* Override any GCC internal prototype to avoid an error. 20232 Use char because int might match the return type of a GCC 20233 builtin and then its argument prototype would still apply. */ 20234#ifdef __cplusplus 20235extern "C" 20236#endif 20237char clock_gettime (); 20238int 20239main () 20240{ 20241return clock_gettime (); 20242 ; 20243 return 0; 20244} 20245_ACEOF 20246if ac_fn_c_try_link "$LINENO"; then : 20247 ac_cv_lib_rt_clock_gettime=yes 20248else 20249 ac_cv_lib_rt_clock_gettime=no 20250fi 20251rm -f core conftest.err conftest.$ac_objext \ 20252 conftest$ac_exeext conftest.$ac_ext 20253LIBS=$ac_check_lib_save_LIBS 20254fi 20255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 20256$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 20257if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 20258 clock_gettime_lib="-lrt" 20259fi 20260 20261 20262 save_LIBS="$LIBS" 20263 LIBS="$LIBS $clock_gettime_lib" 20264 20265 if test "$LD_MAY_BE_WEAK" != "no"; then 20266 trust_test="#error May not be there due to weak linking" 20267 else 20268 trust_test="" 20269 fi 20270 20271 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 20272$as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } 20273if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : 20274 $as_echo_n "(cached) " >&6 20275else 20276 20277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20278/* end confdefs.h. */ 20279 20280#include <time.h> 20281$trust_test 20282 20283int 20284main () 20285{ 20286 20287 struct timespec ts; 20288 long long result; 20289 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); 20290 result = ((long long) ts.tv_sec) * 1000000000LL + 20291 ((long long) ts.tv_nsec); 20292 20293 ; 20294 return 0; 20295} 20296_ACEOF 20297if ac_fn_c_try_link "$LINENO"; then : 20298 erl_cv_clock_gettime_monotonic_raw=yes 20299else 20300 erl_cv_clock_gettime_monotonic_raw=no 20301fi 20302rm -f core conftest.err conftest.$ac_objext \ 20303 conftest$ac_exeext conftest.$ac_ext 20304 20305fi 20306{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 20307$as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } 20308 20309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 20310$as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } 20311if ${erl_cv_clock_gettime_monotonic_low_resolution+:} false; then : 20312 $as_echo_n "(cached) " >&6 20313else 20314 20315 for clock_type in $prefer_resolution_clock_gettime_monotonic $default_resolution_clock_gettime_monotonic $high_resolution_clock_gettime_monotonic $low_resolution_clock_gettime_monotonic; do 20316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20317/* end confdefs.h. */ 20318 20319#include <time.h> 20320$trust_test 20321 20322int 20323main () 20324{ 20325 20326 struct timespec ts; 20327 long long result; 20328 clock_gettime($clock_type,&ts); 20329 result = ((long long) ts.tv_sec) * 1000000000LL + 20330 ((long long) ts.tv_nsec); 20331 20332 ; 20333 return 0; 20334} 20335_ACEOF 20336if ac_fn_c_try_link "$LINENO"; then : 20337 erl_cv_clock_gettime_monotonic_low_resolution=$clock_type 20338else 20339 erl_cv_clock_gettime_monotonic_low_resolution=no 20340fi 20341rm -f core conftest.err conftest.$ac_objext \ 20342 conftest$ac_exeext conftest.$ac_ext 20343 test $erl_cv_clock_gettime_monotonic_low_resolution = no || break 20344 done 20345 20346fi 20347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_low_resolution" >&5 20348$as_echo "$erl_cv_clock_gettime_monotonic_low_resolution" >&6; } 20349 20350 LIBS="$save_LIBS" 20351 20352 if test "$LD_MAY_BE_WEAK" != "no"; then 20353 for ac_func in clock_get_attributes gethrtime 20354do : 20355 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20356ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20357if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20358 cat >>confdefs.h <<_ACEOF 20359#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20360_ACEOF 20361 20362fi 20363done 20364 20365 else 20366 for ac_func in clock_getres clock_get_attributes gethrtime 20367do : 20368 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20369ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20370if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20371 cat >>confdefs.h <<_ACEOF 20372#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20373_ACEOF 20374 20375fi 20376done 20377 20378 fi 20379 20380 20381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 20382$as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } 20383if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : 20384 $as_echo_n "(cached) " >&6 20385else 20386 20387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20388/* end confdefs.h. */ 20389 20390#include <mach/clock.h> 20391#include <mach/mach.h> 20392 20393int 20394main () 20395{ 20396 20397 kern_return_t res; 20398 clock_serv_t clk_srv; 20399 mach_timespec_t time_spec; 20400 20401 host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); 20402 res = clock_get_time(clk_srv, &time_spec); 20403 mach_port_deallocate(mach_task_self(), clk_srv); 20404 20405 ; 20406 return 0; 20407} 20408_ACEOF 20409if ac_fn_c_try_compile "$LINENO"; then : 20410 erl_cv_mach_clock_get_time_monotonic=yes 20411else 20412 erl_cv_mach_clock_get_time_monotonic=no 20413fi 20414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20415 20416fi 20417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 20418$as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } 20419 20420 erl_corrected_monotonic_clock=no 20421 case $erl_cv_clock_gettime_monotonic_low_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in 20422 *-*-*-win32) 20423 erl_monotonic_clock_func=WindowsAPI 20424 ;; 20425 CLOCK_*-*-*-linux*) 20426 case $erl_cv_clock_gettime_monotonic_low_resolution-$erl_cv_clock_gettime_monotonic_raw in 20427 CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) 20428 erl_corrected_monotonic_clock=yes 20429 ;; 20430 *) 20431 # We don't trust CLOCK_MONOTONIC to be NTP 20432 # adjusted on linux systems that do not have 20433 # CLOCK_MONOTONIC_RAW (although it seems to 20434 # be...) 20435 ;; 20436 esac 20437 erl_monotonic_clock_func=clock_gettime 20438 ;; 20439 no-no-no-linux*) 20440 erl_monotonic_clock_func=times 20441 ;; 20442 CLOCK_*-*-*-*) 20443 erl_monotonic_clock_func=clock_gettime 20444 ;; 20445 no-yes-*-*) 20446 erl_monotonic_clock_func=gethrtime 20447 ;; 20448 no-no-yes-*) 20449 erl_monotonic_clock_func=mach_clock_get_time 20450 ;; 20451 no-no-no-*) 20452 erl_monotonic_clock_func=none 20453 ;; 20454 esac 20455 20456 erl_monotonic_clock_low_resolution=no 20457 erl_monotonic_clock_lib= 20458 erl_monotonic_clock_id= 20459 case $erl_monotonic_clock_func in 20460 clock_gettime) 20461 erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_low_resolution 20462 for low_res_id in $low_resolution_clock_gettime_monotonic; do 20463 if test $erl_monotonic_clock_id = $low_res_id; then 20464 erl_monotonic_clock_low_resolution=yes 20465 break 20466 fi 20467 done 20468 erl_monotonic_clock_lib=$clock_gettime_lib 20469 ;; 20470 mach_clock_get_time) 20471 erl_monotonic_clock_id=SYSTEM_CLOCK 20472 ;; 20473 times) 20474 erl_monotonic_clock_low_resolution=yes 20475 ;; 20476 *) 20477 ;; 20478 esac 20479 20480;; 20481 default-no) 20482 20483 if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then 20484 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" 20485 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" 20486 high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" 20487 else 20488 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" 20489 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" 20490 high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" 20491 fi 20492 20493 case "default_resolution" in 20494 high_resolution) 20495 check_msg="high resolution " 20496 prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" 20497 ;; 20498 low_resolution) 20499 check_msg="low resolution " 20500 prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" 20501 ;; 20502 custom_resolution) 20503 check_msg="custom resolution " 20504 prefer_resolution_clock_gettime_monotonic="undefined" 20505 ;; 20506 *) 20507 check_msg="custom " 20508 prefer_resolution_clock_gettime_monotonic="undefined" 20509 ;; 20510 esac 20511 20512 clock_gettime_lib="" 20513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 20514$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 20515if ${ac_cv_lib_rt_clock_gettime+:} false; then : 20516 $as_echo_n "(cached) " >&6 20517else 20518 ac_check_lib_save_LIBS=$LIBS 20519LIBS="-lrt $LIBS" 20520cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20521/* end confdefs.h. */ 20522 20523/* Override any GCC internal prototype to avoid an error. 20524 Use char because int might match the return type of a GCC 20525 builtin and then its argument prototype would still apply. */ 20526#ifdef __cplusplus 20527extern "C" 20528#endif 20529char clock_gettime (); 20530int 20531main () 20532{ 20533return clock_gettime (); 20534 ; 20535 return 0; 20536} 20537_ACEOF 20538if ac_fn_c_try_link "$LINENO"; then : 20539 ac_cv_lib_rt_clock_gettime=yes 20540else 20541 ac_cv_lib_rt_clock_gettime=no 20542fi 20543rm -f core conftest.err conftest.$ac_objext \ 20544 conftest$ac_exeext conftest.$ac_ext 20545LIBS=$ac_check_lib_save_LIBS 20546fi 20547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 20548$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 20549if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 20550 clock_gettime_lib="-lrt" 20551fi 20552 20553 20554 save_LIBS="$LIBS" 20555 LIBS="$LIBS $clock_gettime_lib" 20556 20557 if test "$LD_MAY_BE_WEAK" != "no"; then 20558 trust_test="#error May not be there due to weak linking" 20559 else 20560 trust_test="" 20561 fi 20562 20563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 20564$as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } 20565if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : 20566 $as_echo_n "(cached) " >&6 20567else 20568 20569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20570/* end confdefs.h. */ 20571 20572#include <time.h> 20573$trust_test 20574 20575int 20576main () 20577{ 20578 20579 struct timespec ts; 20580 long long result; 20581 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); 20582 result = ((long long) ts.tv_sec) * 1000000000LL + 20583 ((long long) ts.tv_nsec); 20584 20585 ; 20586 return 0; 20587} 20588_ACEOF 20589if ac_fn_c_try_link "$LINENO"; then : 20590 erl_cv_clock_gettime_monotonic_raw=yes 20591else 20592 erl_cv_clock_gettime_monotonic_raw=no 20593fi 20594rm -f core conftest.err conftest.$ac_objext \ 20595 conftest$ac_exeext conftest.$ac_ext 20596 20597fi 20598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 20599$as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } 20600 20601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 20602$as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } 20603if ${erl_cv_clock_gettime_monotonic_default_resolution+:} false; then : 20604 $as_echo_n "(cached) " >&6 20605else 20606 20607 for clock_type in $prefer_resolution_clock_gettime_monotonic $default_resolution_clock_gettime_monotonic $high_resolution_clock_gettime_monotonic $low_resolution_clock_gettime_monotonic; do 20608 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20609/* end confdefs.h. */ 20610 20611#include <time.h> 20612$trust_test 20613 20614int 20615main () 20616{ 20617 20618 struct timespec ts; 20619 long long result; 20620 clock_gettime($clock_type,&ts); 20621 result = ((long long) ts.tv_sec) * 1000000000LL + 20622 ((long long) ts.tv_nsec); 20623 20624 ; 20625 return 0; 20626} 20627_ACEOF 20628if ac_fn_c_try_link "$LINENO"; then : 20629 erl_cv_clock_gettime_monotonic_default_resolution=$clock_type 20630else 20631 erl_cv_clock_gettime_monotonic_default_resolution=no 20632fi 20633rm -f core conftest.err conftest.$ac_objext \ 20634 conftest$ac_exeext conftest.$ac_ext 20635 test $erl_cv_clock_gettime_monotonic_default_resolution = no || break 20636 done 20637 20638fi 20639{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_default_resolution" >&5 20640$as_echo "$erl_cv_clock_gettime_monotonic_default_resolution" >&6; } 20641 20642 LIBS="$save_LIBS" 20643 20644 if test "$LD_MAY_BE_WEAK" != "no"; then 20645 for ac_func in clock_get_attributes gethrtime 20646do : 20647 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20648ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20649if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20650 cat >>confdefs.h <<_ACEOF 20651#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20652_ACEOF 20653 20654fi 20655done 20656 20657 else 20658 for ac_func in clock_getres clock_get_attributes gethrtime 20659do : 20660 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20661ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20662if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20663 cat >>confdefs.h <<_ACEOF 20664#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20665_ACEOF 20666 20667fi 20668done 20669 20670 fi 20671 20672 20673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 20674$as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } 20675if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : 20676 $as_echo_n "(cached) " >&6 20677else 20678 20679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20680/* end confdefs.h. */ 20681 20682#include <mach/clock.h> 20683#include <mach/mach.h> 20684 20685int 20686main () 20687{ 20688 20689 kern_return_t res; 20690 clock_serv_t clk_srv; 20691 mach_timespec_t time_spec; 20692 20693 host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); 20694 res = clock_get_time(clk_srv, &time_spec); 20695 mach_port_deallocate(mach_task_self(), clk_srv); 20696 20697 ; 20698 return 0; 20699} 20700_ACEOF 20701if ac_fn_c_try_compile "$LINENO"; then : 20702 erl_cv_mach_clock_get_time_monotonic=yes 20703else 20704 erl_cv_mach_clock_get_time_monotonic=no 20705fi 20706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20707 20708fi 20709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 20710$as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } 20711 20712 erl_corrected_monotonic_clock=no 20713 case $erl_cv_clock_gettime_monotonic_default_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in 20714 *-*-*-win32) 20715 erl_monotonic_clock_func=WindowsAPI 20716 ;; 20717 CLOCK_*-*-*-linux*) 20718 case $erl_cv_clock_gettime_monotonic_default_resolution-$erl_cv_clock_gettime_monotonic_raw in 20719 CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) 20720 erl_corrected_monotonic_clock=yes 20721 ;; 20722 *) 20723 # We don't trust CLOCK_MONOTONIC to be NTP 20724 # adjusted on linux systems that do not have 20725 # CLOCK_MONOTONIC_RAW (although it seems to 20726 # be...) 20727 ;; 20728 esac 20729 erl_monotonic_clock_func=clock_gettime 20730 ;; 20731 no-no-no-linux*) 20732 erl_monotonic_clock_func=times 20733 ;; 20734 CLOCK_*-*-*-*) 20735 erl_monotonic_clock_func=clock_gettime 20736 ;; 20737 no-yes-*-*) 20738 erl_monotonic_clock_func=gethrtime 20739 ;; 20740 no-no-yes-*) 20741 erl_monotonic_clock_func=mach_clock_get_time 20742 ;; 20743 no-no-no-*) 20744 erl_monotonic_clock_func=none 20745 ;; 20746 esac 20747 20748 erl_monotonic_clock_low_resolution=no 20749 erl_monotonic_clock_lib= 20750 erl_monotonic_clock_id= 20751 case $erl_monotonic_clock_func in 20752 clock_gettime) 20753 erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_default_resolution 20754 for low_res_id in $low_resolution_clock_gettime_monotonic; do 20755 if test $erl_monotonic_clock_id = $low_res_id; then 20756 erl_monotonic_clock_low_resolution=yes 20757 break 20758 fi 20759 done 20760 erl_monotonic_clock_lib=$clock_gettime_lib 20761 ;; 20762 mach_clock_get_time) 20763 erl_monotonic_clock_id=SYSTEM_CLOCK 20764 ;; 20765 times) 20766 erl_monotonic_clock_low_resolution=yes 20767 ;; 20768 *) 20769 ;; 20770 esac 20771 20772;; 20773 *) 20774 20775 if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then 20776 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" 20777 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" 20778 high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" 20779 else 20780 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" 20781 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" 20782 high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" 20783 fi 20784 20785 case "custom_resolution" in 20786 high_resolution) 20787 check_msg="high resolution " 20788 prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" 20789 ;; 20790 low_resolution) 20791 check_msg="low resolution " 20792 prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" 20793 ;; 20794 custom_resolution) 20795 check_msg="custom resolution " 20796 prefer_resolution_clock_gettime_monotonic="$with_clock_gettime_monotonic_id" 20797 ;; 20798 *) 20799 check_msg="custom " 20800 prefer_resolution_clock_gettime_monotonic="$with_clock_gettime_monotonic_id" 20801 ;; 20802 esac 20803 20804 clock_gettime_lib="" 20805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 20806$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 20807if ${ac_cv_lib_rt_clock_gettime+:} false; then : 20808 $as_echo_n "(cached) " >&6 20809else 20810 ac_check_lib_save_LIBS=$LIBS 20811LIBS="-lrt $LIBS" 20812cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20813/* end confdefs.h. */ 20814 20815/* Override any GCC internal prototype to avoid an error. 20816 Use char because int might match the return type of a GCC 20817 builtin and then its argument prototype would still apply. */ 20818#ifdef __cplusplus 20819extern "C" 20820#endif 20821char clock_gettime (); 20822int 20823main () 20824{ 20825return clock_gettime (); 20826 ; 20827 return 0; 20828} 20829_ACEOF 20830if ac_fn_c_try_link "$LINENO"; then : 20831 ac_cv_lib_rt_clock_gettime=yes 20832else 20833 ac_cv_lib_rt_clock_gettime=no 20834fi 20835rm -f core conftest.err conftest.$ac_objext \ 20836 conftest$ac_exeext conftest.$ac_ext 20837LIBS=$ac_check_lib_save_LIBS 20838fi 20839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 20840$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 20841if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 20842 clock_gettime_lib="-lrt" 20843fi 20844 20845 20846 save_LIBS="$LIBS" 20847 LIBS="$LIBS $clock_gettime_lib" 20848 20849 if test "$LD_MAY_BE_WEAK" != "no"; then 20850 trust_test="#error May not be there due to weak linking" 20851 else 20852 trust_test="" 20853 fi 20854 20855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 20856$as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } 20857if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : 20858 $as_echo_n "(cached) " >&6 20859else 20860 20861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20862/* end confdefs.h. */ 20863 20864#include <time.h> 20865$trust_test 20866 20867int 20868main () 20869{ 20870 20871 struct timespec ts; 20872 long long result; 20873 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); 20874 result = ((long long) ts.tv_sec) * 1000000000LL + 20875 ((long long) ts.tv_nsec); 20876 20877 ; 20878 return 0; 20879} 20880_ACEOF 20881if ac_fn_c_try_link "$LINENO"; then : 20882 erl_cv_clock_gettime_monotonic_raw=yes 20883else 20884 erl_cv_clock_gettime_monotonic_raw=no 20885fi 20886rm -f core conftest.err conftest.$ac_objext \ 20887 conftest$ac_exeext conftest.$ac_ext 20888 20889fi 20890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 20891$as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } 20892 20893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 20894$as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } 20895if ${erl_cv_clock_gettime_monotonic_custom_resolution+:} false; then : 20896 $as_echo_n "(cached) " >&6 20897else 20898 20899 for clock_type in $prefer_resolution_clock_gettime_monotonic $default_resolution_clock_gettime_monotonic $high_resolution_clock_gettime_monotonic $low_resolution_clock_gettime_monotonic; do 20900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20901/* end confdefs.h. */ 20902 20903#include <time.h> 20904$trust_test 20905 20906int 20907main () 20908{ 20909 20910 struct timespec ts; 20911 long long result; 20912 clock_gettime($clock_type,&ts); 20913 result = ((long long) ts.tv_sec) * 1000000000LL + 20914 ((long long) ts.tv_nsec); 20915 20916 ; 20917 return 0; 20918} 20919_ACEOF 20920if ac_fn_c_try_link "$LINENO"; then : 20921 erl_cv_clock_gettime_monotonic_custom_resolution=$clock_type 20922else 20923 erl_cv_clock_gettime_monotonic_custom_resolution=no 20924fi 20925rm -f core conftest.err conftest.$ac_objext \ 20926 conftest$ac_exeext conftest.$ac_ext 20927 test $erl_cv_clock_gettime_monotonic_custom_resolution = no || break 20928 done 20929 20930fi 20931{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_custom_resolution" >&5 20932$as_echo "$erl_cv_clock_gettime_monotonic_custom_resolution" >&6; } 20933 20934 LIBS="$save_LIBS" 20935 20936 if test "$LD_MAY_BE_WEAK" != "no"; then 20937 for ac_func in clock_get_attributes gethrtime 20938do : 20939 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20940ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20941if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20942 cat >>confdefs.h <<_ACEOF 20943#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20944_ACEOF 20945 20946fi 20947done 20948 20949 else 20950 for ac_func in clock_getres clock_get_attributes gethrtime 20951do : 20952 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 20953ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 20954if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 20955 cat >>confdefs.h <<_ACEOF 20956#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 20957_ACEOF 20958 20959fi 20960done 20961 20962 fi 20963 20964 20965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 20966$as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } 20967if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : 20968 $as_echo_n "(cached) " >&6 20969else 20970 20971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20972/* end confdefs.h. */ 20973 20974#include <mach/clock.h> 20975#include <mach/mach.h> 20976 20977int 20978main () 20979{ 20980 20981 kern_return_t res; 20982 clock_serv_t clk_srv; 20983 mach_timespec_t time_spec; 20984 20985 host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); 20986 res = clock_get_time(clk_srv, &time_spec); 20987 mach_port_deallocate(mach_task_self(), clk_srv); 20988 20989 ; 20990 return 0; 20991} 20992_ACEOF 20993if ac_fn_c_try_compile "$LINENO"; then : 20994 erl_cv_mach_clock_get_time_monotonic=yes 20995else 20996 erl_cv_mach_clock_get_time_monotonic=no 20997fi 20998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20999 21000fi 21001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 21002$as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } 21003 21004 erl_corrected_monotonic_clock=no 21005 case $erl_cv_clock_gettime_monotonic_custom_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in 21006 *-*-*-win32) 21007 erl_monotonic_clock_func=WindowsAPI 21008 ;; 21009 CLOCK_*-*-*-linux*) 21010 case $erl_cv_clock_gettime_monotonic_custom_resolution-$erl_cv_clock_gettime_monotonic_raw in 21011 CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) 21012 erl_corrected_monotonic_clock=yes 21013 ;; 21014 *) 21015 # We don't trust CLOCK_MONOTONIC to be NTP 21016 # adjusted on linux systems that do not have 21017 # CLOCK_MONOTONIC_RAW (although it seems to 21018 # be...) 21019 ;; 21020 esac 21021 erl_monotonic_clock_func=clock_gettime 21022 ;; 21023 no-no-no-linux*) 21024 erl_monotonic_clock_func=times 21025 ;; 21026 CLOCK_*-*-*-*) 21027 erl_monotonic_clock_func=clock_gettime 21028 ;; 21029 no-yes-*-*) 21030 erl_monotonic_clock_func=gethrtime 21031 ;; 21032 no-no-yes-*) 21033 erl_monotonic_clock_func=mach_clock_get_time 21034 ;; 21035 no-no-no-*) 21036 erl_monotonic_clock_func=none 21037 ;; 21038 esac 21039 21040 erl_monotonic_clock_low_resolution=no 21041 erl_monotonic_clock_lib= 21042 erl_monotonic_clock_id= 21043 case $erl_monotonic_clock_func in 21044 clock_gettime) 21045 erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_custom_resolution 21046 for low_res_id in $low_resolution_clock_gettime_monotonic; do 21047 if test $erl_monotonic_clock_id = $low_res_id; then 21048 erl_monotonic_clock_low_resolution=yes 21049 break 21050 fi 21051 done 21052 erl_monotonic_clock_lib=$clock_gettime_lib 21053 ;; 21054 mach_clock_get_time) 21055 erl_monotonic_clock_id=SYSTEM_CLOCK 21056 ;; 21057 times) 21058 erl_monotonic_clock_low_resolution=yes 21059 ;; 21060 *) 21061 ;; 21062 esac 21063 21064;; 21065esac 21066 21067case "$erl_monotonic_clock_func-$erl_monotonic_clock_id-$with_clock_gettime_monotonic_id" in 21068 *-*-no) 21069 ;; 21070 clock_gettime-$with_clock_gettime_monotonic_id-$with_clock_gettime_monotonic_id) 21071 ;; 21072 *) 21073 as_fn_error $? "$with_clock_gettime_monotonic_id as clock id to clock_gettime() doesn't compile" "$LINENO" 5 21074 ;; 21075esac 21076 21077case $erl_monotonic_clock_func in 21078 times) 21079 21080$as_echo "#define OS_MONOTONIC_TIME_USING_TIMES 1" >>confdefs.h 21081 21082 ;; 21083 mach_clock_get_time) 21084 21085$as_echo "#define OS_MONOTONIC_TIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h 21086 21087 ;; 21088 clock_gettime) 21089 21090$as_echo "#define OS_MONOTONIC_TIME_USING_CLOCK_GETTIME 1" >>confdefs.h 21091 21092 ;; 21093 gethrtime) 21094 21095$as_echo "#define OS_MONOTONIC_TIME_USING_GETHRTIME 1" >>confdefs.h 21096 21097 ;; 21098 *) 21099 ;; 21100esac 21101 21102if test $erl_corrected_monotonic_clock = yes; then 21103 21104$as_echo "#define ERTS_HAVE_CORRECTED_OS_MONOTONIC_TIME 1" >>confdefs.h 21105 21106fi 21107 21108if test $erl_monotonic_clock_low_resolution = yes; then 21109 21110$as_echo "#define ERTS_HAVE_LOW_RESOLUTION_OS_MONOTONIC_LOW 1" >>confdefs.h 21111 21112fi 21113 21114xrtlib= 21115if test "$erl_monotonic_clock_lib" != ""; then 21116 xrtlib="$erl_monotonic_clock_lib" 21117fi 21118if test "$erl_wall_clock_lib" != ""; then 21119 xrtlib="$erl_wall_clock_lib" 21120fi 21121if test "x$erl_monotonic_clock_id" != "x"; then 21122 21123cat >>confdefs.h <<_ACEOF 21124#define MONOTONIC_CLOCK_ID_STR "$erl_monotonic_clock_id" 21125_ACEOF 21126 21127 21128cat >>confdefs.h <<_ACEOF 21129#define MONOTONIC_CLOCK_ID $erl_monotonic_clock_id 21130_ACEOF 21131 21132fi 21133 21134if test $erl_cv_clock_gettime_monotonic_raw = yes; then 21135 21136$as_echo "#define HAVE_CLOCK_GETTIME_MONOTONIC_RAW 1" >>confdefs.h 21137 21138fi 21139 21140 21141 if test "no" = "yes"; then 21142 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" 21143 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" 21144 high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" 21145 else 21146 default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" 21147 low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" 21148 high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" 21149 fi 21150 21151 case "high_resolution" in 21152 high_resolution) 21153 check_msg="high resolution " 21154 prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" 21155 ;; 21156 low_resolution) 21157 check_msg="low resolution " 21158 prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" 21159 ;; 21160 custom_resolution) 21161 check_msg="custom resolution " 21162 prefer_resolution_clock_gettime_monotonic="undefined" 21163 ;; 21164 *) 21165 check_msg="custom " 21166 prefer_resolution_clock_gettime_monotonic="undefined" 21167 ;; 21168 esac 21169 21170 clock_gettime_lib="" 21171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 21172$as_echo_n "checking for clock_gettime in -lrt... " >&6; } 21173if ${ac_cv_lib_rt_clock_gettime+:} false; then : 21174 $as_echo_n "(cached) " >&6 21175else 21176 ac_check_lib_save_LIBS=$LIBS 21177LIBS="-lrt $LIBS" 21178cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21179/* end confdefs.h. */ 21180 21181/* Override any GCC internal prototype to avoid an error. 21182 Use char because int might match the return type of a GCC 21183 builtin and then its argument prototype would still apply. */ 21184#ifdef __cplusplus 21185extern "C" 21186#endif 21187char clock_gettime (); 21188int 21189main () 21190{ 21191return clock_gettime (); 21192 ; 21193 return 0; 21194} 21195_ACEOF 21196if ac_fn_c_try_link "$LINENO"; then : 21197 ac_cv_lib_rt_clock_gettime=yes 21198else 21199 ac_cv_lib_rt_clock_gettime=no 21200fi 21201rm -f core conftest.err conftest.$ac_objext \ 21202 conftest$ac_exeext conftest.$ac_ext 21203LIBS=$ac_check_lib_save_LIBS 21204fi 21205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 21206$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } 21207if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : 21208 clock_gettime_lib="-lrt" 21209fi 21210 21211 21212 save_LIBS="$LIBS" 21213 LIBS="$LIBS $clock_gettime_lib" 21214 21215 if test "$LD_MAY_BE_WEAK" != "no"; then 21216 trust_test="#error May not be there due to weak linking" 21217 else 21218 trust_test="" 21219 fi 21220 21221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 21222$as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } 21223if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : 21224 $as_echo_n "(cached) " >&6 21225else 21226 21227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21228/* end confdefs.h. */ 21229 21230#include <time.h> 21231$trust_test 21232 21233int 21234main () 21235{ 21236 21237 struct timespec ts; 21238 long long result; 21239 clock_gettime(CLOCK_MONOTONIC_RAW, &ts); 21240 result = ((long long) ts.tv_sec) * 1000000000LL + 21241 ((long long) ts.tv_nsec); 21242 21243 ; 21244 return 0; 21245} 21246_ACEOF 21247if ac_fn_c_try_link "$LINENO"; then : 21248 erl_cv_clock_gettime_monotonic_raw=yes 21249else 21250 erl_cv_clock_gettime_monotonic_raw=no 21251fi 21252rm -f core conftest.err conftest.$ac_objext \ 21253 conftest$ac_exeext conftest.$ac_ext 21254 21255fi 21256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 21257$as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } 21258 21259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 21260$as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } 21261if ${erl_cv_clock_gettime_monotonic_high_resolution+:} false; then : 21262 $as_echo_n "(cached) " >&6 21263else 21264 21265 for clock_type in $prefer_resolution_clock_gettime_monotonic $default_resolution_clock_gettime_monotonic $high_resolution_clock_gettime_monotonic $low_resolution_clock_gettime_monotonic; do 21266 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21267/* end confdefs.h. */ 21268 21269#include <time.h> 21270$trust_test 21271 21272int 21273main () 21274{ 21275 21276 struct timespec ts; 21277 long long result; 21278 clock_gettime($clock_type,&ts); 21279 result = ((long long) ts.tv_sec) * 1000000000LL + 21280 ((long long) ts.tv_nsec); 21281 21282 ; 21283 return 0; 21284} 21285_ACEOF 21286if ac_fn_c_try_link "$LINENO"; then : 21287 erl_cv_clock_gettime_monotonic_high_resolution=$clock_type 21288else 21289 erl_cv_clock_gettime_monotonic_high_resolution=no 21290fi 21291rm -f core conftest.err conftest.$ac_objext \ 21292 conftest$ac_exeext conftest.$ac_ext 21293 test $erl_cv_clock_gettime_monotonic_high_resolution = no || break 21294 done 21295 21296fi 21297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_high_resolution" >&5 21298$as_echo "$erl_cv_clock_gettime_monotonic_high_resolution" >&6; } 21299 21300 LIBS="$save_LIBS" 21301 21302 if test "$LD_MAY_BE_WEAK" != "no"; then 21303 for ac_func in clock_get_attributes gethrtime 21304do : 21305 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 21306ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 21307if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 21308 cat >>confdefs.h <<_ACEOF 21309#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 21310_ACEOF 21311 21312fi 21313done 21314 21315 else 21316 for ac_func in clock_getres clock_get_attributes gethrtime 21317do : 21318 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 21319ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 21320if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 21321 cat >>confdefs.h <<_ACEOF 21322#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 21323_ACEOF 21324 21325fi 21326done 21327 21328 fi 21329 21330 21331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 21332$as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } 21333if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : 21334 $as_echo_n "(cached) " >&6 21335else 21336 21337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21338/* end confdefs.h. */ 21339 21340#include <mach/clock.h> 21341#include <mach/mach.h> 21342 21343int 21344main () 21345{ 21346 21347 kern_return_t res; 21348 clock_serv_t clk_srv; 21349 mach_timespec_t time_spec; 21350 21351 host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); 21352 res = clock_get_time(clk_srv, &time_spec); 21353 mach_port_deallocate(mach_task_self(), clk_srv); 21354 21355 ; 21356 return 0; 21357} 21358_ACEOF 21359if ac_fn_c_try_compile "$LINENO"; then : 21360 erl_cv_mach_clock_get_time_monotonic=yes 21361else 21362 erl_cv_mach_clock_get_time_monotonic=no 21363fi 21364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21365 21366fi 21367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 21368$as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } 21369 21370 erl_corrected_monotonic_clock=no 21371 case $erl_cv_clock_gettime_monotonic_high_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in 21372 *-*-*-win32) 21373 erl_monotonic_clock_func=WindowsAPI 21374 ;; 21375 CLOCK_*-*-*-linux*) 21376 case $erl_cv_clock_gettime_monotonic_high_resolution-$erl_cv_clock_gettime_monotonic_raw in 21377 CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) 21378 erl_corrected_monotonic_clock=yes 21379 ;; 21380 *) 21381 # We don't trust CLOCK_MONOTONIC to be NTP 21382 # adjusted on linux systems that do not have 21383 # CLOCK_MONOTONIC_RAW (although it seems to 21384 # be...) 21385 ;; 21386 esac 21387 erl_monotonic_clock_func=clock_gettime 21388 ;; 21389 no-no-no-linux*) 21390 erl_monotonic_clock_func=times 21391 ;; 21392 CLOCK_*-*-*-*) 21393 erl_monotonic_clock_func=clock_gettime 21394 ;; 21395 no-yes-*-*) 21396 erl_monotonic_clock_func=gethrtime 21397 ;; 21398 no-no-yes-*) 21399 erl_monotonic_clock_func=mach_clock_get_time 21400 ;; 21401 no-no-no-*) 21402 erl_monotonic_clock_func=none 21403 ;; 21404 esac 21405 21406 erl_monotonic_clock_low_resolution=no 21407 erl_monotonic_clock_lib= 21408 erl_monotonic_clock_id= 21409 case $erl_monotonic_clock_func in 21410 clock_gettime) 21411 erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_high_resolution 21412 for low_res_id in $low_resolution_clock_gettime_monotonic; do 21413 if test $erl_monotonic_clock_id = $low_res_id; then 21414 erl_monotonic_clock_low_resolution=yes 21415 break 21416 fi 21417 done 21418 erl_monotonic_clock_lib=$clock_gettime_lib 21419 ;; 21420 mach_clock_get_time) 21421 erl_monotonic_clock_id=SYSTEM_CLOCK 21422 ;; 21423 times) 21424 erl_monotonic_clock_low_resolution=yes 21425 ;; 21426 *) 21427 ;; 21428 esac 21429 21430 21431 21432case $erl_monotonic_clock_low_resolution-$erl_monotonic_clock_func in 21433 no-mach_clock_get_time) 21434 monotonic_hrtime=yes 21435 21436$as_echo "#define SYS_HRTIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h 21437 21438 ;; 21439 no-clock_gettime) 21440 monotonic_hrtime=yes 21441 21442$as_echo "#define SYS_HRTIME_USING_CLOCK_GETTIME 1" >>confdefs.h 21443 21444 ;; 21445 no-gethrtime) 21446 monotonic_hrtime=yes 21447 21448$as_echo "#define SYS_HRTIME_USING_GETHRTIME 1" >>confdefs.h 21449 21450 ;; 21451 *) 21452 monotonic_hrtime=no 21453 ;; 21454esac 21455 21456if test $monotonic_hrtime = yes; then 21457 21458$as_echo "#define HAVE_MONOTONIC_ERTS_SYS_HRTIME 1" >>confdefs.h 21459 21460fi 21461 21462if test "x$erl_monotonic_clock_id" != "x"; then 21463 21464cat >>confdefs.h <<_ACEOF 21465#define HRTIME_CLOCK_ID_STR "$erl_monotonic_clock_id" 21466_ACEOF 21467 21468 21469cat >>confdefs.h <<_ACEOF 21470#define HRTIME_CLOCK_ID $erl_monotonic_clock_id 21471_ACEOF 21472 21473fi 21474 21475 21476 21477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethrvtime works and how to use it" >&5 21478$as_echo_n "checking if gethrvtime works and how to use it... " >&6; } 21479if test "$cross_compiling" = yes; then : 21480 21481case X$erl_xcomp_gethrvtime_procfs_ioctl in 21482 X) 21483 erl_gethrvtime=cross;; 21484 Xyes|Xno) 21485 if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then 21486 erl_gethrvtime=procfs_ioctl 21487 else 21488 erl_gethrvtime=false 21489 fi;; 21490 *) 21491 as_fn_error $? "Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl" "$LINENO" 5;; 21492esac 21493 21494else 21495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21496/* end confdefs.h. */ 21497 21498/* gethrvtime procfs ioctl test */ 21499/* These need to be undef:ed to not break activation of 21500 * micro level process accounting on /proc/self 21501 */ 21502#ifdef _LARGEFILE_SOURCE 21503# undef _LARGEFILE_SOURCE 21504#endif 21505#ifdef _FILE_OFFSET_BITS 21506# undef _FILE_OFFSET_BITS 21507#endif 21508#include <stdlib.h> 21509#include <unistd.h> 21510#include <string.h> 21511#include <stdio.h> 21512#include <sys/time.h> 21513#include <sys/types.h> 21514#include <sys/stat.h> 21515#include <sys/signal.h> 21516#include <sys/fault.h> 21517#include <sys/syscall.h> 21518#include <sys/procfs.h> 21519#include <fcntl.h> 21520 21521int main() { 21522 long msacct = PR_MSACCT; 21523 int fd; 21524 long long start, stop; 21525 int i; 21526 pid_t pid = getpid(); 21527 char proc_self[30] = "/proc/"; 21528 21529 sprintf(proc_self+strlen(proc_self), "%lu", (unsigned long) pid); 21530 if ( (fd = open(proc_self, O_WRONLY)) == -1) 21531 exit(1); 21532 if (ioctl(fd, PIOCSET, &msacct) < 0) 21533 exit(2); 21534 if (close(fd) < 0) 21535 exit(3); 21536 start = gethrvtime(); 21537 for (i = 0; i < 100; i++) 21538 stop = gethrvtime(); 21539 if (start == 0) 21540 exit(4); 21541 if (start == stop) 21542 exit(5); 21543 exit(0); return 0; 21544} 21545 21546_ACEOF 21547if ac_fn_c_try_run "$LINENO"; then : 21548 erl_gethrvtime=procfs_ioctl 21549else 21550 erl_gethrvtime=false 21551fi 21552rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 21553 conftest.$ac_objext conftest.beam conftest.$ac_ext 21554fi 21555 21556 21557LIBRT=$xrtlib 21558case $erl_gethrvtime in 21559 procfs_ioctl) 21560 21561$as_echo "#define HAVE_GETHRVTIME_PROCFS_IOCTL 1" >>confdefs.h 21562 21563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: uses ioctl to procfs" >&5 21564$as_echo "uses ioctl to procfs" >&6; } 21565 ;; 21566 *) 21567 if test $erl_gethrvtime = cross; then 21568 erl_gethrvtime=false 21569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 21570$as_echo "cross" >&6; } 21571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result 'not working' guessed because of cross compilation" >&5 21572$as_echo "$as_me: WARNING: result 'not working' guessed because of cross compilation" >&2;} 21573 else 21574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not working" >&5 21575$as_echo "not working" >&6; } 21576 fi 21577 21578 21579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clock_gettime can be used to get thread CPU time" >&5 21580$as_echo_n "checking if clock_gettime can be used to get thread CPU time... " >&6; } 21581 save_libs=$LIBS 21582 LIBS="-lrt" 21583 if test "$cross_compiling" = yes; then : 21584 21585 case X$erl_xcomp_clock_gettime_cpu_time in 21586 X) erl_clock_gettime_cpu_time=cross;; 21587 Xyes|Xno) erl_clock_gettime_cpu_time=$erl_xcomp_clock_gettime_cpu_time;; 21588 *) as_fn_error $? "Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time" "$LINENO" 5;; 21589 esac 21590 21591else 21592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21593/* end confdefs.h. */ 21594 21595 #include <stdlib.h> 21596 #include <unistd.h> 21597 #include <string.h> 21598 #include <stdio.h> 21599 #include <time.h> 21600 int main() { 21601 long long start, stop; 21602 int i; 21603 struct timespec tp; 21604 21605 if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp) < 0) 21606 exit(1); 21607 start = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec; 21608 for (i = 0; i < 100; i++) 21609 clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp); 21610 stop = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec; 21611 if (start == 0) 21612 exit(4); 21613 if (start == stop) 21614 exit(5); 21615 exit(0); return 0; 21616 } 21617 21618_ACEOF 21619if ac_fn_c_try_run "$LINENO"; then : 21620 erl_clock_gettime_cpu_time=yes 21621else 21622 erl_clock_gettime_cpu_time=no 21623fi 21624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 21625 conftest.$ac_objext conftest.beam conftest.$ac_ext 21626fi 21627 21628 LIBS=$save_libs 21629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_clock_gettime_cpu_time" >&5 21630$as_echo "$erl_clock_gettime_cpu_time" >&6; } 21631 case $erl_clock_gettime_cpu_time in 21632 yes) 21633 21634$as_echo "#define HAVE_CLOCK_GETTIME_CPU_TIME /**/" >>confdefs.h 21635 21636 LIBRT=-lrt 21637 ;; 21638 cross) 21639 erl_clock_gettime_cpu_time=no 21640 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 21641$as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;} 21642 ;; 21643 *) 21644 ;; 21645 esac 21646 ;; 21647esac 21648 21649 21650# Extract the first word of "m4", so it can be a program name with args. 21651set dummy m4; ac_word=$2 21652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21653$as_echo_n "checking for $ac_word... " >&6; } 21654if ${ac_cv_prog_M4+:} false; then : 21655 $as_echo_n "(cached) " >&6 21656else 21657 if test -n "$M4"; then 21658 ac_cv_prog_M4="$M4" # Let the user override the test. 21659else 21660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21661for as_dir in $PATH 21662do 21663 IFS=$as_save_IFS 21664 test -z "$as_dir" && as_dir=. 21665 for ac_exec_ext in '' $ac_executable_extensions; do 21666 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21667 ac_cv_prog_M4="m4" 21668 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21669 break 2 21670 fi 21671done 21672 done 21673IFS=$as_save_IFS 21674 21675fi 21676fi 21677M4=$ac_cv_prog_M4 21678if test -n "$M4"; then 21679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4" >&5 21680$as_echo "$M4" >&6; } 21681else 21682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21683$as_echo "no" >&6; } 21684fi 21685 21686 21687 21688 21689JIT_ARCH= 21690if test ${enable_jit} != no; then 21691 case "$ARCH" in 21692 amd64) 21693 JIT_ARCH=x86 21694 ;; 21695 *) 21696 if test ${enable_jit} = yes; then 21697 as_fn_error $? "JIT only works on x86 64-bit" "$LINENO" 5 21698 else 21699 enable_jit=no 21700 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JIT disabled due to lack to support on $ARCH-$OPSYS" >&5 21701$as_echo "$as_me: WARNING: JIT disabled due to lack to support on $ARCH-$OPSYS" >&2;} 21702 fi 21703 ;; 21704 esac 21705 21706 if test ${enable_jit} != no; then 21707 if test "$CXX" != false; then 21708 ac_ext=cpp 21709ac_cpp='$CXXCPP $CPPFLAGS' 21710ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21711ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21712ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21713 21714 old_CXXFLAGS=$CXXFLAGS 21715 CXXFLAGS="$CXXFLAGS -std=c++17" 21716 ac_ext=cpp 21717ac_cpp='$CXXCPP $CPPFLAGS' 21718ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21719ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21720ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21721if test -z "$CXX"; then 21722 if test -n "$CCC"; then 21723 CXX=$CCC 21724 else 21725 if test -n "$ac_tool_prefix"; then 21726 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 21727 do 21728 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 21729set dummy $ac_tool_prefix$ac_prog; ac_word=$2 21730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21731$as_echo_n "checking for $ac_word... " >&6; } 21732if ${ac_cv_prog_CXX+:} false; then : 21733 $as_echo_n "(cached) " >&6 21734else 21735 if test -n "$CXX"; then 21736 ac_cv_prog_CXX="$CXX" # Let the user override the test. 21737else 21738as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21739for as_dir in $PATH 21740do 21741 IFS=$as_save_IFS 21742 test -z "$as_dir" && as_dir=. 21743 for ac_exec_ext in '' $ac_executable_extensions; do 21744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21745 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 21746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21747 break 2 21748 fi 21749done 21750 done 21751IFS=$as_save_IFS 21752 21753fi 21754fi 21755CXX=$ac_cv_prog_CXX 21756if test -n "$CXX"; then 21757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 21758$as_echo "$CXX" >&6; } 21759else 21760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21761$as_echo "no" >&6; } 21762fi 21763 21764 21765 test -n "$CXX" && break 21766 done 21767fi 21768if test -z "$CXX"; then 21769 ac_ct_CXX=$CXX 21770 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 21771do 21772 # Extract the first word of "$ac_prog", so it can be a program name with args. 21773set dummy $ac_prog; ac_word=$2 21774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 21775$as_echo_n "checking for $ac_word... " >&6; } 21776if ${ac_cv_prog_ac_ct_CXX+:} false; then : 21777 $as_echo_n "(cached) " >&6 21778else 21779 if test -n "$ac_ct_CXX"; then 21780 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 21781else 21782as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21783for as_dir in $PATH 21784do 21785 IFS=$as_save_IFS 21786 test -z "$as_dir" && as_dir=. 21787 for ac_exec_ext in '' $ac_executable_extensions; do 21788 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 21789 ac_cv_prog_ac_ct_CXX="$ac_prog" 21790 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 21791 break 2 21792 fi 21793done 21794 done 21795IFS=$as_save_IFS 21796 21797fi 21798fi 21799ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 21800if test -n "$ac_ct_CXX"; then 21801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 21802$as_echo "$ac_ct_CXX" >&6; } 21803else 21804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21805$as_echo "no" >&6; } 21806fi 21807 21808 21809 test -n "$ac_ct_CXX" && break 21810done 21811 21812 if test "x$ac_ct_CXX" = x; then 21813 CXX="g++" 21814 else 21815 case $cross_compiling:$ac_tool_warned in 21816yes:) 21817{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 21818$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 21819ac_tool_warned=yes ;; 21820esac 21821 CXX=$ac_ct_CXX 21822 fi 21823fi 21824 21825 fi 21826fi 21827# Provide some information about the compiler. 21828$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 21829set X $ac_compile 21830ac_compiler=$2 21831for ac_option in --version -v -V -qversion; do 21832 { { ac_try="$ac_compiler $ac_option >&5" 21833case "(($ac_try" in 21834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 21835 *) ac_try_echo=$ac_try;; 21836esac 21837eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 21838$as_echo "$ac_try_echo"; } >&5 21839 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 21840 ac_status=$? 21841 if test -s conftest.err; then 21842 sed '10a\ 21843... rest of stderr output deleted ... 21844 10q' conftest.err >conftest.er1 21845 cat conftest.er1 >&5 21846 fi 21847 rm -f conftest.er1 conftest.err 21848 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 21849 test $ac_status = 0; } 21850done 21851 21852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 21853$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } 21854if ${ac_cv_cxx_compiler_gnu+:} false; then : 21855 $as_echo_n "(cached) " >&6 21856else 21857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21858/* end confdefs.h. */ 21859 21860int 21861main () 21862{ 21863#ifndef __GNUC__ 21864 choke me 21865#endif 21866 21867 ; 21868 return 0; 21869} 21870_ACEOF 21871if ac_fn_cxx_try_compile "$LINENO"; then : 21872 ac_compiler_gnu=yes 21873else 21874 ac_compiler_gnu=no 21875fi 21876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21877ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 21878 21879fi 21880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 21881$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } 21882if test $ac_compiler_gnu = yes; then 21883 GXX=yes 21884else 21885 GXX= 21886fi 21887ac_test_CXXFLAGS=${CXXFLAGS+set} 21888ac_save_CXXFLAGS=$CXXFLAGS 21889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 21890$as_echo_n "checking whether $CXX accepts -g... " >&6; } 21891if ${ac_cv_prog_cxx_g+:} false; then : 21892 $as_echo_n "(cached) " >&6 21893else 21894 ac_save_cxx_werror_flag=$ac_cxx_werror_flag 21895 ac_cxx_werror_flag=yes 21896 ac_cv_prog_cxx_g=no 21897 CXXFLAGS="-g" 21898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21899/* end confdefs.h. */ 21900 21901int 21902main () 21903{ 21904 21905 ; 21906 return 0; 21907} 21908_ACEOF 21909if ac_fn_cxx_try_compile "$LINENO"; then : 21910 ac_cv_prog_cxx_g=yes 21911else 21912 CXXFLAGS="" 21913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21914/* end confdefs.h. */ 21915 21916int 21917main () 21918{ 21919 21920 ; 21921 return 0; 21922} 21923_ACEOF 21924if ac_fn_cxx_try_compile "$LINENO"; then : 21925 21926else 21927 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21928 CXXFLAGS="-g" 21929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21930/* end confdefs.h. */ 21931 21932int 21933main () 21934{ 21935 21936 ; 21937 return 0; 21938} 21939_ACEOF 21940if ac_fn_cxx_try_compile "$LINENO"; then : 21941 ac_cv_prog_cxx_g=yes 21942fi 21943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21944fi 21945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21946fi 21947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21948 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 21949fi 21950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 21951$as_echo "$ac_cv_prog_cxx_g" >&6; } 21952if test "$ac_test_CXXFLAGS" = set; then 21953 CXXFLAGS=$ac_save_CXXFLAGS 21954elif test $ac_cv_prog_cxx_g = yes; then 21955 if test "$GXX" = yes; then 21956 CXXFLAGS="-g -O2" 21957 else 21958 CXXFLAGS="-g" 21959 fi 21960else 21961 if test "$GXX" = yes; then 21962 CXXFLAGS="-O2" 21963 else 21964 CXXFLAGS= 21965 fi 21966fi 21967ac_ext=cpp 21968ac_cpp='$CXXCPP $CPPFLAGS' 21969ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 21970ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 21971ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 21972 21973 21974cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21975/* end confdefs.h. */ 21976 21977int 21978main () 21979{ 21980#if __cplusplus < 201703L 21981 #error "Needs C++17 compiler" 21982 #endif 21983 ; 21984 return 0; 21985} 21986_ACEOF 21987if ac_fn_cxx_try_compile "$LINENO"; then : 21988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++17 support" >&5 21989$as_echo_n "checking for C++17 support... " >&6; } 21990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 21991$as_echo "yes" >&6; } 21992 HAVE_CXX17=true 21993else 21994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++17 support" >&5 21995$as_echo_n "checking for C++17 support... " >&6; } 21996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 21997$as_echo "no" >&6; } 21998 HAVE_CXX17=false 21999fi 22000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22001 ac_ext=c 22002ac_cpp='$CPP $CPPFLAGS' 22003ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 22004ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 22005ac_compiler_gnu=$ac_cv_c_compiler_gnu 22006 22007 fi 22008 if test "$CXX" = false -o "$HAVE_CXX17" = false; then 22009 if test ${enable_jit} = yes; then 22010 as_fn_error $? "JIT needs a C++ compiler with C++17 support" "$LINENO" 5 22011 else 22012 enable_jit=no 22013 cat >> $ERL_TOP/erts/CONF_INFO <<EOF 22014 22015 JIT disabled due to lack of compiler with C++17 support 22016EOF 22017 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JIT disable due to lack of C++ compiler with C++17 support" >&5 22018$as_echo "$as_me: WARNING: JIT disable due to lack of C++ compiler with C++17 support" >&2;} 22019 fi 22020 fi 22021 fi 22022 22023 if test ${enable_jit} != no; then 22024 enable_jit=yes 22025 fi 22026fi 22027 22028if test ${enable_jit} != no; then 22029 case $host_os in 22030 openbsd*) 22031 # Whenever the kernel is entered (page faults, system calls, etc), 22032 # OpenBSD checks whether the stack pointer is in an area allocated with 22033 # MAP_STACK, so we can't use the native stack for Erlang code. 22034 # 22035 # https://undeadly.org/cgi?action=article;sid=20180310000858 22036 enable_native_stack=no;; 22037 win32*) 22038 # Windows never messes with the stack, so it's safe by default. 22039 enable_native_stack=yes;; 22040 *) 22041 # Use the native stack if we can safely redirect OS signals to a 22042 # different stack. 22043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for safe signal delivery" >&5 22044$as_echo_n "checking for safe signal delivery... " >&6; } 22045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22046/* end confdefs.h. */ 22047#include <signal.h> 22048int 22049main () 22050{ 22051#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__) 22052 #define __DARWIN__ 1 22053 #endif 22054 #if !(defined(__GLIBC__) || defined(__DARWIN__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__sun__)) 22055 #error "Unknown libc. Assume musl, which does not allow safe signals" 22056 #endif 22057 ; 22058 return 0; 22059} 22060_ACEOF 22061if ac_fn_c_try_compile "$LINENO"; then : 22062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22063$as_echo "yes" >&6; } 22064 enable_native_stack=yes 22065else 22066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling native stack in JIT" >&5 22067$as_echo "no, disabling native stack in JIT" >&6; } 22068 enable_native_stack=no 22069 22070fi 22071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;; 22072 esac 22073 22074 if test X${enable_native_stack} = Xyes; then 22075 22076$as_echo "#define NATIVE_ERLANG_STACK /**/" >>confdefs.h 22077 22078 fi 22079fi 22080 22081case $OPSYS in 22082 linux*) 22083 22084$as_echo "#define HAVE_LINUX_PERF_SUPPORT 1" >>confdefs.h 22085 22086 ;; 22087 *) 22088 ;; 22089esac 22090 22091 22092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to redefine FD_SETSIZE" >&5 22093$as_echo_n "checking whether to redefine FD_SETSIZE... " >&6; } 22094case $host_os in 22095 bsdi*) 22096 22097$as_echo "#define REDEFINE_FD_SETSIZE /**/" >>confdefs.h 22098 22099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22100$as_echo "yes" >&6; } 22101 ;; 22102 *) 22103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22104$as_echo "no" >&6; } 22105 ;; 22106esac 22107 22108 22109 22110 22111JIT_ENABLED= 22112FLAVORS="emu jit" 22113# Enable jit 22114if test X${enable_jit} = Xyes; then 22115 JIT_ENABLED=yes 22116 PRIMARY_FLAVOR=jit 22117else 22118 PRIMARY_FLAVOR=emu 22119fi 22120 22121 22122 22123 22124 22125 22126# 22127# Check for working poll(). 22128# 22129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working poll()" >&5 22130$as_echo_n "checking for working poll()... " >&6; } 22131if test "x$ac_cv_header_poll_h" != "xyes" -o "x$ac_cv_func_poll" != "xyes"; then 22132 22133poll_works=no 22134 22135else 22136 22137if test "$cross_compiling" = yes; then : 22138 22139case X$erl_xcomp_poll in 22140 X) poll_works=cross;; 22141 Xyes|Xno) poll_works=$erl_xcomp_poll;; 22142 *) as_fn_error $? "Bad erl_xcomp_poll value: $erl_xcomp_poll" "$LINENO" 5;; 22143esac 22144 22145else 22146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22147/* end confdefs.h. */ 22148 22149#include <poll.h> 22150main() 22151{ 22152#ifdef _POLL_EMUL_H_ 22153 exit(1); /* Implemented using select() -- fail */ 22154#else 22155 struct pollfd fds[1]; 22156 int fd; 22157 fd = open("/dev/null", 1); 22158 fds[0].fd = fd; 22159 fds[0].events = POLLIN; 22160 fds[0].revents = 0; 22161 if (poll(fds, 1, 0) < 0 || (fds[0].revents & POLLNVAL) != 0) { 22162 exit(1); /* Does not work for devices -- fail */ 22163 } 22164 exit(0); 22165#endif 22166} 22167 22168_ACEOF 22169if ac_fn_c_try_run "$LINENO"; then : 22170 poll_works=yes 22171else 22172 poll_works=no 22173fi 22174rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22175 conftest.$ac_objext conftest.beam conftest.$ac_ext 22176fi 22177 22178 22179fi 22180 22181case $poll_works-$host_os in 22182 no-*|cross-darwin*) 22183 # 22184 # The USE_SELECT define is used by the ssl application (should not 22185 # be used by erts). 22186 # 22187 22188$as_echo "#define USE_SELECT 1" >>confdefs.h 22189 22190 if test $poll_works = cross; then 22191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 22192$as_echo "cross" >&6; } 22193 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&5 22194$as_echo "$as_me: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&2;} 22195 else 22196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; non-existing, broken, or based on select()" >&5 22197$as_echo "no; non-existing, broken, or based on select()" >&6; } 22198 fi 22199 poll_works=no;; 22200 yes-*|cross-*) 22201 22202$as_echo "#define ERTS_USE_POLL 1" >>confdefs.h 22203 22204 if test $poll_works = cross; then 22205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 22206$as_echo "cross" >&6; } 22207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&5 22208$as_echo "$as_me: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&2;} 22209 else 22210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22211$as_echo "yes" >&6; } 22212 fi 22213 poll_works=yes;; 22214esac 22215 22216# 22217# If kqueue() found 22218# 22219if test $have_kernel_poll = kqueue; then 22220## Some OS X kernel version seems to have bugs in them with regards to kqueue 22221## Disable kernel poll on those versions 22222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host os has known kqueue bugs" >&5 22223$as_echo_n "checking whether host os has known kqueue bugs... " >&6; } 22224 case $host_os in 22225 # Any OS X version < 16 has known problems with using kqueue 22226 # so we don't use it there. See erl_poll.c for details. 22227 darwin[0-9].*|darwin1[0-5].*) 22228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, disabling kernel poll" >&5 22229$as_echo "yes, disabling kernel poll" >&6; } 22230 have_kernel_poll=no 22231 ;; 22232 *) 22233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22234$as_echo "no" >&6; } 22235 ;; 22236 esac 22237fi 22238# 22239# If epoll() found, check that it is level triggered. 22240# 22241if test $have_kernel_poll = epoll; then 22242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether epoll is level triggered" >&5 22243$as_echo_n "checking whether epoll is level triggered... " >&6; } 22244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22245/* end confdefs.h. */ 22246#include <sys/epoll.h> 22247int 22248main () 22249{ 22250 22251 #ifdef EPOLLET 22252 /* Edge triggered option exist, assume level triggered 22253 is default */ 22254 ; 22255 #else 22256 /* No edge triggered option exist; assume edge 22257 triggered only */ 22258 #error No EPOLLET 22259 #endif 22260 22261 ; 22262 return 0; 22263} 22264_ACEOF 22265if ac_fn_c_try_link "$LINENO"; then : 22266 level_triggered_epoll=yes 22267else 22268 level_triggered_epoll=no 22269 have_kernel_poll=no 22270fi 22271rm -f core conftest.err conftest.$ac_objext \ 22272 conftest$ac_exeext conftest.$ac_ext 22273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $level_triggered_epoll" >&5 22274$as_echo "$level_triggered_epoll" >&6; } 22275fi 22276# 22277# Check if we should enable kernel poll support 22278# 22279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel poll support should be enabled" >&5 22280$as_echo_n "checking whether kernel poll support should be enabled... " >&6; } 22281ERTS_ENABLE_KERNEL_POLL=no 22282ERTS_BUILD_FALLBACK_POLL=no 22283case $enable_kernel_poll-$have_kernel_poll in 22284 no-*) 22285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; disabled by user" >&5 22286$as_echo "no; disabled by user" >&6; };; 22287 yes-no) 22288 as_fn_error $? "no; kernel poll support requested but not found" "$LINENO" 5;; 22289 *-no) 22290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22291$as_echo "no" >&6; };; 22292 *) 22293 case $have_kernel_poll in 22294 epoll) 22295 22296$as_echo "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h 22297 22298 ERTS_BUILD_FALLBACK_POLL=yes 22299 ;; 22300 /dev/poll) 22301 22302$as_echo "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h 22303 22304 ;; 22305 kqueue) 22306 22307$as_echo "#define HAVE_SYS_EVENT_H 1" >>confdefs.h 22308 22309 ERTS_BUILD_FALLBACK_POLL=yes 22310 ;; 22311 *) 22312 as_fn_error $? "configure.in need to be updated" "$LINENO" 5;; 22313 esac 22314 ERTS_ENABLE_KERNEL_POLL=yes 22315 22316$as_echo "#define ERTS_ENABLE_KERNEL_POLL 1" >>confdefs.h 22317 22318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; $have_kernel_poll" >&5 22319$as_echo "yes; $have_kernel_poll" >&6; };; 22320esac 22321 22322 22323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether putenv() stores a copy of the key-value pair" >&5 22324$as_echo_n "checking whether putenv() stores a copy of the key-value pair... " >&6; } 22325if test "$cross_compiling" = yes; then : 22326 22327case X$erl_xcomp_putenv_copy in 22328 X) copying_putenv=cross;; 22329 Xyes|Xno) copying_putenv=$erl_xcomp_putenv_copy;; 22330 *) as_fn_error $? "Bad erl_xcomp_putenv_copy value: $erl_xcomp_putenv_copy" "$LINENO" 5;; 22331esac 22332 22333else 22334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22335/* end confdefs.h. */ 22336 22337#include <stdlib.h> 22338int main(void) { 22339 int i; 22340 char *env; 22341 char buf[10]; 22342 for (i = 0; i < 7; i++) 22343 buf[i] = 'X'; 22344 buf[i] = '\0'; 22345 buf[3] = '='; 22346 if (putenv(buf) != 0) 22347 return 1; 22348 for (i = 4; i < 7; i++) 22349 buf[i] = 'Y'; 22350 env = getenv("XXX"); 22351 if (!env) 22352 return 2; 22353 for (i = 0; i < 3; i++) 22354 if (env[i] != 'X') 22355 return 3; 22356 for (i = 0; i < 3; i++) 22357 buf[i] = 'Y'; 22358 env = getenv("XXX"); 22359 if (!env) 22360 return 4; 22361 for (i = 0; i < 3; i++) 22362 if (env[i] != 'X') 22363 return 5; 22364 return 0; 22365} 22366 22367_ACEOF 22368if ac_fn_c_try_run "$LINENO"; then : 22369 copying_putenv=yes 22370else 22371 copying_putenv=no 22372fi 22373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22374 conftest.$ac_objext conftest.beam conftest.$ac_ext 22375fi 22376 22377 22378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $copying_putenv" >&5 22379$as_echo "$copying_putenv" >&6; } 22380case $copying_putenv in 22381 yes) 22382 22383$as_echo "#define HAVE_COPYING_PUTENV 1" >>confdefs.h 22384;; 22385 cross) 22386 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 22387$as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; 22388 *) ;; 22389esac 22390 22391 22392 22393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a compiler that handles jumptables" >&5 22394$as_echo_n "checking for a compiler that handles jumptables... " >&6; } 22395if ${ac_cv_prog_emu_cc+:} false; then : 22396 $as_echo_n "(cached) " >&6 22397else 22398 22399cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22400/* end confdefs.h. */ 22401 22402int 22403main () 22404{ 22405 22406#if defined(__clang_major__) && __clang_major__ >= 3 22407 /* clang 3.x or later is fine */ 22408#elif defined(__llvm__) 22409#error "this version of llvm is unable to correctly compile beam_emu.c" 22410#endif 22411 __label__ lbl1; 22412 __label__ lbl2; 22413 extern int magic(void); 22414 int x = magic(); 22415 static void *jtab[2]; 22416 22417 jtab[0] = &&lbl1; 22418 jtab[1] = &&lbl2; 22419 goto *jtab[x]; 22420lbl1: 22421 return 1; 22422lbl2: 22423 return 2; 22424 22425 ; 22426 return 0; 22427} 22428_ACEOF 22429if ac_fn_c_try_compile "$LINENO"; then : 22430 ac_cv_prog_emu_cc="$CC" 22431else 22432 ac_cv_prog_emu_cc=no 22433fi 22434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22435 22436if test "$ac_cv_prog_emu_cc" = no; then 22437 for ac_progname in emu_cc.sh gcc-4.2 gcc; do 22438 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" 22439 ac_dummy="$PATH" 22440 for ac_dir in $ac_dummy; do 22441 test -z "$ac_dir" && ac_dir=. 22442 if test -f "$ac_dir/$ac_progname"; then 22443 ac_cv_prog_emu_cc="$ac_dir/$ac_progname" 22444 break 22445 fi 22446 done 22447 IFS="$ac_save_ifs" 22448 if test "$ac_cv_prog_emu_cc" != no; then 22449 break 22450 fi 22451 done 22452fi 22453 22454if test "$ac_cv_prog_emu_cc" != no; then 22455 save_CC="$CC" 22456 save_CFLAGS=$CFLAGS 22457 save_CPPFLAGS=$CPPFLAGS 22458 CC="$ac_cv_prog_emu_cc" 22459 CFLAGS="" 22460 CPPFLAGS="" 22461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22462/* end confdefs.h. */ 22463 22464int 22465main () 22466{ 22467 22468#if defined(__clang_major__) && __clang_major__ >= 3 22469 /* clang 3.x or later is fine */ 22470#elif defined(__llvm__) 22471#error "this version of llvm is unable to correctly compile beam_emu.c" 22472#endif 22473 __label__ lbl1; 22474 __label__ lbl2; 22475 extern int magic(void); 22476 int x = magic(); 22477 static void *jtab[2]; 22478 22479 jtab[0] = &&lbl1; 22480 jtab[1] = &&lbl2; 22481 goto *jtab[x]; 22482 lbl1: 22483 return 1; 22484 lbl2: 22485 return 2; 22486 22487 ; 22488 return 0; 22489} 22490_ACEOF 22491if ac_fn_c_try_compile "$LINENO"; then : 22492 ac_cv_prog_emu_cc="$CC" 22493else 22494 ac_cv_prog_emu_cc=no 22495fi 22496rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22497 CC=$save_CC 22498 CFLAGS=$save_CFLAGS 22499 CPPFLAGS=$save_CPPFLAGS 22500fi 22501 22502fi 22503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_emu_cc" >&5 22504$as_echo "$ac_cv_prog_emu_cc" >&6; } 22505if test "$ac_cv_prog_emu_cc" = no; then 22506 22507$as_echo "#define NO_JUMP_TABLE /**/" >>confdefs.h 22508 22509 EMU_CC="$CC" 22510else 22511 EMU_CC="$ac_cv_prog_emu_cc" 22512fi 22513 22514 22515 22516case $DYNAMIC_TRACE_FRAMEWORK in 22517 dtrace|systemtap) 22518 if test -n "$ac_tool_prefix"; then 22519 # Extract the first word of "${ac_tool_prefix}dtrace", so it can be a program name with args. 22520set dummy ${ac_tool_prefix}dtrace; ac_word=$2 22521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22522$as_echo_n "checking for $ac_word... " >&6; } 22523if ${ac_cv_prog_DTRACE+:} false; then : 22524 $as_echo_n "(cached) " >&6 22525else 22526 if test -n "$DTRACE"; then 22527 ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test. 22528else 22529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22530for as_dir in $PATH 22531do 22532 IFS=$as_save_IFS 22533 test -z "$as_dir" && as_dir=. 22534 for ac_exec_ext in '' $ac_executable_extensions; do 22535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 22536 ac_cv_prog_DTRACE="${ac_tool_prefix}dtrace" 22537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22538 break 2 22539 fi 22540done 22541 done 22542IFS=$as_save_IFS 22543 22544fi 22545fi 22546DTRACE=$ac_cv_prog_DTRACE 22547if test -n "$DTRACE"; then 22548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 22549$as_echo "$DTRACE" >&6; } 22550else 22551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22552$as_echo "no" >&6; } 22553fi 22554 22555 22556fi 22557if test -z "$ac_cv_prog_DTRACE"; then 22558 ac_ct_DTRACE=$DTRACE 22559 # Extract the first word of "dtrace", so it can be a program name with args. 22560set dummy dtrace; ac_word=$2 22561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22562$as_echo_n "checking for $ac_word... " >&6; } 22563if ${ac_cv_prog_ac_ct_DTRACE+:} false; then : 22564 $as_echo_n "(cached) " >&6 22565else 22566 if test -n "$ac_ct_DTRACE"; then 22567 ac_cv_prog_ac_ct_DTRACE="$ac_ct_DTRACE" # Let the user override the test. 22568else 22569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22570for as_dir in $PATH 22571do 22572 IFS=$as_save_IFS 22573 test -z "$as_dir" && as_dir=. 22574 for ac_exec_ext in '' $ac_executable_extensions; do 22575 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 22576 ac_cv_prog_ac_ct_DTRACE="dtrace" 22577 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22578 break 2 22579 fi 22580done 22581 done 22582IFS=$as_save_IFS 22583 22584fi 22585fi 22586ac_ct_DTRACE=$ac_cv_prog_ac_ct_DTRACE 22587if test -n "$ac_ct_DTRACE"; then 22588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DTRACE" >&5 22589$as_echo "$ac_ct_DTRACE" >&6; } 22590else 22591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22592$as_echo "no" >&6; } 22593fi 22594 22595 if test "x$ac_ct_DTRACE" = x; then 22596 DTRACE="none" 22597 else 22598 case $cross_compiling:$ac_tool_warned in 22599yes:) 22600{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 22601$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 22602ac_tool_warned=yes ;; 22603esac 22604 DTRACE=$ac_ct_DTRACE 22605 fi 22606else 22607 DTRACE="$ac_cv_prog_DTRACE" 22608fi 22609 22610 test "$DTRACE" = "none" && as_fn_error $? "No dtrace utility found." "$LINENO" 5; 22611 enable_lttng_test=no 22612 enable_dtrace_test=yes;; 22613 lttng) 22614 enable_lttng_test=yes 22615 enable_dtrace_test=no;; 22616 *) 22617 enable_lttng_test=no 22618 enable_dtrace_test=no;; 22619esac 22620 22621 22622 22623 22624 22625 22626DTRACE_CPP=-C 22627DTRACE_ENABLED= 22628DTRACE_ENABLED_2STEP= 22629DTRACE_2STEP_TEST=./dtrace-test.o 22630DTRACE_BITS_FLAG= 22631case $OPSYS in 22632 freebsd) 22633 if test "$BITS64" = "yes" ; then 22634 DTRACE_BITS_FLAG=-64 22635 else 22636 DTRACE_BITS_FLAG=-32 22637 fi 22638 ;; 22639 *) 22640 : # Nothing to do 22641 ;; 22642esac 22643if test "$enable_dtrace_test" = "yes" ; then 22644 if test "$DTRACE" = "dtrace" ; then 22645 for ac_header in sys/sdt.h 22646do : 22647 ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" 22648if test "x$ac_cv_header_sys_sdt_h" = xyes; then : 22649 cat >>confdefs.h <<_ACEOF 22650#define HAVE_SYS_SDT_H 1 22651_ACEOF 22652 22653fi 22654 22655done 22656 22657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 1-stage DTrace precompilation" >&5 22658$as_echo_n "checking for 1-stage DTrace precompilation... " >&6; } 22659 # The OS X version of dtrace prints a spurious line here. 22660 if ! dtrace -h $DTRACE_CPP -Iemulator/beam -o ./foo-dtrace.h -s emulator/beam/erlang_dtrace.d; then 22661 as_fn_error $? "Could not precompile erlang_dtrace.d: dtrace -h failed" "$LINENO" 5 22662 fi 22663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22664$as_echo "yes" >&6; } 22665 22666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 2-stage DTrace precompilation" >&5 22667$as_echo_n "checking for 2-stage DTrace precompilation... " >&6; } 22668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22669/* end confdefs.h. */ 22670 #include "foo-dtrace.h" 22671int 22672main () 22673{ 22674ERLANG_DIST_PORT_BUSY_ENABLED(); 22675 ; 22676 return 0; 22677} 22678_ACEOF 22679if ac_fn_c_try_compile "$LINENO"; then : 22680 rm -f $DTRACE_2STEP_TEST 22681 dtrace -G $DTRACE_CPP $DTRACE_BITS_FLAG -Iemulator/beam -o $DTRACE_2STEP_TEST -s emulator/beam/erlang_dtrace.d conftest.$OBJEXT 2>&5 22682 if test -f $DTRACE_2STEP_TEST; then 22683 rm -f $DTRACE_2STEP_TEST 22684 DTRACE_ENABLED_2STEP=yes 22685 fi 22686fi 22687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22688 rm -f foo-dtrace.h 22689 if test "x$DTRACE_ENABLED_2STEP" = "xyes"; then : 22690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22691$as_echo "yes" >&6; } 22692else 22693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22694$as_echo "no" >&6; } 22695fi 22696 22697 DTRACE_ENABLED=yes 22698 case $OPSYS in 22699 linux) 22700 : # No extra libs to add to LIBS 22701 ;; 22702 freebsd) 22703 LIBS="$LIBS -lelf" 22704 ;; 22705 *) 22706 LIBS="$LIBS -ldtrace" 22707 ;; 22708 esac 22709 else 22710 as_fn_error $? "Dtrace preprocessing test failed." "$LINENO" 5 22711 fi 22712fi 22713 22714if test "$enable_lttng_test" = "yes" ; then 22715 for ac_header in lttng/tracepoint.h 22716do : 22717 ac_fn_c_check_header_mongrel "$LINENO" "lttng/tracepoint.h" "ac_cv_header_lttng_tracepoint_h" "$ac_includes_default" 22718if test "x$ac_cv_header_lttng_tracepoint_h" = xyes; then : 22719 cat >>confdefs.h <<_ACEOF 22720#define HAVE_LTTNG_TRACEPOINT_H 1 22721_ACEOF 22722 22723fi 22724 22725done 22726 22727 for ac_header in lttng/tracepoint-event.h 22728do : 22729 ac_fn_c_check_header_mongrel "$LINENO" "lttng/tracepoint-event.h" "ac_cv_header_lttng_tracepoint_event_h" "$ac_includes_default" 22730if test "x$ac_cv_header_lttng_tracepoint_event_h" = xyes; then : 22731 cat >>confdefs.h <<_ACEOF 22732#define HAVE_LTTNG_TRACEPOINT_EVENT_H 1 22733_ACEOF 22734 22735fi 22736 22737done 22738 22739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tracepoint_enabled in lttng/tracepoint.h" >&5 22740$as_echo_n "checking for tracepoint_enabled in lttng/tracepoint.h... " >&6; } 22741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22742/* end confdefs.h. */ 22743#include <lttng/tracepoint.h> 22744 #define TRACEPOINT_PROVIDER org_erlang_otp 22745 TRACEPOINT_EVENT( 22746 org_erlang_otp, 22747 dummy, 22748 TP_ARGS(int, my_int), 22749 TP_FIELDS(ctf_integer(int, my_int, my_int))) 22750 #define TRACEPOINT_CREATE_PROBES 22751 #define TRACEPOINT_DEFINE 22752int 22753main () 22754{ 22755if(tracepoint_enabled(org_erlang_otp,dummy)) do {} while(0) 22756 ; 22757 return 0; 22758} 22759_ACEOF 22760if ac_fn_c_try_compile "$LINENO"; then : 22761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22762$as_echo "yes" >&6; } 22763else 22764 as_fn_error $? "no (available in lttng-ust v2.7)" "$LINENO" 5 22765fi 22766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22767 if test "x$ac_cv_header_lttng_tracepoint_h" = "xyes" \ 22768 -a "x$ac_cv_header_lttng_tracepoint_event_h" = "xyes"; then 22769 # No straight forward way to test for liblttng-ust when no public symbol exists, 22770 # just add the lib. 22771 LIBS="$LIBS -llttng-ust -ldl" 22772 else 22773 as_fn_error $? "No LTTng support found." "$LINENO" 5 22774 fi 22775fi 22776 22777 22778#-------------------------------------------------------------------- 22779# Os mon stuff. 22780#-------------------------------------------------------------------- 22781 22782 22783 22784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 22785$as_echo_n "checking for kstat_open in -lkstat... " >&6; } 22786if ${ac_cv_lib_kstat_kstat_open+:} false; then : 22787 $as_echo_n "(cached) " >&6 22788else 22789 ac_check_lib_save_LIBS=$LIBS 22790LIBS="-lkstat $LIBS" 22791cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22792/* end confdefs.h. */ 22793 22794/* Override any GCC internal prototype to avoid an error. 22795 Use char because int might match the return type of a GCC 22796 builtin and then its argument prototype would still apply. */ 22797#ifdef __cplusplus 22798extern "C" 22799#endif 22800char kstat_open (); 22801int 22802main () 22803{ 22804return kstat_open (); 22805 ; 22806 return 0; 22807} 22808_ACEOF 22809if ac_fn_c_try_link "$LINENO"; then : 22810 ac_cv_lib_kstat_kstat_open=yes 22811else 22812 ac_cv_lib_kstat_kstat_open=no 22813fi 22814rm -f core conftest.err conftest.$ac_objext \ 22815 conftest$ac_exeext conftest.$ac_ext 22816LIBS=$ac_check_lib_save_LIBS 22817fi 22818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 22819$as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } 22820if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : 22821 22822 use_cpu_sup=yes 22823 CPU_SUP_LIBS="$CPU_SUP_LIBS -lkstat" 22824 22825fi 22826 22827 22828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 22829$as_echo_n "checking for kvm_open in -lkvm... " >&6; } 22830if ${ac_cv_lib_kvm_kvm_open+:} false; then : 22831 $as_echo_n "(cached) " >&6 22832else 22833 ac_check_lib_save_LIBS=$LIBS 22834LIBS="-lkvm $LIBS" 22835cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22836/* end confdefs.h. */ 22837 22838/* Override any GCC internal prototype to avoid an error. 22839 Use char because int might match the return type of a GCC 22840 builtin and then its argument prototype would still apply. */ 22841#ifdef __cplusplus 22842extern "C" 22843#endif 22844char kvm_open (); 22845int 22846main () 22847{ 22848return kvm_open (); 22849 ; 22850 return 0; 22851} 22852_ACEOF 22853if ac_fn_c_try_link "$LINENO"; then : 22854 ac_cv_lib_kvm_kvm_open=yes 22855else 22856 ac_cv_lib_kvm_kvm_open=no 22857fi 22858rm -f core conftest.err conftest.$ac_objext \ 22859 conftest$ac_exeext conftest.$ac_ext 22860LIBS=$ac_check_lib_save_LIBS 22861fi 22862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 22863$as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } 22864if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : 22865 22866 use_cpu_sup=yes 22867 CPU_SUP_LIBS="$CPU_SUP_LIBS -lkvm" 22868 22869fi 22870 22871 22872case $host_os in 22873 solaris2*) 22874 os_mon_programs="$os_mon_programs ferrule mod_syslog" ;; 22875 darwin*) 22876 use_cpu_sup=yes ;; 22877 openbsd*) 22878 use_cpu_sup=yes ;; 22879 linux*) 22880 use_cpu_sup=yes ;; 22881 freebsd*) 22882 use_cpu_sup=yes ;; 22883esac 22884 22885if test "$use_cpu_sup" = "yes"; then 22886 os_mon_programs="$os_mon_programs cpu_sup" 22887fi 22888 22889 22890# Check whether --with-javac was given. 22891if test "${with_javac+set}" = set; then : 22892 withval=$with_javac; 22893fi 22894 22895 22896need_java="jinterface" 22897 22898if test -d $ERL_TOP/lib/ic; then 22899 need_java="$need_java ic/java_src" 22900fi 22901 22902# Remove all SKIP files from previous runs 22903for a in $need_java ; do 22904 rm -f $ERL_TOP/lib/$a/SKIP 22905done 22906 22907if test "X$with_javac" = "Xno"; then 22908 for a in $need_java ; do 22909 echo "Java compiler disabled by user" > $ERL_TOP/lib/$a/SKIP 22910 done 22911 22912else # begin - try to find javac 22913 22914if test "X$with_javac" != "Xyes" -a "X$with_javac" != "X"; then 22915 check_javac=$with_javac 22916else 22917 check_javac="javac.sh javac guavac gcj jikes bock" 22918fi 22919 22920for ac_prog in $check_javac 22921do 22922 # Extract the first word of "$ac_prog", so it can be a program name with args. 22923set dummy $ac_prog; ac_word=$2 22924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 22925$as_echo_n "checking for $ac_word... " >&6; } 22926if ${ac_cv_prog_JAVAC+:} false; then : 22927 $as_echo_n "(cached) " >&6 22928else 22929 if test -n "$JAVAC"; then 22930 ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. 22931else 22932as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 22933for as_dir in $PATH 22934do 22935 IFS=$as_save_IFS 22936 test -z "$as_dir" && as_dir=. 22937 for ac_exec_ext in '' $ac_executable_extensions; do 22938 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 22939 ac_cv_prog_JAVAC="$ac_prog" 22940 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 22941 break 2 22942 fi 22943done 22944 done 22945IFS=$as_save_IFS 22946 22947fi 22948fi 22949JAVAC=$ac_cv_prog_JAVAC 22950if test -n "$JAVAC"; then 22951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 22952$as_echo "$JAVAC" >&6; } 22953else 22954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22955$as_echo "no" >&6; } 22956fi 22957 22958 22959 test -n "$JAVAC" && break 22960done 22961 22962if test -n "$JAVAC"; then 22963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JDK version 1.6" >&5 22964$as_echo_n "checking for JDK version 1.6... " >&6; } 22965if ${ac_cv_prog_javac_ver_1_6+:} false; then : 22966 $as_echo_n "(cached) " >&6 22967else 22968 java_link='$JAVAC conftest.java 1>&5' 22969cat > conftest.java <<EOF 22970 22971class conftest { public static void main(String[] args) { 22972 for (String i : args); 22973 ; return; }} 22974EOF 22975if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$java_link\""; } >&5 22976 (eval $java_link) 2>&5 22977 ac_status=$? 22978 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 22979 test $ac_status = 0; } && test -s conftest.class; then 22980 rm -rf conftest* 22981 ac_cv_prog_javac_ver_1_6=yes 22982else 22983 echo "configure: failed program was:" 1>&5 22984 cat conftest.java 1>&5 22985 echo "configure: PATH was $PATH" 1>&5 22986 rm -rf conftest* 22987 ac_cv_prog_javac_ver_1_6=no 22988fi 22989rm -f conftest* 22990fi 22991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_ver_1_6" >&5 22992$as_echo "$ac_cv_prog_javac_ver_1_6" >&6; } 22993 if test $ac_cv_prog_javac_ver_1_6 = no; then 22994 unset -v JAVAC 22995 fi 22996fi 22997if test -z "$JAVAC"; then 22998 22999 if test "X$with_javac" != "X"; then 23000 as_fn_error $? "No java compiler found in PATH (checked for $check_javac)" "$LINENO" 5 23001 fi 23002 23003 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find any usable java compiler, will skip: jinterface" >&5 23004$as_echo "$as_me: WARNING: Could not find any usable java compiler, will skip: jinterface" >&2;} 23005 23006 for a in $need_java ; do 23007 echo "No Java compiler found" > $ERL_TOP/lib/$a/SKIP 23008 done 23009fi 23010 23011fi # end - try to find javac 23012 23013 23014if test -n "$ac_tool_prefix"; then 23015 for ac_prog in $CCC c++ g++ CC cxx cc++ cl 23016 do 23017 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 23018set dummy $ac_tool_prefix$ac_prog; ac_word=$2 23019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23020$as_echo_n "checking for $ac_word... " >&6; } 23021if ${ac_cv_prog_CXX+:} false; then : 23022 $as_echo_n "(cached) " >&6 23023else 23024 if test -n "$CXX"; then 23025 ac_cv_prog_CXX="$CXX" # Let the user override the test. 23026else 23027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23028for as_dir in $PATH 23029do 23030 IFS=$as_save_IFS 23031 test -z "$as_dir" && as_dir=. 23032 for ac_exec_ext in '' $ac_executable_extensions; do 23033 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 23034 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 23035 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23036 break 2 23037 fi 23038done 23039 done 23040IFS=$as_save_IFS 23041 23042fi 23043fi 23044CXX=$ac_cv_prog_CXX 23045if test -n "$CXX"; then 23046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 23047$as_echo "$CXX" >&6; } 23048else 23049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23050$as_echo "no" >&6; } 23051fi 23052 23053 23054 test -n "$CXX" && break 23055 done 23056fi 23057if test -z "$CXX"; then 23058 ac_ct_CXX=$CXX 23059 for ac_prog in $CCC c++ g++ CC cxx cc++ cl 23060do 23061 # Extract the first word of "$ac_prog", so it can be a program name with args. 23062set dummy $ac_prog; ac_word=$2 23063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 23064$as_echo_n "checking for $ac_word... " >&6; } 23065if ${ac_cv_prog_ac_ct_CXX+:} false; then : 23066 $as_echo_n "(cached) " >&6 23067else 23068 if test -n "$ac_ct_CXX"; then 23069 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 23070else 23071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23072for as_dir in $PATH 23073do 23074 IFS=$as_save_IFS 23075 test -z "$as_dir" && as_dir=. 23076 for ac_exec_ext in '' $ac_executable_extensions; do 23077 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 23078 ac_cv_prog_ac_ct_CXX="$ac_prog" 23079 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 23080 break 2 23081 fi 23082done 23083 done 23084IFS=$as_save_IFS 23085 23086fi 23087fi 23088ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 23089if test -n "$ac_ct_CXX"; then 23090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 23091$as_echo "$ac_ct_CXX" >&6; } 23092else 23093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 23094$as_echo "no" >&6; } 23095fi 23096 23097 23098 test -n "$ac_ct_CXX" && break 23099done 23100 23101 if test "x$ac_ct_CXX" = x; then 23102 CXX="false" 23103 else 23104 case $cross_compiling:$ac_tool_warned in 23105yes:) 23106{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 23107$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 23108ac_tool_warned=yes ;; 23109esac 23110 CXX=$ac_ct_CXX 23111 fi 23112fi 23113 23114 23115# Remove SKIP file from previous run 23116rm -f $ERL_TOP/lib/orber/SKIP 23117 23118if test "$CXX" = false; then 23119 echo "No C++ compiler found" > $ERL_TOP/lib/orber/SKIP 23120fi 23121 23122CFLAGS="$CFLAGS $CPPFLAGS" 23123 23124# 23125# Currently if we compile for 64 bits we want to compile 23126# some external port programs using 32 bits 23127# 23128 23129# If not defined we trust the C compiler in $CC to do 32 bits 23130if test -z "$CC32"; then 23131 CC32="$CC" 23132fi 23133 23134if test -z "$CFLAGS32"; then 23135 if test $ac_cv_sizeof_void_p != 4; then 23136 # We are compiling default 64 bits and use -m32 for 32 bit compilations 23137 CFLAGS32="$CFLAGS -m32" 23138 else 23139 CFLAGS32="$CFLAGS" 23140 fi 23141fi 23142 23143 23144 23145 23146 23147 23148cat >>confdefs.h <<_ACEOF 23149#define ERTS_EMU_CMDLINE_FLAGS "$STATIC_CFLAGS $CFLAGS $DEBUG_CFLAGS $EMU_THR_DEFS $DEFS $WERRORFLAGS $WFLAGS" 23150_ACEOF 23151 23152 23153 23154 23155 23156erts=${erl_top}/erts 23157 23158erts_dirs=" 23159 $erts/obj $erts/obj.debug 23160 23161 $erts/obj/$host 23162 $erts/obj.debug/$host 23163 23164" 23165for d in ${erl_top}/bin ${erl_top}/bin/$host $erts_dirs ; 23166do 23167 if test ! -d $d; then 23168 mkdir -p 1>/dev/null 2>&1 $d 23169 fi 23170done 23171 23172 23173 23174 23175 23176for ac_func in log2 23177do : 23178 ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2" 23179if test "x$ac_cv_func_log2" = xyes; then : 23180 cat >>confdefs.h <<_ACEOF 23181#define HAVE_LOG2 1 23182_ACEOF 23183 23184fi 23185done 23186 23187 23188 23189saved_CFLAGS="$CFLAGS" 23190CFLAGS="-Werror $CFLAGS" 23191cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23192/* end confdefs.h. */ 23193 23194int 23195main () 23196{ 23197_Pragma("GCC diagnostic push") 23198 _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") 23199 _Pragma("GCC diagnostic pop") 23200 23201 ; 23202 return 0; 23203} 23204_ACEOF 23205if ac_fn_c_try_compile "$LINENO"; then : 23206 23207$as_echo "#define HAVE_GCC_DIAG_IGNORE_WADDRESS_OF_PACKED_MEMBER 1" >>confdefs.h 23208 23209fi 23210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23211CFLAGS="$saved_CFLAGS" 23212 23213 23214 23215if test "x$GCC" = xyes; then 23216 CFLAGS="$WERRORFLAGS $CFLAGS" 23217fi 23218 23219 23220 23221# Check whether --enable-sanitizers was given. 23222if test "${enable_sanitizers+set}" = set; then : 23223 enableval=$enable_sanitizers; 23224case "$enableval" in 23225 no) sanitizers= ;; 23226 yes) sanitizers="-fsanitize=address,undefined" ;; 23227 *) sanitizers="-fsanitize=$enableval" ;; 23228esac 23229CFLAGS="$CFLAGS $sanitizers" 23230LDFLAGS="$LDFLAGS $sanitizers" 23231 23232fi 23233 23234 23235 23236ac_config_files="$ac_config_files emulator/$host/Makefile:emulator/Makefile.in epmd/src/$host/Makefile:epmd/src/Makefile.in etc/common/$host/Makefile:etc/common/Makefile.in include/internal/$host/ethread.mk:include/internal/ethread.mk.in include/internal/$host/erts_internal.mk:include/internal/erts_internal.mk.in lib_src/$host/Makefile:lib_src/Makefile.in ../make/$host/otp.mk:../make/otp.mk.in" 23237 23238 23239ac_config_files="$ac_config_files ../make/make_emakefile:../make/make_emakefile.in" 23240 23241 23242ac_config_files="$ac_config_files ../lib/os_mon/c_src/$host/Makefile:../lib/os_mon/c_src/Makefile.in ../lib/runtime_tools/c_src/$host/Makefile:../lib/runtime_tools/c_src/Makefile.in ../lib/tools/c_src/$host/Makefile:../lib/tools/c_src/Makefile.in" 23243 23244 23245ac_config_files="$ac_config_files ../make/install_dir_data.sh:../make/install_dir_data.sh.in" 23246 23247 23248cat >confcache <<\_ACEOF 23249# This file is a shell script that caches the results of configure 23250# tests run on this system so they can be shared between configure 23251# scripts and configure runs, see configure's option --config-cache. 23252# It is not useful on other systems. If it contains results you don't 23253# want to keep, you may remove or edit it. 23254# 23255# config.status only pays attention to the cache file if you give it 23256# the --recheck option to rerun configure. 23257# 23258# `ac_cv_env_foo' variables (set or unset) will be overridden when 23259# loading this file, other *unset* `ac_cv_foo' will be assigned the 23260# following values. 23261 23262_ACEOF 23263 23264# The following way of writing the cache mishandles newlines in values, 23265# but we know of no workaround that is simple, portable, and efficient. 23266# So, we kill variables containing newlines. 23267# Ultrix sh set writes to stderr and can't be redirected directly, 23268# and sets the high bit in the cache file unless we assign to the vars. 23269( 23270 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 23271 eval ac_val=\$$ac_var 23272 case $ac_val in #( 23273 *${as_nl}*) 23274 case $ac_var in #( 23275 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 23276$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 23277 esac 23278 case $ac_var in #( 23279 _ | IFS | as_nl) ;; #( 23280 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 23281 *) { eval $ac_var=; unset $ac_var;} ;; 23282 esac ;; 23283 esac 23284 done 23285 23286 (set) 2>&1 | 23287 case $as_nl`(ac_space=' '; set) 2>&1` in #( 23288 *${as_nl}ac_space=\ *) 23289 # `set' does not quote correctly, so add quotes: double-quote 23290 # substitution turns \\\\ into \\, and sed turns \\ into \. 23291 sed -n \ 23292 "s/'/'\\\\''/g; 23293 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 23294 ;; #( 23295 *) 23296 # `set' quotes correctly as required by POSIX, so do not add quotes. 23297 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 23298 ;; 23299 esac | 23300 sort 23301) | 23302 sed ' 23303 /^ac_cv_env_/b end 23304 t clear 23305 :clear 23306 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 23307 t end 23308 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 23309 :end' >>confcache 23310if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 23311 if test -w "$cache_file"; then 23312 if test "x$cache_file" != "x/dev/null"; then 23313 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 23314$as_echo "$as_me: updating cache $cache_file" >&6;} 23315 if test ! -f "$cache_file" || test -h "$cache_file"; then 23316 cat confcache >"$cache_file" 23317 else 23318 case $cache_file in #( 23319 */* | ?:*) 23320 mv -f confcache "$cache_file"$$ && 23321 mv -f "$cache_file"$$ "$cache_file" ;; #( 23322 *) 23323 mv -f confcache "$cache_file" ;; 23324 esac 23325 fi 23326 fi 23327 else 23328 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 23329$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 23330 fi 23331fi 23332rm -f confcache 23333 23334test "x$prefix" = xNONE && prefix=$ac_default_prefix 23335# Let make expand exec_prefix. 23336test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 23337 23338DEFS=-DHAVE_CONFIG_H 23339 23340ac_libobjs= 23341ac_ltlibobjs= 23342U= 23343for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 23344 # 1. Remove the extension, and $U if already installed. 23345 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 23346 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 23347 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 23348 # will be set to the directory where LIBOBJS objects are built. 23349 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 23350 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 23351done 23352LIBOBJS=$ac_libobjs 23353 23354LTLIBOBJS=$ac_ltlibobjs 23355 23356 23357 23358 23359 23360: "${CONFIG_STATUS=./config.status}" 23361ac_write_fail=0 23362ac_clean_files_save=$ac_clean_files 23363ac_clean_files="$ac_clean_files $CONFIG_STATUS" 23364{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 23365$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 23366as_write_fail=0 23367cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 23368#! $SHELL 23369# Generated by $as_me. 23370# Run this file to recreate the current configuration. 23371# Compiler output produced by configure, useful for debugging 23372# configure, is in config.log if it exists. 23373 23374debug=false 23375ac_cs_recheck=false 23376ac_cs_silent=false 23377 23378SHELL=\${CONFIG_SHELL-$SHELL} 23379export SHELL 23380_ASEOF 23381cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 23382## -------------------- ## 23383## M4sh Initialization. ## 23384## -------------------- ## 23385 23386# Be more Bourne compatible 23387DUALCASE=1; export DUALCASE # for MKS sh 23388if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 23389 emulate sh 23390 NULLCMD=: 23391 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 23392 # is contrary to our usage. Disable this feature. 23393 alias -g '${1+"$@"}'='"$@"' 23394 setopt NO_GLOB_SUBST 23395else 23396 case `(set -o) 2>/dev/null` in #( 23397 *posix*) : 23398 set -o posix ;; #( 23399 *) : 23400 ;; 23401esac 23402fi 23403 23404 23405as_nl=' 23406' 23407export as_nl 23408# Printing a long string crashes Solaris 7 /usr/bin/printf. 23409as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 23410as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 23411as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 23412# Prefer a ksh shell builtin over an external printf program on Solaris, 23413# but without wasting forks for bash or zsh. 23414if test -z "$BASH_VERSION$ZSH_VERSION" \ 23415 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 23416 as_echo='print -r --' 23417 as_echo_n='print -rn --' 23418elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 23419 as_echo='printf %s\n' 23420 as_echo_n='printf %s' 23421else 23422 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 23423 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 23424 as_echo_n='/usr/ucb/echo -n' 23425 else 23426 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 23427 as_echo_n_body='eval 23428 arg=$1; 23429 case $arg in #( 23430 *"$as_nl"*) 23431 expr "X$arg" : "X\\(.*\\)$as_nl"; 23432 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 23433 esac; 23434 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 23435 ' 23436 export as_echo_n_body 23437 as_echo_n='sh -c $as_echo_n_body as_echo' 23438 fi 23439 export as_echo_body 23440 as_echo='sh -c $as_echo_body as_echo' 23441fi 23442 23443# The user is always right. 23444if test "${PATH_SEPARATOR+set}" != set; then 23445 PATH_SEPARATOR=: 23446 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 23447 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 23448 PATH_SEPARATOR=';' 23449 } 23450fi 23451 23452 23453# IFS 23454# We need space, tab and new line, in precisely that order. Quoting is 23455# there to prevent editors from complaining about space-tab. 23456# (If _AS_PATH_WALK were called with IFS unset, it would disable word 23457# splitting by setting IFS to empty value.) 23458IFS=" "" $as_nl" 23459 23460# Find who we are. Look in the path if we contain no directory separator. 23461as_myself= 23462case $0 in #(( 23463 *[\\/]* ) as_myself=$0 ;; 23464 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 23465for as_dir in $PATH 23466do 23467 IFS=$as_save_IFS 23468 test -z "$as_dir" && as_dir=. 23469 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 23470 done 23471IFS=$as_save_IFS 23472 23473 ;; 23474esac 23475# We did not find ourselves, most probably we were run as `sh COMMAND' 23476# in which case we are not to be found in the path. 23477if test "x$as_myself" = x; then 23478 as_myself=$0 23479fi 23480if test ! -f "$as_myself"; then 23481 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 23482 exit 1 23483fi 23484 23485# Unset variables that we do not need and which cause bugs (e.g. in 23486# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 23487# suppresses any "Segmentation fault" message there. '((' could 23488# trigger a bug in pdksh 5.2.14. 23489for as_var in BASH_ENV ENV MAIL MAILPATH 23490do eval test x\${$as_var+set} = xset \ 23491 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 23492done 23493PS1='$ ' 23494PS2='> ' 23495PS4='+ ' 23496 23497# NLS nuisances. 23498LC_ALL=C 23499export LC_ALL 23500LANGUAGE=C 23501export LANGUAGE 23502 23503# CDPATH. 23504(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 23505 23506 23507# as_fn_error STATUS ERROR [LINENO LOG_FD] 23508# ---------------------------------------- 23509# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 23510# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 23511# script with STATUS, using 1 if that was 0. 23512as_fn_error () 23513{ 23514 as_status=$1; test $as_status -eq 0 && as_status=1 23515 if test "$4"; then 23516 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 23517 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 23518 fi 23519 $as_echo "$as_me: error: $2" >&2 23520 as_fn_exit $as_status 23521} # as_fn_error 23522 23523 23524# as_fn_set_status STATUS 23525# ----------------------- 23526# Set $? to STATUS, without forking. 23527as_fn_set_status () 23528{ 23529 return $1 23530} # as_fn_set_status 23531 23532# as_fn_exit STATUS 23533# ----------------- 23534# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 23535as_fn_exit () 23536{ 23537 set +e 23538 as_fn_set_status $1 23539 exit $1 23540} # as_fn_exit 23541 23542# as_fn_unset VAR 23543# --------------- 23544# Portably unset VAR. 23545as_fn_unset () 23546{ 23547 { eval $1=; unset $1;} 23548} 23549as_unset=as_fn_unset 23550# as_fn_append VAR VALUE 23551# ---------------------- 23552# Append the text in VALUE to the end of the definition contained in VAR. Take 23553# advantage of any shell optimizations that allow amortized linear growth over 23554# repeated appends, instead of the typical quadratic growth present in naive 23555# implementations. 23556if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 23557 eval 'as_fn_append () 23558 { 23559 eval $1+=\$2 23560 }' 23561else 23562 as_fn_append () 23563 { 23564 eval $1=\$$1\$2 23565 } 23566fi # as_fn_append 23567 23568# as_fn_arith ARG... 23569# ------------------ 23570# Perform arithmetic evaluation on the ARGs, and store the result in the 23571# global $as_val. Take advantage of shells that can avoid forks. The arguments 23572# must be portable across $(()) and expr. 23573if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 23574 eval 'as_fn_arith () 23575 { 23576 as_val=$(( $* )) 23577 }' 23578else 23579 as_fn_arith () 23580 { 23581 as_val=`expr "$@" || test $? -eq 1` 23582 } 23583fi # as_fn_arith 23584 23585 23586if expr a : '\(a\)' >/dev/null 2>&1 && 23587 test "X`expr 00001 : '.*\(...\)'`" = X001; then 23588 as_expr=expr 23589else 23590 as_expr=false 23591fi 23592 23593if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 23594 as_basename=basename 23595else 23596 as_basename=false 23597fi 23598 23599if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 23600 as_dirname=dirname 23601else 23602 as_dirname=false 23603fi 23604 23605as_me=`$as_basename -- "$0" || 23606$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 23607 X"$0" : 'X\(//\)$' \| \ 23608 X"$0" : 'X\(/\)' \| . 2>/dev/null || 23609$as_echo X/"$0" | 23610 sed '/^.*\/\([^/][^/]*\)\/*$/{ 23611 s//\1/ 23612 q 23613 } 23614 /^X\/\(\/\/\)$/{ 23615 s//\1/ 23616 q 23617 } 23618 /^X\/\(\/\).*/{ 23619 s//\1/ 23620 q 23621 } 23622 s/.*/./; q'` 23623 23624# Avoid depending upon Character Ranges. 23625as_cr_letters='abcdefghijklmnopqrstuvwxyz' 23626as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 23627as_cr_Letters=$as_cr_letters$as_cr_LETTERS 23628as_cr_digits='0123456789' 23629as_cr_alnum=$as_cr_Letters$as_cr_digits 23630 23631ECHO_C= ECHO_N= ECHO_T= 23632case `echo -n x` in #((((( 23633-n*) 23634 case `echo 'xy\c'` in 23635 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 23636 xy) ECHO_C='\c';; 23637 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 23638 ECHO_T=' ';; 23639 esac;; 23640*) 23641 ECHO_N='-n';; 23642esac 23643 23644rm -f conf$$ conf$$.exe conf$$.file 23645if test -d conf$$.dir; then 23646 rm -f conf$$.dir/conf$$.file 23647else 23648 rm -f conf$$.dir 23649 mkdir conf$$.dir 2>/dev/null 23650fi 23651if (echo >conf$$.file) 2>/dev/null; then 23652 if ln -s conf$$.file conf$$ 2>/dev/null; then 23653 as_ln_s='ln -s' 23654 # ... but there are two gotchas: 23655 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 23656 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 23657 # In both cases, we have to default to `cp -pR'. 23658 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 23659 as_ln_s='cp -pR' 23660 elif ln conf$$.file conf$$ 2>/dev/null; then 23661 as_ln_s=ln 23662 else 23663 as_ln_s='cp -pR' 23664 fi 23665else 23666 as_ln_s='cp -pR' 23667fi 23668rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 23669rmdir conf$$.dir 2>/dev/null 23670 23671 23672# as_fn_mkdir_p 23673# ------------- 23674# Create "$as_dir" as a directory, including parents if necessary. 23675as_fn_mkdir_p () 23676{ 23677 23678 case $as_dir in #( 23679 -*) as_dir=./$as_dir;; 23680 esac 23681 test -d "$as_dir" || eval $as_mkdir_p || { 23682 as_dirs= 23683 while :; do 23684 case $as_dir in #( 23685 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 23686 *) as_qdir=$as_dir;; 23687 esac 23688 as_dirs="'$as_qdir' $as_dirs" 23689 as_dir=`$as_dirname -- "$as_dir" || 23690$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 23691 X"$as_dir" : 'X\(//\)[^/]' \| \ 23692 X"$as_dir" : 'X\(//\)$' \| \ 23693 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 23694$as_echo X"$as_dir" | 23695 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 23696 s//\1/ 23697 q 23698 } 23699 /^X\(\/\/\)[^/].*/{ 23700 s//\1/ 23701 q 23702 } 23703 /^X\(\/\/\)$/{ 23704 s//\1/ 23705 q 23706 } 23707 /^X\(\/\).*/{ 23708 s//\1/ 23709 q 23710 } 23711 s/.*/./; q'` 23712 test -d "$as_dir" && break 23713 done 23714 test -z "$as_dirs" || eval "mkdir $as_dirs" 23715 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 23716 23717 23718} # as_fn_mkdir_p 23719if mkdir -p . 2>/dev/null; then 23720 as_mkdir_p='mkdir -p "$as_dir"' 23721else 23722 test -d ./-p && rmdir ./-p 23723 as_mkdir_p=false 23724fi 23725 23726 23727# as_fn_executable_p FILE 23728# ----------------------- 23729# Test if FILE is an executable regular file. 23730as_fn_executable_p () 23731{ 23732 test -f "$1" && test -x "$1" 23733} # as_fn_executable_p 23734as_test_x='test -x' 23735as_executable_p=as_fn_executable_p 23736 23737# Sed expression to map a string onto a valid CPP name. 23738as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 23739 23740# Sed expression to map a string onto a valid variable name. 23741as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 23742 23743 23744exec 6>&1 23745## ----------------------------------- ## 23746## Main body of $CONFIG_STATUS script. ## 23747## ----------------------------------- ## 23748_ASEOF 23749test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 23750 23751cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 23752# Save the log message, to keep $0 and so on meaningful, and to 23753# report actual input values of CONFIG_FILES etc. instead of their 23754# values after options handling. 23755ac_log=" 23756This file was extended by $as_me, which was 23757generated by GNU Autoconf 2.69. Invocation command line was 23758 23759 CONFIG_FILES = $CONFIG_FILES 23760 CONFIG_HEADERS = $CONFIG_HEADERS 23761 CONFIG_LINKS = $CONFIG_LINKS 23762 CONFIG_COMMANDS = $CONFIG_COMMANDS 23763 $ $0 $@ 23764 23765on `(hostname || uname -n) 2>/dev/null | sed 1q` 23766" 23767 23768_ACEOF 23769 23770case $ac_config_files in *" 23771"*) set x $ac_config_files; shift; ac_config_files=$*;; 23772esac 23773 23774case $ac_config_headers in *" 23775"*) set x $ac_config_headers; shift; ac_config_headers=$*;; 23776esac 23777 23778 23779cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 23780# Files that config.status was made for. 23781config_files="$ac_config_files" 23782config_headers="$ac_config_headers" 23783 23784_ACEOF 23785 23786cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 23787ac_cs_usage="\ 23788\`$as_me' instantiates files and other configuration actions 23789from templates according to the current configuration. Unless the files 23790and actions are specified as TAGs, all are instantiated by default. 23791 23792Usage: $0 [OPTION]... [TAG]... 23793 23794 -h, --help print this help, then exit 23795 -V, --version print version number and configuration settings, then exit 23796 --config print configuration, then exit 23797 -q, --quiet, --silent 23798 do not print progress messages 23799 -d, --debug don't remove temporary files 23800 --recheck update $as_me by reconfiguring in the same conditions 23801 --file=FILE[:TEMPLATE] 23802 instantiate the configuration file FILE 23803 --header=FILE[:TEMPLATE] 23804 instantiate the configuration header FILE 23805 23806Configuration files: 23807$config_files 23808 23809Configuration headers: 23810$config_headers 23811 23812Report bugs to the package provider." 23813 23814_ACEOF 23815cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 23816ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 23817ac_cs_version="\\ 23818config.status 23819configured by $0, generated by GNU Autoconf 2.69, 23820 with options \\"\$ac_cs_config\\" 23821 23822Copyright (C) 2012 Free Software Foundation, Inc. 23823This config.status script is free software; the Free Software Foundation 23824gives unlimited permission to copy, distribute and modify it." 23825 23826ac_pwd='$ac_pwd' 23827srcdir='$srcdir' 23828INSTALL='$INSTALL' 23829test -n "\$AWK" || AWK=awk 23830_ACEOF 23831 23832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 23833# The default lists apply if the user does not specify any file. 23834ac_need_defaults=: 23835while test $# != 0 23836do 23837 case $1 in 23838 --*=?*) 23839 ac_option=`expr "X$1" : 'X\([^=]*\)='` 23840 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 23841 ac_shift=: 23842 ;; 23843 --*=) 23844 ac_option=`expr "X$1" : 'X\([^=]*\)='` 23845 ac_optarg= 23846 ac_shift=: 23847 ;; 23848 *) 23849 ac_option=$1 23850 ac_optarg=$2 23851 ac_shift=shift 23852 ;; 23853 esac 23854 23855 case $ac_option in 23856 # Handling of the options. 23857 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 23858 ac_cs_recheck=: ;; 23859 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 23860 $as_echo "$ac_cs_version"; exit ;; 23861 --config | --confi | --conf | --con | --co | --c ) 23862 $as_echo "$ac_cs_config"; exit ;; 23863 --debug | --debu | --deb | --de | --d | -d ) 23864 debug=: ;; 23865 --file | --fil | --fi | --f ) 23866 $ac_shift 23867 case $ac_optarg in 23868 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 23869 '') as_fn_error $? "missing file argument" ;; 23870 esac 23871 as_fn_append CONFIG_FILES " '$ac_optarg'" 23872 ac_need_defaults=false;; 23873 --header | --heade | --head | --hea ) 23874 $ac_shift 23875 case $ac_optarg in 23876 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 23877 esac 23878 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 23879 ac_need_defaults=false;; 23880 --he | --h) 23881 # Conflict between --help and --header 23882 as_fn_error $? "ambiguous option: \`$1' 23883Try \`$0 --help' for more information.";; 23884 --help | --hel | -h ) 23885 $as_echo "$ac_cs_usage"; exit ;; 23886 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 23887 | -silent | --silent | --silen | --sile | --sil | --si | --s) 23888 ac_cs_silent=: ;; 23889 23890 # This is an error. 23891 -*) as_fn_error $? "unrecognized option: \`$1' 23892Try \`$0 --help' for more information." ;; 23893 23894 *) as_fn_append ac_config_targets " $1" 23895 ac_need_defaults=false ;; 23896 23897 esac 23898 shift 23899done 23900 23901ac_configure_extra_args= 23902 23903if $ac_cs_silent; then 23904 exec 6>/dev/null 23905 ac_configure_extra_args="$ac_configure_extra_args --silent" 23906fi 23907 23908_ACEOF 23909cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 23910if \$ac_cs_recheck; then 23911 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 23912 shift 23913 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 23914 CONFIG_SHELL='$SHELL' 23915 export CONFIG_SHELL 23916 exec "\$@" 23917fi 23918 23919_ACEOF 23920cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 23921exec 5>>config.log 23922{ 23923 echo 23924 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 23925## Running $as_me. ## 23926_ASBOX 23927 $as_echo "$ac_log" 23928} >&5 23929 23930_ACEOF 23931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 23932_ACEOF 23933 23934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 23935 23936# Handling of arguments. 23937for ac_config_target in $ac_config_targets 23938do 23939 case $ac_config_target in 23940 "$host/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $host/config.h:config.h.in" ;; 23941 "include/internal/$host/ethread_header_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/internal/$host/ethread_header_config.h:include/internal/ethread_header_config.h.in" ;; 23942 "include/$host/erl_int_sizes_config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/$host/erl_int_sizes_config.h:include/erl_int_sizes_config.h.in" ;; 23943 "emulator/$host/Makefile") CONFIG_FILES="$CONFIG_FILES emulator/$host/Makefile:emulator/Makefile.in" ;; 23944 "epmd/src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES epmd/src/$host/Makefile:epmd/src/Makefile.in" ;; 23945 "etc/common/$host/Makefile") CONFIG_FILES="$CONFIG_FILES etc/common/$host/Makefile:etc/common/Makefile.in" ;; 23946 "include/internal/$host/ethread.mk") CONFIG_FILES="$CONFIG_FILES include/internal/$host/ethread.mk:include/internal/ethread.mk.in" ;; 23947 "include/internal/$host/erts_internal.mk") CONFIG_FILES="$CONFIG_FILES include/internal/$host/erts_internal.mk:include/internal/erts_internal.mk.in" ;; 23948 "lib_src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES lib_src/$host/Makefile:lib_src/Makefile.in" ;; 23949 "../make/$host/otp.mk") CONFIG_FILES="$CONFIG_FILES ../make/$host/otp.mk:../make/otp.mk.in" ;; 23950 "../make/make_emakefile") CONFIG_FILES="$CONFIG_FILES ../make/make_emakefile:../make/make_emakefile.in" ;; 23951 "../lib/os_mon/c_src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES ../lib/os_mon/c_src/$host/Makefile:../lib/os_mon/c_src/Makefile.in" ;; 23952 "../lib/runtime_tools/c_src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES ../lib/runtime_tools/c_src/$host/Makefile:../lib/runtime_tools/c_src/Makefile.in" ;; 23953 "../lib/tools/c_src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES ../lib/tools/c_src/$host/Makefile:../lib/tools/c_src/Makefile.in" ;; 23954 "../make/install_dir_data.sh") CONFIG_FILES="$CONFIG_FILES ../make/install_dir_data.sh:../make/install_dir_data.sh.in" ;; 23955 23956 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 23957 esac 23958done 23959 23960 23961# If the user did not use the arguments to specify the items to instantiate, 23962# then the envvar interface is used. Set only those that are not. 23963# We use the long form for the default assignment because of an extremely 23964# bizarre bug on SunOS 4.1.3. 23965if $ac_need_defaults; then 23966 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 23967 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 23968fi 23969 23970# Have a temporary directory for convenience. Make it in the build tree 23971# simply because there is no reason against having it here, and in addition, 23972# creating and moving files from /tmp can sometimes cause problems. 23973# Hook for its removal unless debugging. 23974# Note that there is a small window in which the directory will not be cleaned: 23975# after its creation but before its name has been assigned to `$tmp'. 23976$debug || 23977{ 23978 tmp= ac_tmp= 23979 trap 'exit_status=$? 23980 : "${ac_tmp:=$tmp}" 23981 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 23982' 0 23983 trap 'as_fn_exit 1' 1 2 13 15 23984} 23985# Create a (secure) tmp directory for tmp files. 23986 23987{ 23988 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 23989 test -d "$tmp" 23990} || 23991{ 23992 tmp=./conf$$-$RANDOM 23993 (umask 077 && mkdir "$tmp") 23994} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 23995ac_tmp=$tmp 23996 23997# Set up the scripts for CONFIG_FILES section. 23998# No need to generate them if there are no CONFIG_FILES. 23999# This happens for instance with `./config.status config.h'. 24000if test -n "$CONFIG_FILES"; then 24001 24002 24003ac_cr=`echo X | tr X '\015'` 24004# On cygwin, bash can eat \r inside `` if the user requested igncr. 24005# But we know of no other shell where ac_cr would be empty at this 24006# point, so we can use a bashism as a fallback. 24007if test "x$ac_cr" = x; then 24008 eval ac_cr=\$\'\\r\' 24009fi 24010ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 24011if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 24012 ac_cs_awk_cr='\\r' 24013else 24014 ac_cs_awk_cr=$ac_cr 24015fi 24016 24017echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 24018_ACEOF 24019 24020 24021{ 24022 echo "cat >conf$$subs.awk <<_ACEOF" && 24023 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 24024 echo "_ACEOF" 24025} >conf$$subs.sh || 24026 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 24027ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 24028ac_delim='%!_!# ' 24029for ac_last_try in false false false false false :; do 24030 . ./conf$$subs.sh || 24031 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 24032 24033 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 24034 if test $ac_delim_n = $ac_delim_num; then 24035 break 24036 elif $ac_last_try; then 24037 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 24038 else 24039 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 24040 fi 24041done 24042rm -f conf$$subs.sh 24043 24044cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 24045cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 24046_ACEOF 24047sed -n ' 24048h 24049s/^/S["/; s/!.*/"]=/ 24050p 24051g 24052s/^[^!]*!// 24053:repl 24054t repl 24055s/'"$ac_delim"'$// 24056t delim 24057:nl 24058h 24059s/\(.\{148\}\)..*/\1/ 24060t more1 24061s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 24062p 24063n 24064b repl 24065:more1 24066s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 24067p 24068g 24069s/.\{148\}// 24070t nl 24071:delim 24072h 24073s/\(.\{148\}\)..*/\1/ 24074t more2 24075s/["\\]/\\&/g; s/^/"/; s/$/"/ 24076p 24077b 24078:more2 24079s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 24080p 24081g 24082s/.\{148\}// 24083t delim 24084' <conf$$subs.awk | sed ' 24085/^[^""]/{ 24086 N 24087 s/\n// 24088} 24089' >>$CONFIG_STATUS || ac_write_fail=1 24090rm -f conf$$subs.awk 24091cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 24092_ACAWK 24093cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 24094 for (key in S) S_is_set[key] = 1 24095 FS = "" 24096 24097} 24098{ 24099 line = $ 0 24100 nfields = split(line, field, "@") 24101 substed = 0 24102 len = length(field[1]) 24103 for (i = 2; i < nfields; i++) { 24104 key = field[i] 24105 keylen = length(key) 24106 if (S_is_set[key]) { 24107 value = S[key] 24108 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 24109 len += length(value) + length(field[++i]) 24110 substed = 1 24111 } else 24112 len += 1 + keylen 24113 } 24114 24115 print line 24116} 24117 24118_ACAWK 24119_ACEOF 24120cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 24121if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 24122 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 24123else 24124 cat 24125fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 24126 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 24127_ACEOF 24128 24129# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 24130# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 24131# trailing colons and then remove the whole line if VPATH becomes empty 24132# (actually we leave an empty line to preserve line numbers). 24133if test "x$srcdir" = x.; then 24134 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 24135h 24136s/// 24137s/^/:/ 24138s/[ ]*$/:/ 24139s/:\$(srcdir):/:/g 24140s/:\${srcdir}:/:/g 24141s/:@srcdir@:/:/g 24142s/^:*// 24143s/:*$// 24144x 24145s/\(=[ ]*\).*/\1/ 24146G 24147s/\n// 24148s/^[^=]*=[ ]*$// 24149}' 24150fi 24151 24152cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 24153fi # test -n "$CONFIG_FILES" 24154 24155# Set up the scripts for CONFIG_HEADERS section. 24156# No need to generate them if there are no CONFIG_HEADERS. 24157# This happens for instance with `./config.status Makefile'. 24158if test -n "$CONFIG_HEADERS"; then 24159cat >"$ac_tmp/defines.awk" <<\_ACAWK || 24160BEGIN { 24161_ACEOF 24162 24163# Transform confdefs.h into an awk script `defines.awk', embedded as 24164# here-document in config.status, that substitutes the proper values into 24165# config.h.in to produce config.h. 24166 24167# Create a delimiter string that does not exist in confdefs.h, to ease 24168# handling of long lines. 24169ac_delim='%!_!# ' 24170for ac_last_try in false false :; do 24171 ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 24172 if test -z "$ac_tt"; then 24173 break 24174 elif $ac_last_try; then 24175 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 24176 else 24177 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 24178 fi 24179done 24180 24181# For the awk script, D is an array of macro values keyed by name, 24182# likewise P contains macro parameters if any. Preserve backslash 24183# newline sequences. 24184 24185ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 24186sed -n ' 24187s/.\{148\}/&'"$ac_delim"'/g 24188t rset 24189:rset 24190s/^[ ]*#[ ]*define[ ][ ]*/ / 24191t def 24192d 24193:def 24194s/\\$// 24195t bsnl 24196s/["\\]/\\&/g 24197s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 24198D["\1"]=" \3"/p 24199s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 24200d 24201:bsnl 24202s/["\\]/\\&/g 24203s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 24204D["\1"]=" \3\\\\\\n"\\/p 24205t cont 24206s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 24207t cont 24208d 24209:cont 24210n 24211s/.\{148\}/&'"$ac_delim"'/g 24212t clear 24213:clear 24214s/\\$// 24215t bsnlc 24216s/["\\]/\\&/g; s/^/"/; s/$/"/p 24217d 24218:bsnlc 24219s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 24220b cont 24221' <confdefs.h | sed ' 24222s/'"$ac_delim"'/"\\\ 24223"/g' >>$CONFIG_STATUS || ac_write_fail=1 24224 24225cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 24226 for (key in D) D_is_set[key] = 1 24227 FS = "" 24228} 24229/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 24230 line = \$ 0 24231 split(line, arg, " ") 24232 if (arg[1] == "#") { 24233 defundef = arg[2] 24234 mac1 = arg[3] 24235 } else { 24236 defundef = substr(arg[1], 2) 24237 mac1 = arg[2] 24238 } 24239 split(mac1, mac2, "(") #) 24240 macro = mac2[1] 24241 prefix = substr(line, 1, index(line, defundef) - 1) 24242 if (D_is_set[macro]) { 24243 # Preserve the white space surrounding the "#". 24244 print prefix "define", macro P[macro] D[macro] 24245 next 24246 } else { 24247 # Replace #undef with comments. This is necessary, for example, 24248 # in the case of _POSIX_SOURCE, which is predefined and required 24249 # on some systems where configure will not decide to define it. 24250 if (defundef == "undef") { 24251 print "/*", prefix defundef, macro, "*/" 24252 next 24253 } 24254 } 24255} 24256{ print } 24257_ACAWK 24258_ACEOF 24259cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 24260 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 24261fi # test -n "$CONFIG_HEADERS" 24262 24263 24264eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " 24265shift 24266for ac_tag 24267do 24268 case $ac_tag in 24269 :[FHLC]) ac_mode=$ac_tag; continue;; 24270 esac 24271 case $ac_mode$ac_tag in 24272 :[FHL]*:*);; 24273 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 24274 :[FH]-) ac_tag=-:-;; 24275 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 24276 esac 24277 ac_save_IFS=$IFS 24278 IFS=: 24279 set x $ac_tag 24280 IFS=$ac_save_IFS 24281 shift 24282 ac_file=$1 24283 shift 24284 24285 case $ac_mode in 24286 :L) ac_source=$1;; 24287 :[FH]) 24288 ac_file_inputs= 24289 for ac_f 24290 do 24291 case $ac_f in 24292 -) ac_f="$ac_tmp/stdin";; 24293 *) # Look for the file first in the build tree, then in the source tree 24294 # (if the path is not absolute). The absolute path cannot be DOS-style, 24295 # because $ac_f cannot contain `:'. 24296 test -f "$ac_f" || 24297 case $ac_f in 24298 [\\/$]*) false;; 24299 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 24300 esac || 24301 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 24302 esac 24303 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 24304 as_fn_append ac_file_inputs " '$ac_f'" 24305 done 24306 24307 # Let's still pretend it is `configure' which instantiates (i.e., don't 24308 # use $as_me), people would be surprised to read: 24309 # /* config.h. Generated by config.status. */ 24310 configure_input='Generated from '` 24311 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 24312 `' by configure.' 24313 if test x"$ac_file" != x-; then 24314 configure_input="$ac_file. $configure_input" 24315 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 24316$as_echo "$as_me: creating $ac_file" >&6;} 24317 fi 24318 # Neutralize special characters interpreted by sed in replacement strings. 24319 case $configure_input in #( 24320 *\&* | *\|* | *\\* ) 24321 ac_sed_conf_input=`$as_echo "$configure_input" | 24322 sed 's/[\\\\&|]/\\\\&/g'`;; #( 24323 *) ac_sed_conf_input=$configure_input;; 24324 esac 24325 24326 case $ac_tag in 24327 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 24328 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 24329 esac 24330 ;; 24331 esac 24332 24333 ac_dir=`$as_dirname -- "$ac_file" || 24334$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 24335 X"$ac_file" : 'X\(//\)[^/]' \| \ 24336 X"$ac_file" : 'X\(//\)$' \| \ 24337 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 24338$as_echo X"$ac_file" | 24339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 24340 s//\1/ 24341 q 24342 } 24343 /^X\(\/\/\)[^/].*/{ 24344 s//\1/ 24345 q 24346 } 24347 /^X\(\/\/\)$/{ 24348 s//\1/ 24349 q 24350 } 24351 /^X\(\/\).*/{ 24352 s//\1/ 24353 q 24354 } 24355 s/.*/./; q'` 24356 as_dir="$ac_dir"; as_fn_mkdir_p 24357 ac_builddir=. 24358 24359case "$ac_dir" in 24360.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 24361*) 24362 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 24363 # A ".." for each directory in $ac_dir_suffix. 24364 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 24365 case $ac_top_builddir_sub in 24366 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 24367 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 24368 esac ;; 24369esac 24370ac_abs_top_builddir=$ac_pwd 24371ac_abs_builddir=$ac_pwd$ac_dir_suffix 24372# for backward compatibility: 24373ac_top_builddir=$ac_top_build_prefix 24374 24375case $srcdir in 24376 .) # We are building in place. 24377 ac_srcdir=. 24378 ac_top_srcdir=$ac_top_builddir_sub 24379 ac_abs_top_srcdir=$ac_pwd ;; 24380 [\\/]* | ?:[\\/]* ) # Absolute name. 24381 ac_srcdir=$srcdir$ac_dir_suffix; 24382 ac_top_srcdir=$srcdir 24383 ac_abs_top_srcdir=$srcdir ;; 24384 *) # Relative name. 24385 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 24386 ac_top_srcdir=$ac_top_build_prefix$srcdir 24387 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 24388esac 24389ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 24390 24391 24392 case $ac_mode in 24393 :F) 24394 # 24395 # CONFIG_FILE 24396 # 24397 24398 case $INSTALL in 24399 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 24400 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 24401 esac 24402_ACEOF 24403 24404cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 24405# If the template does not know about datarootdir, expand it. 24406# FIXME: This hack should be removed a few years after 2.60. 24407ac_datarootdir_hack=; ac_datarootdir_seen= 24408ac_sed_dataroot=' 24409/datarootdir/ { 24410 p 24411 q 24412} 24413/@datadir@/p 24414/@docdir@/p 24415/@infodir@/p 24416/@localedir@/p 24417/@mandir@/p' 24418case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 24419*datarootdir*) ac_datarootdir_seen=yes;; 24420*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 24421 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 24422$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 24423_ACEOF 24424cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 24425 ac_datarootdir_hack=' 24426 s&@datadir@&$datadir&g 24427 s&@docdir@&$docdir&g 24428 s&@infodir@&$infodir&g 24429 s&@localedir@&$localedir&g 24430 s&@mandir@&$mandir&g 24431 s&\\\${datarootdir}&$datarootdir&g' ;; 24432esac 24433_ACEOF 24434 24435# Neutralize VPATH when `$srcdir' = `.'. 24436# Shell code in configure.ac might set extrasub. 24437# FIXME: do we really want to maintain this feature? 24438cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 24439ac_sed_extra="$ac_vpsub 24440$extrasub 24441_ACEOF 24442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 24443:t 24444/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 24445s|@configure_input@|$ac_sed_conf_input|;t t 24446s&@top_builddir@&$ac_top_builddir_sub&;t t 24447s&@top_build_prefix@&$ac_top_build_prefix&;t t 24448s&@srcdir@&$ac_srcdir&;t t 24449s&@abs_srcdir@&$ac_abs_srcdir&;t t 24450s&@top_srcdir@&$ac_top_srcdir&;t t 24451s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 24452s&@builddir@&$ac_builddir&;t t 24453s&@abs_builddir@&$ac_abs_builddir&;t t 24454s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 24455s&@INSTALL@&$ac_INSTALL&;t t 24456$ac_datarootdir_hack 24457" 24458eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 24459 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 24460 24461test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 24462 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 24463 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 24464 "$ac_tmp/out"`; test -z "$ac_out"; } && 24465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 24466which seems to be undefined. Please make sure it is defined" >&5 24467$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 24468which seems to be undefined. Please make sure it is defined" >&2;} 24469 24470 rm -f "$ac_tmp/stdin" 24471 case $ac_file in 24472 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 24473 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 24474 esac \ 24475 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 24476 ;; 24477 :H) 24478 # 24479 # CONFIG_HEADER 24480 # 24481 if test x"$ac_file" != x-; then 24482 { 24483 $as_echo "/* $configure_input */" \ 24484 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 24485 } >"$ac_tmp/config.h" \ 24486 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 24487 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 24488 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 24489$as_echo "$as_me: $ac_file is unchanged" >&6;} 24490 else 24491 rm -f "$ac_file" 24492 mv "$ac_tmp/config.h" "$ac_file" \ 24493 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 24494 fi 24495 else 24496 $as_echo "/* $configure_input */" \ 24497 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 24498 || as_fn_error $? "could not create -" "$LINENO" 5 24499 fi 24500 ;; 24501 24502 24503 esac 24504 24505 24506 case $ac_file$ac_mode in 24507 "../make/make_emakefile":F) chmod +x ../make/make_emakefile ;; 24508 "../make/install_dir_data.sh":F) chmod +x ../make/install_dir_data.sh ;; 24509 24510 esac 24511done # for ac_tag 24512 24513 24514as_fn_exit 0 24515_ACEOF 24516ac_clean_files=$ac_clean_files_save 24517 24518test $ac_write_fail = 0 || 24519 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 24520 24521 24522# configure is writing to config.log, and then calls config.status. 24523# config.status does its own redirection, appending to config.log. 24524# Unfortunately, on DOS this fails, as config.log is still kept open 24525# by configure, so config.status won't be able to write to it; its 24526# output is simply discarded. So we exec the FD to /dev/null, 24527# effectively closing config.log, so it can be properly (re)opened and 24528# appended to by config.status. When coming back to configure, we 24529# need to make the FD available again. 24530if test "$no_create" != yes; then 24531 ac_cs_success=: 24532 ac_config_status_args= 24533 test "$silent" = yes && 24534 ac_config_status_args="$ac_config_status_args --quiet" 24535 exec 5>/dev/null 24536 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 24537 exec 5>>config.log 24538 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 24539 # would make configure fail if this is the last instruction. 24540 $ac_cs_success || as_fn_exit 1 24541fi 24542if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 24543 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 24544$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 24545fi 24546 24547