#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="vsn.mk" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS CFLAGS32 CC32 JAVAC CPU_SUP_LIBS os_mon_programs DTRACE_ENABLED_2STEP DTRACE_ENABLED DTRACE_CPP DTRACE EMU_CC ERTS_BUILD_FALLBACK_POLL FLAVORS PRIMARY_FLAVOR JIT_ARCH JIT_ENABLED ac_ct_CXX M4 LIBRT BITS64 HAVE_VALGRIND LIBSCTP SYSTEMD_DAEMON_LIBS SOCKET_LIBS USE_ESOCK Z_LIB TERMCAP_LIB THR_DEFS THR_LIBS EMU_LOCK_CHECKING EMU_THR_DEFS EMU_THR_LIBS EMU_THR_X_LIBS EMU_THR_LIB_NAME TYPES DIRTY_SCHEDULER_TEST ETHR_X86_SSE2_ASM ETHR_THR_LIB_BASE_DIR ETHR_THR_LIB_BASE ETHR_DEFS ETHR_LIB_NAME ETHR_LIBS ETHR_X_LIBS ERTS_INTERNAL_X_LIBS DEXPORT ERLANG_OSTYPE HCFLAGS HCC INSTALL_DIR INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM XMLLINT FOP XSLTPROC LN_S PERL YFLAGS YACC CP MKDIR LIBCARBON ARCH OPSYS EXTERNAL_WORD_SIZE EGREP GREP PROFILE_COMPILER USE_PGO XCRUN LLVM_PROFDATA WERRORFLAGS WFLAGS DEBUG_CFLAGS DEBUG_FLAGS ERTS_CONFIG_H_IDIR MIXED_MINGW MIXED_VC GCC STATIC_DRIVERS STATIC_NIFS OTP_VERSION SYSTEM_VSN OTP_RELEASE USE_VM_PROBES ENABLE_ALLOC_TYPE_VARS OBJEXT EXEEXT ac_ct_CC CROSS_COMPILING host_os host_vendor host_cpu host build_os build_vendor build_cpu build erl_xcomp_dlsym_brk_wrappers erl_xcomp_after_morecore_hook erl_xcomp_clock_gettime_cpu_time erl_xcomp_gethrvtime_procfs_ioctl erl_xcomp_getaddrinfo erl_xcomp_reliable_fpe erl_xcomp_putenv_copy erl_xcomp_kqueue erl_xcomp_poll erl_xcomp_linux_usable_sigaltstack erl_xcomp_linux_usable_sigusrx erl_xcomp_linux_nptl erl_xcomp_double_middle_endian erl_xcomp_bigendian erl_xcomp_isysroot erl_xcomp_sysroot GETCONF AR RANLIB LFS_LIBS LFS_LDFLAGS LFS_CFLAGS DED_LD_FLAG_RUNTIME_LIBRARY_PATH DED_LDFLAGS DED_LD LDFLAGS LD CXXFLAGS CXX CPPFLAGS CPP CFLAG_RUNTIME_LIBRARY_PATH STATIC_CFLAGS CFLAGS CC ERL_TOP target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_bootstrap_only enable_dirty_schedulers_test enable_smp_require_native_atomics with_termcap enable_lock_checking enable_lock_counter enable_kernel_poll enable_sctp enable_jit enable_m64_build enable_m32_build with_dynamic_trace enable_vm_probes with_assumed_cache_line_size enable_systemd with_microstate_accounting enable_static_nifs enable_static_drivers with_ets_write_concurrency_locks with_spectre_mitigation enable_pgo enable_native_ethr_impls enable_x86_out_of_order enable_prefer_gcc_native_ethr_impls enable_trust_gcc_atomic_builtins_memory_barriers with_libatomic_ops with_with_sparc_memory_order enable_ppc_lwsync_instruction with_threadnames enable_builtin_zlib enable_esock enable_esock_use_rcvsndtimeo with_esock_counter_size enable_esock_socket_registry with_clock_resolution with_clock_gettime_realtime_id with_clock_gettime_monotonic_id enable_prefer_elapsed_monotonic_time_during_suspend enable_gettimeofday_as_os_system_time with_javac enable_sanitizers ' ac_precious_vars='build_alias host_alias target_alias ERL_TOP CC CFLAGS STATIC_CFLAGS CFLAG_RUNTIME_LIBRARY_PATH CPP CPPFLAGS CXX CXXFLAGS LD LDFLAGS LIBS DED_LD DED_LDFLAGS DED_LD_FLAG_RUNTIME_LIBRARY_PATH LFS_CFLAGS LFS_LDFLAGS LFS_LIBS RANLIB AR GETCONF erl_xcomp_sysroot erl_xcomp_isysroot erl_xcomp_bigendian erl_xcomp_double_middle_endian erl_xcomp_linux_nptl erl_xcomp_linux_usable_sigusrx erl_xcomp_linux_usable_sigaltstack erl_xcomp_poll erl_xcomp_kqueue erl_xcomp_putenv_copy erl_xcomp_reliable_fpe erl_xcomp_getaddrinfo erl_xcomp_gethrvtime_procfs_ioctl erl_xcomp_clock_gettime_cpu_time erl_xcomp_after_morecore_hook erl_xcomp_dlsym_brk_wrappers YACC YFLAGS CCC' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-bootstrap-only enable bootstrap only configuration --enable-dirty-schedulers-test enable dirty scheduler test (for debugging purposes) --disable-smp-require-native-atomics disable the SMP requirement of a native atomic implementation --enable-lock-checking enable lock checking --enable-lock-counter enable lock counters --enable-kernel-poll enable kernel poll support --disable-kernel-poll disable kernel poll support --enable-sctp enable sctp support (default) to on demand load the SCTP library in runtime if needed --enable-sctp=lib enable sctp support to link against the SCTP library --disable-sctp disable sctp support --enable-jit enable JIT support --disable-jit disable JIT support --enable-m64-build build 64bit binaries using the -m64 flag to (g)cc --enable-m32-build build 32bit binaries using the -m32 flag to (g)cc --enable-vm-probes add dynamic trace probes to the Beam VM (only possible if --with-dynamic-trace is enabled, and then default) --enable-systemd enable systemd support in epmd --enable-static-nifs link nifs statically. If yes then all nifs in all Erlang/OTP applications will be statically linked into the main binary. It is also possible to give a list of nifs that should be linked statically. The list should be a comma separated and contain the absolute path to a .a archive for each nif that is to be statically linked. The name of the .a archive has to be the same as the name of the nif. Note that you have to link any external dependencies that the nifs have to the main binary, so for the crypto nif you want to pass LIBS=-lcrypto to configure. --enable-static-drivers comma separated list of linked-in drivers to link statically with the main binary. The list should contain the absolute path to a .a archive for each driver that is to be statically linked. The name of the .a archive has to be the same as the name of the driver. --enable-pgo build erts using PGO (profile guided optimization) --disable-native-ethr-impls disable native ethread implementations --enable-x86-out-of-order enable x86/x84_64 out of order support (default disabled) --enable-prefer-gcc-native-ethr-impls prefer gcc native ethread implementations --enable-trust-gcc-atomic-builtins-memory-barriers trust gcc atomic builtins memory barriers --enable-ppc-lwsync-instruction enable use of powerpc lwsync instruction --disable-ppc-lwsync-instruction disable use of powerpc lwsync instruction --enable-builtin-zlib force use of our own built-in zlib --enable-esock enable builtin experimental socket (as a nif) support (default) --disable-esock disable builtin experimental socket (as a nif) support --enable-esock-rcvsndtimeo enable use of the option(s) rcvtimeo and sndtimeo --disable-esock-rcvsndtimeo disable use of the option(s) rcvtimeo and sndtimeo (default) --enable-esock-socket-registry enable use of the socket registry by default (default) --disable-esock-socket-registry disable use of the socket registry by default --enable-prefer-elapsed-monotonic-time-during-suspend Prefer an OS monotonic time source with elapsed time during suspend --disable-prefer-elapsed-monotonic-time-during-suspend Do not prefer an OS monotonic time source with elapsed time during suspend --enable-gettimeofday-as-os-system-time Force usage of gettimeofday() for OS system time --enable-sanitizers[=comma-separated list of sanitizers] Default=address,undefined Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-termcap use termcap (default) --without-termcap do not use any termcap libraries (ncurses,curses,termcap,termlib) --with-dynamic-trace={dtrace|lttng|systemtap} specify use of dynamic trace framework, dtrace, lttng or systemtap --without-dynamic-trace don't enable any dynamic tracing (default) --with-assumed-cache-line-size=SIZE specify assumed cache line size in bytes (valid values are powers of two between and including 16 and 8192; default is 64) --with-microstate-accounting={yes|extra} enable microstate account, possibly with extra detailed states --without-microstate-accounting don't enable microstate accounting --with-ets-write-concurrency-locks={8|16|32|64|128|256} specify how many locks the write_concurrency option for ets should use. --without-ets-write-concurrency-locks use the default number of write_concurrency locks (default) --with-spectre-mitigation={yes|incomplete} enable spectre mitigation, either fully or with mitigations disabled in a handful places like the interpreter --without-spectre-mitigation build without spectre mitigation --with-libatomic_ops=PATH specify and prefer usage of libatomic_ops in the ethread library --with-sparc-memory-order=TSO|PSO|RMO specify sparc memory order (defaults to RMO) --with-threadnames use pthread_setname to set the thread names (default) --without-threadnames do not set any thread names --with-esock-counter-size=SZ Size of the esock counters, in number of bits: 16 | 24 | 32 | 48 | 64; default is 64 --with-clock-resolution=high|low|default specify wanted clock resolution --with-clock-gettime-realtime-id=CLOCKID specify clock id to use with clock_gettime() for realtime time) --with-clock-gettime-monotonic-id=CLOCKID specify clock id to use with clock_gettime() for monotonic time) --with-javac=JAVAC specify Java compiler to use --with-javac use a Java compiler if found (default) --without-javac don't use any Java compiler Some influential environment variables: ERL_TOP Erlang/OTP top source directory CC C compiler CFLAGS C compiler flags STATIC_CFLAGS C compiler static flags CFLAG_RUNTIME_LIBRARY_PATH runtime library path linker flag passed via C compiler CPP C/C++ preprocessor CPPFLAGS C/C++ preprocessor flags CXX C++ compiler CXXFLAGS C++ compiler flags LD linker (is often overridden by configure) LDFLAGS linker flags (can be risky to set since LD may be overridden by configure) LIBS libraries DED_LD linker for Dynamic Erlang Drivers (set all DED_LD* variables or none) DED_LDFLAGS linker flags for Dynamic Erlang Drivers (set all DED_LD* variables or none) DED_LD_FLAG_RUNTIME_LIBRARY_PATH runtime library path linker flag for Dynamic Erlang Drivers (set all DED_LD* variables or none) LFS_CFLAGS large file support C compiler flags (set all LFS_* variables or none) LFS_LDFLAGS large file support linker flags (set all LFS_* variables or none) LFS_LIBS large file support libraries (set all LFS_* variables or none) RANLIB ranlib AR ar GETCONF getconf erl_xcomp_sysroot Absolute cross system root path (only used when cross compiling) erl_xcomp_isysroot Absolute cross system root include path (only used when cross compiling) erl_xcomp_bigendian big endian system: yes|no (only used when cross compiling) erl_xcomp_double_middle_endian double-middle-endian system: yes|no (only used when cross compiling) erl_xcomp_linux_nptl have Native POSIX Thread Library: yes|no (only used when cross compiling) erl_xcomp_linux_usable_sigusrx SIGUSR1 and SIGUSR2 can be used: yes|no (only used when cross compiling) erl_xcomp_linux_usable_sigaltstack have working sigaltstack(): yes|no (only used when cross compiling) erl_xcomp_poll have working poll(): yes|no (only used when cross compiling) erl_xcomp_kqueue have working kqueue(): yes|no (only used when cross compiling) erl_xcomp_putenv_copy putenv() stores key-value copy: yes|no (only used when cross compiling) erl_xcomp_reliable_fpe have reliable floating point exceptions: yes|no (only used when cross compiling) erl_xcomp_getaddrinfo have working getaddrinfo() for both IPv4 and IPv6: yes|no (only used when cross compiling) erl_xcomp_gethrvtime_procfs_ioctl have working gethrvtime() which can be used with procfs ioctl(): yes|no (only used when cross compiling) erl_xcomp_clock_gettime_cpu_time clock_gettime() can be used for retrieving process CPU time: yes|no (only used when cross compiling) erl_xcomp_after_morecore_hook __after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling) erl_xcomp_dlsym_brk_wrappers dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling) YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES # -------------------------------------------- # Tries to find the compile-time value of EXPR in a program that includes # INCLUDES, setting VAR accordingly. Returns whether the value could be # computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) < 0)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) >= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array [1 - 2 * !(($2) <= $ac_mid)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in #(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu no_werror_CFLAGS=$(echo "$CFLAGS" | sed 's/-Werror\([^=]\|$\)/ /g') if test "$CFLAGS" != "$no_werror_CFLAGS"; then CFLAGS="$no_werror_CFLAGS" WERRORFLAGS=-Werror fi #### Make srcdir absolute, if it isn't already. It's important to #### avoid running the path through pwd unnecessary, since pwd can #### give you automounter prefixes, which can go away. case "${srcdir}" in /* ) ;; . ) ## We may be able to use the $PWD environment variable to make this ## absolute. But sometimes PWD is inaccurate. ## Make sure CDPATH doesn't affect cd (in case PWD is relative). CDPATH= if test "${PWD}" != "" && test "`(cd ${PWD} ; sh -c pwd)`" = "`pwd`" ; then srcdir="$PWD" else srcdir="`(cd ${srcdir}; pwd)`" fi ;; * ) srcdir="`(cd ${srcdir}; pwd)`" ;; esac ## Now, make sure that ERL_TOP is set and is the same as srcdir ## if test -z "$ERL_TOP" || test ! -d $ERL_TOP ; then as_fn_error $? "You need to set the environment variable ERL_TOP!" "$LINENO" 5 fi if test x"${ERL_TOP}/erts" != x"$srcdir"; then as_fn_error $? "You need to run configure with argument --srcdir=${ERL_TOP}/erts" "$LINENO" 5 fi erl_top=${ERL_TOP} # echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # echo X # echo "X srcdir = $srcdir" # echo "X ERL_TOP = $ERL_TOP" # echo X # echo XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ac_aux_dir= for ac_dir in $srcdir/autoconf; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in $srcdir/autoconf" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # # To configure for free source run ./configure --host=free_source # if test "X$host" != "Xfree_source" -a "X$host" != "Xwin32"; then # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac else host_os=$host fi if test "$cross_compiling" = "yes"; then CROSS_COMPILING=yes else CROSS_COMPILING=no fi erl_xcomp_without_sysroot=no if test "$cross_compiling" = "yes"; then test "$erl_xcomp_sysroot" != "" || erl_xcomp_without_sysroot=yes test "$erl_xcomp_isysroot" != "" || erl_xcomp_isysroot="$erl_xcomp_sysroot" else erl_xcomp_sysroot= erl_xcomp_isysroot= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_strerror+:} false; then : break fi done if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ac_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" ENABLE_ALLOC_TYPE_VARS= # Check whether --enable-bootstrap-only was given. if test "${enable_bootstrap_only+set}" = set; then : enableval=$enable_bootstrap_only; if test "X$enableval" = "Xyes"; then # Disable stuff not necessary in a bootstrap only system in order # to speed up things by reducing the amount of stuff needing to be # built... with_termcap=no with_ssl=no with_ssl_zlib=no enable_jit=no enable_sctp=no fi fi # Check whether --enable-dirty-schedulers-test was given. if test "${enable_dirty_schedulers_test+set}" = set; then : enableval=$enable_dirty_schedulers_test; case "$enableval" in yes) enable_dirty_schedulers_test=yes ;; *) enable_dirty_schedulers_test=no ;; esac else enable_dirty_schedulers_test=no fi # Check whether --enable-smp-require-native-atomics was given. if test "${enable_smp_require_native_atomics+set}" = set; then : enableval=$enable_smp_require_native_atomics; case "$enableval" in no) smp_require_native_atomics=no ;; *) smp_require_native_atomics=yes ;; esac else smp_require_native_atomics=yes fi # Check whether --with-termcap was given. if test "${with_termcap+set}" = set; then : withval=$with_termcap; else with_termcap=yes fi # Check whether --enable-lock-checking was given. if test "${enable_lock_checking+set}" = set; then : enableval=$enable_lock_checking; case "$enableval" in no) enable_lock_check=no ;; *) enable_lock_check=yes ;; esac else enable_lock_check=no fi # Check whether --enable-lock-counter was given. if test "${enable_lock_counter+set}" = set; then : enableval=$enable_lock_counter; case "$enableval" in no) enable_lock_count=no ;; *) enable_lock_count=yes ;; esac else enable_lock_count=no fi # Check whether --enable-kernel-poll was given. if test "${enable_kernel_poll+set}" = set; then : enableval=$enable_kernel_poll; case "$enableval" in no) enable_kernel_poll=no ;; *) enable_kernel_poll=yes ;; esac else enable_kernel_poll=unknown fi # Check whether --enable-sctp was given. if test "${enable_sctp+set}" = set; then : enableval=$enable_sctp; case "x$enableval" in xno|xyes|xlib|x) ;; x*) as_fn_error $? "\"invalid value --enable-sctp=$enableval\"" "$LINENO" 5 ;; esac fi # Check whether --enable-jit was given. if test "${enable_jit+set}" = set; then : enableval=$enable_jit; case "$enableval" in no) enable_jit=no ;; *) enable_jit=yes ;; esac else enable_jit=auto fi # Check whether --enable-m64-build was given. if test "${enable_m64_build+set}" = set; then : enableval=$enable_m64_build; case "$enableval" in no) enable_m64_build=no ;; *) enable_m64_build=yes ;; esac else enable_m64_build=no fi # Check whether --enable-m32-build was given. if test "${enable_m32_build+set}" = set; then : enableval=$enable_m32_build; case "$enableval" in no) enable_m32_build=no ;; *) enable_m32_build=yes ;; esac else enable_m32_build=no fi # Check whether --with-dynamic-trace was given. if test "${with_dynamic_trace+set}" = set; then : withval=$with_dynamic_trace; fi if test X"$with_dynamic_trace" = X""; then with_dynamic_trace=no fi case "$with_dynamic_trace" in no) DYNAMIC_TRACE_FRAMEWORK=;; lttng) $as_echo "#define USE_LTTNG 1" >>confdefs.h DYNAMIC_TRACE_FRAMEWORK=lttng;; dtrace) $as_echo "#define USE_DTRACE 1" >>confdefs.h DYNAMIC_TRACE_FRAMEWORK=dtrace;; systemtap) $as_echo "#define USE_SYSTEMTAP 1" >>confdefs.h DYNAMIC_TRACE_FRAMEWORK=systemtap;; *) as_fn_error $? "Unknown dynamic tracing framework specified with --with-dynamic-trace!" "$LINENO" 5;; esac if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then $as_echo "#define USE_DYNAMIC_TRACE 1" >>confdefs.h fi # Check whether --enable-vm-probes was given. if test "${enable_vm_probes+set}" = set; then : enableval=$enable_vm_probes; case "$enableval" in no) use_vm_probes=no ;; *) if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then use_vm_probes=yes ; else as_fn_error $? "Can not enable VM probes without any dynamic tracing framework!" "$LINENO" 5; fi;; esac else if test X"$DYNAMIC_TRACE_FRAMEWORK" != X""; then use_vm_probes=yes ; else use_vm_probes=no fi fi if test X"$DYNAMIC_TRACE_FRAMEWORK" != X"lttng"; then if test X"$use_vm_probes" = X"yes"; then USE_VM_PROBES=yes $as_echo "#define USE_VM_PROBES 1" >>confdefs.h fi fi # Check whether --with-assumed-cache-line-size was given. if test "${with_assumed_cache_line_size+set}" = set; then : withval=$with_assumed_cache_line_size; fi case "$with_assumed_cache_line_size" in ""|no|yes) with_assumed_cache_line_size=64;; 16|32|64|128|256|512|1024|2048|4096|8192) ;; *) as_fn_error $? "Invalid assumed cache-line size of $with_assumed_cache_line_size bytes" "$LINENO" 5 ;; esac cat >>confdefs.h <<_ACEOF #define ASSUMED_CACHE_LINE_SIZE $with_assumed_cache_line_size _ACEOF # Check whether --enable-systemd was given. if test "${enable_systemd+set}" = set; then : enableval=$enable_systemd; else enable_systemd=no fi # Check whether --with-microstate-accounting was given. if test "${with_microstate_accounting+set}" = set; then : withval=$with_microstate_accounting; else with_microstate_accounting=yes fi case "$with_microstate_accounting" in yes) $as_echo "#define ERTS_ENABLE_MSACC 1" >>confdefs.h ;; extra) $as_echo "#define ERTS_ENABLE_MSACC 2" >>confdefs.h ;; *) ;; esac OTP_RELEASE= if test "${ERLANG_COMMERCIAL_BUILD}" != ""; then OTP_EXTRA_FLAGS=-DOTP_RELEASE OTP_RELEASE=yes else OTP_EXTRA_FLAGS= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking OTP release" >&5 $as_echo_n "checking OTP release... " >&6; } SYSTEM_VSN=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_VSN" >&5 $as_echo "$SYSTEM_VSN" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking OTP version" >&5 $as_echo_n "checking OTP version... " >&6; } OTP_VERSION=`cat $ERL_TOP/OTP_VERSION` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTP_VERSION" >&5 $as_echo "$OTP_VERSION" >&6; } if test X${enable_m64_build} = Xyes; then case $CFLAGS in *-m64*) ;; *) CFLAGS="-m64 $CFLAGS" ;; esac else if test X${enable_m32_build} = Xyes; then case $CFLAGS in *-m32*) ;; *) CFLAGS="-m32 $CFLAGS" ;; esac ; fi fi # Check whether --enable-static-nifs was given. if test "${enable_static_nifs+set}" = set; then : enableval=$enable_static_nifs; STATIC_NIFS="$enableval" else STATIC_NIFS=no fi # Check whether --enable-static-drivers was given. if test "${enable_static_drivers+set}" = set; then : enableval=$enable_static_drivers; STATIC_DRIVERS="$enableval" else STATIC_DRIVERS=no fi # Check whether --with-ets-write-concurrency-locks was given. if test "${with_ets_write_concurrency_locks+set}" = set; then : withval=$with_ets_write_concurrency_locks; fi if test X"$with_ets_write_concurrency_locks" != X""; then cat >>confdefs.h <<_ACEOF #define ERTS_DB_HASH_LOCK_CNT $with_ets_write_concurrency_locks _ACEOF fi # Check whether --with-spectre-mitigation was given. if test "${with_spectre_mitigation+set}" = set; then : withval=$with_spectre_mitigation; else with_spectre_mitigation=no fi case "$with_spectre_mitigation" in no) ;; yes) ;; incomplete) ;; *) as_fn_error $? "Invalid spectre mitigation setting" "$LINENO" 5 ;; esac i_noretpoline_attr="" if test X"$with_spectre_mitigation" != X"no"; then CFLAGS="$CFLAGS -mindirect-branch=thunk" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for spectre mitigation" >&5 $as_echo_n "checking for spectre mitigation... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "no" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test X"$with_spectre_mitigation" = X"incomplete"; then # gcc and clang support this attribute if they're recent enough. Note # that we must compile with -Werror to check for actual support as they # warn rather than error out on unsupported attributes. i_noretpoline_attr='__attribute__((__indirect_branch__("keep")))' i_preserve_cflags="$CFLAGS" CFLAGS="$CFLAGS -Werror" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether spectre mitigation can be disabled on a per-function basis" >&5 $as_echo_n "checking whether spectre mitigation can be disabled on a per-function basis... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $i_noretpoline_attr int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "no" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$i_preserve_cflags" fi fi cat >>confdefs.h <<_ACEOF #define ERTS_NO_RETPOLINE $i_noretpoline_attr _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu case $host_os in linux*) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE";; aix*|os400*) # * _ALL_SOURCE: Required to get the winsize structure for TIOCSWINSZ. # * _LINUX_SOURCE_COMPAT: Not required, but makes some libc functions # behave closer to glibc assumptions. CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE -D_LINUX_SOURCE_COMPAT" ;; win32) # The ethread library requires _WIN32_WINNT of at least 0x0403. # -D_WIN32_WINNT=* from CPPFLAGS is saved in ETHR_DEFS. CPPFLAGS="$CPPFLAGS -D_WIN32_WINNT=0x0600 -DWINVER=0x0600" ;; *) ;; esac if test "X$windows_environment_" != "Xchecked"; then windows_environment_=checked MIXED_CYGWIN=no MIXED_MSYS=no MIXED_VSL=no MIXED_VC=no MIXED_MINGW=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mixed mingw-gcc and native VC++ environment" >&5 $as_echo_n "checking for mixed mingw-gcc and native VC++ environment... " >&6; } if test "X$host" = "Xwin32" -a "x$GCC" != "xyes"; then if test -x /usr/bin/msys-?.0.dll; then CFLAGS="$CFLAGS -O2" MIXED_MSYS=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: MSYS and VC" >&5 $as_echo "MSYS and VC" >&6; } MIXED_VC=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" elif test -x /usr/bin/cygpath; then CFLAGS="$CFLAGS -O2" MIXED_CYGWIN=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cygwin and VC" >&5 $as_echo "Cygwin and VC" >&6; } MIXED_VC=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" elif test -x /bin/wslpath; then CFLAGS="$CFLAGS -O2" MIXED_WSL=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: WSL and VC" >&5 $as_echo "WSL and VC" >&6; } MIXED_VC=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 $as_echo "undeterminable" >&6; } as_fn_error cannot handle this! "Seems to be mixed windows but not within any known env" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$MIXED_MSYS" != "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mixed cygwin and native MinGW environment" >&5 $as_echo_n "checking for mixed cygwin and native MinGW environment... " >&6; } if test "X$host" = "Xwin32" -a "x$GCC" = x"yes"; then if test -x /usr/bin/cygpath; then CFLAGS="$CFLAGS -O2" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MIXED_MINGW=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 $as_echo "undeterminable" >&6; } as_fn_error cannot handle this! "Seems to be mixed windows but not with cygwin" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mixed MSYS and native MinGW environment" >&5 $as_echo_n "checking for mixed MSYS and native MinGW environment... " >&6; } if test "x$GCC" = x"yes"; then if test -x /usr/bin/msys-=.0.dll; then CFLAGS="$CFLAGS -O2" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } MIXED_MINGW=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 $as_echo "undeterminable" >&6; } as_fn_error cannot handle this! "Seems to be mixed windows but not with msys" "$LINENO" 5 fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we mix cygwin with any native compiler" >&5 $as_echo_n "checking if we mix cygwin with any native compiler... " >&6; } if test "X$MIXED_CYGWIN" = "Xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we mix msys with another native compiler" >&5 $as_echo_n "checking if we mix msys with another native compiler... " >&6; } if test "X$MIXED_MSYS" = "Xyes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we mix WSL with another native compiler" >&5 $as_echo_n "checking if we mix WSL with another native compiler... " >&6; } if test "X$MIXED_WSL" = "Xyes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi ERTS_CONFIG_H_IDIR="-I${ERL_TOP}/erts/$host" extra_flags="$ERTS_CONFIG_H_IDIR $OTP_EXTRA_FLAGS" CFLAGS="$CFLAGS $extra_flags" DEBUG_CFLAGS="-g $CPPFLAGS $extra_flags $DEBUG_CFLAGS" DEBUG_FLAGS=-g case $CFLAGS in *-m64*) case $DEBUG_CFLAGS in *-m64*) ;; *) DEBUG_CFLAGS="-m64 $DEBUG_CFLAGS" ;; esac ;; *-m32*) case $DEBUG_CFLAGS in *-m32*) ;; *) DEBUG_CFLAGS="-m32 $DEBUG_CFLAGS" ;; esac ;; *) ;; esac lfs_conf=ok lfs_source=none if test "${LFS_CFLAGS+set}" = "set" || \ test "${LFS_LDFLAGS+set}" = "set" || \ test "${LFS_LIBS+set}" = "set"; then lfs_source=user else if test "$cross_compiling" != "yes"; then # Extract the first word of "getconf", so it can be a program name with args. set dummy getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GETCONF"; then ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GETCONF="getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" fi fi GETCONF=$ac_cv_prog_GETCONF if test -n "$GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 $as_echo "$GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else host_getconf="$host_alias-getconf" # Extract the first word of "$host_getconf", so it can be a program name with args. set dummy $host_getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GETCONF"; then ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GETCONF="$host_getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" fi fi GETCONF=$ac_cv_prog_GETCONF if test -n "$GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 $as_echo "$GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then GETCONF= prfx="$erl_xcomp_sysroot" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args. set dummy ${ac_tool_prefix}getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else case $GETCONF in [\\/]* | ?:[\\/]*) ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GETCONF=$ac_cv_path_GETCONF if test -n "$GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 $as_echo "$GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_GETCONF"; then ac_pt_GETCONF=$GETCONF # Extract the first word of "getconf", so it can be a program name with args. set dummy getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_GETCONF in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_GETCONF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF if test -n "$ac_pt_GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 $as_echo "$ac_pt_GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_GETCONF" = x; then GETCONF="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GETCONF=$ac_pt_GETCONF fi else GETCONF="$ac_cv_path_GETCONF" fi fi fi test "$GETCONF" = "false" || lfs_source=getconf fi if test "$lfs_source" = "none"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to check for large file support flags; no getconf is available" >&5 $as_echo "$as_me: WARNING: Do not know how to check for large file support flags; no getconf is available" >&2;} else for var in CFLAGS LDFLAGS LIBS; do { $as_echo "$as_me:${as_lineno-$LINENO}: checking for large file support $var" >&5 $as_echo_n "checking for large file support $var... " >&6; } if test $lfs_source = user; then eval "lfs_val=\"\$LFS_$var\"" else eval "lfs_var=LFS_$var" lfs_val=`$GETCONF $lfs_var 2>/dev/null` || lfs_conf=failed if test $lfs_conf = failed; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } break fi eval "$lfs_var=\"$lfs_val\"" fi test "$lfs_val" != "" || lfs_val=none { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lfs_val" >&5 $as_echo "$lfs_val" >&6; } done if test $lfs_conf = failed; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Check for large file support flags failed; $GETCONF failed" >&5 $as_echo "$as_me: WARNING: Check for large file support flags failed; $GETCONF failed" >&2;} else CFLAGS="$CFLAGS $LFS_CFLAGS" DEBUG_CFLAGS="$DEBUG_CFLAGS $LFS_CFLAGS" LDFLAGS="$LDFLAGS $LFS_LDFLAGS" LIBS="$LIBS $LFS_LIBS" fi fi if test "x$GCC" = xyes; then # Treat certain GCC warnings as errors { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)" >&5 $as_echo_n "checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-Werror=return-type $WERRORFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : can_enable_flag=true else can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WERRORFLAGS="-Werror=return-type $WERRORFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)" >&5 $as_echo_n "checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-Werror=implicit $WERRORFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : can_enable_flag=true else can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WERRORFLAGS="-Werror=implicit $WERRORFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)" >&5 $as_echo_n "checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-Werror=undef $WERRORFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : can_enable_flag=true else can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } WERRORFLAGS="-Werror=undef $WERRORFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # until the emulator can handle this, I suggest we turn it off! #WFLAGS="-Wall -Wshadow -Wcast-qual -Wmissing-declarations" WFLAGS="-Wall -Wstrict-prototypes -Wpointer-arith" case "$host_cpu" in tile*) # tile-gcc is a bit stricter with -Wmissing-prototypes than other gccs, # and too strict for our taste. ;; *) WFLAGS="$WFLAGS -Wmissing-prototypes";; esac saved_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Wdeclaration-after-statement" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : warn_decl_after_st=true else warn_decl_after_st=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "X$warn_decl_after_st" = "Xtrue"; then WFLAGS="$WFLAGS -Wdeclaration-after-statement" fi CFLAGS=$saved_CFLAGS # Use -fno-common for gcc, that is link error if multiple definitions of # global variables are encountered. This is ISO C compliant. # Until version 10, gcc has had -fcommon as default, which allows and merges # such dubious duplicates. { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-common to CFLAGS (via CFLAGS)" >&5 $as_echo_n "checking if we can add -fno-common to CFLAGS (via CFLAGS)... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-fno-common $CFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : can_enable_flag=true else can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CFLAGS="-fno-common $CFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else WFLAGS="" WERRORFLAGS=${WERRORFLAGS:-""} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking C99 support" >&5 $as_echo_n "checking C99 support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if __STDC_VERSION__ < 199901L #error "Not C99" #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } CFLAGS="-std=gnu99 $CFLAGS" DEBUG_CFLAGS="-std=gnu99 $DEBUG_CFLAGS" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking CFLAGS for -O switch" >&5 $as_echo_n "checking CFLAGS for -O switch... " >&6; } case "$CFLAGS" in *-O*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) as_fn_error $? " CFLAGS must contain a -O flag. If you need to edit the CFLAGS you probably also want to add the default CFLAGS. The default CFLAGS are \"-O2 -g\". If you want to build erts without any optimization, pass -O0 to CFLAGS." "$LINENO" 5 ;; esac ## Check if we can do profile guided optimization of beam_emu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-generate -Werror..." >&5 $as_echo_n "checking whether $CC accepts -fprofile-generate -Werror...... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-fprofile-generate -Werror $CFLAGS"; if test "$cross_compiling" = yes; then : can_enable_flag=false else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_run "$LINENO"; then : return 0; else can_enable_flag=true fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then PROFILE_GENERATE=true { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else PROFILE_GENERATE=false { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-use -Werror..." >&5 $as_echo_n "checking whether $CC accepts -fprofile-use -Werror...... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-fprofile-use -Werror $CFLAGS"; if test "$cross_compiling" = yes; then : can_enable_flag=false else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_run "$LINENO"; then : return 0; else can_enable_flag=true fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then PROFILE_USE=true { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else PROFILE_USE=false { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-use -fprofile-correction -Werror..." >&5 $as_echo_n "checking whether $CC accepts -fprofile-use -fprofile-correction -Werror...... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-fprofile-use -fprofile-correction -Werror $CFLAGS"; if test "$cross_compiling" = yes; then : can_enable_flag=false else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_run "$LINENO"; then : return 0; else can_enable_flag=true fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then PROFILE_CORRECTION=true { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else PROFILE_CORRECTION=false { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "X$PROFILE_CORRECTION" = "Xtrue"; then saved_CFLAGS=$CFLAGS saved_LDFLAGS=$LDFLAGS CFLAGS="-fprofile-generate $saved_CFLAGS" LDFLAGS="-fprofile-generate $saved_LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC links with -fprofile-generate" >&5 $as_echo_n "checking whether $CC links with -fprofile-generate... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } PROFILE_GENERATE=true else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PROFILE_GENERATE=false fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$saved_CFLAGS LDFLAGS=$saved_LDFLAGS fi ## Check if this is clang { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-instr-generate -Werror..." >&5 $as_echo_n "checking whether $CC accepts -fprofile-instr-generate -Werror...... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-fprofile-instr-generate -Werror $CFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : can_enable_flag=true else can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue"; then PROFILE_INSTR_GENERATE=true { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else PROFILE_INSTR_GENERATE=false { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "X$PROFILE_INSTR_GENERATE" = "Xtrue"; then # It was clang, now we also have to check if we have llvm-profdata and that # we can link programs with -fprofile-instr-use saved_CFLAGS=$CFLAGS; CFLAGS="-fprofile-instr-generate -Werror $saved_CFLAGS" if test "$cross_compiling" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Disabling PGO when cross-compiling" >&5 $as_echo "$as_me: Disabling PGO when cross-compiling" >&6;} else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : # Extract the first word of "llvm-profdata", so it can be a program name with args. set dummy llvm-profdata; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_LLVM_PROFDATA+:} false; then : $as_echo_n "(cached) " >&6 else case $LLVM_PROFDATA in [\\/]* | ?:[\\/]*) ac_cv_path_LLVM_PROFDATA="$LLVM_PROFDATA" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="$PATH:/Library/Developer/CommandLineTools/usr/bin" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_LLVM_PROFDATA="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi LLVM_PROFDATA=$ac_cv_path_LLVM_PROFDATA if test -n "$LLVM_PROFDATA"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5 $as_echo "$LLVM_PROFDATA" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_prog in xcrun do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XCRUN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XCRUN"; then ac_cv_prog_XCRUN="$XCRUN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_XCRUN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XCRUN=$ac_cv_prog_XCRUN if test -n "$XCRUN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCRUN" >&5 $as_echo "$XCRUN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XCRUN" && break done if test "X$XCRUN" != "X" -a "X$LLVM_PROFDATA" = "X"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $XCRUN $LLVM_PROFDATA" >&5 $as_echo_n "checking for $XCRUN $LLVM_PROFDATA... " >&6; } if $XCRUN $LLVM_PROFDATA --help 2>& 5 >& 5; then LLVM_PROFDATA="$XCRUN $LLVM_PROFDATA" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "X$LLVM_PROFDATA" != "X"; then CFLAGS="-fprofile-instr-use=default.profdata $saved_CFLAGS"; $LLVM_PROFDATA merge -output=default.profdata *.profraw; { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-instr-use=default.profdata -Werror" >&5 $as_echo_n "checking whether $CC accepts -fprofile-instr-use=default.profdata -Werror... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } PROFILE_INSTR_USE=true else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PROFILE_INSTR_USE=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f default.profdata fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f *.profraw CFLAGS=$saved_CFLAGS; fi # Check whether --enable-pgo was given. if test "${enable_pgo+set}" = set; then : enableval=$enable_pgo; case "$enableval" in no) enable_pgo=no ;; *) enable_pgo=yes ;; esac else enable_pgo=default fi USE_PGO=false { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to do PGO of erts" >&5 $as_echo_n "checking whether to do PGO of erts... " >&6; } if test $enable_pgo = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled by user" >&5 $as_echo "no, disabled by user" >&6; } elif test $CROSS_COMPILING = yes; then if test $enable_pgo = yes; then as_fn_error $? "cannot use PGO when cross-compiling" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cross compiling" >&5 $as_echo "no, cross compiling" >&6; } fi elif test "X$host" = "Xwin32"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not supported in windows" >&5 $as_echo "no, not supported in windows" >&6; } elif test "X$PROFILE_GENERATE" = "Xtrue" -a "X$PROFILE_USE" = "Xtrue" -a "X$PROFILE_CORRECTION" = "Xtrue"; then ## We need -fprofile-generate and -fprofile-correction support to use PGO with ## gcc as multiple threads run within the executed object files USE_PGO=true PROFILE_COMPILER=gcc { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using -fprofile-generate -fprofile-correction" >&5 $as_echo "yes, using -fprofile-generate -fprofile-correction" >&6; } elif test "X$PROFILE_INSTR_GENERATE" = "Xtrue" -a "X$PROFILE_INSTR_USE" = "Xtrue"; then USE_PGO=true PROFILE_COMPILER=clang { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, using -fprofile-instr-generate" >&5 $as_echo "yes, using -fprofile-instr-generate" >&6; } else if test $enable_pgo = yes; then as_fn_error $? "cannot use PGO with this compiler" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi USE_PGO=false ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF # Needed for ARCH and smp checks below if test "x$ac_cv_sizeof_void_p" = x8; then EXTERNAL_WORD_SIZE=64 else EXTERNAL_WORD_SIZE=32 fi if test "x$host_alias" != "x"; then chk_opsys_=$host_os else chk_opsys_=`uname -s` if test "x$chk_opsys_" = "xSunOS"; then chk_opsys_=$chk_opsys_`uname -r` fi fi case $chk_opsys_ in win32) OPSYS=win32;; solaris2.*|SunOS5.*) OPSYS=sol2;; linux*|Linux) OPSYS=linux;; darwin|Darwin) OPSYS=darwin;; freebsd|FreeBSD) OPSYS=freebsd;; *) OPSYS=noopsys esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target hardware architecture" >&5 $as_echo_n "checking target hardware architecture... " >&6; } if test "x$host_alias" != "x" -a "x$host_cpu" != "x"; then chk_arch_=$host_cpu else chk_arch_=`uname -m` fi case $chk_arch_ in sun4u) ARCH=ultrasparc;; sparc64) ARCH=sparc64;; sun4v) ARCH=ultrasparc;; i86pc) ARCH=x86;; i386) ARCH=x86;; i486) ARCH=x86;; i586) ARCH=x86;; i686) ARCH=x86;; x86_64) ARCH=amd64;; amd64) ARCH=amd64;; macppc) ARCH=ppc;; powerpc) ARCH=ppc;; ppc) ARCH=ppc;; ppc64) ARCH=ppc64;; ppc64le) ARCH=ppc64le;; powerpc64) ARCH=ppc64;; powerpc64le) ARCH=ppc64le;; "Power Macintosh") ARCH=ppc;; arm64) ARCH=arm64;; armv5b) ARCH=arm;; armv5teb) ARCH=arm;; armv5tel) ARCH=arm;; armv5tejl) ARCH=arm;; armv6l) ARCH=arm;; armv6hl) ARCH=arm;; armv7l) ARCH=arm;; armv7hl) ARCH=arm;; armv8*) ARCH=arm;; aarch64) ARCH=arm64;; aarch*) ARCH=arm;; tile) ARCH=tile;; e2k) ARCH=e2k;; *) ARCH=noarch;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARCH" >&5 $as_echo "$ARCH" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compilation mode forces ARCH adjustment" >&5 $as_echo_n "checking whether compilation mode forces ARCH adjustment... " >&6; } case "$ARCH-$ac_cv_sizeof_void_p" in x86-8) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=x86 to ARCH=amd64" >&5 $as_echo "yes: adjusting ARCH=x86 to ARCH=amd64" >&6; } ARCH=amd64 ;; amd64-4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=amd64 to ARCH=x86" >&5 $as_echo "yes: adjusting ARCH=amd64 to ARCH=x86" >&6; } ARCH=x86 ;; ultrasparc-8) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ultrasparc to ARCH=sparc64" >&5 $as_echo "yes: adjusting ARCH=ultrasparc to ARCH=sparc64" >&6; } ARCH=sparc64 ;; sparc64-4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=sparc64 to ARCH=ultrasparc" >&5 $as_echo "yes: adjusting ARCH=sparc64 to ARCH=ultrasparc" >&6; } ARCH=ultrasparc ;; ppc64-4) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ppc64 to ARCH=ppc" >&5 $as_echo "yes: adjusting ARCH=ppc64 to ARCH=ppc" >&6; } ARCH=ppc ;; ppc-8) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ppc to ARCH=ppc64" >&5 $as_echo "yes: adjusting ARCH=ppc to ARCH=ppc64" >&6; } ARCH=ppc64 ;; arm-8) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=arm to ARCH=arm64" >&5 $as_echo "yes: adjusting ARCH=arm to ARCH=arm64" >&6; } ARCH=arm64 ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no: ARCH is $ARCH" >&5 $as_echo "no: ARCH is $ARCH" >&6; } ;; esac case $ARCH-$OPSYS in amd64-darwin*|arm64-darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to cope with 64bit Darwin" >&5 $as_echo "$as_me: Adjusting LDFLAGS to cope with 64bit Darwin" >&6;} case $LDFLAGS in *-m64*) ;; *) LDFLAGS="-m64 $LDFLAGS" ;; esac ;; *-darwin*) case $LDFLAGS in *-m32*) ;; *) LDFLAGS="-m32 $LDFLAGS" ;; esac ;; *) if test X${enable_m64_build} = Xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to use -m64" >&5 $as_echo "$as_me: Adjusting LDFLAGS to use -m64" >&6;} case $LDFLAGS in *-m64*) ;; *) LDFLAGS="-m64 $LDFLAGS" ;; esac fi; if test X${enable_m32_build} = Xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to use -m32" >&5 $as_echo "$as_me: Adjusting LDFLAGS to use -m32" >&6;} ; case $LDFLAGS in *-m32*) ;; *) LDFLAGS="-m32 $LDFLAGS" ;; esac ; fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if VM has to be linked with Carbon framework" >&5 $as_echo_n "checking if VM has to be linked with Carbon framework... " >&6; } case $ARCH-$OPSYS in *-darwin*) LIBCARBON="-framework Carbon -framework Cocoa" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) LIBCARBON= { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac _search_path=/bin:/usr/bin:/usr/local/bin:$PATH # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MKDIR+:} false; then : $as_echo_n "(cached) " >&6 else case $MKDIR in [\\/]* | ?:[\\/]*) ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $_search_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="false" ;; esac fi MKDIR=$ac_cv_path_MKDIR if test -n "$MKDIR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 $as_echo "$MKDIR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$ac_cv_path_MKDIR" = false; then as_fn_error $? "No 'mkdir' command found" "$LINENO" 5 fi # Extract the first word of "cp", so it can be a program name with args. set dummy cp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CP+:} false; then : $as_echo_n "(cached) " >&6 else case $CP in [\\/]* | ?:[\\/]*) ac_cv_path_CP="$CP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $_search_path do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_CP" && ac_cv_path_CP="false" ;; esac fi CP=$ac_cv_path_CP if test -n "$CP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 $as_echo "$CP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$ac_cv_path_CP" = false; then as_fn_error $? "No 'cp' command found" "$LINENO" 5 fi _search_path= # Remove old configuration information. # Next line should be before first output to CONN_INFO. So this is # just the right place. rm -f "$ERL_TOP/erts/CONF_INFO" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we are building a sharing-preserving emulator" >&5 $as_echo_n "checking if we are building a sharing-preserving emulator... " >&6; } if test "$enable_sharing_preserving" = "yes"; then $as_echo "#define SHCOPY 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in perl5 perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $PERL in [\\/]* | ?:[\\/]*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/local/bin:/opt/local/bin:/usr/local/gnu/bin:${PATH}" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PERL=$ac_cv_path_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done test -n "$PERL" || PERL="false" if test "$PERL" = "false"; then ac_cv_path_PERL=false PERL=false fi if test "$ac_cv_path_PERL" = false; then as_fn_error $? "Perl version 5 is required to build the emulator!" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test "$ac_cv_prog_AR" = false; then as_fn_error $? "No 'ar' command found in PATH" "$LINENO" 5 fi # # Get programs needed for building the documentation # ## Delete previous failed configure results if test -f doc/CONF_INFO; then rm -f doc/CONF_INFO fi for ac_prog in xsltproc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XSLTPROC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XSLTPROC"; then ac_cv_prog_XSLTPROC="$XSLTPROC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_XSLTPROC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XSLTPROC=$ac_cv_prog_XSLTPROC if test -n "$XSLTPROC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 $as_echo "$XSLTPROC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XSLTPROC" && break done if test -z "$XSLTPROC"; then echo "xsltproc" >> doc/CONF_INFO { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No 'xsltproc' command found: the documentation cannot be built" >&5 $as_echo "$as_me: WARNING: No 'xsltproc' command found: the documentation cannot be built" >&2;} fi for ac_prog in fop do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_FOP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FOP"; then ac_cv_prog_FOP="$FOP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FOP="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FOP=$ac_cv_prog_FOP if test -n "$FOP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5 $as_echo "$FOP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$FOP" && break done if test -z "$FOP"; then FOP="$ERL_TOP/make/fakefop" echo "fop" >> doc/CONF_INFO { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No 'fop' command found: going to generate placeholder PDF files" >&5 $as_echo "$as_me: WARNING: No 'fop' command found: going to generate placeholder PDF files" >&2;} fi for ac_prog in xmllint do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_XMLLINT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$XMLLINT"; then ac_cv_prog_XMLLINT="$XMLLINT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_XMLLINT="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi XMLLINT=$ac_cv_prog_XMLLINT if test -n "$XMLLINT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 $as_echo "$XMLLINT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$XMLLINT" && break done if test -z "$XMLLINT"; then echo "xmllint" >> doc/CONF_INFO { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No 'xmllint' command found: can't run the xmllint target for the documentation" >&5 $as_echo "$as_me: WARNING: No 'xmllint' command found: can't run the xmllint target for the documentation" >&2;} fi case $host in *-*-solaris*|free_source) if test -x /usr/ucb/install; then INSTALL="/usr/ucb/install -c" fi ;; *) ;; esac # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a directory including parents" >&5 $as_echo_n "checking how to create a directory including parents... " >&6; } if ${ac_cv_prog_mkdir_p+:} false; then : $as_echo_n "(cached) " >&6 else temp_name_base=config.$$ temp_name=$temp_name_base/x/y/z $INSTALL -d $temp_name >/dev/null 2>&1 ac_cv_prog_mkdir_p=none if test -d $temp_name; then ac_cv_prog_mkdir_p="$INSTALL -d" else mkdir -p $temp_name >/dev/null 2>&1 if test -d $temp_name; then ac_cv_prog_mkdir_p="mkdir -p" fi fi rm -fr $temp_name_base fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_mkdir_p" >&5 $as_echo "$ac_cv_prog_mkdir_p" >&6; } case "${ac_cv_prog_mkdir_p}" in none) as_fn_error $? "don't know how create directories with parents" "$LINENO" 5 ;; *) INSTALL_DIR="$ac_cv_prog_mkdir_p" ;; esac case $host_os in darwin*) INSTALL_DATA="$INSTALL_DATA -p";; *) ;; esac case $build in *tile*) INSTALL_PROGRAM="$INSTALL_PROGRAM -m755" INSTALL_SCRIPT="$INSTALL_SCRIPT -m755" ;; *) ;; esac HCC='$(CC)' HCFLAGS="" HCFLAGS="$HCFLAGS -I${ERL_TOP}/erts/$host" LD='$(CC)' LD_MAY_BE_WEAK=no case $host in win32) ERLANG_OSTYPE=win32 ;; *) ERLANG_OSTYPE=unix ;; esac # Check how to export functions from the emulator executable, needed # when dynamically loaded drivers are loaded (so that they can find # emulator functions). # OS'es with ELF executables using the GNU linker (Linux and recent *BSD, # in rare cases Solaris) typically need '-Wl,-export-dynamic' (i.e. pass # -export-dynamic to the linker - also known as -rdynamic and some other # variants); some sysVr4 system(s) instead need(s) '-Wl,-Bexport'. # AIX 4.x (perhaps only for x>=2) wants -Wl,-bexpall,-brtl and doesn't # reliably return an error for others, thus we separate it out. # Otherwise we assume that if the linker accepts the flag, it is needed. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra flags needed to export symbols" >&5 $as_echo_n "checking for extra flags needed to export symbols... " >&6; } DEXPORT="" case $host_os in aix*|os400*) DEXPORT=-Wl,-bexpall,-brtl ;; bsdi*) DEXPORT="-rdynamic " ;; win32) DEXPORT="" ;; *) save_ldflags="$LDFLAGS" LDFLAGS=-Wl,-export-dynamic cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : DEXPORT=-Wl,-export-dynamic else LDFLAGS=-Wl,-Bexport cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : DEXPORT=-Wl,-Bexport fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_ldflags" ;; esac case "x$DEXPORT" in "x") { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; };; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEXPORT" >&5 $as_echo "$DEXPORT" >&6; };; esac # Check for Solaris/ultrasparc /dev/perfmon interface # (also needs gcc specific asm instructions) case "${host}:${GCC}" in sparc-*-solaris*:yes) $as_echo "#define HAVE_SOLARIS_SPARC_PERFMON 1" >>confdefs.h ;; *) ;; esac case $host_os in darwin19*) # Disable stack checking to avoid crashing with a segment fault # in macOS Catalina. { $as_echo "$as_me:${as_lineno-$LINENO}: Turning off stack check on macOS 10.15 (Catalina)" >&5 $as_echo "$as_me: Turning off stack check on macOS 10.15 (Catalina)" >&6;} CFLAGS="-fno-stack-check $CFLAGS" ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 $as_echo_n "checking for sin in -lm... " >&6; } if ${ac_cv_lib_m_sin+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sin (); int main () { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sin=yes else ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 $as_echo "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 $as_echo_n "checking for main in -linet... " >&6; } if ${ac_cv_lib_inet_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet_main=yes else ac_cv_lib_inet_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 $as_echo "$ac_cv_lib_inet_main" >&6; } if test "x$ac_cv_lib_inet_main" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINET 1 _ACEOF LIBS="-linet $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 $as_echo_n "checking for openpty in -lutil... " >&6; } if ${ac_cv_lib_util_openpty+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char openpty (); int main () { return openpty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_util_openpty=yes else ac_cv_lib_util_openpty=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 $as_echo "$ac_cv_lib_util_openpty" >&6; } if test "x$ac_cv_lib_util_openpty" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUTIL 1 _ACEOF LIBS="-lutil $LIBS" fi # Check whether --enable-native-ethr-impls was given. if test "${enable_native_ethr_impls+set}" = set; then : enableval=$enable_native_ethr_impls; case "$enableval" in no) disable_native_ethr_impls=yes ;; *) disable_native_ethr_impls=no ;; esac else disable_native_ethr_impls=no fi test "X$disable_native_ethr_impls" = "Xyes" && $as_echo "#define ETHR_DISABLE_NATIVE_IMPLS 1" >>confdefs.h # Check whether --enable-x86-out-of-order was given. if test "${enable_x86_out_of_order+set}" = set; then : enableval=$enable_x86_out_of_order; fi # Check whether --enable-prefer-gcc-native-ethr-impls was given. if test "${enable_prefer_gcc_native_ethr_impls+set}" = set; then : enableval=$enable_prefer_gcc_native_ethr_impls; case "$enableval" in yes) enable_prefer_gcc_native_ethr_impls=yes ;; *) enable_prefer_gcc_native_ethr_impls=no ;; esac else enable_prefer_gcc_native_ethr_impls=no fi test $enable_prefer_gcc_native_ethr_impls = yes && $as_echo "#define ETHR_PREFER_GCC_NATIVE_IMPLS 1" >>confdefs.h # Check whether --enable-trust-gcc-atomic-builtins-memory-barriers was given. if test "${enable_trust_gcc_atomic_builtins_memory_barriers+set}" = set; then : enableval=$enable_trust_gcc_atomic_builtins_memory_barriers; case "$enableval" in yes) trust_gcc_atomic_builtins_mbs=1 ;; *) trust_gcc_atomic_builtins_mbs=0 ;; esac else trust_gcc_atomic_builtins_mbs=0 fi cat >>confdefs.h <<_ACEOF #define ETHR_TRUST_GCC_ATOMIC_BUILTINS_MEMORY_BARRIERS $trust_gcc_atomic_builtins_mbs _ACEOF # Check whether --with-libatomic_ops was given. if test "${with_libatomic_ops+set}" = set; then : withval=$with_libatomic_ops; fi # Check whether --with-with_sparc_memory_order was given. if test "${with_with_sparc_memory_order+set}" = set; then : withval=$with_with_sparc_memory_order; fi # Check whether --enable-ppc-lwsync-instruction was given. if test "${enable_ppc_lwsync_instruction+set}" = set; then : enableval=$enable_ppc_lwsync_instruction; case "$enableval" in no) enable_lwsync=no ;; *) enable_lwsync=yes ;; esac else # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF case $host_cpu-$ac_cv_sizeof_void_p in macppc-8|powerpc-8|ppc-8|powerpc64-8|ppc64-8|powerpc64le-8|ppc64le-8|"Power Macintosh"-8) enable_lwsync=yes;; *) enable_lwsync=undefined;; esac fi case $enable_lwsync in no) $as_echo "#define ETHR_PPC_HAVE_NO_LWSYNC 1" >>confdefs.h ;; yes) $as_echo "#define ETHR_PPC_HAVE_LWSYNC 1" >>confdefs.h ;; *) ;; esac NEED_NPTL_PTHREAD_H=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native win32 threads" >&5 $as_echo_n "checking for native win32 threads... " >&6; } if test "X$host_os" = "Xwin32"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } THR_DEFS="-DWIN32_THREADS" THR_LIBS= THR_LIB_NAME=win32_threads THR_LIB_TYPE=win32_threads else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } THR_DEFS= THR_LIBS= THR_LIB_NAME= THR_LIB_TYPE=posix_unknown { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : THR_LIBS="-lpthread" fi if test "x$THR_LIBS" = "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 $as_echo_n "checking for pthread_create in -lc_r... " >&6; } if ${ac_cv_lib_c_r_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lc_r $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_c_r_pthread_create=yes else ac_cv_lib_c_r_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 $as_echo "$ac_cv_lib_c_r_pthread_create" >&6; } if test "x$ac_cv_lib_c_r_pthread_create" = xyes; then : THR_LIBS="-lc_r" fi fi if test "x$THR_LIBS" = "x"; then ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" if test "x$ac_cv_func_pthread_create" = xyes; then : THR_LIBS="none_needed" fi fi if test "x$THR_LIBS" = "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the '-pthread' switch can be used" >&5 $as_echo_n "checking if the '-pthread' switch can be used... " >&6; } saved_cflags=$CFLAGS CFLAGS="$CFLAGS -pthread" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_create((void*)0,(void*)0,(void*)0,(void*)0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : THR_DEFS="-pthread" THR_LIBS="-pthread" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$saved_cflags if test "x$THR_LIBS" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$THR_LIBS" != "x"; then THR_DEFS="$THR_DEFS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS" THR_LIB_NAME=pthread if test "x$THR_LIBS" = "xnone_needed"; then THR_LIBS= fi case $host_os in solaris*) THR_DEFS="$THR_DEFS -D_POSIX_PTHREAD_SEMANTICS" ;; linux*) THR_DEFS="$THR_DEFS -D_POSIX_THREAD_SAFE_FUNCTIONS" if test "$cross_compiling" != "yes"; then # Extract the first word of "getconf", so it can be a program name with args. set dummy getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GETCONF"; then ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GETCONF="getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" fi fi GETCONF=$ac_cv_prog_GETCONF if test -n "$GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 $as_echo "$GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else host_getconf="$host_alias-getconf" # Extract the first word of "$host_getconf", so it can be a program name with args. set dummy $host_getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$GETCONF"; then ac_cv_prog_GETCONF="$GETCONF" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_GETCONF="$host_getconf" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_GETCONF" && ac_cv_prog_GETCONF="false" fi fi GETCONF=$ac_cv_prog_GETCONF if test -n "$GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 $as_echo "$GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$GETCONF" = "false" && test "$erl_xcomp_sysroot" != ""; then GETCONF= prfx="$erl_xcomp_sysroot" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}getconf", so it can be a program name with args. set dummy ${ac_tool_prefix}getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else case $GETCONF in [\\/]* | ?:[\\/]*) ac_cv_path_GETCONF="$GETCONF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GETCONF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GETCONF=$ac_cv_path_GETCONF if test -n "$GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 $as_echo "$GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_GETCONF"; then ac_pt_GETCONF=$GETCONF # Extract the first word of "getconf", so it can be a program name with args. set dummy getconf; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_GETCONF+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_GETCONF in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_GETCONF="$ac_pt_GETCONF" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy=""$prfx/usr/bin:$prfx/bin:$prfx/usr/local/bin"" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_GETCONF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_GETCONF=$ac_cv_path_ac_pt_GETCONF if test -n "$ac_pt_GETCONF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 $as_echo "$ac_pt_GETCONF" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_GETCONF" = x; then GETCONF="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac GETCONF=$ac_pt_GETCONF fi else GETCONF="$ac_cv_path_GETCONF" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Native POSIX Thread Library" >&5 $as_echo_n "checking for Native POSIX Thread Library... " >&6; } libpthr_vsn=`$GETCONF GNU_LIBPTHREAD_VERSION 2>/dev/null` if test $? -eq 0; then case "$libpthr_vsn" in *nptl*|*NPTL*) nptl=yes;; *) nptl=no;; esac elif test "$cross_compiling" = "yes"; then case "$erl_xcomp_linux_nptl" in "") nptl=cross;; yes|no) nptl=$erl_xcomp_linux_nptl;; *) as_fn_error $? "Bad erl_xcomp_linux_nptl value: $erl_xcomp_linux_nptl" "$LINENO" 5;; esac else nptl=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $nptl" >&5 $as_echo "$nptl" >&6; } if test $nptl = cross; then nptl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} fi if test $nptl = yes; then THR_LIB_TYPE=posix_nptl need_nptl_incldir=no ac_fn_c_check_header_mongrel "$LINENO" "nptl/pthread.h" "ac_cv_header_nptl_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_nptl_pthread_h" = xyes; then : need_nptl_incldir=yes NEED_NPTL_PTHREAD_H=yes fi if test $need_nptl_incldir = yes; then # Ahh... nptl_path="$C_INCLUDE_PATH:$CPATH" if test X$cross_compiling != Xyes; then nptl_path="$nptl_path:/usr/local/include:/usr/include" else IROOT="$erl_xcomp_isysroot" test "$IROOT" != "" || IROOT="$erl_xcomp_sysroot" test "$IROOT" != "" || as_fn_error $? "Don't know where to search for includes! Please set erl_xcomp_isysroot" "$LINENO" 5 nptl_path="$nptl_path:$IROOT/usr/local/include:$IROOT/usr/include" fi nptl_ws_path= save_ifs="$IFS"; IFS=":" for dir in $nptl_path; do if test "x$dir" != "x"; then nptl_ws_path="$nptl_ws_path $dir" fi done IFS=$save_ifs nptl_incldir= for dir in $nptl_ws_path; do as_ac_Header=`$as_echo "ac_cv_header_$dir/nptl/pthread.h" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$dir/nptl/pthread.h" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : nptl_incldir=$dir/nptl fi if test "x$nptl_incldir" != "x"; then THR_DEFS="$THR_DEFS -isystem $nptl_incldir" break fi done if test "x$nptl_incldir" = "x"; then as_fn_error $? "Failed to locate nptl system include directory" "$LINENO" 5 fi fi fi ;; *) ;; esac saved_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $THR_DEFS" ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : $as_echo "#define HAVE_PTHREAD_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "pthread/mit/pthread.h" "ac_cv_header_pthread_mit_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_mit_pthread_h" = xyes; then : \ $as_echo "#define HAVE_MIT_PTHREAD_H 1" >>confdefs.h fi CPPFLAGS=$saved_cppflags fi fi ERTS_INTERNAL_X_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 $as_echo_n "checking for kstat_open in -lkstat... " >&6; } if ${ac_cv_lib_kstat_kstat_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkstat $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char kstat_open (); int main () { return kstat_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kstat_kstat_open=yes else ac_cv_lib_kstat_kstat_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : $as_echo "#define HAVE_KSTAT 1" >>confdefs.h ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat" fi if test "no" = "yes"; then default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" else default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" fi case "try_find_pthread_compatible" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_MONOTONIC" ;; *) check_msg="custom " prefer_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_MONOTONIC" ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 $as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime(CLOCK_MONOTONIC_RAW, &ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_raw=yes else erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if ${erl_cv_clock_gettime_monotonic_try_find_pthread_compatible+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_try_find_pthread_compatible=$clock_type else erl_cv_clock_gettime_monotonic_try_find_pthread_compatible=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_try_find_pthread_compatible" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then for ac_func in clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else for ac_func in clock_getres clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 $as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_monotonic=yes else erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 $as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } erl_corrected_monotonic_clock=no case $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in *-*-*-win32) erl_monotonic_clock_func=WindowsAPI ;; CLOCK_*-*-*-linux*) case $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible-$erl_cv_clock_gettime_monotonic_raw in CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) erl_corrected_monotonic_clock=yes ;; *) # We don't trust CLOCK_MONOTONIC to be NTP # adjusted on linux systems that do not have # CLOCK_MONOTONIC_RAW (although it seems to # be...) ;; esac erl_monotonic_clock_func=clock_gettime ;; no-no-no-linux*) erl_monotonic_clock_func=times ;; CLOCK_*-*-*-*) erl_monotonic_clock_func=clock_gettime ;; no-yes-*-*) erl_monotonic_clock_func=gethrtime ;; no-no-yes-*) erl_monotonic_clock_func=mach_clock_get_time ;; no-no-no-*) erl_monotonic_clock_func=none ;; esac erl_monotonic_clock_low_resolution=no erl_monotonic_clock_lib= erl_monotonic_clock_id= case $erl_monotonic_clock_func in clock_gettime) erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_try_find_pthread_compatible for low_res_id in $low_resolution_clock_gettime_monotonic; do if test $erl_monotonic_clock_id = $low_res_id; then erl_monotonic_clock_low_resolution=yes break fi done erl_monotonic_clock_lib=$clock_gettime_lib ;; mach_clock_get_time) erl_monotonic_clock_id=SYSTEM_CLOCK ;; times) erl_monotonic_clock_low_resolution=yes ;; *) ;; esac case $erl_monotonic_clock_func in clock_gettime) $as_echo "#define ETHR_HAVE_CLOCK_GETTIME_MONOTONIC 1" >>confdefs.h ;; mach_clock_get_time) $as_echo "#define ETHR_HAVE_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; gethrtime) $as_echo "#define ETHR_HAVE_GETHRTIME 1" >>confdefs.h ;; *) ;; esac if test "x$erl_monotonic_clock_id" != "x"; then cat >>confdefs.h <<_ACEOF #define ETHR_MONOTONIC_CLOCK_ID $erl_monotonic_clock_id _ACEOF fi ethr_native_atomic_implementation=none ethr_have_native_atomics=no ethr_have_native_spinlock=no ETHR_THR_LIB_BASE="$THR_LIB_NAME" ETHR_THR_LIB_BASE_TYPE="$THR_LIB_TYPE" ETHR_DEFS="$THR_DEFS" ETHR_X_LIBS="$THR_LIBS $ERTS_INTERNAL_X_LIBS $erl_monotonic_clock_lib" ETHR_LIBS= ETHR_LIB_NAME= ethr_modified_default_stack_size= # Check whether --with-threadnames was given. if test "${with_threadnames+set}" = set; then : withval=$with_threadnames; else with_threadnames=yes fi ethr_lib_name=ethread case "$THR_LIB_NAME" in win32_threads) ETHR_THR_LIB_BASE_DIR=win # * _WIN32_WINNT >= 0x0400 is needed for # TryEnterCriticalSection # * _WIN32_WINNT >= 0x0403 is needed for # InitializeCriticalSectionAndSpinCount # The ethread lib will refuse to build if _WIN32_WINNT < 0x0403. # # -D_WIN32_WINNT should have been defined in $CPPFLAGS; fetch it # and save it in ETHR_DEFS. found_win32_winnt=no for cppflag in $CPPFLAGS; do case $cppflag in -DWINVER*) ETHR_DEFS="$ETHR_DEFS $cppflag" ;; -D_WIN32_WINNT*) ETHR_DEFS="$ETHR_DEFS $cppflag" found_win32_winnt=yes ;; *) ;; esac done if test $found_win32_winnt = no; then as_fn_error $? "-D_WIN32_WINNT missing in CPPFLAGS" "$LINENO" 5 fi $as_echo "#define ETHR_WIN32_THREADS 1" >>confdefs.h if test "X$disable_native_ethr_impls" = "Xyes"; then have_interlocked_op=no ethr_have_native_atomics=no else ilckd="_InterlockedDecrement" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDDECREMENT 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedDecrement_rel" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDDECREMENT_REL 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedIncrement" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDINCREMENT 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedIncrement_acq" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedExchangeAdd" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDEXCHANGEADD 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedExchangeAdd_acq" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedAnd" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDAND 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedOr" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDOR 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedExchange" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDEXCHANGE 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedCompareExchange" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange_acq" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange_rel" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (long) 0);";; "3") ilckd_call="${ilckd}(var, (long) 0, (long) 0);";; "4") ilckd_call="${ilckd}(var, (long) 0, (long) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedDecrement64" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDDECREMENT64 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedDecrement64_rel" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDDECREMENT64_REL 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedIncrement64" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDINCREMENT64 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedIncrement64_acq" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "1" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedExchangeAdd64" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedExchangeAdd64_acq" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedAnd64" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDAND64 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedOr64" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDOR64 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedExchange64" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "2" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDEXCHANGE64 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } ilckd="_InterlockedCompareExchange64" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange64_acq" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange64_rel" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "3" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } test "$have_interlocked_op" = "yes" && ethr_have_native_atomics=yes ilckd="_InterlockedCompareExchange128" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 $as_echo_n "checking for ${ilckd}()... " >&6; } case "4" in "1") ilckd_call="${ilckd}(var);";; "2") ilckd_call="${ilckd}(var, (__int64) 0);";; "3") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0);";; "4") ilckd_call="${ilckd}(var, (__int64) 0, (__int64) 0, arr);";; esac have_interlocked_op=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main () { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_interlocked_op=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $have_interlocked_op = yes && cat >>confdefs.h <<_ACEOF #define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128 1 _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_interlocked_op" >&5 $as_echo "$have_interlocked_op" >&6; } fi if test "$ethr_have_native_atomics" = "yes"; then ethr_native_atomic_implementation=windows ethr_have_native_spinlock=yes fi ;; pthread) ETHR_THR_LIB_BASE_DIR=pthread $as_echo "#define ETHR_PTHREADS 1" >>confdefs.h case $host_os in openbsd*) # The default stack size is insufficient for our needs # on OpenBSD. We increase it to 256 kilo words. ethr_modified_default_stack_size=256;; linux*) ETHR_DEFS="$ETHR_DEFS -D_GNU_SOURCE" if test X$cross_compiling = Xyes; then case X$erl_xcomp_linux_usable_sigusrx in X) usable_sigusrx=cross;; Xyes|Xno) usable_sigusrx=$erl_xcomp_linux_usable_sigusrx;; *) as_fn_error $? "Bad erl_xcomp_linux_usable_sigusrx value: $erl_xcomp_linux_usable_sigusrx" "$LINENO" 5;; esac case X$erl_xcomp_linux_usable_sigaltstack in X) usable_sigaltstack=cross;; Xyes|Xno) usable_sigaltstack=$erl_xcomp_linux_usable_sigaltstack;; *) as_fn_error $? "Bad erl_xcomp_linux_usable_sigaltstack value: $erl_xcomp_linux_usable_sigaltstack" "$LINENO" 5;; esac else # FIXME: Test for actual problems instead of kernel versions linux_kernel_vsn_=`uname -r` case $linux_kernel_vsn_ in [0-1].*|2.[0-1]|2.[0-1].*) usable_sigusrx=no usable_sigaltstack=no;; 2.[2-3]|2.[2-3].*) usable_sigusrx=yes usable_sigaltstack=no;; *) usable_sigusrx=yes usable_sigaltstack=yes;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if SIGUSR1 and SIGUSR2 can be used" >&5 $as_echo_n "checking if SIGUSR1 and SIGUSR2 can be used... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $usable_sigusrx" >&5 $as_echo "$usable_sigusrx" >&6; } if test $usable_sigusrx = cross; then usable_sigusrx=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} fi if test $usable_sigusrx = no; then ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGUSRX" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sigaltstack can be used" >&5 $as_echo_n "checking if sigaltstack can be used... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $usable_sigaltstack" >&5 $as_echo "$usable_sigaltstack" >&6; } if test $usable_sigaltstack = cross; then usable_sigaltstack=yes { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result yes guessed because of cross compilation" >&2;} fi if test $usable_sigaltstack = no; then ETHR_DEFS="$ETHR_DEFS -DETHR_UNUSABLE_SIGALTSTACK" fi ;; *) ;; esac saved_cppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $ETHR_DEFS" saved_libs="$LIBS" LIBS="$LIBS $ETHR_X_LIBS" ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes; then : \ $as_echo "#define ETHR_HAVE_PTHREAD_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "pthread/mit/pthread.h" "ac_cv_header_pthread_mit_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_mit_pthread_h" = xyes; then : \ $as_echo "#define ETHR_HAVE_MIT_PTHREAD_H 1" >>confdefs.h fi if test $NEED_NPTL_PTHREAD_H = yes; then $as_echo "#define ETHR_NEED_NPTL_PTHREAD_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default" if test "x$ac_cv_header_sched_h" = xyes; then : \ $as_echo "#define ETHR_HAVE_SCHED_H 1" >>confdefs.h fi ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : \ $as_echo "#define ETHR_HAVE_SYS_TIME_H 1" >>confdefs.h fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct timeval *tv; return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define ETHR_TIME_WITH_SYS_TIME 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable PTHREAD_STACK_MIN" >&5 $as_echo_n "checking for usable PTHREAD_STACK_MIN... " >&6; } pthread_stack_min=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if defined(ETHR_NEED_NPTL_PTHREAD_H) #include #elif defined(ETHR_HAVE_MIT_PTHREAD_H) #include #elif defined(ETHR_HAVE_PTHREAD_H) #include #endif int main () { return PTHREAD_STACK_MIN; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : pthread_stack_min=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_stack_min" >&5 $as_echo "$pthread_stack_min" >&6; } test $pthread_stack_min != yes || { $as_echo "#define ETHR_HAVE_USABLE_PTHREAD_STACK_MIN 1" >>confdefs.h } ac_fn_c_check_func "$LINENO" "pthread_spin_lock" "ac_cv_func_pthread_spin_lock" if test "x$ac_cv_func_pthread_spin_lock" = xyes; then : \ ethr_have_native_spinlock=yes \ $as_echo "#define ETHR_HAVE_PTHREAD_SPIN_LOCK 1" >>confdefs.h fi have_sched_yield=no have_librt_sched_yield=no ac_fn_c_check_func "$LINENO" "sched_yield" "ac_cv_func_sched_yield" if test "x$ac_cv_func_sched_yield" = xyes; then : have_sched_yield=yes fi if test $have_sched_yield = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 $as_echo_n "checking for sched_yield in -lrt... " >&6; } if ${ac_cv_lib_rt_sched_yield+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sched_yield (); int main () { return sched_yield (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_sched_yield=yes else ac_cv_lib_rt_sched_yield=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; } if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : have_librt_sched_yield=yes ETHR_X_LIBS="$ETHR_X_LIBS -lrt" fi fi if test $have_sched_yield = yes || test $have_librt_sched_yield = yes; then $as_echo "#define ETHR_HAVE_SCHED_YIELD 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sched_yield() returns an int" >&5 $as_echo_n "checking whether sched_yield() returns an int... " >&6; } sched_yield_ret_int=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef ETHR_HAVE_SCHED_H #include #endif int main () { int sched_yield(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : sched_yield_ret_int=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sched_yield_ret_int" >&5 $as_echo "$sched_yield_ret_int" >&6; } if test $sched_yield_ret_int = yes; then $as_echo "#define ETHR_SCHED_YIELD_RET_INT 1" >>confdefs.h fi fi have_pthread_yield=no ac_fn_c_check_func "$LINENO" "pthread_yield" "ac_cv_func_pthread_yield" if test "x$ac_cv_func_pthread_yield" = xyes; then : have_pthread_yield=yes fi if test $have_pthread_yield = yes; then $as_echo "#define ETHR_HAVE_PTHREAD_YIELD 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_yield() returns an int" >&5 $as_echo_n "checking whether pthread_yield() returns an int... " >&6; } pthread_yield_ret_int=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(ETHR_NEED_NPTL_PTHREAD_H) #include #elif defined(ETHR_HAVE_MIT_PTHREAD_H) #include #elif defined(ETHR_HAVE_PTHREAD_H) #include #endif int main () { int pthread_yield(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pthread_yield_ret_int=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_yield_ret_int" >&5 $as_echo "$pthread_yield_ret_int" >&6; } if test $pthread_yield_ret_int = yes; then $as_echo "#define ETHR_PTHREAD_YIELD_RET_INT 1" >>confdefs.h fi fi have_pthread_rwlock_init=no ac_fn_c_check_func "$LINENO" "pthread_rwlock_init" "ac_cv_func_pthread_rwlock_init" if test "x$ac_cv_func_pthread_rwlock_init" = xyes; then : have_pthread_rwlock_init=yes fi if test $have_pthread_rwlock_init = yes; then ethr_have_pthread_rwlockattr_setkind_np=no ac_fn_c_check_func "$LINENO" "pthread_rwlockattr_setkind_np" "ac_cv_func_pthread_rwlockattr_setkind_np" if test "x$ac_cv_func_pthread_rwlockattr_setkind_np" = xyes; then : ethr_have_pthread_rwlockattr_setkind_np=yes fi if test $ethr_have_pthread_rwlockattr_setkind_np = yes; then $as_echo "#define ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP" >&5 $as_echo_n "checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP... " >&6; } ethr_pthread_rwlock_writer_nonrecursive_initializer_np=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(ETHR_NEED_NPTL_PTHREAD_H) #include #elif defined(ETHR_HAVE_MIT_PTHREAD_H) #include #elif defined(ETHR_HAVE_PTHREAD_H) #include #endif int main () { pthread_rwlockattr_t *attr; return pthread_rwlockattr_setkind_np(attr, PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_pthread_rwlock_writer_nonrecursive_initializer_np=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&5 $as_echo "$ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&6; } if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then $as_echo "#define ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 1" >>confdefs.h fi fi fi if test "$force_pthread_rwlocks" = "yes"; then $as_echo "#define ETHR_FORCE_PTHREAD_RWLOCK 1" >>confdefs.h if test $have_pthread_rwlock_init = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues." >&5 $as_echo "$as_me: WARNING: Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues." >&2;} else as_fn_error $? "User forced usage of pthread rwlock, but no such implementation was found" "$LINENO" 5 fi fi ac_fn_c_check_func "$LINENO" "pthread_attr_setguardsize" "ac_cv_func_pthread_attr_setguardsize" if test "x$ac_cv_func_pthread_attr_setguardsize" = xyes; then : \ $as_echo "#define ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE 1" >>confdefs.h fi if test "x$erl_monotonic_clock_id" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_cond_timedwait() can use the monotonic clock $erl_monotonic_clock_id for timeout" >&5 $as_echo_n "checking whether pthread_cond_timedwait() can use the monotonic clock $erl_monotonic_clock_id for timeout... " >&6; } pthread_cond_timedwait_monotonic=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(ETHR_NEED_NPTL_PTHREAD_H) # include #elif defined(ETHR_HAVE_MIT_PTHREAD_H) # include #elif defined(ETHR_HAVE_PTHREAD_H) # include #endif #ifdef ETHR_TIME_WITH_SYS_TIME # include # include #else # ifdef ETHR_HAVE_SYS_TIME_H # include # else # include # endif #endif #if defined(ETHR_HAVE_MACH_CLOCK_GET_TIME) # include # include #endif int main () { int res; pthread_condattr_t attr; pthread_cond_t cond; struct timespec cond_timeout; pthread_mutex_t mutex; res = pthread_condattr_init(&attr); res = pthread_condattr_setclock(&attr, ETHR_MONOTONIC_CLOCK_ID); res = pthread_cond_init(&cond, &attr); res = pthread_cond_timedwait(&cond, &mutex, &cond_timeout); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pthread_cond_timedwait_monotonic=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_cond_timedwait_monotonic" >&5 $as_echo "$pthread_cond_timedwait_monotonic" >&6; } if test $pthread_cond_timedwait_monotonic = yes; then $as_echo "#define ETHR_HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1" >>confdefs.h fi fi linux_futex=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux futexes" >&5 $as_echo_n "checking for Linux futexes... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { int i = 1; syscall(__NR_futex, (void *) &i, FUTEX_WAKE, 1, (void*)0,(void*)0, 0); syscall(__NR_futex, (void *) &i, FUTEX_WAIT, 0, (void*)0,(void*)0, 0); return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : linux_futex=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $linux_futex" >&5 $as_echo "$linux_futex" >&6; } test $linux_futex = yes && $as_echo "#define ETHR_HAVE_LINUX_FUTEX 1" >>confdefs.h pthread_setname=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np" >&5 $as_echo_n "checking for pthread_setname_np... " >&6; } old_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -Werror" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_setname_np(pthread_self(), "name"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pthread_setname=linux fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main () { pthread_set_name_np(pthread_self(), "name"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pthread_setname=bsd fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _DARWIN_C_SOURCE #include int main () { pthread_setname_np("name"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pthread_setname=darwin fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_setname" >&5 $as_echo "$pthread_setname" >&6; } case $with_threadnames-$pthread_setname in yes-linux) $as_echo "#define ETHR_HAVE_PTHREAD_SETNAME_NP_2 1" >>confdefs.h ;; yes-bsd) $as_echo "#define ETHR_HAVE_PTHREAD_SET_NAME_NP_2 1" >>confdefs.h ;; yes-darwin) $as_echo "#define ETHR_HAVE_PTHREAD_SETNAME_NP_1 1" >>confdefs.h ;; *) ;; esac pthread_getname=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_getname_np" >&5 $as_echo_n "checking for pthread_getname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #define _DARWIN_C_SOURCE #include int main () { char buff[256]; pthread_getname_np(pthread_self(), buff, 256); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pthread_getname=linux fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #define _DARWIN_C_SOURCE #include int main () { char buff[256]; pthread_getname_np(pthread_self(), buff); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pthread_getname=ibm fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pthread_getname" >&5 $as_echo "$pthread_getname" >&6; } case $pthread_getname in linux) $as_echo "#define ETHR_HAVE_PTHREAD_GETNAME_NP_3 1" >>confdefs.h ;; ibm) $as_echo "#define ETHR_HAVE_PTHREAD_GETNAME_NP_2 1" >>confdefs.h ;; *) ;; esac CFLAGS=$old_CFLAGS if test "X$disable_native_ethr_impls" = "Xyes"; then ethr_have_native_atomics=no else # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int128_t" >&5 $as_echo_n "checking size of __int128_t... " >&6; } if ${ac_cv_sizeof___int128_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int128_t))" "ac_cv_sizeof___int128_t" "$ac_includes_default"; then : else if test "$ac_cv_type___int128_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (__int128_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof___int128_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int128_t" >&5 $as_echo "$ac_cv_sizeof___int128_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF___INT128_T $ac_cv_sizeof___int128_t _ACEOF if test "$ac_cv_sizeof_short" = "4"; then gcc_atomic_type32="short" elif test "$ac_cv_sizeof_int" = "4"; then gcc_atomic_type32="int" elif test "$ac_cv_sizeof_long" = "4"; then gcc_atomic_type32="long" else as_fn_error $? "No 32-bit type found" "$LINENO" 5 fi if test "$ac_cv_sizeof_int" = "8"; then gcc_atomic_type64="int" elif test "$ac_cv_sizeof_long" = "8"; then gcc_atomic_type64="long" elif test "$ac_cv_sizeof_long_long" = "8"; then gcc_atomic_type64="long long" else as_fn_error $? "No 64-bit type found" "$LINENO" 5 fi if test "$ac_cv_sizeof___int128_t" = "16"; then gcc_atomic_type128="__int128_t" else gcc_atomic_type128="#error " fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working __sync_synchronize()" >&5 $as_echo_n "checking for a working __sync_synchronize()... " >&6; } if ${ethr_cv___sync_synchronize+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv___sync_synchronize=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __sync_synchronize(); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv___sync_synchronize=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $ethr_cv___sync_synchronize = yes; then # # Old gcc versions on at least x86 have a buggy # __sync_synchronize() which does not emit a # memory barrier. We try to detect this by # compiling to assembly with and without # __sync_synchronize() and compare the results. # ethr_test_filename="chk_if___sync_synchronize_noop_config1test.$$" cat > "${ethr_test_filename}.c" < "${ethr_test_filename}.c" </dev/null 2>&1; then ethr___sync_synchronize_noop=yes else ethr___sync_synchronize_noop=no fi rm -f "${ethr_test_filename}.c" "${ethr_test_filename}1.o" "${ethr_test_filename}2.o" if test $ethr___sync_synchronize_noop = yes; then # Got a buggy implementation of # __sync_synchronize... ethr_cv___sync_synchronize="no; buggy implementation" fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv___sync_synchronize" >&5 $as_echo "$ethr_cv___sync_synchronize" >&6; } if test "$ethr_cv___sync_synchronize" = "yes"; then have_sync_synchronize_value="~0" else have_sync_synchronize_value="0" fi cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___sync_synchronize $have_sync_synchronize_value _ACEOF # __sync_add_and_fetch - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __sync_add_and_fetch in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_add_and_fetch(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_add_and_fetch(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __sync_add_and_fetch" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_add_and_fetch()" >&5 $as_echo_n "checking for 32-bit __sync_add_and_fetch()... " >&6; } if ${ethr_cv_32bit___sync_add_and_fetch+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___sync_add_and_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___sync_add_and_fetch=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_add_and_fetch" >&5 $as_echo "$ethr_cv_32bit___sync_add_and_fetch" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_add_and_fetch()" >&5 $as_echo_n "checking for 64-bit __sync_add_and_fetch()... " >&6; } if ${ethr_cv_64bit___sync_add_and_fetch+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___sync_add_and_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___sync_add_and_fetch=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_add_and_fetch" >&5 $as_echo "$ethr_cv_64bit___sync_add_and_fetch" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_add_and_fetch()" >&5 $as_echo_n "checking for 128-bit __sync_add_and_fetch()... " >&6; } if ${ethr_cv_128bit___sync_add_and_fetch+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___sync_add_and_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___sync_add_and_fetch=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_add_and_fetch" >&5 $as_echo "$ethr_cv_128bit___sync_add_and_fetch" >&6; } case $ethr_cv_128bit___sync_add_and_fetch-$ethr_cv_64bit___sync_add_and_fetch-$ethr_cv_32bit___sync_add_and_fetch in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___sync_add_and_fetch $have_atomic_ops _ACEOF # __sync_fetch_and_and - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __sync_fetch_and_and in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_and(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_and(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __sync_fetch_and_and" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_fetch_and_and()" >&5 $as_echo_n "checking for 32-bit __sync_fetch_and_and()... " >&6; } if ${ethr_cv_32bit___sync_fetch_and_and+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___sync_fetch_and_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___sync_fetch_and_and=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_fetch_and_and" >&5 $as_echo "$ethr_cv_32bit___sync_fetch_and_and" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_fetch_and_and()" >&5 $as_echo_n "checking for 64-bit __sync_fetch_and_and()... " >&6; } if ${ethr_cv_64bit___sync_fetch_and_and+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___sync_fetch_and_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___sync_fetch_and_and=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_fetch_and_and" >&5 $as_echo "$ethr_cv_64bit___sync_fetch_and_and" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_fetch_and_and()" >&5 $as_echo_n "checking for 128-bit __sync_fetch_and_and()... " >&6; } if ${ethr_cv_128bit___sync_fetch_and_and+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___sync_fetch_and_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___sync_fetch_and_and=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_fetch_and_and" >&5 $as_echo "$ethr_cv_128bit___sync_fetch_and_and" >&6; } case $ethr_cv_128bit___sync_fetch_and_and-$ethr_cv_64bit___sync_fetch_and_and-$ethr_cv_32bit___sync_fetch_and_and in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___sync_fetch_and_and $have_atomic_ops _ACEOF # __sync_fetch_and_or - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __sync_fetch_and_or in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_or(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_fetch_and_or(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __sync_fetch_and_or" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_fetch_and_or()" >&5 $as_echo_n "checking for 32-bit __sync_fetch_and_or()... " >&6; } if ${ethr_cv_32bit___sync_fetch_and_or+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___sync_fetch_and_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___sync_fetch_and_or=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_fetch_and_or" >&5 $as_echo "$ethr_cv_32bit___sync_fetch_and_or" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_fetch_and_or()" >&5 $as_echo_n "checking for 64-bit __sync_fetch_and_or()... " >&6; } if ${ethr_cv_64bit___sync_fetch_and_or+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___sync_fetch_and_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___sync_fetch_and_or=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_fetch_and_or" >&5 $as_echo "$ethr_cv_64bit___sync_fetch_and_or" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_fetch_and_or()" >&5 $as_echo_n "checking for 128-bit __sync_fetch_and_or()... " >&6; } if ${ethr_cv_128bit___sync_fetch_and_or+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___sync_fetch_and_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___sync_fetch_and_or=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_fetch_and_or" >&5 $as_echo "$ethr_cv_128bit___sync_fetch_and_or" >&6; } case $ethr_cv_128bit___sync_fetch_and_or-$ethr_cv_64bit___sync_fetch_and_or-$ethr_cv_32bit___sync_fetch_and_or in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___sync_fetch_and_or $have_atomic_ops _ACEOF # __sync_val_compare_and_swap - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __sync_val_compare_and_swap in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __sync_val_compare_and_swap(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) 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);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __sync_val_compare_and_swap" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_val_compare_and_swap()" >&5 $as_echo_n "checking for 32-bit __sync_val_compare_and_swap()... " >&6; } if ${ethr_cv_32bit___sync_val_compare_and_swap+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___sync_val_compare_and_swap=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___sync_val_compare_and_swap=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_val_compare_and_swap" >&5 $as_echo "$ethr_cv_32bit___sync_val_compare_and_swap" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_val_compare_and_swap()" >&5 $as_echo_n "checking for 64-bit __sync_val_compare_and_swap()... " >&6; } if ${ethr_cv_64bit___sync_val_compare_and_swap+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___sync_val_compare_and_swap=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___sync_val_compare_and_swap=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_val_compare_and_swap" >&5 $as_echo "$ethr_cv_64bit___sync_val_compare_and_swap" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_val_compare_and_swap()" >&5 $as_echo_n "checking for 128-bit __sync_val_compare_and_swap()... " >&6; } if ${ethr_cv_128bit___sync_val_compare_and_swap+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___sync_val_compare_and_swap=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___sync_val_compare_and_swap=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_val_compare_and_swap" >&5 $as_echo "$ethr_cv_128bit___sync_val_compare_and_swap" >&6; } 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 no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___sync_val_compare_and_swap $have_atomic_ops _ACEOF # __atomic_store_n - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __atomic_store_n in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_store_n(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_store_n(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __atomic_store_n" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_store_n()" >&5 $as_echo_n "checking for 32-bit __atomic_store_n()... " >&6; } if ${ethr_cv_32bit___atomic_store_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___atomic_store_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___atomic_store_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_store_n" >&5 $as_echo "$ethr_cv_32bit___atomic_store_n" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_store_n()" >&5 $as_echo_n "checking for 64-bit __atomic_store_n()... " >&6; } if ${ethr_cv_64bit___atomic_store_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___atomic_store_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___atomic_store_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_store_n" >&5 $as_echo "$ethr_cv_64bit___atomic_store_n" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_store_n()" >&5 $as_echo_n "checking for 128-bit __atomic_store_n()... " >&6; } if ${ethr_cv_128bit___atomic_store_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___atomic_store_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___atomic_store_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_store_n" >&5 $as_echo "$ethr_cv_128bit___atomic_store_n" >&6; } case $ethr_cv_128bit___atomic_store_n-$ethr_cv_64bit___atomic_store_n-$ethr_cv_32bit___atomic_store_n in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___atomic_store_n $have_atomic_ops _ACEOF # __atomic_load_n - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __atomic_load_n in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_load_n(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_load_n(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __atomic_load_n" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_load_n()" >&5 $as_echo_n "checking for 32-bit __atomic_load_n()... " >&6; } if ${ethr_cv_32bit___atomic_load_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___atomic_load_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___atomic_load_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_load_n" >&5 $as_echo "$ethr_cv_32bit___atomic_load_n" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_load_n()" >&5 $as_echo_n "checking for 64-bit __atomic_load_n()... " >&6; } if ${ethr_cv_64bit___atomic_load_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___atomic_load_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___atomic_load_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_load_n" >&5 $as_echo "$ethr_cv_64bit___atomic_load_n" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_load_n()" >&5 $as_echo_n "checking for 128-bit __atomic_load_n()... " >&6; } if ${ethr_cv_128bit___atomic_load_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___atomic_load_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___atomic_load_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_load_n" >&5 $as_echo "$ethr_cv_128bit___atomic_load_n" >&6; } case $ethr_cv_128bit___atomic_load_n-$ethr_cv_64bit___atomic_load_n-$ethr_cv_32bit___atomic_load_n in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___atomic_load_n $have_atomic_ops _ACEOF # __atomic_add_fetch - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __atomic_add_fetch in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_add_fetch(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_add_fetch(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __atomic_add_fetch" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_add_fetch()" >&5 $as_echo_n "checking for 32-bit __atomic_add_fetch()... " >&6; } if ${ethr_cv_32bit___atomic_add_fetch+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___atomic_add_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___atomic_add_fetch=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_add_fetch" >&5 $as_echo "$ethr_cv_32bit___atomic_add_fetch" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_add_fetch()" >&5 $as_echo_n "checking for 64-bit __atomic_add_fetch()... " >&6; } if ${ethr_cv_64bit___atomic_add_fetch+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___atomic_add_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___atomic_add_fetch=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_add_fetch" >&5 $as_echo "$ethr_cv_64bit___atomic_add_fetch" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_add_fetch()" >&5 $as_echo_n "checking for 128-bit __atomic_add_fetch()... " >&6; } if ${ethr_cv_128bit___atomic_add_fetch+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___atomic_add_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___atomic_add_fetch=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_add_fetch" >&5 $as_echo "$ethr_cv_128bit___atomic_add_fetch" >&6; } case $ethr_cv_128bit___atomic_add_fetch-$ethr_cv_64bit___atomic_add_fetch-$ethr_cv_32bit___atomic_add_fetch in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___atomic_add_fetch $have_atomic_ops _ACEOF # __atomic_fetch_and - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __atomic_fetch_and in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_and(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_and(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __atomic_fetch_and" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_fetch_and()" >&5 $as_echo_n "checking for 32-bit __atomic_fetch_and()... " >&6; } if ${ethr_cv_32bit___atomic_fetch_and+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___atomic_fetch_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___atomic_fetch_and=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_fetch_and" >&5 $as_echo "$ethr_cv_32bit___atomic_fetch_and" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_fetch_and()" >&5 $as_echo_n "checking for 64-bit __atomic_fetch_and()... " >&6; } if ${ethr_cv_64bit___atomic_fetch_and+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___atomic_fetch_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___atomic_fetch_and=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_fetch_and" >&5 $as_echo "$ethr_cv_64bit___atomic_fetch_and" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_fetch_and()" >&5 $as_echo_n "checking for 128-bit __atomic_fetch_and()... " >&6; } if ${ethr_cv_128bit___atomic_fetch_and+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___atomic_fetch_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___atomic_fetch_and=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_fetch_and" >&5 $as_echo "$ethr_cv_128bit___atomic_fetch_and" >&6; } case $ethr_cv_128bit___atomic_fetch_and-$ethr_cv_64bit___atomic_fetch_and-$ethr_cv_32bit___atomic_fetch_and in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___atomic_fetch_and $have_atomic_ops _ACEOF # __atomic_fetch_or - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __atomic_fetch_or in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_or(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_fetch_or(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __atomic_fetch_or" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_fetch_or()" >&5 $as_echo_n "checking for 32-bit __atomic_fetch_or()... " >&6; } if ${ethr_cv_32bit___atomic_fetch_or+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___atomic_fetch_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___atomic_fetch_or=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_fetch_or" >&5 $as_echo "$ethr_cv_32bit___atomic_fetch_or" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_fetch_or()" >&5 $as_echo_n "checking for 64-bit __atomic_fetch_or()... " >&6; } if ${ethr_cv_64bit___atomic_fetch_or+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___atomic_fetch_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___atomic_fetch_or=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_fetch_or" >&5 $as_echo "$ethr_cv_64bit___atomic_fetch_or" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_fetch_or()" >&5 $as_echo_n "checking for 128-bit __atomic_fetch_or()... " >&6; } if ${ethr_cv_128bit___atomic_fetch_or+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___atomic_fetch_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___atomic_fetch_or=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_fetch_or" >&5 $as_echo "$ethr_cv_128bit___atomic_fetch_or" >&6; } case $ethr_cv_128bit___atomic_fetch_or-$ethr_cv_64bit___atomic_fetch_or-$ethr_cv_32bit___atomic_fetch_or in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___atomic_fetch_or $have_atomic_ops _ACEOF # __atomic_compare_exchange_n - atomic_op for atomic_bit_size in 32 64 128; do case $atomic_bit_size in 32) gcc_atomic_type="$gcc_atomic_type32";; 64) gcc_atomic_type="$gcc_atomic_type64";; 128) gcc_atomic_type="$gcc_atomic_type128";; esac gcc_atomic_lockfree="int x[(2*__atomic_always_lock_free(sizeof($gcc_atomic_type), 0))-1]" case __atomic_compare_exchange_n in __sync_add_and_fetch | __sync_fetch_and_and | __sync_fetch_and_or) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0);" ;; __sync_val_compare_and_swap) atomic_call="volatile $gcc_atomic_type var; $gcc_atomic_type res = __atomic_compare_exchange_n(&var, ($gcc_atomic_type) 0, ($gcc_atomic_type) 0);" ;; __atomic_store_n) 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);" ;; __atomic_load_n) 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);" ;; __atomic_add_fetch| __atomic_fetch_and | __atomic_fetch_or) 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);" ;; __atomic_compare_exchange_n) 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);" ;; *) as_fn_error $? "Internal error: missing implementation for __atomic_compare_exchange_n" "$LINENO" 5 ;; esac eval atomic${atomic_bit_size}_call=\"$atomic_call\" done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_compare_exchange_n()" >&5 $as_echo_n "checking for 32-bit __atomic_compare_exchange_n()... " >&6; } if ${ethr_cv_32bit___atomic_compare_exchange_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_32bit___atomic_compare_exchange_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic32_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_32bit___atomic_compare_exchange_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_compare_exchange_n" >&5 $as_echo "$ethr_cv_32bit___atomic_compare_exchange_n" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_compare_exchange_n()" >&5 $as_echo_n "checking for 64-bit __atomic_compare_exchange_n()... " >&6; } if ${ethr_cv_64bit___atomic_compare_exchange_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_64bit___atomic_compare_exchange_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic64_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_64bit___atomic_compare_exchange_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_compare_exchange_n" >&5 $as_echo "$ethr_cv_64bit___atomic_compare_exchange_n" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_compare_exchange_n()" >&5 $as_echo_n "checking for 128-bit __atomic_compare_exchange_n()... " >&6; } if ${ethr_cv_128bit___atomic_compare_exchange_n+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_128bit___atomic_compare_exchange_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { $atomic128_call ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_128bit___atomic_compare_exchange_n=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_compare_exchange_n" >&5 $as_echo "$ethr_cv_128bit___atomic_compare_exchange_n" >&6; } case $ethr_cv_128bit___atomic_compare_exchange_n-$ethr_cv_64bit___atomic_compare_exchange_n-$ethr_cv_32bit___atomic_compare_exchange_n in no-no-no) have_atomic_ops=0;; no-no-yes) have_atomic_ops=4;; no-yes-no) have_atomic_ops=8;; no-yes-yes) have_atomic_ops=12;; yes-no-no) have_atomic_ops=16;; yes-no-yes) have_atomic_ops=20;; yes-yes-no) have_atomic_ops=24;; yes-yes-yes) have_atomic_ops=28;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE___atomic_compare_exchange_n $have_atomic_ops _ACEOF ethr_have_gcc_native_atomics=no ethr_arm_dbm_sy_instr_val=0 ethr_arm_dbm_st_instr_val=0 ethr_arm_dbm_ld_instr_val=0 case "$GCC-$host_cpu" in yes-arm*|yes-aarch*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb sy' instruction" >&5 $as_echo_n "checking for ARM 'dmb sy' instruction... " >&6; } if ${ethr_cv_arm_dbm_sy_instr+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_arm_dbm_sy_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__ __volatile__("dmb sy" : : : "memory"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_arm_dbm_sy_instr=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_sy_instr" >&5 $as_echo "$ethr_cv_arm_dbm_sy_instr" >&6; } if test $ethr_cv_arm_dbm_sy_instr = yes; then ethr_arm_dbm_sy_instr_val=1 test $ethr_cv_64bit___atomic_compare_exchange_n = yes && ethr_have_gcc_native_atomics=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb st' instruction" >&5 $as_echo_n "checking for ARM 'dmb st' instruction... " >&6; } if ${ethr_cv_arm_dbm_st_instr+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_arm_dbm_st_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__ __volatile__("dmb st" : : : "memory"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_arm_dbm_st_instr=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_st_instr" >&5 $as_echo "$ethr_cv_arm_dbm_st_instr" >&6; } if test $ethr_cv_arm_dbm_st_instr = yes; then ethr_arm_dbm_st_instr_val=1 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb ld' instruction" >&5 $as_echo_n "checking for ARM 'dmb ld' instruction... " >&6; } if ${ethr_cv_arm_dbm_ld_instr+:} false; then : $as_echo_n "(cached) " >&6 else ethr_cv_arm_dbm_ld_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { __asm__ __volatile__("dmb ld" : : : "memory"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_cv_arm_dbm_ld_instr=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_ld_instr" >&5 $as_echo "$ethr_cv_arm_dbm_ld_instr" >&6; } if test $ethr_cv_arm_dbm_ld_instr = yes; then ethr_arm_dbm_ld_instr_val=1 fi;; *) ;; esac cat >>confdefs.h <<_ACEOF #define ETHR_HAVE_GCC_ASM_ARM_DMB_INSTRUCTION $ethr_arm_dbm_sy_instr_val _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_HAVE_GCC_ASM_ARM_DMB_ST_INSTRUCTION $ethr_arm_dbm_st_instr_val _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_HAVE_GCC_ASM_ARM_DMB_LD_INSTRUCTION $ethr_arm_dbm_ld_instr_val _ACEOF test $ethr_cv_32bit___sync_val_compare_and_swap = yes && ethr_have_gcc_native_atomics=yes test $ethr_cv_64bit___sync_val_compare_and_swap = yes && ethr_have_gcc_native_atomics=yes if test "$ethr_cv___sync_synchronize" = "yes"; then test $ethr_cv_64bit___atomic_compare_exchange_n = yes && ethr_have_gcc_native_atomics=yes test $ethr_cv_32bit___atomic_compare_exchange_n = yes && ethr_have_gcc_native_atomics=yes fi ethr_have_gcc_atomic_builtins=0 if test $ethr_have_gcc_native_atomics = yes; then ethr_native_atomic_implementation=gcc_sync test $ethr_cv_32bit___atomic_compare_exchange_n = yes && ethr_have_gcc_atomic_builtins=1 test $ethr_cv_64bit___atomic_compare_exchange_n = yes && ethr_have_gcc_atomic_builtins=1 test $ethr_have_gcc_atomic_builtins = 1 && ethr_native_atomic_implementation=gcc_atomic_sync fi cat >>confdefs.h <<_ACEOF #define ETHR_HAVE_GCC___ATOMIC_BUILTINS $ethr_have_gcc_atomic_builtins _ACEOF test $ethr_have_gcc_native_atomics = yes && ethr_have_native_atomics=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a usable libatomic_ops implementation" >&5 $as_echo_n "checking for a usable libatomic_ops implementation... " >&6; } case "x$with_libatomic_ops" in xno | xyes | x) libatomic_ops_include= ;; *) if test -d "${with_libatomic_ops}/include"; then libatomic_ops_include="-I$with_libatomic_ops/include" CPPFLAGS="$CPPFLAGS $libatomic_ops_include" else as_fn_error $? "libatomic_ops include directory $with_libatomic_ops/include not found" "$LINENO" 5 fi;; esac ethr_have_libatomic_ops=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "atomic_ops.h" int main () { volatile AO_t x; AO_t y; int z; AO_nop_full(); #if defined(AO_HAVE_store) AO_store(&x, (AO_t) 0); #elif defined(AO_HAVE_store_release) AO_store_release(&x, (AO_t) 0); #else #error No store #endif #if defined(AO_HAVE_load) z = AO_load(&x); #elif defined(AO_HAVE_load_acquire) z = AO_load_acquire(&x); #else #error No load #endif #if defined(AO_HAVE_compare_and_swap_full) z = AO_compare_and_swap_full(&x, (AO_t) 0, (AO_t) 1); #elif defined(AO_HAVE_compare_and_swap_release) z = AO_compare_and_swap_release(&x, (AO_t) 0, (AO_t) 1); #elif defined(AO_HAVE_compare_and_swap_acquire) z = AO_compare_and_swap_acquire(&x, (AO_t) 0, (AO_t) 1); #elif defined(AO_HAVE_compare_and_swap) z = AO_compare_and_swap(&x, (AO_t) 0, (AO_t) 1); #else #error No compare_and_swap #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ethr_have_native_atomics=yes ethr_native_atomic_implementation=libatomic_ops ethr_have_libatomic_ops=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ethr_have_libatomic_ops" >&5 $as_echo "$ethr_have_libatomic_ops" >&6; } if test $ethr_have_libatomic_ops = yes; then # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of AO_t" >&5 $as_echo_n "checking size of AO_t... " >&6; } if ${ac_cv_sizeof_AO_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (AO_t))" "ac_cv_sizeof_AO_t" " #include #include \"atomic_ops.h\" "; then : else if test "$ac_cv_type_AO_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (AO_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_AO_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_AO_t" >&5 $as_echo "$ac_cv_sizeof_AO_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_AO_T $ac_cv_sizeof_AO_t _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_SIZEOF_AO_T $ac_cv_sizeof_AO_t _ACEOF $as_echo "#define ETHR_HAVE_LIBATOMIC_OPS 1" >>confdefs.h if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then $as_echo "#define ETHR_PREFER_LIBATOMIC_OPS_NATIVE_IMPLS 1" >>confdefs.h fi ETHR_DEFS="$ETHR_DEFS $libatomic_ops_include" elif test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then as_fn_error $? "No usable libatomic_ops implementation found" "$LINENO" 5 fi case "$host_cpu" in sparc | sun4u | sparc64 | sun4v) case "$with_sparc_memory_order" in "TSO") $as_echo "#define ETHR_SPARC_TSO 1" >>confdefs.h ;; "PSO") $as_echo "#define ETHR_SPARC_PSO 1" >>confdefs.h ;; "RMO"|"") $as_echo "#define ETHR_SPARC_RMO 1" >>confdefs.h ;; *) as_fn_error $? "Unsupported Sparc memory order: $with_sparc_memory_order" "$LINENO" 5;; esac ethr_native_atomic_implementation=ethread ethr_have_native_atomics=yes;; i86pc | i*86 | x86_64 | amd64) if test "$enable_x86_out_of_order" = "yes"; then $as_echo "#define ETHR_X86_OUT_OF_ORDER 1" >>confdefs.h fi ethr_native_atomic_implementation=ethread ethr_have_native_atomics=yes;; macppc | ppc | powerpc | "Power Macintosh") ethr_native_atomic_implementation=ethread ethr_have_native_atomics=yes;; tile) ethr_native_atomic_implementation=ethread ethr_have_native_atomics=yes;; *) ;; esac fi test ethr_have_native_atomics = "yes" && ethr_have_native_spinlock=yes LIBS=$saved_libs CPPFLAGS=$saved_cppflags ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether default stack size should be modified" >&5 $as_echo_n "checking whether default stack size should be modified... " >&6; } if test "x$ethr_modified_default_stack_size" != "x"; then cat >>confdefs.h <<_ACEOF #define ETHR_MODIFIED_DEFAULT_STACK_SIZE $ethr_modified_default_stack_size _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; to $ethr_modified_default_stack_size kilo words" >&5 $as_echo "yes; to $ethr_modified_default_stack_size kilo words" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ETHR_THR_LIB_BASE" != "x"; then ETHR_DEFS="-DUSE_THREADS $ETHR_DEFS" ETHR_LIBS="-l$ethr_lib_name -lerts_internal_r $ETHR_X_LIBS" ETHR_LIB_NAME=$ethr_lib_name fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_SIZEOF_PTR $ac_cv_sizeof_void_p _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 $as_echo_n "checking size of __int64... " >&6; } if ${ac_cv_sizeof___int64+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default"; then : else if test "$ac_cv_type___int64" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (__int64) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof___int64=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 $as_echo "$ac_cv_sizeof___int64" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF___INT64 $ac_cv_sizeof___int64 _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_SIZEOF___INT64 $ac_cv_sizeof___int64 _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of __int128_t" >&5 $as_echo_n "checking size of __int128_t... " >&6; } if ${ac_cv_sizeof___int128_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int128_t))" "ac_cv_sizeof___int128_t" "$ac_includes_default"; then : else if test "$ac_cv_type___int128_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (__int128_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof___int128_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int128_t" >&5 $as_echo "$ac_cv_sizeof___int128_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF___INT128_T $ac_cv_sizeof___int128_t _ACEOF cat >>confdefs.h <<_ACEOF #define ETHR_SIZEOF___INT128_T $ac_cv_sizeof___int128_t _ACEOF case X$erl_xcomp_bigendian in X) ;; Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;; *) as_fn_error $? "Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" "$LINENO" 5;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac if test "$ac_cv_c_bigendian" = "yes"; then $as_echo "#define ETHR_BIGENDIAN 1" >>confdefs.h fi case X$erl_xcomp_double_middle_endian in X) ;; Xyes|Xno|Xunknown) ac_cv_c_double_middle_endian=$erl_xcomp_double_middle_endian;; *) as_fn_error $? "Bad erl_xcomp_double_middle_endian value: $erl_xcomp_double_middle_endian" "$LINENO" 5;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether double word ordering is middle-endian" >&5 $as_echo_n "checking whether double word ordering is middle-endian... " >&6; } if ${ac_cv_c_double_middle_endian+:} false; then : $as_echo_n "(cached) " >&6 else # It does not; compile a test program. if test "$cross_compiling" = yes; then : ac_cv_c_double_middle=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main(void) { int i = 0; int zero = 0; int bigendian; int zero_index = 0; union { long int l; char c[sizeof (long int)]; } u; /* we'll use the one with 32-bit words */ union { double d; unsigned int c[2]; } vint; union { double d; unsigned long c[2]; } vlong; union { double d; unsigned short c[2]; } vshort; /* Are we little or big endian? From Harbison&Steele. */ u.l = 1; bigendian = (u.c[sizeof (long int) - 1] == 1); zero_index = bigendian ? 1 : 0; vint.d = 1.0; vlong.d = 1.0; vshort.d = 1.0; if (sizeof(unsigned int) == 4) { if (vint.c[zero_index] != 0) zero = 1; } else if (sizeof(unsigned long) == 4) { if (vlong.c[zero_index] != 0) zero = 1; } else if (sizeof(unsigned short) == 4) { if (vshort.c[zero_index] != 0) zero = 1; } exit (zero); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_double_middle_endian=no else ac_cv_c_double_middle_endian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_double_middle_endian" >&5 $as_echo "$ac_cv_c_double_middle_endian" >&6; } case $ac_cv_c_double_middle_endian in yes) $as_echo "#define DOUBLE_MIDDLE_ENDIAN 1" >>confdefs.h ;; no) ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown double endianness presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&5 $as_echo "$as_me: WARNING: unknown double endianness presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&2;} ;; esac ETHR_X86_SSE2_ASM=no case "$GCC-$ac_cv_sizeof_void_p-$host_cpu" in yes-4-i86pc | yes-4-i*86 | yes-4-x86_64 | yes-4-amd64) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc sse2 asm support" >&5 $as_echo_n "checking for gcc sse2 asm support... " >&6; } save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -msse2" gcc_sse2_asm=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { long long x, *y; __asm__ __volatile__("movq %1, %0\n\t" : "=x"(x) : "m"(*y) : "memory"); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gcc_sse2_asm=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_sse2_asm" >&5 $as_echo "$gcc_sse2_asm" >&6; } if test "$gcc_sse2_asm" = "yes"; then $as_echo "#define ETHR_GCC_HAVE_SSE2_ASM_SUPPORT 1" >>confdefs.h ETHR_X86_SSE2_ASM=yes fi ;; *) ;; esac case "$GCC-$host_cpu" in yes-i86pc | yes-i*86 | yes-x86_64 | yes-amd64) if test $ac_cv_sizeof_void_p = 4; then dw_cmpxchg="cmpxchg8b" else dw_cmpxchg="cmpxchg16b" fi gcc_dw_cmpxchg_asm=no gcc_pic_dw_cmpxchg_asm=no gcc_cflags_pic=no gcc_cmpxchg8b_pic_no_clobber_ebx=no gcc_cmpxchg8b_pic_no_clobber_ebx_register_shortage=no save_CFLAGS="$CFLAGS" # Check if it works out of the box using passed CFLAGS # and with -fPIC added to CFLAGS if the passed CFLAGS # doesn't trigger position independent code pic_cmpxchg=unknown while true; do case $pic_cmpxchg in yes) pic_text="pic ";; *) pic_text="";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc $pic_text$dw_cmpxchg plain asm support" >&5 $as_echo_n "checking for gcc $pic_text$dw_cmpxchg plain asm support... " >&6; } plain_cmpxchg=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { char xchgd; long new[2], xchg[2], *p; __asm__ __volatile__( #if ETHR_SIZEOF_PTR == 4 "lock; cmpxchg8b %0\n\t" #else "lock; cmpxchg16b %0\n\t" #endif "setz %3\n\t" : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=q"(xchgd) : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "c"(new[1]), "b"(new[0]) : "cc", "memory"); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : plain_cmpxchg=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plain_cmpxchg" >&5 $as_echo "$plain_cmpxchg" >&6; } if test $pic_cmpxchg = yes; then gcc_pic_dw_cmpxchg_asm=$plain_cmpxchg break fi gcc_dw_cmpxchg_asm=$plain_cmpxchg # If not already compiling to position independent # code add -fPIC to CFLAGS and do it again. This # since we want also want to know how to compile # to position independent code since this might # cause problems with the use of the EBX register # as input to the asm on 32-bit x86 and old gcc # compilers (gcc vsn < 5). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if !defined(__PIC__) || !__PIC__ # error no pic #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : pic_cmpxchg=yes gcc_cflags_pic=yes else pic_cmpxchg=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $pic_cmpxchg = yes; then gcc_pic_dw_cmpxchg_asm=$gcc_dw_cmpxchg_asm break fi CFLAGS="$save_CFLAGS -fPIC" pic_cmpxchg=yes done if test $gcc_pic_dw_cmpxchg_asm = no && test $ac_cv_sizeof_void_p = 4; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc pic cmpxchg8b asm support with EBX workaround" >&5 $as_echo_n "checking for gcc pic cmpxchg8b asm support with EBX workaround... " >&6; } # Check if we can work around it by managing the ebx # register explicitly in the asm... cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { char xchgd; long new[2], xchg[2], *p; __asm__ __volatile__( "pushl %%ebx\n\t" "movl %8, %%ebx\n\t" "lock; cmpxchg8b %0\n\t" "setz %3\n\t" "popl %%ebx\n\t" : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=q"(xchgd) : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "c"(new[1]), "r"(new[0]) : "cc", "memory"); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gcc_pic_dw_cmpxchg_asm=yes gcc_cmpxchg8b_pic_no_clobber_ebx=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_pic_dw_cmpxchg_asm" >&5 $as_echo "$gcc_pic_dw_cmpxchg_asm" >&6; } if test $gcc_pic_dw_cmpxchg_asm = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc pic cmpxchg8b asm support with EBX and register shortage workarounds" >&5 $as_echo_n "checking for gcc pic cmpxchg8b asm support with EBX and register shortage workarounds... " >&6; } # If no optimization is enabled we sometimes get a # register shortage. Check if we can work around # this... cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { char xchgd; long new[2], xchg[2], *p; __asm__ __volatile__( "pushl %%ebx\n\t" "movl (%7), %%ebx\n\t" "movl 4(%7), %%ecx\n\t" "lock; cmpxchg8b %0\n\t" "setz %3\n\t" "popl %%ebx\n\t" : "=m"(*p), "=d"(xchg[1]), "=a"(xchg[0]), "=c"(xchgd) : "m"(*p), "1"(xchg[1]), "2"(xchg[0]), "r"(new) : "cc", "memory"); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : gcc_pic_dw_cmpxchg_asm=yes gcc_cmpxchg8b_pic_no_clobber_ebx=yes gcc_cmpxchg8b_pic_no_clobber_ebx_register_shortage=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_pic_dw_cmpxchg_asm" >&5 $as_echo "$gcc_pic_dw_cmpxchg_asm" >&6; } fi if test $gcc_cflags_pic = yes; then gcc_dw_cmpxchg_asm=$gcc_pic_dw_cmpxchg_asm fi fi CFLAGS="$save_CFLAGS" if test "$gcc_cmpxchg8b_pic_no_clobber_ebx" = "yes"; then $as_echo "#define ETHR_CMPXCHG8B_PIC_NO_CLOBBER_EBX 1" >>confdefs.h fi if test "$gcc_cmpxchg8b_pic_no_clobber_ebx_register_shortage" = "yes"; then $as_echo "#define ETHR_CMPXCHG8B_REGISTER_SHORTAGE 1" >>confdefs.h fi if test "$gcc_dw_cmpxchg_asm" = "yes"; then $as_echo "#define ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT 1" >>confdefs.h fi;; *) ;; esac $as_echo "#define ETHR_HAVE_ETHREAD_DEFINES 1" >>confdefs.h if test "X$ETHR_LIB_NAME" = "X"; then as_fn_error $? "cannot build emulator since no thread library was found" "$LINENO" 5 fi TYPES=opt DIRTY_SCHEDULER_TEST=$enable_dirty_schedulers_test test $DIRTY_SCHEDULER_TEST != yes || { test -f "$ERL_TOP/erts/CONF_INFO" || echo "" > "$ERL_TOP/erts/CONF_INFO" cat >> $ERL_TOP/erts/CONF_INFO <>confdefs.h case "$ethr_have_native_atomics-$smp_require_native_atomics-$ethr_have_native_spinlock" in yes-*) if test "$ethr_native_atomic_implementation" = "gcc_sync"; then test -f "$ERL_TOP/erts/CONF_INFO" || echo "" > "$ERL_TOP/erts/CONF_INFO" cat >> $ERL_TOP/erts/CONF_INFO < "$ERL_TOP/erts/CONF_INFO" cat >> $ERL_TOP/erts/CONF_INFO < "$ERL_TOP/erts/CONF_INFO" cat >> "$ERL_TOP/erts/CONF_INFO" <>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/falloc.h do : ac_fn_c_check_header_mongrel "$LINENO" "linux/falloc.h" "ac_cv_header_linux_falloc_h" "$ac_includes_default" if test "x$ac_cv_header_linux_falloc_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_FALLOC_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fallocate() works" >&5 $as_echo_n "checking whether fallocate() works... " >&6; } if ${i_cv_fallocate_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include int main () { int fd = creat("conftest.temp", 0600); fallocate(fd, FALLOC_FL_KEEP_SIZE,(off_t) 1024,(off_t) 1024); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : i_cv_fallocate_works=yes else i_cv_fallocate_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_fallocate_works" >&5 $as_echo "$i_cv_fallocate_works" >&6; } if test $i_cv_fallocate_works = yes; then $as_echo "#define HAVE_FALLOCATE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_fallocate() works" >&5 $as_echo_n "checking whether posix_fallocate() works... " >&6; } if ${i_cv_posix_fallocate_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : i_cv_posix_fallocate_works=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if !defined(__sun) && !defined(__sun__) #define _XOPEN_SOURCE 600 #endif #include #include #include #include #if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 7)) possibly broken posix_fallocate #endif int main() { int fd = creat("conftest.temp", 0600); int ret; if (-1 == fd) { perror("creat()"); return 2; } ret = posix_fallocate(fd, 1024, 1024) < 0 ? 1 : 0; unlink("conftest.temp"); return ret; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : i_cv_posix_fallocate_works=yes else i_cv_posix_fallocate_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $i_cv_posix_fallocate_works" >&5 $as_echo "$i_cv_posix_fallocate_works" >&6; } if test $i_cv_posix_fallocate_works = yes; then $as_echo "#define HAVE_POSIX_FALLOCATE /**/" >>confdefs.h fi # # EMU_THR_LIB_NAME, EMU_THR_LIBS, EMU_THR_X_LIBS, and EMU_THR_DEFS is # used by the emulator, and can (but should not) be used by applications # that only require thread support when the emulator has thread support. # Other applications should use ETHR_LIB_NAME, ETHR_LIBS, ETHR_X_LIBS, # and ETHR_DEFS. # EMU_THR_LIB_NAME= EMU_THR_X_LIBS= EMU_THR_LIBS= EMU_THR_DEFS= # Threads enabled for emulator EMU_THR_LIB_NAME=$ETHR_LIB_NAME EMU_THR_X_LIBS=$ETHR_X_LIBS EMU_THR_LIBS=$ETHR_LIBS EMU_THR_DEFS=$ETHR_DEFS ENABLE_ALLOC_TYPE_VARS="$ENABLE_ALLOC_TYPE_VARS threads" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lock checking should be enabled" >&5 $as_echo_n "checking whether lock checking should be enabled... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lock_check" >&5 $as_echo "$enable_lock_check" >&6; } if test "x$enable_lock_check" != "xno"; then EMU_THR_DEFS="$EMU_THR_DEFS -DERTS_ENABLE_LOCK_CHECK" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lock counters should be enabled" >&5 $as_echo_n "checking whether lock counters should be enabled... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_lock_count" >&5 $as_echo "$enable_lock_count" >&6; } if test "x$enable_lock_count" != "xno"; then TYPES="$TYPES lcnt" fi case $host_os in linux*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dlopen() needs to be called before first call to dlerror()" >&5 $as_echo_n "checking whether dlopen() needs to be called before first call to dlerror()... " >&6; } if test "x$ETHR_THR_LIB_BASE_TYPE" != "xposix_nptl"; then $as_echo "#define ERTS_NEED_DLOPEN_BEFORE_DLERROR 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) ;; esac # Remove -D_WIN32_WINNT*, -DWINVER* and -D_GNU_SOURCE from EMU_THR_DEFS # (defined in CFLAGS). Note that we want to keep these flags # in ETHR_DEFS, but not in EMU_THR_DEFS. new_emu_thr_defs= for thr_def in $EMU_THR_DEFS; do case $thr_def in -D_GNU_SOURCE*|-D_WIN32_WINNT*|-DWINVER*) ;; *) new_emu_thr_defs="$new_emu_thr_defs $thr_def" ;; esac done EMU_THR_DEFS=$new_emu_thr_defs if test "x$enable_lock_check" = "xno"; then EMU_LOCK_CHECKING=no else EMU_LOCK_CHECKING=yes fi ERTS_INTERNAL_X_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 $as_echo_n "checking for kstat_open in -lkstat... " >&6; } if ${ac_cv_lib_kstat_kstat_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkstat $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char kstat_open (); int main () { return kstat_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kstat_kstat_open=yes else ac_cv_lib_kstat_kstat_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : $as_echo "#define HAVE_KSTAT 1" >>confdefs.h ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat" fi THR_LIBS=$ETHR_X_LIBS THR_DEFS=$ETHR_DEFS TERMCAP_LIB= if test "x$with_termcap" != "xno" && test "X$host" != "Xwin32"; then # try these libs termcap_libs="tinfo ncurses curses termcap termlib" for termcap_lib in $termcap_libs; do as_ac_Lib=`$as_echo "ac_cv_lib_$termcap_lib''_tgetent" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l$termcap_lib" >&5 $as_echo_n "checking for tgetent in -l$termcap_lib... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l$termcap_lib $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tgetent (); int main () { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : TERMCAP_LIB="-l$termcap_lib" fi if test "x$TERMCAP_LIB" != "x"; then break fi done if test "x$TERMCAP_LIB" = "x"; then as_fn_error $? "No curses library functions found" "$LINENO" 5 fi fi if test "x$TERMCAP_LIB" != "x"; then $as_echo "#define HAVE_TERMCAP 1" >>confdefs.h fi if test "X$host" != "Xwin32"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wcwidth" >&5 $as_echo_n "checking for wcwidth... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { wcwidth(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_wcwidth=yes else have_wcwidth=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $have_wcwidth = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_WCWIDTH 1" >>confdefs.h fi fi # Check whether --enable-builtin-zlib was given. if test "${enable_builtin_zlib+set}" = set; then : enableval=$enable_builtin_zlib; case "$enableval" in no) enable_builtin_zlib=no ;; *) enable_builtin_zlib=yes ;; esac else enable_builtin_zlib=no fi Z_LIB= if test "x$enable_builtin_zlib" = "xyes"; then $as_echo "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: Using our own built-in zlib source" >&5 $as_echo "$as_me: Using our own built-in zlib source" >&6;} else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib 1.2.5 or higher" >&5 $as_echo_n "checking for zlib 1.2.5 or higher... " >&6; } zlib_save_LIBS=$LIBS LIBS="-lz $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "zlib.h" int main () { #if ZLIB_VERNUM >= 0x1250 Bytef s[1]; s[0] = 0; (void) adler32((uLong)0, s, 1); #else #error "No zlib 1.2.5 or higher found" error #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : Z_LIB="-lz" $as_echo "#define HAVE_LIBZ 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$Z_LIB" != ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inflateGetDictionary" >&5 $as_echo_n "checking for library containing inflateGetDictionary... " >&6; } if ${ac_cv_search_inflateGetDictionary+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inflateGetDictionary (); int main () { return inflateGetDictionary (); ; return 0; } _ACEOF for ac_lib in '' z; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inflateGetDictionary=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inflateGetDictionary+:} false; then : break fi done if ${ac_cv_search_inflateGetDictionary+:} false; then : else ac_cv_search_inflateGetDictionary=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateGetDictionary" >&5 $as_echo "$ac_cv_search_inflateGetDictionary" >&6; } ac_res=$ac_cv_search_inflateGetDictionary if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h fi fi LIBS=$zlib_save_LIBS fi # Check whether --enable-esock was given. if test "${enable_esock+set}" = set; then : enableval=$enable_esock; fi USE_ESOCK=yes if test "x$enable_esock" = "xyes"; then USE_ESOCK=yes else if test "x$enable_esock" = "xno"; then USE_ESOCK=no fi fi if test "x$USE_ESOCK" = "xyes"; then if test "x$USE_ESOCK" = "xyes"; then for ac_func in localtime_r strftime getprotoent setprotoent endprotoent do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi fi # Check whether --enable-esock_use_rcvsndtimeo was given. if test "${enable_esock_use_rcvsndtimeo+set}" = set; then : enableval=$enable_esock_use_rcvsndtimeo; fi if test "x$enable_esock_rcvsndtimeo" = "xyes"; then $as_echo "#define ESOCK_USE_RCVSNDTIMEO 1" >>confdefs.h fi # Check whether --with-esock-counter-size was given. if test "${with_esock_counter_size+set}" = set; then : withval=$with_esock_counter_size; else with_esock_counter_size=64 fi case "$with_esock_counter_size" in 16) $as_echo "#define ESOCK_COUNTER_SIZE 16" >>confdefs.h ;; 24) $as_echo "#define ESOCK_COUNTER_SIZE 24" >>confdefs.h ;; 32) $as_echo "#define ESOCK_COUNTER_SIZE 32" >>confdefs.h ;; 48) $as_echo "#define ESOCK_COUNTER_SIZE 48" >>confdefs.h ;; 64) $as_echo "#define ESOCK_COUNTER_SIZE 64" >>confdefs.h ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Invalid esock counter size ($with_esock_counter_size), using default (64)" >&5 $as_echo "$as_me: WARNING: Invalid esock counter size ($with_esock_counter_size), using default (64)" >&2;} $as_echo "#define ESOCK_COUNTER_SIZE 64" >>confdefs.h ;; esac ac_fn_c_check_func "$LINENO" "if_nametoindex" "ac_cv_func_if_nametoindex" if test "x$ac_cv_func_if_nametoindex" = xyes; then : $as_echo "#define HAVE_IF_NAMETOINDEX 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "if_indextoname" "ac_cv_func_if_indextoname" if test "x$ac_cv_func_if_indextoname" = xyes; then : $as_echo "#define HAVE_IF_INDEXTONAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "if_nameindex" "ac_cv_func_if_nameindex" if test "x$ac_cv_func_if_nameindex" = xyes; then : $as_echo "#define HAVE_IF_NAMEINDEX 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "if_freenameindex" "ac_cv_func_if_freenameindex" if test "x$ac_cv_func_if_freenameindex" = xyes; then : $as_echo "#define HAVE_IF_FREENAMEINDEX 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" if test "x$ac_cv_func_gethostname" = xyes; then : $as_echo "#define HAVE_GETHOSTNAME 1" >>confdefs.h fi # Check whether --enable-esock-socket-registry was given. if test "${enable_esock_socket_registry+set}" = set; then : enableval=$enable_esock_socket_registry; fi if test "x$enable_esock_socket_registry" = "xno"; then : $as_echo "#define ESOCK_USE_SOCKET_REGISTRY 0" >>confdefs.h else $as_echo "#define ESOCK_USE_SOCKET_REGISTRY 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_map" "ac_cv_member_struct_ifreq_ifr_map" "#ifdef __WIN32__ #else #include #endif " if test "x$ac_cv_member_struct_ifreq_ifr_map" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_MAP 1 _ACEOF $as_echo "#define ESOCK_USE_IFMAP /**/" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "#ifdef __WIN32__ #else #include #endif " if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 _ACEOF $as_echo "#define ESOCK_USE_HWADDR /**/" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_ifindex" "ac_cv_member_struct_ifreq_ifr_ifindex" "#ifdef __WIN32__ #else #include #endif " if test "x$ac_cv_member_struct_ifreq_ifr_ifindex" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_IFINDEX 1 _ACEOF $as_echo "#define ESOCK_USE_IFINDEX /**/" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_index" "ac_cv_member_struct_ifreq_ifr_index" "#ifdef __WIN32__ #else #include #endif " if test "x$ac_cv_member_struct_ifreq_ifr_index" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_INDEX 1 _ACEOF $as_echo "#define ESOCK_USE_INDEX /**/" >>confdefs.h fi #-------------------------------------------------------------------- # Check for the existence of the -lsocket and -lnsl libraries. # The order here is important, so that they end up in the right # order in the command line generated by make. Here are some # special considerations: # 1. Use "connect" and "accept" to check for -lsocket, and # "gethostbyname" to check for -lnsl. # 2. Use each function name only once: can't redo a check because # autoconf caches the results of the last check and won't redo it. # 3. Use -lnsl and -lsocket only if they supply procedures that # aren't already present in the normal libraries. This is because # IRIX 5.2 has libraries, but they aren't needed and they're # bogus: they goof up name resolution if used. # 4. On some SVR4 systems, can't use -lsocket without -lnsl too. # To get around this problem, check for both libraries together # if -lsocket doesn't work by itself. #-------------------------------------------------------------------- tk_oldLibs=$LIBS erl_checkBoth=0 SOCKET_LIBS="" ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : erl_checkSocket=0 else erl_checkSocket=1 fi if test "$erl_checkSocket" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5 $as_echo_n "checking for main in -lsocket... " >&6; } if ${ac_cv_lib_socket_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_main=yes else ac_cv_lib_socket_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5 $as_echo "$ac_cv_lib_socket_main" >&6; } if test "x$ac_cv_lib_socket_main" = xyes; then : SOCKET_LIBS="-lsocket" else erl_checkBoth=1 fi fi if test "$erl_checkBoth" = 1; then LIBS="$LIBS -lsocket -lnsl" ac_fn_c_check_func "$LINENO" "accept" "ac_cv_func_accept" if test "x$ac_cv_func_accept" = xyes; then : SOCKET_LIBS="-lsocket -lnsl" fi fi LIBS="$tk_oldLibs $SOCKET_LIBS" ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 $as_echo_n "checking for main in -lnsl... " >&6; } if ${ac_cv_lib_nsl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_main=yes else ac_cv_lib_nsl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 $as_echo "$ac_cv_lib_nsl_main" >&6; } if test "x$ac_cv_lib_nsl_main" = xyes; then : SOCKET_LIBS="$SOCKET_LIBS -lnsl" fi fi ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" if test "x$ac_cv_func_gethostbyname_r" = xyes; then : have_gethostbyname_r=yes fi LIBS="$tk_oldLibs $SOCKET_LIBS" if test "$have_gethostbyname_r" = yes; then # OK, so we have gethostbyname_r() - but do we know how to call it...? # (if not, HAVE_GETHOSTBYNAME_R will not be defined at all) case $host_os in solaris2*) $as_echo "#define HAVE_GETHOSTBYNAME_R GHBN_R_SOLARIS" >>confdefs.h ;; aix*|os400*) # AIX version also needs "struct hostent_data" defn cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct hostent_data hd; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_GETHOSTBYNAME_R GHBN_R_AIX" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ;; *) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GLIBC__ yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "^yes$" >/dev/null 2>&1; then : $as_echo "#define HAVE_GETHOSTBYNAME_R GHBN_R_GLIBC" >>confdefs.h fi rm -f conftest* ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working posix_openpt implementation" >&5 $as_echo_n "checking for working posix_openpt implementation... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _XOPEN_SOURCE 600 #include #include int main () { int mfd = posix_openpt(O_RDWR); ptsname(mfd); grantpt(mfd); unlockpt(mfd); return mfd; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : working_posix_openpt=yes else working_posix_openpt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "X$working_posix_openpt" = "Xyes"; then $as_echo "#define HAVE_WORKING_POSIX_OPENPT 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if netdb.h requires netinet/in.h to be previously included" >&5 $as_echo_n "checking if netdb.h requires netinet/in.h to be previously included... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sockaddr_in" >/dev/null 2>&1; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : need_in_h=yes else need_in_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else need_in_h=no fi rm -f conftest* if test $need_in_h = yes; then $as_echo "#define NETDB_H_NEEDS_IN_H 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 $as_echo_n "checking for socklen_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { socklen_t test; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : have_socklen_t=yes else have_socklen_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext, if test $have_socklen_t = yes; then $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errno declaration in netdb.h" >&5 $as_echo_n "checking for h_errno declaration in netdb.h... " >&6; } if ${ac_cv_decl_h_errno+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int err = h_errno; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_decl_h_errno=yes else ac_cv_decl_h_errno=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_h_errno" >&5 $as_echo "$ac_cv_decl_h_errno" >&6; } if test $ac_cv_decl_h_errno = yes; then $as_echo "#define H_ERRNO_DECLARED 1" >>confdefs.h fi saved_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $EMU_THR_DEFS" ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi for ac_header in fcntl.h limits.h unistd.h syslog.h dlfcn.h ieeefp.h \ sys/types.h sys/stropts.h sys/sysctl.h \ sys/ioctl.h sys/time.h sys/uio.h sys/mman.h \ sys/socket.h sys/sockio.h sys/socketio.h \ net/errno.h malloc.h arpa/nameser.h libdlpi.h \ pty.h util.h libutil.h utmp.h langinfo.h poll.h sdkddkver.h \ elf.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_hwaddr" "ac_cv_member_struct_ifreq_ifr_hwaddr" "#ifdef __WIN32__ #else #include #endif " if test "x$ac_cv_member_struct_ifreq_ifr_hwaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_HWADDR 1 _ACEOF fi ac_fn_c_check_member "$LINENO" "struct ifreq" "ifr_enaddr" "ac_cv_member_struct_ifreq_ifr_enaddr" "#ifdef __WIN32__ #else #include #endif " if test "x$ac_cv_member_struct_ifreq_ifr_enaddr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_IFREQ_IFR_ENADDR 1 _ACEOF fi if test x"$enable_systemd" != x"no"; then systemd_daemon_save_LIBS=$LIBS LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sd_listen_fds" >&5 $as_echo_n "checking for library containing sd_listen_fds... " >&6; } if ${ac_cv_search_sd_listen_fds+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sd_listen_fds (); int main () { return sd_listen_fds (); ; return 0; } _ACEOF for ac_lib in '' systemd systemd-daemon; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $systemd_daemon_save_LIBS $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sd_listen_fds=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sd_listen_fds+:} false; then : break fi done if ${ac_cv_search_sd_listen_fds+:} false; then : else ac_cv_search_sd_listen_fds=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sd_listen_fds" >&5 $as_echo "$ac_cv_search_sd_listen_fds" >&6; } ac_res=$ac_cv_search_sd_listen_fds if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_sd_listen_fds=yes else have_sd_listen_fds=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sd_notify" >&5 $as_echo_n "checking for library containing sd_notify... " >&6; } if ${ac_cv_search_sd_notify+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sd_notify (); int main () { return sd_notify (); ; return 0; } _ACEOF for ac_lib in '' systemd systemd-daemon; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $systemd_daemon_save_LIBS $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sd_notify=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sd_notify+:} false; then : break fi done if ${ac_cv_search_sd_notify+:} false; then : else ac_cv_search_sd_notify=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sd_notify" >&5 $as_echo "$ac_cv_search_sd_notify" >&6; } ac_res=$ac_cv_search_sd_notify if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_sd_notify=yes else have_sd_notify=no fi for ac_header in systemd/sd-daemon.h do : ac_fn_c_check_header_mongrel "$LINENO" "systemd/sd-daemon.h" "ac_cv_header_systemd_sd_daemon_h" "$ac_includes_default" if test "x$ac_cv_header_systemd_sd_daemon_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYSTEMD_SD_DAEMON_H 1 _ACEOF have_systemd_sd_daemon_h=yes else have_systemd_sd_daemon_h=no fi done if test x"$have_sd_listen_fds" = x"yes" && \ test x"$have_sd_notify" = x"yes" && \ test x"$have_systemd_sd_daemon_h" = x"yes"; then $as_echo "#define HAVE_SYSTEMD_DAEMON 1" >>confdefs.h SYSTEMD_DAEMON_LIBS=$LIBS elif test x"$enable_systemd" = x"yes"; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "--enable-systemd was given, but test for systemd failed See \`config.log' for more details" "$LINENO" 5; } fi LIBS=$systemd_daemon_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_open in -ldlpi" >&5 $as_echo_n "checking for dlpi_open in -ldlpi... " >&6; } if ${ac_cv_lib_dlpi_dlpi_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldlpi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlpi_open (); int main () { return dlpi_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dlpi_dlpi_open=yes else ac_cv_lib_dlpi_dlpi_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_open" >&5 $as_echo "$ac_cv_lib_dlpi_dlpi_open" >&6; } if test "x$ac_cv_lib_dlpi_dlpi_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDLPI 1 _ACEOF LIBS="-ldlpi $LIBS" fi if test x"$ac_cv_lib_dlpi_dlpi_open" = x"no"; then unset -v ac_cv_lib_dlpi_dlpi_open save_ldflags="$LDFLAGS" try_dlpi_lib=/lib if test x"$ac_cv_sizeof_void_p" = x"8"; then if test -d /lib64; then try_dlpi_lib=/lib64 elif test -d /lib/64; then try_dlpi_lib=/lib/64 fi fi if test ! -f "$try_dlpi_lib/libdlpi.so" && \ test -f "$try_dlpi_lib/libdlpi.so.1" then as_fn_error $? "Your OS installation is missing a symbolic link. Maybe it lacks some development package(s)... It can anyhow be fixed with the following command: # ln -s libdlpi.so.1 $try_dlpi_lib/libdlpi.so " "$LINENO" 5 fi LDFLAGS="-L$try_dlpi_lib -R$try_dlpi_lib $LDFLAGS" unset -v try_dlpi_lib { $as_echo "$as_me:${as_lineno-$LINENO}: Extending the search to include /lib" >&5 $as_echo "$as_me: Extending the search to include /lib" >&6;} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlpi_open in -ldlpi" >&5 $as_echo_n "checking for dlpi_open in -ldlpi... " >&6; } if ${ac_cv_lib_dlpi_dlpi_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldlpi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlpi_open (); int main () { return dlpi_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dlpi_dlpi_open=yes else ac_cv_lib_dlpi_dlpi_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_open" >&5 $as_echo "$ac_cv_lib_dlpi_dlpi_open" >&6; } if test "x$ac_cv_lib_dlpi_dlpi_open" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDLPI 1 _ACEOF LIBS="-ldlpi $LIBS" fi if test x"$ac_cv_lib_dlpi_dlpi_open" = x"no"; then LDFLAGS="$save_ldflags" fi unset -v save_ldflags fi ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" if test "x$ac_cv_header_sys_resource_h" = xyes; then : $as_echo "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h ac_fn_c_check_decl "$LINENO" "getrlimit" "ac_cv_have_decl_getrlimit" "#include " if test "x$ac_cv_have_decl_getrlimit" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_GETRLIMIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "setrlimit" "ac_cv_have_decl_setrlimit" "#include " if test "x$ac_cv_have_decl_setrlimit" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SETRLIMIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "RLIMIT_STACK" "ac_cv_have_decl_RLIMIT_STACK" "#include " if test "x$ac_cv_have_decl_RLIMIT_STACK" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_RLIMIT_STACK $ac_have_decl _ACEOF fi for ac_func in getrusage do : ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" if test "x$ac_cv_func_getrusage" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETRUSAGE 1 _ACEOF fi done have_kernel_poll=no ac_fn_c_check_header_mongrel "$LINENO" "sys/event.h" "ac_cv_header_sys_event_h" "$ac_includes_default" if test "x$ac_cv_header_sys_event_h" = xyes; then : have_kernel_poll=kqueue fi ac_fn_c_check_header_mongrel "$LINENO" "sys/epoll.h" "ac_cv_header_sys_epoll_h" "$ac_includes_default" if test "x$ac_cv_header_sys_epoll_h" = xyes; then : have_kernel_poll=epoll fi ac_fn_c_check_header_mongrel "$LINENO" "sys/devpoll.h" "ac_cv_header_sys_devpoll_h" "$ac_includes_default" if test "x$ac_cv_header_sys_devpoll_h" = xyes; then : have_kernel_poll=/dev/poll fi for ac_header in sys/timerfd.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/timerfd.h" "ac_cv_header_sys_timerfd_h" "$ac_includes_default" if test "x$ac_cv_header_sys_timerfd_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_TIMERFD_H 1 _ACEOF fi done for ac_header in netpacket/packet.h do : ac_fn_c_check_header_mongrel "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default" if test "x$ac_cv_header_netpacket_packet_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETPACKET_PACKET_H 1 _ACEOF have_netpacket_packet_h=yes else have_netpacket_packet_h=no fi done if test "x$enable_sctp" != "xno" ; then ac_fn_c_check_header_compile "$LINENO" "netinet/sctp.h" "ac_cv_header_netinet_sctp_h" "#if HAVE_SYS_SOCKET_H #include #endif " if test "x$ac_cv_header_netinet_sctp_h" = xyes; then : LIBSCTP=libsctp.so.1 $as_echo "#define HAVE_SCTP_H 1" >>confdefs.h fi fi case "x$enable_sctp" in xno|x) ;; *) if test "x$LIBSCTP" = "x" ; then as_fn_error $? "sctp support requested, but cannot be enabled since 'netinet/sctp.h' is missing" "$LINENO" 5 fi;; esac if test x"$ac_cv_header_netinet_sctp_h" = x"yes"; then if test "x$enable_sctp" = "xlib"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sctp_bindx in -lsctp" >&5 $as_echo_n "checking for sctp_bindx in -lsctp... " >&6; } if ${ac_cv_lib_sctp_sctp_bindx+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsctp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_bindx (); int main () { return sctp_bindx (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sctp_sctp_bindx=yes else ac_cv_lib_sctp_sctp_bindx=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sctp_sctp_bindx" >&5 $as_echo "$ac_cv_lib_sctp_sctp_bindx" >&6; } if test "x$ac_cv_lib_sctp_sctp_bindx" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSCTP 1 _ACEOF LIBS="-lsctp $LIBS" fi fi for ac_func in sctp_bindx sctp_peeloff sctp_getladdrs sctp_freeladdrs sctp_getpaddrs sctp_freepaddrs do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done 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 #include #endif #include " if test "x$ac_cv_member_struct_sctp_accoc_value_assoc_id" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_ACCOC_VALUE_ASSOC_ID 1 _ACEOF fi ac_fn_c_check_decl "$LINENO" "SCTP_UNORDERED" "ac_cv_have_decl_SCTP_UNORDERED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_UNORDERED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_UNORDERED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_ADDR_OVER" "ac_cv_have_decl_SCTP_ADDR_OVER" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_ADDR_OVER" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_ADDR_OVER $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_ABORT" "ac_cv_have_decl_SCTP_ABORT" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_ABORT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_ABORT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_EOF" "ac_cv_have_decl_SCTP_EOF" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_EOF" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_EOF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_SENDALL" "ac_cv_have_decl_SCTP_SENDALL" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_SENDALL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_SENDALL $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_ADDR_CONFIRMED" "ac_cv_have_decl_SCTP_ADDR_CONFIRMED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_ADDR_CONFIRMED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_ADDR_CONFIRMED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_DELAYED_ACK_TIME" "ac_cv_have_decl_SCTP_DELAYED_ACK_TIME" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_DELAYED_ACK_TIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_DELAYED_ACK_TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_EMPTY" "ac_cv_have_decl_SCTP_EMPTY" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_EMPTY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_EMPTY $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_UNCONFIRMED" "ac_cv_have_decl_SCTP_UNCONFIRMED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_UNCONFIRMED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_UNCONFIRMED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_CLOSED" "ac_cv_have_decl_SCTP_CLOSED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_CLOSED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_CLOSED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_IDLE" "ac_cv_have_decl_SCTPS_IDLE" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_IDLE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_IDLE $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_BOUND" "ac_cv_have_decl_SCTP_BOUND" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_BOUND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_BOUND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_BOUND" "ac_cv_have_decl_SCTPS_BOUND" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_BOUND" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_BOUND $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_LISTEN" "ac_cv_have_decl_SCTP_LISTEN" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_LISTEN" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_LISTEN $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_LISTEN" "ac_cv_have_decl_SCTPS_LISTEN" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_LISTEN" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_LISTEN $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_COOKIE_WAIT" "ac_cv_have_decl_SCTP_COOKIE_WAIT" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_COOKIE_WAIT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_COOKIE_WAIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_COOKIE_WAIT" "ac_cv_have_decl_SCTPS_COOKIE_WAIT" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_COOKIE_WAIT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_COOKIE_WAIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_COOKIE_ECHOED" "ac_cv_have_decl_SCTP_COOKIE_ECHOED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_COOKIE_ECHOED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_COOKIE_ECHOED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_COOKIE_ECHOED" "ac_cv_have_decl_SCTPS_COOKIE_ECHOED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_COOKIE_ECHOED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_COOKIE_ECHOED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_ESTABLISHED" "ac_cv_have_decl_SCTP_ESTABLISHED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_ESTABLISHED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_ESTABLISHED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_ESTABLISHED" "ac_cv_have_decl_SCTPS_ESTABLISHED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_ESTABLISHED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_ESTABLISHED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_PENDING" "ac_cv_have_decl_SCTP_SHUTDOWN_PENDING" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_PENDING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_SHUTDOWN_PENDING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_PENDING" "ac_cv_have_decl_SCTPS_SHUTDOWN_PENDING" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_PENDING" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_SHUTDOWN_PENDING $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_SENT" "ac_cv_have_decl_SCTP_SHUTDOWN_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_SENT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_SHUTDOWN_SENT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_SENT" "ac_cv_have_decl_SCTPS_SHUTDOWN_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_SENT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_SHUTDOWN_SENT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_RECEIVED" "ac_cv_have_decl_SCTP_SHUTDOWN_RECEIVED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_RECEIVED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_SHUTDOWN_RECEIVED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_RECEIVED" "ac_cv_have_decl_SCTPS_SHUTDOWN_RECEIVED" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_RECEIVED" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_SHUTDOWN_RECEIVED $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTP_SHUTDOWN_ACK_SENT" "ac_cv_have_decl_SCTP_SHUTDOWN_ACK_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_ACK_SENT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTP_SHUTDOWN_ACK_SENT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "SCTPS_SHUTDOWN_ACK_SENT" "ac_cv_have_decl_SCTPS_SHUTDOWN_ACK_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_ACK_SENT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SCTPS_SHUTDOWN_ACK_SENT $ac_have_decl _ACEOF ac_fn_c_check_member "$LINENO" "struct sctp_paddrparams" "spp_pathmtu" "ac_cv_member_struct_sctp_paddrparams_spp_pathmtu" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_member_struct_sctp_paddrparams_spp_pathmtu" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_PATHMTU 1 _ACEOF fi ac_fn_c_check_member "$LINENO" "struct sctp_paddrparams" "spp_sackdelay" "ac_cv_member_struct_sctp_paddrparams_spp_sackdelay" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_member_struct_sctp_paddrparams_spp_sackdelay" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY 1 _ACEOF fi ac_fn_c_check_member "$LINENO" "struct sctp_paddrparams" "spp_flags" "ac_cv_member_struct_sctp_paddrparams_spp_flags" "#if HAVE_SYS_SOCKET_H #include #endif #include " if test "x$ac_cv_member_struct_sctp_paddrparams_spp_flags" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_FLAGS 1 _ACEOF fi ac_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 #include #endif #include " if test "x$ac_cv_member_struct_sctp_remote_error_sre_data" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_REMOTE_ERROR_SRE_DATA 1 _ACEOF fi ac_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 #include #endif #include " if test "x$ac_cv_member_struct_sctp_send_failed_ssf_data" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_SEND_FAILED_SSF_DATA 1 _ACEOF fi ac_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 #include #endif #include " if test "x$ac_cv_member_struct_sctp_event_subscribe_sctp_authentication_event" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_AUTHENTICATION_EVENT 1 _ACEOF fi ac_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 #include #endif #include " if test "x$ac_cv_member_struct_sctp_event_subscribe_sctp_sender_dry_event" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_SENDER_DRY_EVENT 1 _ACEOF fi fi for ac_header in sched.h setns.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in setns do : ac_fn_c_check_func "$LINENO" "setns" "ac_cv_func_setns" if test "x$ac_cv_func_setns" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SETNS 1 _ACEOF fi done for ac_header in linux/types.h linux/errqueue.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TIME_H # include #endif #ifdef HAVE_LINUX_TYPES_H # include #endif " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done HAVE_VALGRIND=no ac_fn_c_check_header_mongrel "$LINENO" "valgrind/valgrind.h" "ac_cv_header_valgrind_valgrind_h" "$ac_includes_default" if test "x$ac_cv_header_valgrind_valgrind_h" = xyes; then : HAVE_VALGRIND=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SO_BSDCOMPAT declaration" >&5 $as_echo_n "checking for SO_BSDCOMPAT declaration... " >&6; } if ${ac_cv_decl_so_bsdcompat+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = SO_BSDCOMPAT; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_decl_so_bsdcompat=yes else ac_cv_decl_so_bsdcompat=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_so_bsdcompat" >&5 $as_echo "$ac_cv_decl_so_bsdcompat" >&6; } case "${ac_cv_decl_so_bsdcompat}" in "yes" ) $as_echo "#define HAVE_SO_BSDCOMPAT /**/" >>confdefs.h ;; * ) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in netinet/in.h" >&5 $as_echo_n "checking for INADDR_LOOPBACK in netinet/in.h... " >&6; } if ${ac_cv_decl_inaddr_loopback+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int i = INADDR_LOOPBACK; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_decl_inaddr_loopback=yes else ac_cv_decl_inaddr_loopback=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback" >&5 $as_echo "$ac_cv_decl_inaddr_loopback" >&6; } if test ${ac_cv_decl_inaddr_loopback} = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in rpc/types.h" >&5 $as_echo_n "checking for INADDR_LOOPBACK in rpc/types.h... " >&6; } if ${ac_cv_decl_inaddr_loopback_rpc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int i = INADDR_LOOPBACK; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_decl_inaddr_loopback_rpc=yes else ac_cv_decl_inaddr_loopback_rpc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback_rpc" >&5 $as_echo "$ac_cv_decl_inaddr_loopback_rpc" >&6; } case "${ac_cv_decl_inaddr_loopback_rpc}" in "yes" ) $as_echo "#define DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H /**/" >>confdefs.h ;; * ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in winsock2.h" >&5 $as_echo_n "checking for INADDR_LOOPBACK in winsock2.h... " >&6; } if ${ac_cv_decl_inaddr_loopback_winsock2+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include int main () { int i = INADDR_LOOPBACK; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_decl_inaddr_loopback_winsock2=yes else ac_cv_decl_inaddr_loopback_winsock2=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback_winsock2" >&5 $as_echo "$ac_cv_decl_inaddr_loopback_winsock2" >&6; } case "${ac_cv_decl_inaddr_loopback_winsock2}" in "yes" ) $as_echo "#define DEF_INADDR_LOOPBACK_IN_WINSOCK2_H /**/" >>confdefs.h ;; * ) # couldn't find it anywhere $as_echo "#define HAVE_NO_INADDR_LOOPBACK /**/" >>confdefs.h ;; esac;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys_errlist declaration in stdio.h or errno.h" >&5 $as_echo_n "checking for sys_errlist declaration in stdio.h or errno.h... " >&6; } if ${ac_cv_decl_sys_errlist+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { char *msg = *(sys_errlist + 1); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_decl_sys_errlist=yes else ac_cv_decl_sys_errlist=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_sys_errlist" >&5 $as_echo "$ac_cv_decl_sys_errlist" >&6; } if test $ac_cv_decl_sys_errlist = yes; then $as_echo "#define SYS_ERRLIST_DECLARED /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if windows.h includes winsock2.h" >&5 $as_echo_n "checking if windows.h includes winsock2.h... " >&6; } if ${erts_cv_windows_h_includes_winsock2_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _WINSOCK2API_ #error winsock2.h not included #endif int i = 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erts_cv_windows_h_includes_winsock2_h=yes else erts_cv_windows_h_includes_winsock2_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_windows_h_includes_winsock2_h" >&5 $as_echo "$erts_cv_windows_h_includes_winsock2_h" >&6; } if test $erts_cv_windows_h_includes_winsock2_h = yes; then $as_echo "#define WINDOWS_H_INCLUDES_WINSOCK2_H 1" >>confdefs.h fi CPPFLAGS=$saved_cppflags { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" if test "x$ac_cv_type_off_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct sockaddr has sa_len field" >&5 $as_echo_n "checking whether struct sockaddr has sa_len field... " >&6; } if ${ac_cv_struct_sockaddr_sa_len+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct sockaddr s; s.sa_len = 10; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_sockaddr_sa_len=yes else ac_cv_struct_sockaddr_sa_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_sa_len" >&5 $as_echo "$ac_cv_struct_sockaddr_sa_len" >&6; } case ${ac_cv_struct_sockaddr_sa_len} in "no" ) $as_echo "#define NO_SA_LEN 1" >>confdefs.h ;; *) ;; esac # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 $as_echo_n "checking size of char... " >&6; } if ${ac_cv_sizeof_char+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then : else if test "$ac_cv_type_char" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (char) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_char=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 $as_echo "$ac_cv_sizeof_char" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_CHAR $ac_cv_sizeof_char _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 $as_echo_n "checking size of short... " >&6; } if ${ac_cv_sizeof_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default"; then : else if test "$ac_cv_type_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (short) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_short=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 $as_echo "$ac_cv_sizeof_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SHORT $ac_cv_sizeof_short _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 $as_echo_n "checking size of void *... " >&6; } if ${ac_cv_sizeof_void_p+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : else if test "$ac_cv_type_void_p" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (void *) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_void_p=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 $as_echo "$ac_cv_sizeof_void_p" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_VOID_P $ac_cv_sizeof_void_p _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 $as_echo_n "checking size of long long... " >&6; } if ${ac_cv_sizeof_long_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 $as_echo "$ac_cv_sizeof_long_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 $as_echo_n "checking size of off_t... " >&6; } if ${ac_cv_sizeof_off_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : else if test "$ac_cv_type_off_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 $as_echo "$ac_cv_sizeof_off_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 $as_echo_n "checking size of time_t... " >&6; } if ${ac_cv_sizeof_time_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default"; then : else if test "$ac_cv_type_time_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (time_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_time_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 $as_echo "$ac_cv_sizeof_time_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_TIME_T $ac_cv_sizeof_time_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of suseconds_t" >&5 $as_echo_n "checking size of suseconds_t... " >&6; } if ${ac_cv_sizeof_suseconds_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (suseconds_t))" "ac_cv_sizeof_suseconds_t" "$ac_includes_default"; then : else if test "$ac_cv_type_suseconds_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (suseconds_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_suseconds_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_suseconds_t" >&5 $as_echo "$ac_cv_sizeof_suseconds_t" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_SUSECONDS_T $ac_cv_sizeof_suseconds_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of _Float16" >&5 $as_echo_n "checking size of _Float16... " >&6; } if ${ac_cv_sizeof__Float16+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Float16))" "ac_cv_sizeof__Float16" "$ac_includes_default"; then : else if test "$ac_cv_type__Float16" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (_Float16) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof__Float16=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Float16" >&5 $as_echo "$ac_cv_sizeof__Float16" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF__FLOAT16 $ac_cv_sizeof__Float16 _ACEOF BITS64= if test $ac_cv_sizeof_void_p = 8; then BITS64=yes fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler 'restrict' support" >&5 $as_echo_n "checking for C compiler 'restrict' support... " >&6; } restrict_keyword="" for x in restrict __restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int * $x foo(int * $x arg); int * $x foo(int * $x arg) { int * $x var=arg; return var;} int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : restrict_keyword=$x fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$restrict_keyword" != "x"; then break fi done cat >>confdefs.h <<_ACEOF #define ERTS_RESTRICT $restrict_keyword _ACEOF if test "x$restrict_keyword" != "x"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_compiler_gnu" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly" >&5 $as_echo_n "checking if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly... " >&6; } ## tree-copyrename was broken in gcc 4.3 and then removed in gcc 6 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if (__GNUC__ > 4 && __GNUC__ < 6) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) ; #else #error old and ok #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : no_tree_copyrename=yes else no_tree_copyrename=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$no_tree_copyrename" = "xyes"; then CFLAGS="$CFLAGS -fno-tree-copyrename" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken gcc-4.3.0 compiler" >&5 $as_echo_n "checking for broken gcc-4.3.0 compiler... " >&6; } if test "$cross_compiling" = yes; then : gcc_4_3_0_bug=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* pr36339.c */ extern void abort (void); typedef unsigned long my_uintptr_t; int check_a(my_uintptr_t tagged_ptr); int __attribute__((noinline)) try_a(my_uintptr_t x) { my_uintptr_t heap[2]; my_uintptr_t *hp = heap; hp[0] = x; hp[1] = 0; return check_a((my_uintptr_t)(void*)((char*)hp + 1)); } int __attribute__((noinline)) check_a(my_uintptr_t tagged_ptr) { my_uintptr_t *hp = (my_uintptr_t*)(void*)((char*)tagged_ptr - 1); if (hp[0] == 42 && hp[1] == 0) return 0; return -1; } int main(void) { if (try_a(42) < 0) abort (); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : gcc_4_3_0_bug=no else gcc_4_3_0_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi case $gcc_4_3_0_bug in yes|no) gcc_4_3_0_bug_result=$gcc_4_3_0_bug;; cross) gcc_dumped_vsn=`$CC -dumpversion 2>/dev/null` case gcc-$gcc_dumped_vsn in gcc-4.3.0) gcc_4_3_0_bug=yes;; *) gcc_4_3_0_bug=no;; esac 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";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_4_3_0_bug_result" >&5 $as_echo "$gcc_4_3_0_bug_result" >&6; } if test $gcc_4_3_0_bug = yes; then as_fn_error $? "This gcc miscompiles the Erlang runtime system; please use a different version" "$LINENO" 5 fi fi case X$erl_xcomp_bigendian in X) ;; Xyes|Xno) ac_cv_c_bigendian=$erl_xcomp_bigendian;; *) as_fn_error $? "Bad erl_xcomp_bigendian value: $erl_xcomp_bigendian" "$LINENO" 5;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h $as_echo "#define ERTS_ENDIANNESS 1" >>confdefs.h ;; #( no) $as_echo "#define ERTS_ENDIANNESS -1" >>confdefs.h ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) case "$erl_xcomp_bigendian" in yes) $as_echo "#define ERTS_ENDIANNESS 1" >>confdefs.h ;; no) $as_echo "#define ERTS_ENDIANNESS -1" >>confdefs.h ;; *) $as_echo "#define ERTS_ENDIANNESS 0" >>confdefs.h ;; esac ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether double word ordering is middle-endian" >&5 $as_echo_n "checking whether double word ordering is middle-endian... " >&6; } if ${ac_cv_c_double_middle_endian+:} false; then : $as_echo_n "(cached) " >&6 else # It does not; compile a test program. if test "$cross_compiling" = yes; then : ac_cv_c_double_middle=unknown else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main(void) { int i = 0; int zero = 0; int bigendian; int zero_index = 0; union { long int l; char c[sizeof (long int)]; } u; /* we'll use the one with 32-bit words */ union { double d; unsigned int c[2]; } vint; union { double d; unsigned long c[2]; } vlong; union { double d; unsigned short c[2]; } vshort; /* Are we little or big endian? From Harbison&Steele. */ u.l = 1; bigendian = (u.c[sizeof (long int) - 1] == 1); zero_index = bigendian ? 1 : 0; vint.d = 1.0; vlong.d = 1.0; vshort.d = 1.0; if (sizeof(unsigned int) == 4) { if (vint.c[zero_index] != 0) zero = 1; } else if (sizeof(unsigned long) == 4) { if (vlong.c[zero_index] != 0) zero = 1; } else if (sizeof(unsigned short) == 4) { if (vshort.c[zero_index] != 0) zero = 1; } exit (zero); } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_double_middle_endian=no else ac_cv_c_double_middle_endian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_double_middle_endian" >&5 $as_echo "$ac_cv_c_double_middle_endian" >&6; } case $ac_cv_c_double_middle_endian in yes) $as_echo "#define DOUBLE_MIDDLE_ENDIAN 1" >>confdefs.h ;; no) ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown double endianness presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&5 $as_echo "$as_me: WARNING: unknown double endianness presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&2;} ;; esac for ac_func in fdatasync do : ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" if test "x$ac_cv_func_fdatasync" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FDATASYNC 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 $as_echo_n "checking for library containing fdatasync... " >&6; } if ${ac_cv_search_fdatasync+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fdatasync (); int main () { return fdatasync (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_fdatasync=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_fdatasync+:} false; then : break fi done if ${ac_cv_search_fdatasync+:} false; then : else ac_cv_search_fdatasync=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5 $as_echo "$ac_cv_search_fdatasync" >&6; } ac_res=$ac_cv_search_fdatasync if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi case $host_os in linux*|freebsd*|dragonfly*|darwin*) for ac_func in sendfile do : ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile" if test "x$ac_cv_func_sendfile" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SENDFILE 1 _ACEOF fi done ;; solaris*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sendfilev" >&5 $as_echo_n "checking for library containing sendfilev... " >&6; } if ${ac_cv_search_sendfilev+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sendfilev (); int main () { return sendfilev (); ; return 0; } _ACEOF for ac_lib in '' sendfile; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sendfilev=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sendfilev+:} false; then : break fi done if ${ac_cv_search_sendfilev+:} false; then : else ac_cv_search_sendfilev=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sendfilev" >&5 $as_echo "$ac_cv_search_sendfilev" >&6; } ac_res=$ac_cv_search_sendfilev if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_SENDFILEV 1" >>confdefs.h fi ;; win32) LIBS="$LIBS -lmswsock" ;; *) ;; esac saved_cppflags=$CPPFLAGS CPPFLAGS="$CPPFLAGS $EMU_THR_DEFS" saved_libs=$LIBS LIBS="$LIBS $EMU_THR_X_LIBS" for ac_header in windows.h do : ac_fn_c_check_header_mongrel "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINDOWS_H 1 _ACEOF fi done for ac_header in winsock2.h do : ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" if test "x$ac_cv_header_winsock2_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WINSOCK2_H 1 _ACEOF fi done for ac_header in ws2tcpip.h do : ac_fn_c_check_header_compile "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" " #ifdef HAVE_WINSOCK2_H #include #endif #ifdef HAVE_WINDOWS_H #include #endif " if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WS2TCPIP_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 $as_echo_n "checking for getaddrinfo... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_WINSOCK2_H #include #endif #ifdef HAVE_WINDOWS_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif #ifndef __WIN32__ #include #include #endif int main () { getaddrinfo("","",NULL,NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_getaddrinfo=yes else have_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $have_getaddrinfo = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getaddrinfo accepts enough flags" >&5 $as_echo_n "checking whether getaddrinfo accepts enough flags... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_WINSOCK2_H #include #endif #ifdef HAVE_WINDOWS_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif #ifndef __WIN32__ #include #include #endif int main () { struct addrinfo hints, *ai; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; hints.ai_socktype = SOCK_STREAM; hints.ai_family = AF_INET6; if (getaddrinfo("::", NULL, &hints, &ai) == 0) { freeaddrinfo(ai); exit(0); } else { exit(1); } ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else have_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5 $as_echo "$have_getaddrinfo" >&6; } case $have_getaddrinfo in yes) $as_echo "#define HAVE_GETADDRINFO 1" >>confdefs.h ;; *) ;; esac else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo" >&5 $as_echo_n "checking for getnameinfo... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifdef HAVE_WINSOCK2_H #include #endif #ifdef HAVE_WINDOWS_H #include #endif #ifdef HAVE_WS2TCPIP_H #include #endif #ifndef __WIN32__ #include #include #endif int main () { getnameinfo(NULL,0,NULL,0,NULL,0,0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_getnameinfo=yes else have_getnameinfo=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $have_getnameinfo = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_GETNAMEINFO 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi for ac_func in getipnodebyname getipnodebyaddr gethostbyname2 do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in ieee_handler fpsetmask finite isnan isinf res_gethostbyname dlopen \ pread pwrite memmove strerror strerror_r strncasecmp \ gethrtime localtime_r gmtime_r mprotect madvise posix_madvise \ mmap mremap memcpy mallopt sbrk _sbrk __sbrk brk _brk __brk \ flockfile fstat strlcpy strlcat setsid posix2time time2posix \ setlocale nl_langinfo poll mlockall ppoll vsyslog do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ## We have a special check for inet_pton as AC_CHECK_FUCNS does not work ## on windows 32-bit as there a macro is used to rename the symbol... { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 $as_echo_n "checking for inet_pton... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef WIN32 #include #else #include #endif int main () { inet_pton(2,"",(void*)0) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_inet_pton=yes else have_inet_pton=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $have_inet_pton = yes; then $as_echo "#define HAVE_INET_PTON 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for isfinite" >&5 $as_echo_n "checking for isfinite... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { isfinite(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : have_isfinite=yes else have_isfinite=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test $have_isfinite = yes; then $as_echo "#define HAVE_ISFINITE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi case X$erl_xcomp_posix_memalign in Xno) ;; Xyes) have_posix_memalign=yes ;; *) ac_fn_c_check_func "$LINENO" "posix_memalign" "ac_cv_func_posix_memalign" if test "x$ac_cv_func_posix_memalign" = xyes; then : if test "$cross_compiling" != yes; then if test "$cross_compiling" = yes; then : { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run test program while cross compiling See \`config.log' for more details" "$LINENO" 5; } else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main(void) { void *ptr = NULL; int error; size_t alignment = 0x40000, size = 0x20028; if ((error = posix_memalign(&ptr, alignment, size)) != 0 || ptr == NULL) return error; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : have_posix_memalign=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else have_posix_memalign=yes fi fi ;; esac if test "$have_posix_memalign" = "yes"; then $as_echo "#define HAVE_POSIX_MEMALIGN 1" >>confdefs.h fi case $host_os in darwin10.8.0) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for writev" >&5 $as_echo_n "checking for writev... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; *) for ac_func in writev do : ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" if test "x$ac_cv_func_writev" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_WRITEV 1 _ACEOF fi done ;; esac ac_fn_c_check_decl "$LINENO" "posix2time" "ac_cv_have_decl_posix2time" "#include " if test "x$ac_cv_have_decl_posix2time" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_POSIX2TIME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "time2posix" "ac_cv_have_decl_time2posix" "#include " if test "x$ac_cv_have_decl_time2posix" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TIME2POSIX $ac_have_decl _ACEOF for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting declaration of fread" >&5 $as_echo_n "checking for conflicting declaration of fread... " >&6; } if ${ac_cv_func_decl_fread+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { extern int fread(); char *c = (char *)fread; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "ac_cv_func_decl_fread=no" else eval "ac_cv_func_decl_fread=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if eval "test \"`echo '$ac_cv_func_decl_'fread`\" = yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_CONFLICTING_FREAD_DECLARATION 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putc_unlocked" >&5 $as_echo_n "checking for putc_unlocked... " >&6; } if ${erts_cv_putc_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int res = putc_unlocked('x',stdout); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_putc_unlocked=yes else erts_cv_putc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_putc_unlocked" >&5 $as_echo "$erts_cv_putc_unlocked" >&6; } if test $erts_cv_putc_unlocked = yes; then $as_echo "#define HAVE_PUTC_UNLOCKED 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fwrite_unlocked" >&5 $as_echo_n "checking for fwrite_unlocked... " >&6; } if ${erts_cv_fwrite_unlocked+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { size_t res = fwrite_unlocked(NULL,sizeof(char),0,stdout); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_fwrite_unlocked=yes else erts_cv_fwrite_unlocked=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_fwrite_unlocked" >&5 $as_echo "$erts_cv_fwrite_unlocked" >&6; } if test $erts_cv_fwrite_unlocked = yes; then $as_echo "#define HAVE_FWRITE_UNLOCKED 1" >>confdefs.h fi for ac_func in openpty do : ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" if test "x$ac_cv_func_openpty" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENPTY 1 _ACEOF fi done for ac_header in net/if_dl.h ifaddrs.h netpacket/packet.h sys/un.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getifaddrs do : ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" if test "x$ac_cv_func_getifaddrs" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETIFADDRS 1 _ACEOF fi done ac_fn_c_check_member "$LINENO" "struct sockaddr_un" "sun_path" "ac_cv_member_struct_sockaddr_un_sun_path" "#include " if test "x$ac_cv_member_struct_sockaddr_un_sun_path" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_SOCKADDR_UN_SUN_PATH 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether in6addr_any is declared" >&5 $as_echo_n "checking whether in6addr_any is declared... " >&6; } if ${erts_cv_have_in6addr_any+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { printf("%d", in6addr_any.s6_addr[16]); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_have_in6addr_any=yes else erts_cv_have_in6addr_any=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_in6addr_any" >&5 $as_echo "$erts_cv_have_in6addr_any" >&6; } case "$erts_cv_have_in6addr_any" in yes) $as_echo "#define HAVE_IN6ADDR_ANY 1" >>confdefs.h esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether in6addr_loopback is declared" >&5 $as_echo_n "checking whether in6addr_loopback is declared... " >&6; } if ${erts_cv_have_in6addr_loopback+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { printf("%d", in6addr_loopback.s6_addr[16]); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_have_in6addr_loopback=yes else erts_cv_have_in6addr_loopback=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_in6addr_loopback" >&5 $as_echo "$erts_cv_have_in6addr_loopback" >&6; } case "$erts_cv_have_in6addr_loopback" in yes) $as_echo "#define HAVE_IN6ADDR_LOOPBACK 1" >>confdefs.h esac ac_fn_c_check_decl "$LINENO" "IN6ADDR_ANY_INIT" "ac_cv_have_decl_IN6ADDR_ANY_INIT" " #include #include #include " if test "x$ac_cv_have_decl_IN6ADDR_ANY_INIT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IN6ADDR_ANY_INIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "IN6ADDR_LOOPBACK_INIT" "ac_cv_have_decl_IN6ADDR_LOOPBACK_INIT" " #include #include #include " if test "x$ac_cv_have_decl_IN6ADDR_LOOPBACK_INIT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IN6ADDR_LOOPBACK_INIT $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "IPV6_V6ONLY" "ac_cv_have_decl_IPV6_V6ONLY" " #include #include #include " if test "x$ac_cv_have_decl_IPV6_V6ONLY" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_IPV6_V6ONLY $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_getaffinity/sched_setaffinity" >&5 $as_echo_n "checking for sched_getaffinity/sched_setaffinity... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef CPU_SETSIZE #error no CPU_SETSIZE #endif int res; cpu_set_t cpuset; CPU_ZERO(&cpuset); CPU_SET(1, &cpuset); res = sched_setaffinity(0, sizeof(cpu_set_t), &cpuset); res = sched_getaffinity(0, sizeof(cpu_set_t), &cpuset); res = CPU_ISSET(1, &cpuset); CPU_CLR(1, &cpuset); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : sched_xetaffinity=yes else sched_xetaffinity=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $sched_xetaffinity" >&5 $as_echo "$sched_xetaffinity" >&6; } if test $sched_xetaffinity = yes; then $as_echo "#define HAVE_SCHED_xETAFFINITY 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pset functionality" >&5 $as_echo_n "checking for pset functionality... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int res; psetid_t id = PS_MYID; int type = PS_PRIVATE; uint_t numcpus = 1024; processorid_t cpulist[1024]; res = pset_info(id, &type, &numcpus, &cpulist[0]); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : pset_functionality=yes else pset_functionality=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pset_functionality" >&5 $as_echo "$pset_functionality" >&6; } if test $pset_functionality = yes; then $as_echo "#define HAVE_PSET 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for processor_bind functionality" >&5 $as_echo_n "checking for processor_bind functionality... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { int res = processor_bind(P_LWPID, P_MYID, PBIND_NONE, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : processor_bind_functionality=yes else processor_bind_functionality=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $processor_bind_functionality" >&5 $as_echo "$processor_bind_functionality" >&6; } if test $processor_bind_functionality = yes; then $as_echo "#define HAVE_PROCESSOR_BIND 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cpuset_getaffinity/cpuset_setaffinity" >&5 $as_echo_n "checking for cpuset_getaffinity/cpuset_setaffinity... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { int res; cpuset_t cpuset; CPU_ZERO(&cpuset); CPU_SET(1, &cpuset); res = cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset); res = cpuset_getaffinity(CPU_LEVEL_WHICH, CPU_WHICH_PID, -1, sizeof(cpuset_t), &cpuset); res = CPU_ISSET(1, &cpuset); CPU_CLR(1, &cpuset); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cpuset_xetaffinity=yes else cpuset_xetaffinity=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpuset_xetaffinity" >&5 $as_echo "$cpuset_xetaffinity" >&6; } if test $cpuset_xetaffinity = yes; then $as_echo "#define HAVE_CPUSET_xETAFFINITY 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 'end' symbol" >&5 $as_echo_n "checking for 'end' symbol... " >&6; } if ${erts_cv_have_end_symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern char end; {char *x = &end; *x= 0;} ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_have_end_symbol=yes else erts_cv_have_end_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_end_symbol" >&5 $as_echo "$erts_cv_have_end_symbol" >&6; } if test $erts_cv_have_end_symbol = yes; then $as_echo "#define HAVE_END_SYMBOL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for '_end' symbol" >&5 $as_echo_n "checking for '_end' symbol... " >&6; } if ${erts_cv_have__end_symbol+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern char _end; {char *x = &_end; *x= 0;} ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_have__end_symbol=yes else erts_cv_have__end_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have__end_symbol" >&5 $as_echo "$erts_cv_have__end_symbol" >&6; } if test $erts_cv_have__end_symbol = yes; then $as_echo "#define HAVE__END_SYMBOL 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if __after_morecore_hook can track malloc()s core memory use" >&5 $as_echo_n "checking if __after_morecore_hook can track malloc()s core memory use... " >&6; } if ${erts_cv___after_morecore_hook_can_track_malloc+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case X$erl_xcomp_after_morecore_hook in X) erts_cv___after_morecore_hook_can_track_malloc=cross;; Xyes|Xno) erts_cv___after_morecore_hook_can_track_malloc=$erl_xcomp_after_morecore_hook;; *) as_fn_error $? "Bad erl_xcomp_after_morecore_hook value: $erl_xcomp_after_morecore_hook" "$LINENO" 5;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_MALLOC_H # include #endif #if defined(HAVE_END_SYMBOL) extern char end; #elif defined(HAVE__END_SYMBOL) extern char _end; #endif #ifdef ETHR_PTHREADS # ifdef ETHR_HAVE_PTHREAD_H # include # else # ifdef ETHR_HAVE_MIT_PTHREAD_H # include # endif # endif # define N_THR 5 #else # define N_THR 1 #endif static char *heap_start = NULL; static char *heap_end = NULL; void update_heap_size(void) { heap_end = (char *) sbrk(0); } void init_hook(void) { #if defined(HAVE_END_SYMBOL) heap_start = &end; #elif defined(HAVE__END_SYMBOL) heap_start = &_end; #else heap_start = sbrk(0); #endif __after_morecore_hook = update_heap_size; } void (*__malloc_initialize_hook) (void) = init_hook; static int check_malloc(int size) { char *p = (char *) malloc(size); if (!heap_start || !heap_end) return 0; if (!p) return 0; if (p < heap_start || heap_end <= p) return 0; if (p + size < heap_start || heap_end < p + size) return 0; return 1; } #ifdef ETHR_PTHREADS pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; #endif static void * do_tests(void *vresp) { int i, ok = 0; #ifdef ETHR_PTHREADS if (pthread_mutex_lock(&mutex) != 0) return NULL; #endif for (i = 0; i < 10; i++) if (!check_malloc(1000)) goto failed; for (i = 0; i < 100; i++) if (!check_malloc(1)) goto failed; if (!check_malloc(1024*1024+1)) goto failed; if (!check_malloc(10*1024*1024+1)) goto failed; ok = 1; failed: #ifdef ETHR_PTHREADS if (pthread_mutex_unlock(&mutex) != 0) return NULL; #endif if (ok) *((int *) vresp) = 0; return NULL; } int main(void) { int res[N_THR], i; #ifdef ETHR_PTHREADS pthread_t tid[N_THR]; #endif #if defined(HAVE_MALLOPT) && defined(M_MMAP_MAX) (void) mallopt(M_MMAP_MAX, 0); #endif for (i = 0; i < N_THR; i++) res[i] = 1; #ifdef ETHR_PTHREADS for (i = 1; i < N_THR; i++) if (pthread_create(&tid[i], NULL, do_tests, &res[i]) != 0) return 1; #endif (void) do_tests(&res[0]); #ifdef ETHR_PTHREADS for (i = 1; i < N_THR; i++) if (pthread_join(tid[i], NULL) != 0) return 1; #endif for (i = 0; i < N_THR; i++) if (res[i]) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : erts_cv___after_morecore_hook_can_track_malloc=yes else erts_cv___after_morecore_hook_can_track_malloc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv___after_morecore_hook_can_track_malloc" >&5 $as_echo "$erts_cv___after_morecore_hook_can_track_malloc" >&6; } case $erts_cv___after_morecore_hook_can_track_malloc in yes) $as_echo "#define ERTS___AFTER_MORECORE_HOOK_CAN_TRACK_MALLOC 1" >>confdefs.h ;; cross) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; *) ;; esac if test "x$ac_cv_func_sbrk" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of sbrk()s return value and argument" >&5 $as_echo_n "checking types of sbrk()s return value and argument... " >&6; } if ${erts_cv_sbrk_ret_arg_types+:} false; then : $as_echo_n "(cached) " >&6 else erts_cv_sbrk_ret_arg_types=unknown ret_types="void *,char *" arg_types="intptr_t,ptrdiff_t,int,long" save_ifs="$IFS"; IFS="," for rtype in $ret_types; do for atype in $arg_types; do IFS=$save_ifs cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { $rtype sbrk($atype incr); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_sbrk_ret_arg_types="$rtype,$atype" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext IFS="," if test "$erts_cv_sbrk_ret_arg_types" != "unknown"; then break 2 fi done done IFS=$save_ifs fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_sbrk_ret_arg_types" >&5 $as_echo "$erts_cv_sbrk_ret_arg_types" >&6; } if test "$erts_cv_sbrk_ret_arg_types" != "unknown"; then save_ifs="$IFS"; IFS="," read ret_type arg_type <>confdefs.h <<_ACEOF #define SBRK_RET_TYPE $ret_type _ACEOF cat >>confdefs.h <<_ACEOF #define SBRK_ARG_TYPE $arg_type _ACEOF fi fi if test $ac_cv_func_brk = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of brk()s return value and argument" >&5 $as_echo_n "checking types of brk()s return value and argument... " >&6; } if ${erts_cv_brk_ret_arg_types+:} false; then : $as_echo_n "(cached) " >&6 else erts_cv_brk_ret_arg_types=unknown ret_types="int,long,char *,void *" arg_types="void *,const void *,char *,const char *" save_ifs="$IFS"; IFS="," for rtype in $ret_types; do for atype in $arg_types; do IFS=$save_ifs cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { $rtype brk($atype endds); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erts_cv_brk_ret_arg_types="$rtype,$atype" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext IFS="," if test "$erts_cv_brk_ret_arg_types" != "unknown"; then break 2 fi done done IFS=$save_ifs fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_brk_ret_arg_types" >&5 $as_echo "$erts_cv_brk_ret_arg_types" >&6; } if test "$erts_cv_brk_ret_arg_types" != "unknown"; then save_ifs="$IFS"; IFS="," read ret_type arg_type <>confdefs.h <<_ACEOF #define BRK_RET_TYPE $ret_type _ACEOF cat >>confdefs.h <<_ACEOF #define BRK_ARG_TYPE $arg_type _ACEOF fi fi if test $ac_cv_func_sbrk = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sbrk()/brk() wrappers can track malloc()s core memory use" >&5 $as_echo_n "checking if sbrk()/brk() wrappers can track malloc()s core memory use... " >&6; } if ${erts_cv_brk_wrappers_can_track_malloc+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : case X$erl_xcomp_dlsym_brk_wrappers in X) erts_cv_brk_wrappers_can_track_malloc=cross;; Xyes|Xno) erts_cv_brk_wrappers_can_track_malloc=$erl_xcomp_dlsym_brk_wrappers;; *) as_fn_error $? "Bad erl_xcomp_dlsym_brk_wrappers value: $erl_xcomp_dlsym_brk_wrappers" "$LINENO" 5;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifdef HAVE_DLFCN_H # include #endif /* * Our implementation requires that we have sbrk(), and 'end' or '_end'. */ #if !defined(HAVE_SBRK) # error no sbrk() #endif #if defined(HAVE_END_SYMBOL) extern char end; #elif defined(HAVE__END_SYMBOL) extern char _end; #else # error no 'end' nor '_end' #endif #ifdef ETHR_PTHREADS # ifdef ETHR_HAVE_PTHREAD_H # include # else # ifdef ETHR_HAVE_MIT_PTHREAD_H # include # endif # endif # define N_THR 5 #else # define N_THR 1 #endif #define SBRK_IMPL(RET_TYPE, SBRK, ARG_TYPE) \ RET_TYPE SBRK (ARG_TYPE); \ static RET_TYPE (*real_ ## SBRK)(ARG_TYPE) = NULL; \ RET_TYPE \ SBRK (ARG_TYPE arg) \ { \ RET_TYPE res; \ if (!real_ ## SBRK) real_ ## SBRK = dlsym(RTLD_NEXT, #SBRK); \ res = (*real_ ## SBRK)(arg); \ if (res != (RET_TYPE) -1) heap_end = (char *) (*real_ ## SBRK)(0); \ return res; \ } #define BRK_IMPL(RET_TYPE, BRK, ARG_TYPE) \ RET_TYPE BRK (ARG_TYPE); \ static RET_TYPE (*real_ ## BRK)(ARG_TYPE) = NULL; \ RET_TYPE \ BRK (ARG_TYPE arg) \ { \ RET_TYPE res; \ if (!real_ ## BRK) real_ ## BRK = dlsym(RTLD_NEXT, #BRK); \ res = (*real_ ## BRK)(arg); \ if (res != (RET_TYPE) -1) heap_end = (char *) arg; \ return res; \ } static char *heap_start = NULL; static char *heap_end = NULL; SBRK_IMPL(SBRK_RET_TYPE, sbrk, SBRK_ARG_TYPE) #ifdef HAVE_BRK BRK_IMPL(BRK_RET_TYPE, brk, BRK_ARG_TYPE) #endif #ifdef HAVE__SBRK SBRK_IMPL(SBRK_RET_TYPE, _sbrk, SBRK_ARG_TYPE) #endif #ifdef HAVE__BRK BRK_IMPL(BRK_RET_TYPE, _brk, BRK_ARG_TYPE) #endif #ifdef HAVE___SBRK SBRK_IMPL(SBRK_RET_TYPE, __sbrk, SBRK_ARG_TYPE) #endif #ifdef HAVE___BRK BRK_IMPL(BRK_RET_TYPE, __brk, BRK_ARG_TYPE) #endif static int check_malloc(int size) { char *p = (char *) malloc(size); if (!heap_start || !heap_end) return 0; if (!p) return 0; if (p < heap_start || heap_end <= p) return 0; if (p + size < heap_start || heap_end < p + size) return 0; return 1; } #ifdef ETHR_PTHREADS pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; #endif static void * do_tests(void *vresp) { int i, ok = 0; #ifdef ETHR_PTHREADS if (pthread_mutex_lock(&mutex) != 0) return NULL; #endif for (i = 0; i < 10; i++) if (!check_malloc(1000)) goto failed; for (i = 0; i < 100; i++) if (!check_malloc(1)) goto failed; if (!check_malloc(1024*1024+1)) goto failed; if (!check_malloc(10*1024*1024+1)) goto failed; ok = 1; failed: #ifdef ETHR_PTHREADS if (pthread_mutex_unlock(&mutex) != 0) return NULL; #endif if (ok) *((int *) vresp) = 0; return NULL; } int main(void) { int res[N_THR], i; #ifdef ETHR_PTHREADS pthread_t tid[N_THR]; #endif #if defined(HAVE_END_SYMBOL) heap_start = &end; #elif defined(HAVE__END_SYMBOL) heap_start = &_end; #endif #if defined(HAVE_MALLOPT) && defined(M_MMAP_MAX) (void) mallopt(M_MMAP_MAX, 0); #endif for (i = 0; i < N_THR; i++) res[i] = 1; #ifdef ETHR_PTHREADS for (i = 1; i < N_THR; i++) if (pthread_create(&tid[i], NULL, do_tests, &res[i]) != 0) return 1; #endif (void) do_tests(&res[0]); #ifdef ETHR_PTHREADS for (i = 1; i < N_THR; i++) if (pthread_join(tid[i], NULL) != 0) return 1; #endif for (i = 0; i < N_THR; i++) if (res[i]) return 1; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : erts_cv_brk_wrappers_can_track_malloc=yes else erts_cv_brk_wrappers_can_track_malloc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erts_cv_brk_wrappers_can_track_malloc" >&5 $as_echo "$erts_cv_brk_wrappers_can_track_malloc" >&6; } case $erts_cv_brk_wrappers_can_track_malloc in yes) $as_echo "#define ERTS_BRK_WRAPPERS_CAN_TRACK_MALLOC 1" >>confdefs.h ;; cross) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; *) ;; esac fi LIBS=$saved_libs CPPFLAGS=$saved_cppflags case $ARCH in x86|amd64) $as_echo "#define ERTS_STRUCTURE_ALIGNED_ALLOC 1" >>confdefs.h ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IP version 6 support" >&5 $as_echo_n "checking for IP version 6 support... " >&6; } if ${ac_cv_sys_ipv6_support+:} false; then : $as_echo_n "(cached) " >&6 else ok_so_far=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __WIN32__ #include #include #else #include #endif int main () { struct in6_addr a6; struct sockaddr_in6 s6; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ok_so_far=yes else ok_so_far=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ok_so_far = yes; then ac_cv_sys_ipv6_support=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __WIN32__ #include #include #else #include #endif int main () { struct in_addr6 a6; struct sockaddr_in6 s6; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_ipv6_support=in_addr6 else ac_cv_sys_ipv6_support=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi case ${ac_cv_sys_ipv6_support} in yes) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_IN6 1" >>confdefs.h ;; in_addr6) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (but I am redefining in_addr6 to in6_addr)" >&5 $as_echo "yes (but I am redefining in_addr6 to in6_addr)" >&6; } $as_echo "#define HAVE_IN6 1" >>confdefs.h $as_echo "#define HAVE_IN_ADDR6_STRUCT /**/" >>confdefs.h ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multicast support" >&5 $as_echo_n "checking for multicast support... " >&6; } if ${ac_cv_sys_multicast_support+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #if defined(IP_MULTICAST_TTL) && defined(IP_MULTICAST_LOOP) && defined(IP_MULTICAST_IF) && defined(IP_ADD_MEMBERSHIP) && defined(IP_DROP_MEMBERSHIP) yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "^yes$" >/dev/null 2>&1; then : ac_cv_sys_multicast_support=yes else ac_cv_sys_multicast_support=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_multicast_support" >&5 $as_echo "$ac_cv_sys_multicast_support" >&6; } if test $ac_cv_sys_multicast_support = yes; then $as_echo "#define HAVE_MULTICAST_SUPPORT 1" >>confdefs.h fi # Check whether --with-clock-resolution was given. if test "${with_clock_resolution+set}" = set; then : withval=$with_clock_resolution; fi # Check whether --with-clock-gettime-realtime-id was given. if test "${with_clock_gettime_realtime_id+set}" = set; then : withval=$with_clock_gettime_realtime_id; fi # Check whether --with-clock-gettime-monotonic-id was given. if test "${with_clock_gettime_monotonic_id+set}" = set; then : withval=$with_clock_gettime_monotonic_id; fi # Check whether --enable-prefer-elapsed-monotonic-time-during-suspend was given. if test "${enable_prefer_elapsed_monotonic_time_during_suspend+set}" = set; then : enableval=$enable_prefer_elapsed_monotonic_time_during_suspend; case "$enableval" in yes) prefer_elapsed_monotonic_time_during_suspend=yes ;; *) prefer_elapsed_monotonic_time_during_suspend=no ;; esac else prefer_elapsed_monotonic_time_during_suspend=no fi # Check whether --enable-gettimeofday-as-os-system-time was given. if test "${enable_gettimeofday_as_os_system_time+set}" = set; then : enableval=$enable_gettimeofday_as_os_system_time; case "$enableval" in yes) force_gettimeofday_os_system_time=yes ;; *) force_gettimeofday_os_system_time=no ;; esac else force_gettimeofday_os_system_time=no fi case "$with_clock_resolution" in ""|no|yes) with_clock_resolution=default;; high|low|default) ;; *) as_fn_error $? "Invalid wanted clock resolution: $with_clock_resolution" "$LINENO" 5 ;; esac if test "$force_gettimeofday_os_system_time" = "yes"; then for ac_func in gettimeofday do : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETTIMEOFDAY 1 _ACEOF fi done if test "$ac_cv_func_gettimeofday" = "yes"; then $as_echo "#define OS_SYSTEM_TIME_GETTIMEOFDAY 1" >>confdefs.h else as_fn_error $? "No gettimeofday() available" "$LINENO" 5 fi else # $force_gettimeofday_os_system_time != yes case "$with_clock_gettime_realtime_id" in ""|no) with_clock_gettime_realtime_id=no ;; CLOCK_*CPUTIME*) 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 ;; CLOCK_MONOTONIC*|CLOCK_BOOTTIME*|CLOCK_UPTIME*|CLOCK_HIGHRES*) 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 ;; CLOCK_*) ;; *) as_fn_error $? "Invalid clock_gettime() clock id: $with_clock_gettime_realtime_id" "$LINENO" 5 ;; esac case "$with_clock_resolution-$with_clock_gettime_realtime_id" in high-no) default_resolution_clock_gettime_wall="CLOCK_REALTIME" low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" case "high_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_wall="" ;; *) check_msg="" prefer_resolution_clock_gettime_wall= ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if ${erl_cv_clock_gettime_wall_high_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_wall_high_resolution=$clock_type else erl_cv_clock_gettime_wall_high_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_high_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_high_resolution" >&5 $as_echo "$erl_cv_clock_gettime_wall_high_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then check_for_clock_getres= else check_for_clock_getres=clock_getres fi for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 $as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } if ${erl_cv_mach_clock_get_time_wall+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_wall=yes else erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 $as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } erl_wall_clock_lib= erl_wall_clock_low_resolution=no erl_wall_clock_id= case high_resolution-$erl_cv_clock_gettime_wall_high_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in *-*-*-*-win32) erl_wall_clock_func=WindowsAPI erl_wall_clock_low_resolution=yes ;; high_resolution-no-yes-*-*) erl_wall_clock_func=mach_clock_get_time erl_wall_clock_id=CALENDAR_CLOCK ;; *-CLOCK_*-*-*-*) erl_wall_clock_func=clock_gettime erl_wall_clock_lib=$clock_gettime_lib erl_wall_clock_id=$erl_cv_clock_gettime_wall_high_resolution for low_res_id in $low_resolution_clock_gettime_wall; do if test $erl_wall_clock_id = $low_res_id; then erl_wall_clock_low_resolution=yes break fi done ;; *-no-*-yes-*) erl_wall_clock_func=gettimeofday ;; *) erl_wall_clock_func=none ;; esac ;; low-no) default_resolution_clock_gettime_wall="CLOCK_REALTIME" low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" case "low_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_wall="" ;; *) check_msg="" prefer_resolution_clock_gettime_wall= ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if ${erl_cv_clock_gettime_wall_low_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_wall_low_resolution=$clock_type else erl_cv_clock_gettime_wall_low_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_low_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_low_resolution" >&5 $as_echo "$erl_cv_clock_gettime_wall_low_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then check_for_clock_getres= else check_for_clock_getres=clock_getres fi for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 $as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } if ${erl_cv_mach_clock_get_time_wall+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_wall=yes else erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 $as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } erl_wall_clock_lib= erl_wall_clock_low_resolution=no erl_wall_clock_id= case low_resolution-$erl_cv_clock_gettime_wall_low_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in *-*-*-*-win32) erl_wall_clock_func=WindowsAPI erl_wall_clock_low_resolution=yes ;; high_resolution-no-yes-*-*) erl_wall_clock_func=mach_clock_get_time erl_wall_clock_id=CALENDAR_CLOCK ;; *-CLOCK_*-*-*-*) erl_wall_clock_func=clock_gettime erl_wall_clock_lib=$clock_gettime_lib erl_wall_clock_id=$erl_cv_clock_gettime_wall_low_resolution for low_res_id in $low_resolution_clock_gettime_wall; do if test $erl_wall_clock_id = $low_res_id; then erl_wall_clock_low_resolution=yes break fi done ;; *-no-*-yes-*) erl_wall_clock_func=gettimeofday ;; *) erl_wall_clock_func=none ;; esac ;; default-no) default_resolution_clock_gettime_wall="CLOCK_REALTIME" low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" case "default_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_wall="" ;; *) check_msg="" prefer_resolution_clock_gettime_wall= ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if ${erl_cv_clock_gettime_wall_default_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_wall_default_resolution=$clock_type else erl_cv_clock_gettime_wall_default_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_default_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_default_resolution" >&5 $as_echo "$erl_cv_clock_gettime_wall_default_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then check_for_clock_getres= else check_for_clock_getres=clock_getres fi for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 $as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } if ${erl_cv_mach_clock_get_time_wall+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_wall=yes else erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 $as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } erl_wall_clock_lib= erl_wall_clock_low_resolution=no erl_wall_clock_id= case default_resolution-$erl_cv_clock_gettime_wall_default_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in *-*-*-*-win32) erl_wall_clock_func=WindowsAPI erl_wall_clock_low_resolution=yes ;; high_resolution-no-yes-*-*) erl_wall_clock_func=mach_clock_get_time erl_wall_clock_id=CALENDAR_CLOCK ;; *-CLOCK_*-*-*-*) erl_wall_clock_func=clock_gettime erl_wall_clock_lib=$clock_gettime_lib erl_wall_clock_id=$erl_cv_clock_gettime_wall_default_resolution for low_res_id in $low_resolution_clock_gettime_wall; do if test $erl_wall_clock_id = $low_res_id; then erl_wall_clock_low_resolution=yes break fi done ;; *-no-*-yes-*) erl_wall_clock_func=gettimeofday ;; *) erl_wall_clock_func=none ;; esac ;; *) default_resolution_clock_gettime_wall="CLOCK_REALTIME" low_resolution_clock_gettime_wall="CLOCK_REALTIME_COARSE CLOCK_REALTIME_FAST" high_resolution_clock_gettime_wall="CLOCK_REALTIME_PRECISE" case "custom_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_wall="$high_resolution_clock_gettime_wall" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_wall="$low_resolution_clock_gettime_wall" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_wall="$with_clock_gettime_realtime_id" ;; *) check_msg="" prefer_resolution_clock_gettime_wall= ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if ${erl_cv_clock_gettime_wall_custom_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_wall_custom_resolution=$clock_type else erl_cv_clock_gettime_wall_custom_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_custom_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_custom_resolution" >&5 $as_echo "$erl_cv_clock_gettime_wall_custom_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then check_for_clock_getres= else check_for_clock_getres=clock_getres fi for ac_func in $check_for_clock_getres clock_get_attributes gettimeofday do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 $as_echo_n "checking for mach clock_get_time() with wall clock type... " >&6; } if ${erl_cv_mach_clock_get_time_wall+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_wall=yes else erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 $as_echo "$erl_cv_mach_clock_get_time_wall" >&6; } erl_wall_clock_lib= erl_wall_clock_low_resolution=no erl_wall_clock_id= case custom_resolution-$erl_cv_clock_gettime_wall_custom_resolution-$erl_cv_mach_clock_get_time_wall-$ac_cv_func_gettimeofday-$host_os in *-*-*-*-win32) erl_wall_clock_func=WindowsAPI erl_wall_clock_low_resolution=yes ;; high_resolution-no-yes-*-*) erl_wall_clock_func=mach_clock_get_time erl_wall_clock_id=CALENDAR_CLOCK ;; *-CLOCK_*-*-*-*) erl_wall_clock_func=clock_gettime erl_wall_clock_lib=$clock_gettime_lib erl_wall_clock_id=$erl_cv_clock_gettime_wall_custom_resolution for low_res_id in $low_resolution_clock_gettime_wall; do if test $erl_wall_clock_id = $low_res_id; then erl_wall_clock_low_resolution=yes break fi done ;; *-no-*-yes-*) erl_wall_clock_func=gettimeofday ;; *) erl_wall_clock_func=none ;; esac ;; esac case "$erl_wall_clock_func-$erl_wall_clock_id-$with_clock_gettime_realtime_id" in *-*-no) ;; clock_gettime-$with_clock_gettime_realtime_id-$with_clock_gettime_realtime_id) ;; *) as_fn_error $? "$with_clock_gettime_realtime_id as clock id to clock_gettime() doesn't compile" "$LINENO" 5 ;; esac case $erl_wall_clock_func in none) as_fn_error $? "No wall clock source found" "$LINENO" 5 ;; mach_clock_get_time) $as_echo "#define OS_SYSTEM_TIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; clock_gettime) $as_echo "#define OS_SYSTEM_TIME_USING_CLOCK_GETTIME 1" >>confdefs.h ;; gettimeofday) $as_echo "#define OS_SYSTEM_TIME_GETTIMEOFDAY 1" >>confdefs.h ;; *) ;; esac if test "x$erl_wall_clock_id" != "x"; then cat >>confdefs.h <<_ACEOF #define WALL_CLOCK_ID_STR "$erl_wall_clock_id" _ACEOF cat >>confdefs.h <<_ACEOF #define WALL_CLOCK_ID $erl_wall_clock_id _ACEOF fi fi # $force_gettimeofday_os_system_time != yes case "$with_clock_gettime_monotonic_id" in ""|no) with_clock_gettime_monotonic_id=no ;; CLOCK_*CPUTIME*) 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 ;; CLOCK_REALTIME*|CLOCK_TAI*) 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 ;; CLOCK_*) ;; *) as_fn_error $? "Invalid clock_gettime() clock id: $with_clock_gettime_monotonic_id" "$LINENO" 5 ;; esac case "$with_clock_resolution-$with_clock_gettime_monotonic_id" in high-no) if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" else default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" fi case "high_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_monotonic="undefined" ;; *) check_msg="custom " prefer_resolution_clock_gettime_monotonic="undefined" ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 $as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime(CLOCK_MONOTONIC_RAW, &ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_raw=yes else erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if ${erl_cv_clock_gettime_monotonic_high_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_high_resolution=$clock_type else erl_cv_clock_gettime_monotonic_high_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_high_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_high_resolution" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_high_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then for ac_func in clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else for ac_func in clock_getres clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 $as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_monotonic=yes else erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 $as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } erl_corrected_monotonic_clock=no case $erl_cv_clock_gettime_monotonic_high_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in *-*-*-win32) erl_monotonic_clock_func=WindowsAPI ;; CLOCK_*-*-*-linux*) case $erl_cv_clock_gettime_monotonic_high_resolution-$erl_cv_clock_gettime_monotonic_raw in CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) erl_corrected_monotonic_clock=yes ;; *) # We don't trust CLOCK_MONOTONIC to be NTP # adjusted on linux systems that do not have # CLOCK_MONOTONIC_RAW (although it seems to # be...) ;; esac erl_monotonic_clock_func=clock_gettime ;; no-no-no-linux*) erl_monotonic_clock_func=times ;; CLOCK_*-*-*-*) erl_monotonic_clock_func=clock_gettime ;; no-yes-*-*) erl_monotonic_clock_func=gethrtime ;; no-no-yes-*) erl_monotonic_clock_func=mach_clock_get_time ;; no-no-no-*) erl_monotonic_clock_func=none ;; esac erl_monotonic_clock_low_resolution=no erl_monotonic_clock_lib= erl_monotonic_clock_id= case $erl_monotonic_clock_func in clock_gettime) erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_high_resolution for low_res_id in $low_resolution_clock_gettime_monotonic; do if test $erl_monotonic_clock_id = $low_res_id; then erl_monotonic_clock_low_resolution=yes break fi done erl_monotonic_clock_lib=$clock_gettime_lib ;; mach_clock_get_time) erl_monotonic_clock_id=SYSTEM_CLOCK ;; times) erl_monotonic_clock_low_resolution=yes ;; *) ;; esac ;; low-no) if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" else default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" fi case "low_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_monotonic="undefined" ;; *) check_msg="custom " prefer_resolution_clock_gettime_monotonic="undefined" ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 $as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime(CLOCK_MONOTONIC_RAW, &ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_raw=yes else erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if ${erl_cv_clock_gettime_monotonic_low_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_low_resolution=$clock_type else erl_cv_clock_gettime_monotonic_low_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_low_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_low_resolution" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_low_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then for ac_func in clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else for ac_func in clock_getres clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 $as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_monotonic=yes else erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 $as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } erl_corrected_monotonic_clock=no case $erl_cv_clock_gettime_monotonic_low_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in *-*-*-win32) erl_monotonic_clock_func=WindowsAPI ;; CLOCK_*-*-*-linux*) case $erl_cv_clock_gettime_monotonic_low_resolution-$erl_cv_clock_gettime_monotonic_raw in CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) erl_corrected_monotonic_clock=yes ;; *) # We don't trust CLOCK_MONOTONIC to be NTP # adjusted on linux systems that do not have # CLOCK_MONOTONIC_RAW (although it seems to # be...) ;; esac erl_monotonic_clock_func=clock_gettime ;; no-no-no-linux*) erl_monotonic_clock_func=times ;; CLOCK_*-*-*-*) erl_monotonic_clock_func=clock_gettime ;; no-yes-*-*) erl_monotonic_clock_func=gethrtime ;; no-no-yes-*) erl_monotonic_clock_func=mach_clock_get_time ;; no-no-no-*) erl_monotonic_clock_func=none ;; esac erl_monotonic_clock_low_resolution=no erl_monotonic_clock_lib= erl_monotonic_clock_id= case $erl_monotonic_clock_func in clock_gettime) erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_low_resolution for low_res_id in $low_resolution_clock_gettime_monotonic; do if test $erl_monotonic_clock_id = $low_res_id; then erl_monotonic_clock_low_resolution=yes break fi done erl_monotonic_clock_lib=$clock_gettime_lib ;; mach_clock_get_time) erl_monotonic_clock_id=SYSTEM_CLOCK ;; times) erl_monotonic_clock_low_resolution=yes ;; *) ;; esac ;; default-no) if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" else default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" fi case "default_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_monotonic="undefined" ;; *) check_msg="custom " prefer_resolution_clock_gettime_monotonic="undefined" ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 $as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime(CLOCK_MONOTONIC_RAW, &ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_raw=yes else erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if ${erl_cv_clock_gettime_monotonic_default_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_default_resolution=$clock_type else erl_cv_clock_gettime_monotonic_default_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_default_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_default_resolution" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_default_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then for ac_func in clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else for ac_func in clock_getres clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 $as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_monotonic=yes else erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 $as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } erl_corrected_monotonic_clock=no case $erl_cv_clock_gettime_monotonic_default_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in *-*-*-win32) erl_monotonic_clock_func=WindowsAPI ;; CLOCK_*-*-*-linux*) case $erl_cv_clock_gettime_monotonic_default_resolution-$erl_cv_clock_gettime_monotonic_raw in CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) erl_corrected_monotonic_clock=yes ;; *) # We don't trust CLOCK_MONOTONIC to be NTP # adjusted on linux systems that do not have # CLOCK_MONOTONIC_RAW (although it seems to # be...) ;; esac erl_monotonic_clock_func=clock_gettime ;; no-no-no-linux*) erl_monotonic_clock_func=times ;; CLOCK_*-*-*-*) erl_monotonic_clock_func=clock_gettime ;; no-yes-*-*) erl_monotonic_clock_func=gethrtime ;; no-no-yes-*) erl_monotonic_clock_func=mach_clock_get_time ;; no-no-no-*) erl_monotonic_clock_func=none ;; esac erl_monotonic_clock_low_resolution=no erl_monotonic_clock_lib= erl_monotonic_clock_id= case $erl_monotonic_clock_func in clock_gettime) erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_default_resolution for low_res_id in $low_resolution_clock_gettime_monotonic; do if test $erl_monotonic_clock_id = $low_res_id; then erl_monotonic_clock_low_resolution=yes break fi done erl_monotonic_clock_lib=$clock_gettime_lib ;; mach_clock_get_time) erl_monotonic_clock_id=SYSTEM_CLOCK ;; times) erl_monotonic_clock_low_resolution=yes ;; *) ;; esac ;; *) if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" else default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" fi case "custom_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_monotonic="$with_clock_gettime_monotonic_id" ;; *) check_msg="custom " prefer_resolution_clock_gettime_monotonic="$with_clock_gettime_monotonic_id" ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 $as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime(CLOCK_MONOTONIC_RAW, &ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_raw=yes else erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if ${erl_cv_clock_gettime_monotonic_custom_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_custom_resolution=$clock_type else erl_cv_clock_gettime_monotonic_custom_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_custom_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_custom_resolution" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_custom_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then for ac_func in clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else for ac_func in clock_getres clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 $as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_monotonic=yes else erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 $as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } erl_corrected_monotonic_clock=no case $erl_cv_clock_gettime_monotonic_custom_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in *-*-*-win32) erl_monotonic_clock_func=WindowsAPI ;; CLOCK_*-*-*-linux*) case $erl_cv_clock_gettime_monotonic_custom_resolution-$erl_cv_clock_gettime_monotonic_raw in CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) erl_corrected_monotonic_clock=yes ;; *) # We don't trust CLOCK_MONOTONIC to be NTP # adjusted on linux systems that do not have # CLOCK_MONOTONIC_RAW (although it seems to # be...) ;; esac erl_monotonic_clock_func=clock_gettime ;; no-no-no-linux*) erl_monotonic_clock_func=times ;; CLOCK_*-*-*-*) erl_monotonic_clock_func=clock_gettime ;; no-yes-*-*) erl_monotonic_clock_func=gethrtime ;; no-no-yes-*) erl_monotonic_clock_func=mach_clock_get_time ;; no-no-no-*) erl_monotonic_clock_func=none ;; esac erl_monotonic_clock_low_resolution=no erl_monotonic_clock_lib= erl_monotonic_clock_id= case $erl_monotonic_clock_func in clock_gettime) erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_custom_resolution for low_res_id in $low_resolution_clock_gettime_monotonic; do if test $erl_monotonic_clock_id = $low_res_id; then erl_monotonic_clock_low_resolution=yes break fi done erl_monotonic_clock_lib=$clock_gettime_lib ;; mach_clock_get_time) erl_monotonic_clock_id=SYSTEM_CLOCK ;; times) erl_monotonic_clock_low_resolution=yes ;; *) ;; esac ;; esac case "$erl_monotonic_clock_func-$erl_monotonic_clock_id-$with_clock_gettime_monotonic_id" in *-*-no) ;; clock_gettime-$with_clock_gettime_monotonic_id-$with_clock_gettime_monotonic_id) ;; *) as_fn_error $? "$with_clock_gettime_monotonic_id as clock id to clock_gettime() doesn't compile" "$LINENO" 5 ;; esac case $erl_monotonic_clock_func in times) $as_echo "#define OS_MONOTONIC_TIME_USING_TIMES 1" >>confdefs.h ;; mach_clock_get_time) $as_echo "#define OS_MONOTONIC_TIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; clock_gettime) $as_echo "#define OS_MONOTONIC_TIME_USING_CLOCK_GETTIME 1" >>confdefs.h ;; gethrtime) $as_echo "#define OS_MONOTONIC_TIME_USING_GETHRTIME 1" >>confdefs.h ;; *) ;; esac if test $erl_corrected_monotonic_clock = yes; then $as_echo "#define ERTS_HAVE_CORRECTED_OS_MONOTONIC_TIME 1" >>confdefs.h fi if test $erl_monotonic_clock_low_resolution = yes; then $as_echo "#define ERTS_HAVE_LOW_RESOLUTION_OS_MONOTONIC_LOW 1" >>confdefs.h fi xrtlib= if test "$erl_monotonic_clock_lib" != ""; then xrtlib="$erl_monotonic_clock_lib" fi if test "$erl_wall_clock_lib" != ""; then xrtlib="$erl_wall_clock_lib" fi if test "x$erl_monotonic_clock_id" != "x"; then cat >>confdefs.h <<_ACEOF #define MONOTONIC_CLOCK_ID_STR "$erl_monotonic_clock_id" _ACEOF cat >>confdefs.h <<_ACEOF #define MONOTONIC_CLOCK_ID $erl_monotonic_clock_id _ACEOF fi if test $erl_cv_clock_gettime_monotonic_raw = yes; then $as_echo "#define HAVE_CLOCK_GETTIME_MONOTONIC_RAW 1" >>confdefs.h fi if test "no" = "yes"; then default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_BOOTTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_FAST" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_PRECISE" else default_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME CLOCK_MONOTONIC" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_COARSE CLOCK_UPTIME_FAST" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_PRECISE" fi case "high_resolution" in high_resolution) check_msg="high resolution " prefer_resolution_clock_gettime_monotonic="$high_resolution_clock_gettime_monotonic" ;; low_resolution) check_msg="low resolution " prefer_resolution_clock_gettime_monotonic="$low_resolution_clock_gettime_monotonic" ;; custom_resolution) check_msg="custom resolution " prefer_resolution_clock_gettime_monotonic="undefined" ;; *) check_msg="custom " prefer_resolution_clock_gettime_monotonic="undefined" ;; esac clock_gettime_lib="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 $as_echo_n "checking for clock_gettime in -lrt... " >&6; } if ${ac_cv_lib_rt_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_clock_gettime=yes else ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 $as_echo "$ac_cv_lib_rt_clock_gettime" >&6; } if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then : clock_gettime_lib="-lrt" fi save_LIBS="$LIBS" LIBS="$LIBS $clock_gettime_lib" if test "$LD_MAY_BE_WEAK" != "no"; then trust_test="#error May not be there due to weak linking" else trust_test="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 $as_echo_n "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if ${erl_cv_clock_gettime_monotonic_raw+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime(CLOCK_MONOTONIC_RAW, &ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_raw=yes else erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_raw" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 $as_echo_n "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if ${erl_cv_clock_gettime_monotonic_high_resolution+:} false; then : $as_echo_n "(cached) " >&6 else 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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main () { struct timespec ts; long long result; clock_gettime($clock_type,&ts); result = ((long long) ts.tv_sec) * 1000000000LL + ((long long) ts.tv_nsec); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : erl_cv_clock_gettime_monotonic_high_resolution=$clock_type else erl_cv_clock_gettime_monotonic_high_resolution=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_high_resolution = no || break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_high_resolution" >&5 $as_echo "$erl_cv_clock_gettime_monotonic_high_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no"; then for ac_func in clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done else for ac_func in clock_getres clock_get_attributes gethrtime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 $as_echo_n "checking for mach clock_get_time() with monotonic clock type... " >&6; } if ${erl_cv_mach_clock_get_time_monotonic+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { kern_return_t res; clock_serv_t clk_srv; mach_timespec_t time_spec; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &clk_srv); res = clock_get_time(clk_srv, &time_spec); mach_port_deallocate(mach_task_self(), clk_srv); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : erl_cv_mach_clock_get_time_monotonic=yes else erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 $as_echo "$erl_cv_mach_clock_get_time_monotonic" >&6; } erl_corrected_monotonic_clock=no case $erl_cv_clock_gettime_monotonic_high_resolution-$ac_cv_func_gethrtime-$erl_cv_mach_clock_get_time_monotonic-$host_os in *-*-*-win32) erl_monotonic_clock_func=WindowsAPI ;; CLOCK_*-*-*-linux*) case $erl_cv_clock_gettime_monotonic_high_resolution-$erl_cv_clock_gettime_monotonic_raw in CLOCK_BOOTTIME-yes|CLOCK_MONOTONIC-yes) erl_corrected_monotonic_clock=yes ;; *) # We don't trust CLOCK_MONOTONIC to be NTP # adjusted on linux systems that do not have # CLOCK_MONOTONIC_RAW (although it seems to # be...) ;; esac erl_monotonic_clock_func=clock_gettime ;; no-no-no-linux*) erl_monotonic_clock_func=times ;; CLOCK_*-*-*-*) erl_monotonic_clock_func=clock_gettime ;; no-yes-*-*) erl_monotonic_clock_func=gethrtime ;; no-no-yes-*) erl_monotonic_clock_func=mach_clock_get_time ;; no-no-no-*) erl_monotonic_clock_func=none ;; esac erl_monotonic_clock_low_resolution=no erl_monotonic_clock_lib= erl_monotonic_clock_id= case $erl_monotonic_clock_func in clock_gettime) erl_monotonic_clock_id=$erl_cv_clock_gettime_monotonic_high_resolution for low_res_id in $low_resolution_clock_gettime_monotonic; do if test $erl_monotonic_clock_id = $low_res_id; then erl_monotonic_clock_low_resolution=yes break fi done erl_monotonic_clock_lib=$clock_gettime_lib ;; mach_clock_get_time) erl_monotonic_clock_id=SYSTEM_CLOCK ;; times) erl_monotonic_clock_low_resolution=yes ;; *) ;; esac case $erl_monotonic_clock_low_resolution-$erl_monotonic_clock_func in no-mach_clock_get_time) monotonic_hrtime=yes $as_echo "#define SYS_HRTIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; no-clock_gettime) monotonic_hrtime=yes $as_echo "#define SYS_HRTIME_USING_CLOCK_GETTIME 1" >>confdefs.h ;; no-gethrtime) monotonic_hrtime=yes $as_echo "#define SYS_HRTIME_USING_GETHRTIME 1" >>confdefs.h ;; *) monotonic_hrtime=no ;; esac if test $monotonic_hrtime = yes; then $as_echo "#define HAVE_MONOTONIC_ERTS_SYS_HRTIME 1" >>confdefs.h fi if test "x$erl_monotonic_clock_id" != "x"; then cat >>confdefs.h <<_ACEOF #define HRTIME_CLOCK_ID_STR "$erl_monotonic_clock_id" _ACEOF cat >>confdefs.h <<_ACEOF #define HRTIME_CLOCK_ID $erl_monotonic_clock_id _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if gethrvtime works and how to use it" >&5 $as_echo_n "checking if gethrvtime works and how to use it... " >&6; } if test "$cross_compiling" = yes; then : case X$erl_xcomp_gethrvtime_procfs_ioctl in X) erl_gethrvtime=cross;; Xyes|Xno) if test $erl_xcomp_gethrvtime_procfs_ioctl = yes; then erl_gethrvtime=procfs_ioctl else erl_gethrvtime=false fi;; *) as_fn_error $? "Bad erl_xcomp_gethrvtime_procfs_ioctl value: $erl_xcomp_gethrvtime_procfs_ioctl" "$LINENO" 5;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* gethrvtime procfs ioctl test */ /* These need to be undef:ed to not break activation of * micro level process accounting on /proc/self */ #ifdef _LARGEFILE_SOURCE # undef _LARGEFILE_SOURCE #endif #ifdef _FILE_OFFSET_BITS # undef _FILE_OFFSET_BITS #endif #include #include #include #include #include #include #include #include #include #include #include #include int main() { long msacct = PR_MSACCT; int fd; long long start, stop; int i; pid_t pid = getpid(); char proc_self[30] = "/proc/"; sprintf(proc_self+strlen(proc_self), "%lu", (unsigned long) pid); if ( (fd = open(proc_self, O_WRONLY)) == -1) exit(1); if (ioctl(fd, PIOCSET, &msacct) < 0) exit(2); if (close(fd) < 0) exit(3); start = gethrvtime(); for (i = 0; i < 100; i++) stop = gethrvtime(); if (start == 0) exit(4); if (start == stop) exit(5); exit(0); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : erl_gethrvtime=procfs_ioctl else erl_gethrvtime=false fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBRT=$xrtlib case $erl_gethrvtime in procfs_ioctl) $as_echo "#define HAVE_GETHRVTIME_PROCFS_IOCTL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: uses ioctl to procfs" >&5 $as_echo "uses ioctl to procfs" >&6; } ;; *) if test $erl_gethrvtime = cross; then erl_gethrvtime=false { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 $as_echo "cross" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result 'not working' guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result 'not working' guessed because of cross compilation" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not working" >&5 $as_echo "not working" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if clock_gettime can be used to get thread CPU time" >&5 $as_echo_n "checking if clock_gettime can be used to get thread CPU time... " >&6; } save_libs=$LIBS LIBS="-lrt" if test "$cross_compiling" = yes; then : case X$erl_xcomp_clock_gettime_cpu_time in X) erl_clock_gettime_cpu_time=cross;; Xyes|Xno) erl_clock_gettime_cpu_time=$erl_xcomp_clock_gettime_cpu_time;; *) as_fn_error $? "Bad erl_xcomp_clock_gettime_cpu_time value: $erl_xcomp_clock_gettime_cpu_time" "$LINENO" 5;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include int main() { long long start, stop; int i; struct timespec tp; if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp) < 0) exit(1); start = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec; for (i = 0; i < 100; i++) clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp); stop = ((long long)tp.tv_sec * 1000000000LL) + (long long)tp.tv_nsec; if (start == 0) exit(4); if (start == stop) exit(5); exit(0); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : erl_clock_gettime_cpu_time=yes else erl_clock_gettime_cpu_time=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi LIBS=$save_libs { $as_echo "$as_me:${as_lineno-$LINENO}: result: $erl_clock_gettime_cpu_time" >&5 $as_echo "$erl_clock_gettime_cpu_time" >&6; } case $erl_clock_gettime_cpu_time in yes) $as_echo "#define HAVE_CLOCK_GETTIME_CPU_TIME /**/" >>confdefs.h LIBRT=-lrt ;; cross) erl_clock_gettime_cpu_time=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;} ;; *) ;; esac ;; esac # Extract the first word of "m4", so it can be a program name with args. set dummy m4; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_M4+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$M4"; then ac_cv_prog_M4="$M4" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_M4="m4" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi M4=$ac_cv_prog_M4 if test -n "$M4"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4" >&5 $as_echo "$M4" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi JIT_ARCH= if test ${enable_jit} != no; then case "$ARCH" in amd64) JIT_ARCH=x86 ;; *) if test ${enable_jit} = yes; then as_fn_error $? "JIT only works on x86 64-bit" "$LINENO" 5 else enable_jit=no { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: JIT disabled due to lack to support on $ARCH-$OPSYS" >&5 $as_echo "$as_me: WARNING: JIT disabled due to lack to support on $ARCH-$OPSYS" >&2;} fi ;; esac if test ${enable_jit} != no; then if test "$CXX" != false; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu old_CXXFLAGS=$CXXFLAGS CXXFLAGS="$CXXFLAGS -std=c++17" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if __cplusplus < 201703L #error "Needs C++17 compiler" #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++17 support" >&5 $as_echo_n "checking for C++17 support... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_CXX17=true else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++17 support" >&5 $as_echo_n "checking for C++17 support... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } HAVE_CXX17=false fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi if test "$CXX" = false -o "$HAVE_CXX17" = false; then if test ${enable_jit} = yes; then as_fn_error $? "JIT needs a C++ compiler with C++17 support" "$LINENO" 5 else enable_jit=no cat >> $ERL_TOP/erts/CONF_INFO <&5 $as_echo "$as_me: WARNING: JIT disable due to lack of C++ compiler with C++17 support" >&2;} fi fi fi if test ${enable_jit} != no; then enable_jit=yes fi fi if test ${enable_jit} != no; then case $host_os in openbsd*) # Whenever the kernel is entered (page faults, system calls, etc), # OpenBSD checks whether the stack pointer is in an area allocated with # MAP_STACK, so we can't use the native stack for Erlang code. # # https://undeadly.org/cgi?action=article;sid=20180310000858 enable_native_stack=no;; win32*) # Windows never messes with the stack, so it's safe by default. enable_native_stack=yes;; *) # Use the native stack if we can safely redirect OS signals to a # different stack. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for safe signal delivery" >&5 $as_echo_n "checking for safe signal delivery... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__) #define __DARWIN__ 1 #endif #if !(defined(__GLIBC__) || defined(__DARWIN__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__sun__)) #error "Unknown libc. Assume musl, which does not allow safe signals" #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } enable_native_stack=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling native stack in JIT" >&5 $as_echo "no, disabling native stack in JIT" >&6; } enable_native_stack=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext;; esac if test X${enable_native_stack} = Xyes; then $as_echo "#define NATIVE_ERLANG_STACK /**/" >>confdefs.h fi fi case $OPSYS in linux*) $as_echo "#define HAVE_LINUX_PERF_SUPPORT 1" >>confdefs.h ;; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to redefine FD_SETSIZE" >&5 $as_echo_n "checking whether to redefine FD_SETSIZE... " >&6; } case $host_os in bsdi*) $as_echo "#define REDEFINE_FD_SETSIZE /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac JIT_ENABLED= FLAVORS="emu jit" # Enable jit if test X${enable_jit} = Xyes; then JIT_ENABLED=yes PRIMARY_FLAVOR=jit else PRIMARY_FLAVOR=emu fi # # Check for working poll(). # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working poll()" >&5 $as_echo_n "checking for working poll()... " >&6; } if test "x$ac_cv_header_poll_h" != "xyes" -o "x$ac_cv_func_poll" != "xyes"; then poll_works=no else if test "$cross_compiling" = yes; then : case X$erl_xcomp_poll in X) poll_works=cross;; Xyes|Xno) poll_works=$erl_xcomp_poll;; *) as_fn_error $? "Bad erl_xcomp_poll value: $erl_xcomp_poll" "$LINENO" 5;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include main() { #ifdef _POLL_EMUL_H_ exit(1); /* Implemented using select() -- fail */ #else struct pollfd fds[1]; int fd; fd = open("/dev/null", 1); fds[0].fd = fd; fds[0].events = POLLIN; fds[0].revents = 0; if (poll(fds, 1, 0) < 0 || (fds[0].revents & POLLNVAL) != 0) { exit(1); /* Does not work for devices -- fail */ } exit(0); #endif } _ACEOF if ac_fn_c_try_run "$LINENO"; then : poll_works=yes else poll_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi case $poll_works-$host_os in no-*|cross-darwin*) # # The USE_SELECT define is used by the ssl application (should not # be used by erts). # $as_echo "#define USE_SELECT 1" >>confdefs.h if test $poll_works = cross; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 $as_echo "cross" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&5 $as_echo "$as_me: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; non-existing, broken, or based on select()" >&5 $as_echo "no; non-existing, broken, or based on select()" >&6; } fi poll_works=no;; yes-*|cross-*) $as_echo "#define ERTS_USE_POLL 1" >>confdefs.h if test $poll_works = cross; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross" >&5 $as_echo "cross" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&5 $as_echo "$as_me: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&2;} else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi poll_works=yes;; esac # # If kqueue() found # if test $have_kernel_poll = kqueue; then ## Some OS X kernel version seems to have bugs in them with regards to kqueue ## Disable kernel poll on those versions { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether host os has known kqueue bugs" >&5 $as_echo_n "checking whether host os has known kqueue bugs... " >&6; } case $host_os in # Any OS X version < 16 has known problems with using kqueue # so we don't use it there. See erl_poll.c for details. darwin[0-9].*|darwin1[0-5].*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, disabling kernel poll" >&5 $as_echo "yes, disabling kernel poll" >&6; } have_kernel_poll=no ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # # If epoll() found, check that it is level triggered. # if test $have_kernel_poll = epoll; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether epoll is level triggered" >&5 $as_echo_n "checking whether epoll is level triggered... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifdef EPOLLET /* Edge triggered option exist, assume level triggered is default */ ; #else /* No edge triggered option exist; assume edge triggered only */ #error No EPOLLET #endif ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : level_triggered_epoll=yes else level_triggered_epoll=no have_kernel_poll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $level_triggered_epoll" >&5 $as_echo "$level_triggered_epoll" >&6; } fi # # Check if we should enable kernel poll support # { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether kernel poll support should be enabled" >&5 $as_echo_n "checking whether kernel poll support should be enabled... " >&6; } ERTS_ENABLE_KERNEL_POLL=no ERTS_BUILD_FALLBACK_POLL=no case $enable_kernel_poll-$have_kernel_poll in no-*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no; disabled by user" >&5 $as_echo "no; disabled by user" >&6; };; yes-no) as_fn_error $? "no; kernel poll support requested but not found" "$LINENO" 5;; *-no) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; };; *) case $have_kernel_poll in epoll) $as_echo "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h ERTS_BUILD_FALLBACK_POLL=yes ;; /dev/poll) $as_echo "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h ;; kqueue) $as_echo "#define HAVE_SYS_EVENT_H 1" >>confdefs.h ERTS_BUILD_FALLBACK_POLL=yes ;; *) as_fn_error $? "configure.in need to be updated" "$LINENO" 5;; esac ERTS_ENABLE_KERNEL_POLL=yes $as_echo "#define ERTS_ENABLE_KERNEL_POLL 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes; $have_kernel_poll" >&5 $as_echo "yes; $have_kernel_poll" >&6; };; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether putenv() stores a copy of the key-value pair" >&5 $as_echo_n "checking whether putenv() stores a copy of the key-value pair... " >&6; } if test "$cross_compiling" = yes; then : case X$erl_xcomp_putenv_copy in X) copying_putenv=cross;; Xyes|Xno) copying_putenv=$erl_xcomp_putenv_copy;; *) as_fn_error $? "Bad erl_xcomp_putenv_copy value: $erl_xcomp_putenv_copy" "$LINENO" 5;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main(void) { int i; char *env; char buf[10]; for (i = 0; i < 7; i++) buf[i] = 'X'; buf[i] = '\0'; buf[3] = '='; if (putenv(buf) != 0) return 1; for (i = 4; i < 7; i++) buf[i] = 'Y'; env = getenv("XXX"); if (!env) return 2; for (i = 0; i < 3; i++) if (env[i] != 'X') return 3; for (i = 0; i < 3; i++) buf[i] = 'Y'; env = getenv("XXX"); if (!env) return 4; for (i = 0; i < 3; i++) if (env[i] != 'X') return 5; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : copying_putenv=yes else copying_putenv=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $copying_putenv" >&5 $as_echo "$copying_putenv" >&6; } case $copying_putenv in yes) $as_echo "#define HAVE_COPYING_PUTENV 1" >>confdefs.h ;; cross) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; *) ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a compiler that handles jumptables" >&5 $as_echo_n "checking for a compiler that handles jumptables... " >&6; } if ${ac_cv_prog_emu_cc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if defined(__clang_major__) && __clang_major__ >= 3 /* clang 3.x or later is fine */ #elif defined(__llvm__) #error "this version of llvm is unable to correctly compile beam_emu.c" #endif __label__ lbl1; __label__ lbl2; extern int magic(void); int x = magic(); static void *jtab[2]; jtab[0] = &&lbl1; jtab[1] = &&lbl2; goto *jtab[x]; lbl1: return 1; lbl2: return 2; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_emu_cc="$CC" else ac_cv_prog_emu_cc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "$ac_cv_prog_emu_cc" = no; then for ac_progname in emu_cc.sh gcc-4.2 gcc; do IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy="$PATH" for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_progname"; then ac_cv_prog_emu_cc="$ac_dir/$ac_progname" break fi done IFS="$ac_save_ifs" if test "$ac_cv_prog_emu_cc" != no; then break fi done fi if test "$ac_cv_prog_emu_cc" != no; then save_CC="$CC" save_CFLAGS=$CFLAGS save_CPPFLAGS=$CPPFLAGS CC="$ac_cv_prog_emu_cc" CFLAGS="" CPPFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #if defined(__clang_major__) && __clang_major__ >= 3 /* clang 3.x or later is fine */ #elif defined(__llvm__) #error "this version of llvm is unable to correctly compile beam_emu.c" #endif __label__ lbl1; __label__ lbl2; extern int magic(void); int x = magic(); static void *jtab[2]; jtab[0] = &&lbl1; jtab[1] = &&lbl2; goto *jtab[x]; lbl1: return 1; lbl2: return 2; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_emu_cc="$CC" else ac_cv_prog_emu_cc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CC=$save_CC CFLAGS=$save_CFLAGS CPPFLAGS=$save_CPPFLAGS fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_emu_cc" >&5 $as_echo "$ac_cv_prog_emu_cc" >&6; } if test "$ac_cv_prog_emu_cc" = no; then $as_echo "#define NO_JUMP_TABLE /**/" >>confdefs.h EMU_CC="$CC" else EMU_CC="$ac_cv_prog_emu_cc" fi case $DYNAMIC_TRACE_FRAMEWORK in dtrace|systemtap) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dtrace", so it can be a program name with args. set dummy ${ac_tool_prefix}dtrace; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DTRACE+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DTRACE"; then ac_cv_prog_DTRACE="$DTRACE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DTRACE="${ac_tool_prefix}dtrace" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DTRACE=$ac_cv_prog_DTRACE if test -n "$DTRACE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 $as_echo "$DTRACE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DTRACE"; then ac_ct_DTRACE=$DTRACE # Extract the first word of "dtrace", so it can be a program name with args. set dummy dtrace; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DTRACE+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DTRACE"; then ac_cv_prog_ac_ct_DTRACE="$ac_ct_DTRACE" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DTRACE="dtrace" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DTRACE=$ac_cv_prog_ac_ct_DTRACE if test -n "$ac_ct_DTRACE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DTRACE" >&5 $as_echo "$ac_ct_DTRACE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DTRACE" = x; then DTRACE="none" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DTRACE=$ac_ct_DTRACE fi else DTRACE="$ac_cv_prog_DTRACE" fi test "$DTRACE" = "none" && as_fn_error $? "No dtrace utility found." "$LINENO" 5; enable_lttng_test=no enable_dtrace_test=yes;; lttng) enable_lttng_test=yes enable_dtrace_test=no;; *) enable_lttng_test=no enable_dtrace_test=no;; esac DTRACE_CPP=-C DTRACE_ENABLED= DTRACE_ENABLED_2STEP= DTRACE_2STEP_TEST=./dtrace-test.o DTRACE_BITS_FLAG= case $OPSYS in freebsd) if test "$BITS64" = "yes" ; then DTRACE_BITS_FLAG=-64 else DTRACE_BITS_FLAG=-32 fi ;; *) : # Nothing to do ;; esac if test "$enable_dtrace_test" = "yes" ; then if test "$DTRACE" = "dtrace" ; then for ac_header in sys/sdt.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sdt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SDT_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 1-stage DTrace precompilation" >&5 $as_echo_n "checking for 1-stage DTrace precompilation... " >&6; } # The OS X version of dtrace prints a spurious line here. if ! dtrace -h $DTRACE_CPP -Iemulator/beam -o ./foo-dtrace.h -s emulator/beam/erlang_dtrace.d; then as_fn_error $? "Could not precompile erlang_dtrace.d: dtrace -h failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 2-stage DTrace precompilation" >&5 $as_echo_n "checking for 2-stage DTrace precompilation... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "foo-dtrace.h" int main () { ERLANG_DIST_PORT_BUSY_ENABLED(); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : rm -f $DTRACE_2STEP_TEST dtrace -G $DTRACE_CPP $DTRACE_BITS_FLAG -Iemulator/beam -o $DTRACE_2STEP_TEST -s emulator/beam/erlang_dtrace.d conftest.$OBJEXT 2>&5 if test -f $DTRACE_2STEP_TEST; then rm -f $DTRACE_2STEP_TEST DTRACE_ENABLED_2STEP=yes fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext rm -f foo-dtrace.h if test "x$DTRACE_ENABLED_2STEP" = "xyes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi DTRACE_ENABLED=yes case $OPSYS in linux) : # No extra libs to add to LIBS ;; freebsd) LIBS="$LIBS -lelf" ;; *) LIBS="$LIBS -ldtrace" ;; esac else as_fn_error $? "Dtrace preprocessing test failed." "$LINENO" 5 fi fi if test "$enable_lttng_test" = "yes" ; then for ac_header in lttng/tracepoint.h do : ac_fn_c_check_header_mongrel "$LINENO" "lttng/tracepoint.h" "ac_cv_header_lttng_tracepoint_h" "$ac_includes_default" if test "x$ac_cv_header_lttng_tracepoint_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LTTNG_TRACEPOINT_H 1 _ACEOF fi done for ac_header in lttng/tracepoint-event.h do : ac_fn_c_check_header_mongrel "$LINENO" "lttng/tracepoint-event.h" "ac_cv_header_lttng_tracepoint_event_h" "$ac_includes_default" if test "x$ac_cv_header_lttng_tracepoint_event_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LTTNG_TRACEPOINT_EVENT_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tracepoint_enabled in lttng/tracepoint.h" >&5 $as_echo_n "checking for tracepoint_enabled in lttng/tracepoint.h... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #define TRACEPOINT_PROVIDER org_erlang_otp TRACEPOINT_EVENT( org_erlang_otp, dummy, TP_ARGS(int, my_int), TP_FIELDS(ctf_integer(int, my_int, my_int))) #define TRACEPOINT_CREATE_PROBES #define TRACEPOINT_DEFINE int main () { if(tracepoint_enabled(org_erlang_otp,dummy)) do {} while(0) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else as_fn_error $? "no (available in lttng-ust v2.7)" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test "x$ac_cv_header_lttng_tracepoint_h" = "xyes" \ -a "x$ac_cv_header_lttng_tracepoint_event_h" = "xyes"; then # No straight forward way to test for liblttng-ust when no public symbol exists, # just add the lib. LIBS="$LIBS -llttng-ust -ldl" else as_fn_error $? "No LTTng support found." "$LINENO" 5 fi fi #-------------------------------------------------------------------- # Os mon stuff. #-------------------------------------------------------------------- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 $as_echo_n "checking for kstat_open in -lkstat... " >&6; } if ${ac_cv_lib_kstat_kstat_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkstat $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char kstat_open (); int main () { return kstat_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kstat_kstat_open=yes else ac_cv_lib_kstat_kstat_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 $as_echo "$ac_cv_lib_kstat_kstat_open" >&6; } if test "x$ac_cv_lib_kstat_kstat_open" = xyes; then : use_cpu_sup=yes CPU_SUP_LIBS="$CPU_SUP_LIBS -lkstat" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 $as_echo_n "checking for kvm_open in -lkvm... " >&6; } if ${ac_cv_lib_kvm_kvm_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkvm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char kvm_open (); int main () { return kvm_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kvm_kvm_open=yes else ac_cv_lib_kvm_kvm_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 $as_echo "$ac_cv_lib_kvm_kvm_open" >&6; } if test "x$ac_cv_lib_kvm_kvm_open" = xyes; then : use_cpu_sup=yes CPU_SUP_LIBS="$CPU_SUP_LIBS -lkvm" fi case $host_os in solaris2*) os_mon_programs="$os_mon_programs ferrule mod_syslog" ;; darwin*) use_cpu_sup=yes ;; openbsd*) use_cpu_sup=yes ;; linux*) use_cpu_sup=yes ;; freebsd*) use_cpu_sup=yes ;; esac if test "$use_cpu_sup" = "yes"; then os_mon_programs="$os_mon_programs cpu_sup" fi # Check whether --with-javac was given. if test "${with_javac+set}" = set; then : withval=$with_javac; fi need_java="jinterface" if test -d $ERL_TOP/lib/ic; then need_java="$need_java ic/java_src" fi # Remove all SKIP files from previous runs for a in $need_java ; do rm -f $ERL_TOP/lib/$a/SKIP done if test "X$with_javac" = "Xno"; then for a in $need_java ; do echo "Java compiler disabled by user" > $ERL_TOP/lib/$a/SKIP done else # begin - try to find javac if test "X$with_javac" != "Xyes" -a "X$with_javac" != "X"; then check_javac=$with_javac else check_javac="javac.sh javac guavac gcj jikes bock" fi for ac_prog in $check_javac do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVAC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVAC"; then ac_cv_prog_JAVAC="$JAVAC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVAC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVAC=$ac_cv_prog_JAVAC if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 $as_echo "$JAVAC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$JAVAC" && break done if test -n "$JAVAC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JDK version 1.6" >&5 $as_echo_n "checking for JDK version 1.6... " >&6; } if ${ac_cv_prog_javac_ver_1_6+:} false; then : $as_echo_n "(cached) " >&6 else java_link='$JAVAC conftest.java 1>&5' cat > conftest.java <&5 (eval $java_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest.class; then rm -rf conftest* ac_cv_prog_javac_ver_1_6=yes else echo "configure: failed program was:" 1>&5 cat conftest.java 1>&5 echo "configure: PATH was $PATH" 1>&5 rm -rf conftest* ac_cv_prog_javac_ver_1_6=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_ver_1_6" >&5 $as_echo "$ac_cv_prog_javac_ver_1_6" >&6; } if test $ac_cv_prog_javac_ver_1_6 = no; then unset -v JAVAC fi fi if test -z "$JAVAC"; then if test "X$with_javac" != "X"; then as_fn_error $? "No java compiler found in PATH (checked for $check_javac)" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find any usable java compiler, will skip: jinterface" >&5 $as_echo "$as_me: WARNING: Could not find any usable java compiler, will skip: jinterface" >&2;} for a in $need_java ; do echo "No Java compiler found" > $ERL_TOP/lib/$a/SKIP done fi fi # end - try to find javac if test -n "$ac_tool_prefix"; then for ac_prog in $CCC c++ g++ CC cxx cc++ cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC c++ g++ CC cxx cc++ cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi # Remove SKIP file from previous run rm -f $ERL_TOP/lib/orber/SKIP if test "$CXX" = false; then echo "No C++ compiler found" > $ERL_TOP/lib/orber/SKIP fi CFLAGS="$CFLAGS $CPPFLAGS" # # Currently if we compile for 64 bits we want to compile # some external port programs using 32 bits # # If not defined we trust the C compiler in $CC to do 32 bits if test -z "$CC32"; then CC32="$CC" fi if test -z "$CFLAGS32"; then if test $ac_cv_sizeof_void_p != 4; then # We are compiling default 64 bits and use -m32 for 32 bit compilations CFLAGS32="$CFLAGS -m32" else CFLAGS32="$CFLAGS" fi fi cat >>confdefs.h <<_ACEOF #define ERTS_EMU_CMDLINE_FLAGS "$STATIC_CFLAGS $CFLAGS $DEBUG_CFLAGS $EMU_THR_DEFS $DEFS $WERRORFLAGS $WFLAGS" _ACEOF erts=${erl_top}/erts erts_dirs=" $erts/obj $erts/obj.debug $erts/obj/$host $erts/obj.debug/$host " for d in ${erl_top}/bin ${erl_top}/bin/$host $erts_dirs ; do if test ! -d $d; then mkdir -p 1>/dev/null 2>&1 $d fi done for ac_func in log2 do : ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2" if test "x$ac_cv_func_log2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOG2 1 _ACEOF fi done saved_CFLAGS="$CFLAGS" CFLAGS="-Werror $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Waddress-of-packed-member\"") _Pragma("GCC diagnostic pop") ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_GCC_DIAG_IGNORE_WADDRESS_OF_PACKED_MEMBER 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS="$saved_CFLAGS" if test "x$GCC" = xyes; then CFLAGS="$WERRORFLAGS $CFLAGS" fi # Check whether --enable-sanitizers was given. if test "${enable_sanitizers+set}" = set; then : enableval=$enable_sanitizers; case "$enableval" in no) sanitizers= ;; yes) sanitizers="-fsanitize=address,undefined" ;; *) sanitizers="-fsanitize=$enableval" ;; esac CFLAGS="$CFLAGS $sanitizers" LDFLAGS="$LDFLAGS $sanitizers" fi ac_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" ac_config_files="$ac_config_files ../make/make_emakefile:../make/make_emakefile.in" ac_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" ac_config_files="$ac_config_files ../make/install_dir_data.sh:../make/install_dir_data.sh.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "$host/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $host/config.h:config.h.in" ;; "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" ;; "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" ;; "emulator/$host/Makefile") CONFIG_FILES="$CONFIG_FILES emulator/$host/Makefile:emulator/Makefile.in" ;; "epmd/src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES epmd/src/$host/Makefile:epmd/src/Makefile.in" ;; "etc/common/$host/Makefile") CONFIG_FILES="$CONFIG_FILES etc/common/$host/Makefile:etc/common/Makefile.in" ;; "include/internal/$host/ethread.mk") CONFIG_FILES="$CONFIG_FILES include/internal/$host/ethread.mk:include/internal/ethread.mk.in" ;; "include/internal/$host/erts_internal.mk") CONFIG_FILES="$CONFIG_FILES include/internal/$host/erts_internal.mk:include/internal/erts_internal.mk.in" ;; "lib_src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES lib_src/$host/Makefile:lib_src/Makefile.in" ;; "../make/$host/otp.mk") CONFIG_FILES="$CONFIG_FILES ../make/$host/otp.mk:../make/otp.mk.in" ;; "../make/make_emakefile") CONFIG_FILES="$CONFIG_FILES ../make/make_emakefile:../make/make_emakefile.in" ;; "../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" ;; "../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" ;; "../lib/tools/c_src/$host/Makefile") CONFIG_FILES="$CONFIG_FILES ../lib/tools/c_src/$host/Makefile:../lib/tools/c_src/Makefile.in" ;; "../make/install_dir_data.sh") CONFIG_FILES="$CONFIG_FILES ../make/install_dir_data.sh:../make/install_dir_data.sh.in" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac case $ac_file$ac_mode in "../make/make_emakefile":F) chmod +x ../make/make_emakefile ;; "../make/install_dir_data.sh":F) chmod +x ../make/install_dir_data.sh ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi