#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 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 as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; 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 # 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # 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'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 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="as_nop=: if test \${ZSH_VERSION+y} && (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 \$as_nop 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 \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || 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_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi 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'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$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_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # 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=`printf "%s\n" "$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 || printf "%s\n" 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_nop 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_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # 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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$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 || printf "%s\n" 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" || { printf "%s\n" "$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 } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. 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 # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' 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="emulator/beam/erl_process.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_STDIO_H # include #endif #ifdef HAVE_STDLIB_H # include #endif #ifdef HAVE_STRING_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_c_list= ac_func_c_list= ac_subst_vars='LTLIBOBJS LIBOBJS DEBUG_CFLAGS ERL_DETERMINISTIC 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 M4 LIBRT BITS64 HAVE_VALGRIND LIBSCTP SYSTEMD_DAEMON_LIBS SOCKET_LIBS 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 DEFAULT_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 CP MKDIR LIBCARBON ARCH OPSYS EXTERNAL_WORD_SIZE PROFILE_COMPILER USE_PGO XCRUN LLVM_PROFDATA WERRORFLAGS WFLAGS DEBUG_FLAGS ERTS_CONFIG_H_IDIR MIXED_MINGW MIXED_VC INSTALL_DIR INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM XMLLINT FOP XSLTPROC LN_S PERL YFLAGS YACC EGREP GREP ac_ct_CXX 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 target_os target_vendor target_cpu target 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 enable_esock_extended_error_info 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_deterministic_build ' 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 CCC YACC YFLAGS' # 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 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=`printf "%s\n" "$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=`printf "%s\n" "$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=`printf "%s\n" "$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=`printf "%s\n" "$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. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$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" ;; *) printf "%s\n" "$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 || printf "%s\n" 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] --target=TARGET configure for building compilers for TARGET [HOST] _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. Note that you have to link any external dependencies, that the nifs have, to the main binary. So for the crypto nifs 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-extended-error-info enable use of extended error info --disable-esock-extended-error-info disable use of extended error info (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-deterministic-build enable build determinism, stripping absolute paths from build output 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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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 configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. 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 printf "%s\n" "$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.71 Copyright (C) 2021 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 conftest.beam 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\"" printf "%s\n" "$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 printf "%s\n" "$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_nop printf "%s\n" "$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.beam 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\"" printf "%s\n" "$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 printf "%s\n" "$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_nop printf "%s\n" "$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_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 conftest.beam 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\"" printf "%s\n" "$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 printf "%s\n" "$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_nop printf "%s\n" "$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 # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" 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\"" printf "%s\n" "$ac_try_echo"; } >&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 printf "%s\n" "$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_nop printf "%s\n" "$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_try_run LINENO # ---------------------- # Try to run 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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$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 (void) { 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 (void) { 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_nop 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.beam conftest.$ac_ext done else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { 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 (void) { 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_nop 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.beam conftest.$ac_ext done else $as_nop ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { 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_nop as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { return $2; } static unsigned long int ulongval (void) { return $2; } #include #include int main (void) { 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 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop 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 $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ #include #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 (void) { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$3=yes" else $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 printf %s "checking for $2.$3... " >&6; } if eval test \${$4+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main (void) { 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main (void) { 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 $as_nop eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$4 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 printf %s "checking for $2... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { 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 (void) { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR # ------------------------------------------------------------------ # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. ac_fn_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 printf %s "checking whether $as_decl_name is declared... " >&6; } if eval test \${$3+y} then : printf %s "(cached) " >&6 else $as_nop as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` eval ac_save_FLAGS=\$$6 as_fn_append $6 " $5" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main (void) { #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 $as_nop eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext eval $6=\$ac_save_FLAGS fi eval ac_res=\$$3 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_check_decl ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac 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.71. Invocation command line was $ $0$ac_configure_args_raw _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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "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=`printf "%s\n" "$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=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## 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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$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 printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$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 printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*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 do not provoke an error unfortunately, instead are silently treated as an "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 is necessary to write \x00 == 0 to get something that is 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 **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' // Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' // Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " # Test code for whether the C++ compiler supports C++98 (global declarations) ac_cxx_conftest_cxx98_globals=' // Does the compiler advertise C++98 conformance? #if !defined __cplusplus || __cplusplus < 199711L # error "Compiler does not advertise C++98 conformance" #endif // These inclusions are to reject old compilers that // lack the unsuffixed header files. #include #include // and are *not* freestanding headers in C++98. extern void assert (int); namespace std { extern int strcmp (const char *, const char *); } // Namespaces, exceptions, and templates were all added after "C++ 2.0". using std::exception; using std::strcmp; namespace { void test_exception_syntax() { try { throw "test"; } catch (const char *s) { // Extra parentheses suppress a warning when building autoconf itself, // due to lint rules shared with more typical C programs. assert (!(strcmp) (s, "test")); } } template struct test_template { T const val; explicit test_template(T t) : val(t) {} template T add(U u) { return static_cast(u) + val; } }; } // anonymous namespace ' # Test code for whether the C++ compiler supports C++98 (body of main) ac_cxx_conftest_cxx98_main=' assert (argc); assert (! argv[0]); { test_exception_syntax (); test_template tt (2.0); assert (tt.add (4) == 6.0); assert (true && !false); } ' # Test code for whether the C++ compiler supports C++11 (global declarations) ac_cxx_conftest_cxx11_globals=' // Does the compiler advertise C++ 2011 conformance? #if !defined __cplusplus || __cplusplus < 201103L # error "Compiler does not advertise C++11 conformance" #endif namespace cxx11test { constexpr int get_val() { return 20; } struct testinit { int i; double d; }; class delegate { public: delegate(int n) : n(n) {} delegate(): delegate(2354) {} virtual int getval() { return this->n; }; protected: int n; }; class overridden : public delegate { public: overridden(int n): delegate(n) {} virtual int getval() override final { return this->n * 2; } }; class nocopy { public: nocopy(int i): i(i) {} nocopy() = default; nocopy(const nocopy&) = delete; nocopy & operator=(const nocopy&) = delete; private: int i; }; // for testing lambda expressions template Ret eval(Fn f, Ret v) { return f(v); } // for testing variadic templates and trailing return types template auto sum(V first) -> V { return first; } template auto sum(V first, Args... rest) -> V { return first + sum(rest...); } } ' # Test code for whether the C++ compiler supports C++11 (body of main) ac_cxx_conftest_cxx11_main=' { // Test auto and decltype auto a1 = 6538; auto a2 = 48573953.4; auto a3 = "String literal"; int total = 0; for (auto i = a3; *i; ++i) { total += *i; } decltype(a2) a4 = 34895.034; } { // Test constexpr short sa[cxx11test::get_val()] = { 0 }; } { // Test initializer lists cxx11test::testinit il = { 4323, 435234.23544 }; } { // Test range-based for int array[] = {9, 7, 13, 15, 4, 18, 12, 10, 5, 3, 14, 19, 17, 8, 6, 20, 16, 2, 11, 1}; for (auto &x : array) { x += 23; } } { // Test lambda expressions using cxx11test::eval; assert (eval ([](int x) { return x*2; }, 21) == 42); double d = 2.0; assert (eval ([&](double x) { return d += x; }, 3.0) == 5.0); assert (d == 5.0); assert (eval ([=](double x) mutable { return d += x; }, 4.0) == 9.0); assert (d == 5.0); } { // Test use of variadic templates using cxx11test::sum; auto a = sum(1); auto b = sum(1, 2); auto c = sum(1.0, 2.0, 3.0); } { // Test constructor delegation cxx11test::delegate d1; cxx11test::delegate d2(); cxx11test::delegate d3(45); } { // Test override and final cxx11test::overridden o1(55464); } { // Test nullptr char *c = nullptr; } { // Test template brackets test_template<::test_template> v(test_template(12)); } { // Unicode literals char const *utf8 = u8"UTF-8 string \u2500"; char16_t const *utf16 = u"UTF-8 string \u2500"; char32_t const *utf32 = U"UTF-32 string \u2500"; } ' # Test code for whether the C compiler supports C++11 (complete). ac_cxx_conftest_cxx11_program="${ac_cxx_conftest_cxx98_globals} ${ac_cxx_conftest_cxx11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} ${ac_cxx_conftest_cxx11_main} return ok; } " # Test code for whether the C compiler supports C++98 (complete). ac_cxx_conftest_cxx98_program="${ac_cxx_conftest_cxx98_globals} int main (int argc, char **argv) { int ok = 0; ${ac_cxx_conftest_cxx98_main} return ok; } " as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF" # Auxiliary files required by this configure script. ac_aux_files="install-sh config.guess config.sub" # Locations in which to look for auxiliary files. ac_aux_dir_candidates="${ERL_TOP}/make/autoconf" # Search for a directory containing all of the required auxiliary files, # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. # If we don't find one directory that contains all the files we need, # we report the set of missing files from the *first* directory in # $ac_aux_dir_candidates and give up. ac_missing_aux_files="" ac_first_candidate=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in $ac_aux_dir_candidates do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 ac_aux_dir_found=yes ac_install_sh= for ac_aux in $ac_aux_files do # As a special case, if "install-sh" is required, that requirement # can be satisfied by any of "install-sh", "install.sh", or "shtool", # and $ac_install_sh is set appropriately for whichever one is found. if test x"$ac_aux" = x"install-sh" then if test -f "${as_dir}install-sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 ac_install_sh="${as_dir}install-sh -c" elif test -f "${as_dir}install.sh"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 ac_install_sh="${as_dir}install.sh -c" elif test -f "${as_dir}shtool"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 ac_install_sh="${as_dir}shtool install -c" else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} install-sh" else break fi fi else if test -f "${as_dir}${ac_aux}"; then printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 else ac_aux_dir_found=no if $ac_first_candidate; then ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" else break fi fi fi done if test "$ac_aux_dir_found" = yes; then ac_aux_dir="$as_dir" break fi ac_first_candidate=false as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$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. if test -f "${ac_aux_dir}config.guess"; then ac_config_guess="$SHELL ${ac_aux_dir}config.guess" fi if test -f "${ac_aux_dir}config.sub"; then ac_config_sub="$SHELL ${ac_aux_dir}config.sub" fi if test -f "$ac_aux_dir/configure"; then ac_configure="$SHELL ${ac_aux_dir}configure" 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,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 printf "%s\n" "$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=`printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`${MAKE-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 "X $CFLAGS " != "X$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 # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 printf %s "checking build system type... " >&6; } if test ${ac_cv_build+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 printf %s "checking host system type... " >&6; } if test ${ac_cv_host+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 printf %s "checking target system type... " >&6; } if test ${ac_cv_target+y} then : printf %s "(cached) " >&6 else $as_nop if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 printf "%s\n" "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- # Adjust for local legacy windows hack... case $host in #( local-*-windows) : host=win32 host_os=win32 host_vendor= host_cpu= ;; #( *) : ;; esac # Adjust for local legacy windows hack... case $build in #( local-*-windows) : build=win32 build_os=win32 build_vendor= build_cpu= ;; #( *) : ;; esac # Adjust for local legacy windows hack... case $target in #( local-*-windows) : target=win32 target_os=win32 target_vendor= target_cpu= ;; #( *) : ;; esac if test "$cross_compiling" = "yes" -a "$build" = "$host" then : as_fn_error $? " Cross compiling with the same canonicalized 'host' value as the canonicalized 'build' value. We are cross compiling since the '--host=$host_alias' and the '--build=$build_alias' arguments differ. When cross compiling Erlang/OTP, also the canonicalized values of the '--build' and the '--host' arguments *must* differ. The canonicalized values of these arguments however both equals: $host You can check the canonical value by passing a value as argument to the 'make/autoconf/config.sub' script. " "$LINENO" 5 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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}clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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="clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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. printf "%s\n" "$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 -version; 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\"" printf "%s\n" "$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 printf "%s\n" "$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 (void) { ; 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$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+y} && 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 $as_nop ac_file='' fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$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 (void) { 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$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 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$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_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; 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 ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _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 conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 printf %s "checking for library containing strerror... " >&6; } if test ${ac_cv_search_strerror+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char strerror (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_strerror+y} then : break fi done if test ${ac_cv_search_strerror+y} then : else $as_nop ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 printf "%s\n" "$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+y} 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+y} then : enableval=$enable_dirty_schedulers_test; case "$enableval" in yes) enable_dirty_schedulers_test=yes ;; *) enable_dirty_schedulers_test=no ;; esac else $as_nop enable_dirty_schedulers_test=no fi # Check whether --enable-smp-require-native-atomics was given. if test ${enable_smp_require_native_atomics+y} then : enableval=$enable_smp_require_native_atomics; case "$enableval" in no) smp_require_native_atomics=no ;; *) smp_require_native_atomics=yes ;; esac else $as_nop smp_require_native_atomics=yes fi # Check whether --with-termcap was given. if test ${with_termcap+y} then : withval=$with_termcap; else $as_nop with_termcap=yes fi # Check whether --enable-lock-checking was given. if test ${enable_lock_checking+y} then : enableval=$enable_lock_checking; case "$enableval" in no) enable_lock_check=no ;; *) enable_lock_check=yes ;; esac else $as_nop enable_lock_check=no fi # Check whether --enable-lock-counter was given. if test ${enable_lock_counter+y} then : enableval=$enable_lock_counter; case "$enableval" in no) enable_lock_count=no ;; *) enable_lock_count=yes ;; esac else $as_nop enable_lock_count=no fi # Check whether --enable-kernel-poll was given. if test ${enable_kernel_poll+y} then : enableval=$enable_kernel_poll; case "$enableval" in no) enable_kernel_poll=no ;; *) enable_kernel_poll=yes ;; esac else $as_nop enable_kernel_poll=unknown fi # Check whether --enable-sctp was given. if test ${enable_sctp+y} 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+y} then : enableval=$enable_jit; case "$enableval" in no) enable_jit=no ;; *) enable_jit=yes ;; esac else $as_nop enable_jit=auto fi # Check whether --enable-m64-build was given. if test ${enable_m64_build+y} then : enableval=$enable_m64_build; case "$enableval" in no) enable_m64_build=no ;; *) enable_m64_build=yes ;; esac else $as_nop enable_m64_build=no fi # Check whether --enable-m32-build was given. if test ${enable_m32_build+y} then : enableval=$enable_m32_build; case "$enableval" in no) enable_m32_build=no ;; *) enable_m32_build=yes ;; esac else $as_nop enable_m32_build=no fi # Check whether --with-dynamic-trace was given. if test ${with_dynamic_trace+y} 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) printf "%s\n" "#define USE_LTTNG 1" >>confdefs.h DYNAMIC_TRACE_FRAMEWORK=lttng;; dtrace) printf "%s\n" "#define USE_DTRACE 1" >>confdefs.h DYNAMIC_TRACE_FRAMEWORK=dtrace;; systemtap) printf "%s\n" "#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 printf "%s\n" "#define USE_DYNAMIC_TRACE 1" >>confdefs.h fi # Check whether --enable-vm-probes was given. if test ${enable_vm_probes+y} 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 $as_nop 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 printf "%s\n" "#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+y} 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 printf "%s\n" "#define ASSUMED_CACHE_LINE_SIZE $with_assumed_cache_line_size" >>confdefs.h # Check whether --enable-systemd was given. if test ${enable_systemd+y} then : enableval=$enable_systemd; else $as_nop enable_systemd=no fi # Check whether --with-microstate-accounting was given. if test ${with_microstate_accounting+y} then : withval=$with_microstate_accounting; else $as_nop with_microstate_accounting=yes fi case "$with_microstate_accounting" in yes) printf "%s\n" "#define ERTS_ENABLE_MSACC 1" >>confdefs.h ;; extra) printf "%s\n" "#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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OTP release" >&5 printf %s "checking OTP release... " >&6; } SYSTEM_VSN=`cat $ERL_TOP/OTP_VERSION | sed "s|\([0-9]*\).*|\1|"` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SYSTEM_VSN" >&5 printf "%s\n" "$SYSTEM_VSN" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking OTP version" >&5 printf %s "checking OTP version... " >&6; } OTP_VERSION=`cat $ERL_TOP/OTP_VERSION` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $OTP_VERSION" >&5 printf "%s\n" "$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+y} then : enableval=$enable_static_nifs; STATIC_NIFS="$enableval" else $as_nop STATIC_NIFS=no fi # Check whether --enable-static-drivers was given. if test ${enable_static_drivers+y} then : enableval=$enable_static_drivers; STATIC_DRIVERS="$enableval" else $as_nop STATIC_DRIVERS=no fi # Check whether --with-ets-write-concurrency-locks was given. if test ${with_ets_write_concurrency_locks+y} then : withval=$with_ets_write_concurrency_locks; fi if test X"$with_ets_write_concurrency_locks" != X""; then printf "%s\n" "#define ERTS_DB_HASH_LOCK_CNT $with_ets_write_concurrency_locks" >>confdefs.h fi # Check whether --with-spectre-mitigation was given. if test ${with_spectre_mitigation+y} then : withval=$with_spectre_mitigation; else $as_nop 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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for spectre mitigation" >&5 printf %s "checking for spectre mitigation... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop as_fn_error $? "no" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether spectre mitigation can be disabled on a per-function basis" >&5 printf %s "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 (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop as_fn_error $? "no" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$i_preserve_cflags" fi fi printf "%s\n" "#define ERTS_NO_RETPOLINE $i_noretpoline_attr" >>confdefs.h 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 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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}clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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="clang" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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. printf "%s\n" "$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 -version; 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\"" printf "%s\n" "$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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; 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 ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _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 conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi 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 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 clang++ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CXX+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 printf "%s\n" "$CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 clang++ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CXX+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 printf "%s\n" "$ac_ct_CXX" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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. printf "%s\n" "$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\"" printf "%s\n" "$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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C++" >&5 printf %s "checking whether the compiler supports GNU C++... " >&6; } if test ${ac_cv_cxx_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 printf "%s\n" "$ac_cv_cxx_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+y} ac_save_CXXFLAGS=$CXXFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 printf %s "checking whether $CXX accepts -g... " >&6; } if test ${ac_cv_prog_cxx_g+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_g=yes else $as_nop CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : else $as_nop ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 printf "%s\n" "$ac_cv_prog_cxx_g" >&6; } if test $ac_test_CXXFLAGS; 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_prog_cxx_stdcxx=no if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++11 features" >&5 printf %s "checking for $CXX option to enable C++11 features... " >&6; } if test ${ac_cv_prog_cxx_11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_11=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx11_program _ACEOF for ac_arg in '' -std=gnu++11 -std=gnu++0x -std=c++11 -std=c++0x -qlanglvl=extended0x -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx11" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx11" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx11" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx11" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx11 ac_prog_cxx_stdcxx=cxx11 fi fi if test x$ac_prog_cxx_stdcxx = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CXX option to enable C++98 features" >&5 printf %s "checking for $CXX option to enable C++98 features... " >&6; } if test ${ac_cv_prog_cxx_98+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cxx_98=no ac_save_CXX=$CXX cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_cxx_conftest_cxx98_program _ACEOF for ac_arg in '' -std=gnu++98 -std=c++98 -qlanglvl=extended -AA do CXX="$ac_save_CXX $ac_arg" if ac_fn_cxx_try_compile "$LINENO" then : ac_cv_prog_cxx_cxx98=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cxx_cxx98" != "xno" && break done rm -f conftest.$ac_ext CXX=$ac_save_CXX fi if test "x$ac_cv_prog_cxx_cxx98" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cxx_cxx98" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_cxx98" >&5 printf "%s\n" "$ac_cv_prog_cxx_cxx98" >&6; } CXX="$CXX $ac_cv_prog_cxx_cxx98" fi ac_cv_prog_cxx_stdcxx=$ac_cv_prog_cxx_cxx98 ac_prog_cxx_stdcxx=cxx98 fi 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 printf %s "checking for grep that handles long lines and -e... " >&6; } if test ${ac_cv_path_GREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 printf "%s\n" "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 printf %s "checking for egrep... " >&6; } if test ${ac_cv_path_EGREP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf %s 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" printf "%s\n" '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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 printf "%s\n" "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 printf %s "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 test ${ac_cv_prog_CPP+y} then : printf %s "(cached) " >&6 else $as_nop # Double quotes because $CC needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" 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. # 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. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # 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 $as_nop # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 printf "%s\n" "$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. # 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. */ #include Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO" then : else $as_nop # 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 $as_nop # 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_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 printf "%s\n" "$RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_RANLIB+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 printf "%s\n" "$ac_ct_RANLIB" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_YACC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 printf "%s\n" "$YACC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_PERL+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 printf "%s\n" "$PERL" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 printf %s "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_AR+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 printf "%s\n" "$AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_AR+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 printf "%s\n" "$ac_ct_AR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_XSLTPROC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 printf "%s\n" "$XSLTPROC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$XSLTPROC" && break done if test -z "$XSLTPROC"; then echo "xsltproc" >> doc/CONF_INFO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No 'xsltproc' command found: the documentation cannot be built" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_FOP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $FOP" >&5 printf "%s\n" "$FOP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$FOP" && break done if test -z "$FOP"; then FOP="$ERL_TOP/make/fakefop" echo "fop" >> doc/CONF_INFO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No 'fop' command found: going to generate placeholder PDF files" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_XMLLINT+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XMLLINT" >&5 printf "%s\n" "$XMLLINT" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$XMLLINT" && break done if test -z "$XMLLINT"; then echo "xmllint" >> doc/CONF_INFO { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: No 'xmllint' command found: can't run the xmllint target for the documentation" >&5 printf "%s\n" "$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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 printf %s "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test ${ac_cv_path_install+y} then : printf %s "(cached) " >&6 else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac # Account for fact that we put trailing slashes in our PATH walk. 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+y}; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 printf "%s\n" "$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' { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to create a directory including parents" >&5 printf %s "checking how to create a directory including parents... " >&6; } if test ${ac_cv_prog_mkdir_p+y} then : printf %s "(cached) " >&6 else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_mkdir_p" >&5 printf "%s\n" "$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 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed mingw-gcc and native VC++ environment" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: MSYS and VC" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Cygwin and VC" >&5 printf "%s\n" "Cygwin and VC" >&6; } MIXED_VC=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" elif test -x /bin/wslpath; then CFLAGS="$CFLAGS -O2" MIXED_WSL=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: WSL and VC" >&5 printf "%s\n" "WSL and VC" >&6; } MIXED_VC=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_VC" else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 printf "%s\n" "undeterminable" >&6; } as_fn_error cannot handle this! "Seems to be mixed windows but not within any known env" "$LINENO" 5 fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$MIXED_MSYS" != "xyes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed cygwin and native MinGW environment" >&5 printf %s "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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } MIXED_MINGW=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 printf "%s\n" "undeterminable" >&6; } as_fn_error cannot handle this! "Seems to be mixed windows but not with cygwin" "$LINENO" 5 fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mixed MSYS and native MinGW environment" >&5 printf %s "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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } MIXED_MINGW=yes CPPFLAGS="$CPPFLAGS -DERTS_MIXED_MINGW" else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: undeterminable" >&5 printf "%s\n" "undeterminable" >&6; } as_fn_error cannot handle this! "Seems to be mixed windows but not with msys" "$LINENO" 5 fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix cygwin with any native compiler" >&5 printf %s "checking if we mix cygwin with any native compiler... " >&6; } if test "X$MIXED_CYGWIN" = "Xyes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix msys with another native compiler" >&5 printf %s "checking if we mix msys with another native compiler... " >&6; } if test "X$MIXED_MSYS" = "Xyes" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we mix WSL with another native compiler" >&5 printf %s "checking if we mix WSL with another native compiler... " >&6; } if test "X$MIXED_WSL" = "Xyes" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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_FLAGS=-g 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 printf "%s\n" "$GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 printf "%s\n" "$GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 printf "%s\n" "$GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 printf "%s\n" "$ac_pt_GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_GETCONF" = x; then GETCONF="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Do not know how to check for large file support flags; no getconf is available" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for large file support $var" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: failed" >&5 printf "%s\n" "failed" >&6; } break fi eval "$lfs_var=\"$lfs_val\"" fi test "$lfs_val" != "" || lfs_val=none { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $lfs_val" >&5 printf "%s\n" "$lfs_val" >&6; } done if test $lfs_conf = failed; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Check for large file support flags failed; $GETCONF failed" >&5 printf "%s\n" "$as_me: WARNING: Check for large file support flags failed; $GETCONF failed" >&2;} else CFLAGS="$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=return-type to WERRORFLAGS (via CFLAGS)" >&5 printf %s "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 (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : can_enable_flag=true else $as_nop can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } WERRORFLAGS="-Werror=return-type $WERRORFLAGS" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=implicit to WERRORFLAGS (via CFLAGS)" >&5 printf %s "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 (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : can_enable_flag=true else $as_nop can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } WERRORFLAGS="-Werror=implicit $WERRORFLAGS" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -Werror=undef to WERRORFLAGS (via CFLAGS)" >&5 printf %s "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 (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : can_enable_flag=true else $as_nop can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } WERRORFLAGS="-Werror=undef $WERRORFLAGS" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 (void) { ; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : warn_decl_after_st=true else $as_nop warn_decl_after_st=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-common to CFLAGS (via CFLAGS)" >&5 printf %s "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 (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : can_enable_flag=true else $as_nop can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } CFLAGS="-fno-common $CFLAGS" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)" >&5 printf %s "checking if we can add -fno-strict-aliasing to CFLAGS (via CFLAGS)... " >&6; } saved_CFLAGS=$CFLAGS; CFLAGS="-fno-strict-aliasing $CFLAGS"; cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : can_enable_flag=true else $as_nop can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } CFLAGS="-fno-strict-aliasing $CFLAGS" else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else $as_nop WFLAGS="" WERRORFLAGS=${WERRORFLAGS:-""} fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking C99 support" >&5 printf %s "checking C99 support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #if __STDC_VERSION__ < 199901L #error "Not C99" #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } CFLAGS="-std=gnu99 $CFLAGS" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ## Check if we can do profile guided optimization of beam_emu { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-generate -Werror..." >&5 printf %s "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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_run "$LINENO" then : return 0; else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop PROFILE_GENERATE=false { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-use -Werror..." >&5 printf %s "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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_run "$LINENO" then : return 0; else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop PROFILE_USE=false { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-use -fprofile-correction -Werror..." >&5 printf %s "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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ _ACEOF if ac_fn_c_try_run "$LINENO" then : return 0; else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop PROFILE_CORRECTION=false { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC links with -fprofile-generate" >&5 printf %s "checking whether $CC links with -fprofile-generate... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } PROFILE_GENERATE=true else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PROFILE_GENERATE=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$saved_CFLAGS LDFLAGS=$saved_LDFLAGS fi ## Check if this is clang { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-instr-generate -Werror..." >&5 printf %s "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 (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : can_enable_flag=true else $as_nop can_enable_flag=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$saved_CFLAGS; if test "X$can_enable_flag" = "Xtrue" then : PROFILE_INSTR_GENERATE=true { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop PROFILE_INSTR_GENERATE=false { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Disabling PGO when cross-compiling" >&5 printf "%s\n" "$as_me: Disabling PGO when cross-compiling" >&6;} else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_LLVM_PROFDATA+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LLVM_PROFDATA" >&5 printf "%s\n" "$LLVM_PROFDATA" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_XCRUN+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XCRUN" >&5 printf "%s\n" "$XCRUN" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$XCRUN" && break done if test "X$XCRUN" != "X" -a "X$LLVM_PROFDATA" = "X" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $XCRUN $LLVM_PROFDATA" >&5 printf %s "checking for $XCRUN $LLVM_PROFDATA... " >&6; } if $XCRUN $LLVM_PROFDATA --help 2>& 5 >& 5 then : LLVM_PROFDATA="$XCRUN $LLVM_PROFDATA" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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; { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -fprofile-instr-use=default.profdata -Werror" >&5 printf %s "checking whether $CC accepts -fprofile-instr-use=default.profdata -Werror... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } PROFILE_INSTR_USE=true else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } PROFILE_INSTR_USE=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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+y} then : enableval=$enable_pgo; case "$enableval" in no) enable_pgo=no ;; *) enable_pgo=yes ;; esac else $as_nop enable_pgo=default fi USE_PGO=false { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to do PGO of erts" >&5 printf %s "checking whether to do PGO of erts... " >&6; } if test $enable_pgo = no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, disabled by user" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, cross compiling" >&5 printf "%s\n" "no, cross compiling" >&6; } fi elif test "X$host" = "Xwin32"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, not supported in windows" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, using -fprofile-generate -fprofile-correction" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, using -fprofile-instr-generate" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi USE_PGO=false ac_header= ac_cache= for ac_item in $ac_header_c_list do if test $ac_cache; then ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then printf "%s\n" "#define $ac_item 1" >> confdefs.h fi ac_header= ac_cache= elif test $ac_header; then ac_cache=$ac_item else ac_header=$ac_item fi done if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes then : printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 printf %s "checking size of void *... " >&6; } if test ${ac_cv_sizeof_void_p+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_void_p" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h # 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target hardware architecture" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ARCH" >&5 printf "%s\n" "$ARCH" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether compilation mode forces ARCH adjustment" >&5 printf %s "checking whether compilation mode forces ARCH adjustment... " >&6; } case "$ARCH-$ac_cv_sizeof_void_p" in x86-8) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=x86 to ARCH=amd64" >&5 printf "%s\n" "yes: adjusting ARCH=x86 to ARCH=amd64" >&6; } ARCH=amd64 ;; amd64-4) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=amd64 to ARCH=x86" >&5 printf "%s\n" "yes: adjusting ARCH=amd64 to ARCH=x86" >&6; } ARCH=x86 ;; ultrasparc-8) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ultrasparc to ARCH=sparc64" >&5 printf "%s\n" "yes: adjusting ARCH=ultrasparc to ARCH=sparc64" >&6; } ARCH=sparc64 ;; sparc64-4) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=sparc64 to ARCH=ultrasparc" >&5 printf "%s\n" "yes: adjusting ARCH=sparc64 to ARCH=ultrasparc" >&6; } ARCH=ultrasparc ;; ppc64-4) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ppc64 to ARCH=ppc" >&5 printf "%s\n" "yes: adjusting ARCH=ppc64 to ARCH=ppc" >&6; } ARCH=ppc ;; ppc-8) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=ppc to ARCH=ppc64" >&5 printf "%s\n" "yes: adjusting ARCH=ppc to ARCH=ppc64" >&6; } ARCH=ppc64 ;; arm-8) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes: adjusting ARCH=arm to ARCH=arm64" >&5 printf "%s\n" "yes: adjusting ARCH=arm to ARCH=arm64" >&6; } ARCH=arm64 ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no: ARCH is $ARCH" >&5 printf "%s\n" "no: ARCH is $ARCH" >&6; } ;; esac case $ARCH-$OPSYS in amd64-darwin*|arm64-darwin*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to cope with 64bit Darwin" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to use -m64" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Adjusting LDFLAGS to use -m32" >&5 printf "%s\n" "$as_me: Adjusting LDFLAGS to use -m32" >&6;} ; case $LDFLAGS in *-m32*) ;; *) LDFLAGS="-m32 $LDFLAGS" ;; esac ; fi ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if VM has to be linked with Carbon framework" >&5 printf %s "checking if VM has to be linked with Carbon framework... " >&6; } case $ARCH-$OPSYS in *-darwin*) LIBCARBON="-framework Carbon -framework Cocoa" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; *) LIBCARBON= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_MKDIR+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5 printf "%s\n" "$MKDIR" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_CP+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CP" >&5 printf "%s\n" "$CP" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we are building a sharing-preserving emulator" >&5 printf %s "checking if we are building a sharing-preserving emulator... " >&6; } if test "$enable_sharing_preserving" = "yes"; then printf "%s\n" "#define SHCOPY 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extra flags needed to export symbols" >&5 printf %s "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="" ;; #( *) : DEXPORT= save_ldflags="$LDFLAGS" LDFLAGS=-Wl,-export-dynamic cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : DEXPORT="$LDFLAGS" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$DEXPORT" = "" then : LDFLAGS=-Wl,-Bexport cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : DEXPORT="$LDFLAGS" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi LDFLAGS="$save_ldflags" ;; esac case "x$DEXPORT" in "x") { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; };; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DEXPORT" >&5 printf "%s\n" "$DEXPORT" >&6; };; esac # Check for Solaris/ultrasparc /dev/perfmon interface # (also needs gcc specific asm instructions) case "${host}:${GCC}" in sparc-*-solaris*:yes) printf "%s\n" "#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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Turning off stack check on macOS 10.15 (Catalina)" >&5 printf "%s\n" "$as_me: Turning off stack check on macOS 10.15 (Catalina)" >&6;} CFLAGS="-fno-stack-check $CFLAGS" ;; *) ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sin in -lm" >&5 printf %s "checking for sin in -lm... " >&6; } if test ${ac_cv_lib_m_sin+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char sin (); int main (void) { return sin (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_m_sin=yes else $as_nop ac_cv_lib_m_sin=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sin" >&5 printf "%s\n" "$ac_cv_lib_m_sin" >&6; } if test "x$ac_cv_lib_m_sin" = xyes then : printf "%s\n" "#define HAVE_LIBM 1" >>confdefs.h LIBS="-lm $LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 printf %s "checking for dlopen in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlopen+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlopen (); int main (void) { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlopen=yes else $as_nop ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes then : printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h LIBS="-ldl $LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlvsym in -ldl" >&5 printf %s "checking for dlvsym in -ldl... " >&6; } if test ${ac_cv_lib_dl_dlvsym+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlvsym (); int main (void) { return dlvsym (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dl_dlvsym=yes else $as_nop ac_cv_lib_dl_dlvsym=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlvsym" >&5 printf "%s\n" "$ac_cv_lib_dl_dlvsym" >&6; } if test "x$ac_cv_lib_dl_dlvsym" = xyes then : printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h LIBS="-ldl $LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -linet" >&5 printf %s "checking for main in -linet... " >&6; } if test ${ac_cv_lib_inet_main+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_inet_main=yes else $as_nop ac_cv_lib_inet_main=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_main" >&5 printf "%s\n" "$ac_cv_lib_inet_main" >&6; } if test "x$ac_cv_lib_inet_main" = xyes then : printf "%s\n" "#define HAVE_LIBINET 1" >>confdefs.h LIBS="-linet $LIBS" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openpty in -lutil" >&5 printf %s "checking for openpty in -lutil... " >&6; } if test ${ac_cv_lib_util_openpty+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char openpty (); int main (void) { return openpty (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_util_openpty=yes else $as_nop ac_cv_lib_util_openpty=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_util_openpty" >&5 printf "%s\n" "$ac_cv_lib_util_openpty" >&6; } if test "x$ac_cv_lib_util_openpty" = xyes then : printf "%s\n" "#define HAVE_LIBUTIL 1" >>confdefs.h LIBS="-lutil $LIBS" fi # Check whether --enable-native-ethr-impls was given. if test ${enable_native_ethr_impls+y} then : enableval=$enable_native_ethr_impls; case "$enableval" in no) disable_native_ethr_impls=yes ;; *) disable_native_ethr_impls=no ;; esac else $as_nop disable_native_ethr_impls=no fi test "X$disable_native_ethr_impls" = "Xyes" && printf "%s\n" "#define ETHR_DISABLE_NATIVE_IMPLS 1" >>confdefs.h # Check whether --enable-x86-out-of-order was given. if test ${enable_x86_out_of_order+y} 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+y} 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 $as_nop enable_prefer_gcc_native_ethr_impls=no fi test $enable_prefer_gcc_native_ethr_impls = yes && printf "%s\n" "#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+y} 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 $as_nop trust_gcc_atomic_builtins_mbs=0 fi printf "%s\n" "#define ETHR_TRUST_GCC_ATOMIC_BUILTINS_MEMORY_BARRIERS $trust_gcc_atomic_builtins_mbs" >>confdefs.h # Check whether --with-libatomic_ops was given. if test ${with_libatomic_ops+y} then : withval=$with_libatomic_ops; fi # Check whether --with-with_sparc_memory_order was given. if test ${with_with_sparc_memory_order+y} then : withval=$with_with_sparc_memory_order; fi # Check whether --enable-ppc-lwsync-instruction was given. if test ${enable_ppc_lwsync_instruction+y} then : enableval=$enable_ppc_lwsync_instruction; case "$enableval" in no) enable_lwsync=no ;; *) enable_lwsync=yes ;; esac else $as_nop # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 printf %s "checking size of void *... " >&6; } if test ${ac_cv_sizeof_void_p+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_void_p" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h 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) printf "%s\n" "#define ETHR_PPC_HAVE_NO_LWSYNC 1" >>confdefs.h ;; yes) printf "%s\n" "#define ETHR_PPC_HAVE_LWSYNC 1" >>confdefs.h ;; *) ;; esac NEED_NPTL_PTHREAD_H=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for native win32 threads" >&5 printf %s "checking for native win32 threads... " >&6; } if test "X$host_os" = "Xwin32" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } THR_DEFS="-DWIN32_THREADS" THR_LIBS= THR_LIB_NAME=win32_threads THR_LIB_TYPE=win32_threads else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } THR_DEFS= THR_LIBS= THR_LIB_NAME= THR_LIB_TYPE=posix_unknown { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 printf %s "checking for pthread_create in -lpthread... " >&6; } if test ${ac_cv_lib_pthread_pthread_create+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char pthread_create (); int main (void) { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_pthread_pthread_create=yes else $as_nop ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 printf "%s\n" "$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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lc_r" >&5 printf %s "checking for pthread_create in -lc_r... " >&6; } if test ${ac_cv_lib_c_r_pthread_create+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char pthread_create (); int main (void) { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_c_r_pthread_create=yes else $as_nop ac_cv_lib_c_r_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_create" >&5 printf "%s\n" "$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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the '-pthread' switch can be used" >&5 printf %s "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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$saved_cflags if test "x$THR_LIBS" != "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 printf "%s\n" "$GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi else $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 printf "%s\n" "$GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GETCONF" >&5 printf "%s\n" "$GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_ac_pt_GETCONF+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_GETCONF" >&5 printf "%s\n" "$ac_pt_GETCONF" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_pt_GETCONF" = x; then GETCONF="false" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Native POSIX Thread Library" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $nptl" >&5 printf "%s\n" "$nptl" >&6; } if test $nptl = cross; then nptl=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 printf "%s\n" "$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_compile "$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=`printf "%s\n" "ac_cv_header_$dir/nptl/pthread.h" | $as_tr_sh` ac_fn_c_check_header_compile "$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_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes then : printf "%s\n" "#define HAVE_PTHREAD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$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 : \ printf "%s\n" "#define HAVE_MIT_PTHREAD_H 1" >>confdefs.h fi CPPFLAGS=$saved_cppflags fi fi ERTS_INTERNAL_X_LIBS= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 printf %s "checking for kstat_open in -lkstat... " >&6; } if test ${ac_cv_lib_kstat_kstat_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char kstat_open (); int main (void) { return kstat_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_kstat_kstat_open=yes else $as_nop ac_cv_lib_kstat_kstat_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 printf "%s\n" "$ac_cv_lib_kstat_kstat_open" >&6; } if test "x$ac_cv_lib_kstat_kstat_open" = xyes then : printf "%s\n" "#define HAVE_KSTAT 1" >>confdefs.h ERTS_INTERNAL_X_LIBS="$ERTS_INTERNAL_X_LIBS -lkstat" fi # CLOCK_MONOTONIC is buggy on MacOS (darwin), or at least on Big Sur # and Monterey, since it may step backwards. if test "no" = "yes"; then case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW";; *) 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";; esac else case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW" low_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW";; *) 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";; esac 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_UPTIME_RAW CLOCK_MONOTONIC" ;; *) check_msg="custom " prefer_resolution_clock_gettime_monotonic="CLOCK_HIGHRES CLOCK_UPTIME_RAW CLOCK_MONOTONIC" ;; esac clock_gettime_lib="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 printf %s "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if test ${erl_cv_clock_gettime_monotonic_raw+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_raw" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if test ${erl_cv_clock_gettime_monotonic_try_find_pthread_compatible+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_try_find_pthread_compatible=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_try_find_pthread_compatible" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_try_find_pthread_compatible" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no" then : ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi else $as_nop ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 printf %s "checking for mach clock_get_time() with monotonic clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_monotonic+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 printf "%s\n" "$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) printf "%s\n" "#define ETHR_HAVE_CLOCK_GETTIME_MONOTONIC 1" >>confdefs.h ;; mach_clock_get_time) printf "%s\n" "#define ETHR_HAVE_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; gethrtime) printf "%s\n" "#define ETHR_HAVE_GETHRTIME 1" >>confdefs.h ;; *) ;; esac if test "x$erl_monotonic_clock_id" != "x"; then printf "%s\n" "#define ETHR_MONOTONIC_CLOCK_ID $erl_monotonic_clock_id" >>confdefs.h 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+y} then : withval=$with_threadnames; else $as_nop 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 printf "%s\n" "#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" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedDecrement+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedDecrement=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedDecrement=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement" >&5 printf "%s\n" "$ethr_cv_have__InterlockedDecrement" >&6; } if [ "${ethr_cv_have__InterlockedDecrement}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT 1" >>confdefs.h else : fi ilckd="_InterlockedDecrement_rel" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedDecrement_rel+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedDecrement_rel=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedDecrement_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement_rel" >&5 printf "%s\n" "$ethr_cv_have__InterlockedDecrement_rel" >&6; } if [ "${ethr_cv_have__InterlockedDecrement_rel}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT_REL 1" >>confdefs.h else : fi ilckd="_InterlockedIncrement" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedIncrement+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedIncrement=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedIncrement=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement" >&5 printf "%s\n" "$ethr_cv_have__InterlockedIncrement" >&6; } if [ "${ethr_cv_have__InterlockedIncrement}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT 1" >>confdefs.h else : fi ilckd="_InterlockedIncrement_acq" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedIncrement_acq+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedIncrement_acq=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedIncrement_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement_acq" >&5 printf "%s\n" "$ethr_cv_have__InterlockedIncrement_acq" >&6; } if [ "${ethr_cv_have__InterlockedIncrement_acq}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT_ACQ 1" >>confdefs.h else : fi ilckd="_InterlockedExchangeAdd" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedExchangeAdd+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedExchangeAdd=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedExchangeAdd=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd" >&5 printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd" >&6; } if [ "${ethr_cv_have__InterlockedExchangeAdd}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD 1" >>confdefs.h else : fi ilckd="_InterlockedExchangeAdd_acq" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedExchangeAdd_acq+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedExchangeAdd_acq=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedExchangeAdd_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd_acq" >&5 printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd_acq" >&6; } if [ "${ethr_cv_have__InterlockedExchangeAdd_acq}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD_ACQ 1" >>confdefs.h else : fi ilckd="_InterlockedAnd" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedAnd+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedAnd=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedAnd=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedAnd" >&5 printf "%s\n" "$ethr_cv_have__InterlockedAnd" >&6; } if [ "${ethr_cv_have__InterlockedAnd}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDAND 1" >>confdefs.h else : fi ilckd="_InterlockedOr" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedOr+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedOr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedOr=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedOr" >&5 printf "%s\n" "$ethr_cv_have__InterlockedOr" >&6; } if [ "${ethr_cv_have__InterlockedOr}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDOR 1" >>confdefs.h else : fi ilckd="_InterlockedExchange" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedExchange+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedExchange=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedExchange=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchange" >&5 printf "%s\n" "$ethr_cv_have__InterlockedExchange" >&6; } if [ "${ethr_cv_have__InterlockedExchange}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGE 1" >>confdefs.h else : fi ilckd="_InterlockedCompareExchange" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedCompareExchange+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedCompareExchange=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedCompareExchange=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange" >&5 printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange" >&6; } if [ "${ethr_cv_have__InterlockedCompareExchange}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE 1" >>confdefs.h ethr_have_native_atomics=yes else : fi ilckd="_InterlockedCompareExchange_acq" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedCompareExchange_acq+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedCompareExchange_acq=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedCompareExchange_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange_acq" >&5 printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange_acq" >&6; } if [ "${ethr_cv_have__InterlockedCompareExchange_acq}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_ACQ 1" >>confdefs.h ethr_have_native_atomics=yes else : fi ilckd="_InterlockedCompareExchange_rel" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedCompareExchange_rel+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedCompareExchange_rel=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile long *var; volatile long arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedCompareExchange_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange_rel" >&5 printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange_rel" >&6; } if [ "${ethr_cv_have__InterlockedCompareExchange_rel}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE_REL 1" >>confdefs.h ethr_have_native_atomics=yes else : fi ilckd="_InterlockedDecrement64" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedDecrement64+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedDecrement64=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedDecrement64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement64" >&5 printf "%s\n" "$ethr_cv_have__InterlockedDecrement64" >&6; } if [ "${ethr_cv_have__InterlockedDecrement64}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT64 1" >>confdefs.h else : fi ilckd="_InterlockedDecrement64_rel" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedDecrement64_rel+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedDecrement64_rel=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedDecrement64_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedDecrement64_rel" >&5 printf "%s\n" "$ethr_cv_have__InterlockedDecrement64_rel" >&6; } if [ "${ethr_cv_have__InterlockedDecrement64_rel}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDDECREMENT64_REL 1" >>confdefs.h else : fi ilckd="_InterlockedIncrement64" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedIncrement64+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedIncrement64=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedIncrement64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement64" >&5 printf "%s\n" "$ethr_cv_have__InterlockedIncrement64" >&6; } if [ "${ethr_cv_have__InterlockedIncrement64}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT64 1" >>confdefs.h else : fi ilckd="_InterlockedIncrement64_acq" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedIncrement64_acq+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedIncrement64_acq=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedIncrement64_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedIncrement64_acq" >&5 printf "%s\n" "$ethr_cv_have__InterlockedIncrement64_acq" >&6; } if [ "${ethr_cv_have__InterlockedIncrement64_acq}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDINCREMENT64_ACQ 1" >>confdefs.h else : fi ilckd="_InterlockedExchangeAdd64" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedExchangeAdd64+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedExchangeAdd64=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedExchangeAdd64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd64" >&5 printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd64" >&6; } if [ "${ethr_cv_have__InterlockedExchangeAdd64}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64 1" >>confdefs.h else : fi ilckd="_InterlockedExchangeAdd64_acq" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedExchangeAdd64_acq+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedExchangeAdd64_acq=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedExchangeAdd64_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchangeAdd64_acq" >&5 printf "%s\n" "$ethr_cv_have__InterlockedExchangeAdd64_acq" >&6; } if [ "${ethr_cv_have__InterlockedExchangeAdd64_acq}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGEADD64_ACQ 1" >>confdefs.h else : fi ilckd="_InterlockedAnd64" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedAnd64+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedAnd64=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedAnd64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedAnd64" >&5 printf "%s\n" "$ethr_cv_have__InterlockedAnd64" >&6; } if [ "${ethr_cv_have__InterlockedAnd64}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDAND64 1" >>confdefs.h else : fi ilckd="_InterlockedOr64" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedOr64+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedOr64=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedOr64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedOr64" >&5 printf "%s\n" "$ethr_cv_have__InterlockedOr64" >&6; } if [ "${ethr_cv_have__InterlockedOr64}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDOR64 1" >>confdefs.h else : fi ilckd="_InterlockedExchange64" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedExchange64+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedExchange64=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedExchange64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedExchange64" >&5 printf "%s\n" "$ethr_cv_have__InterlockedExchange64" >&6; } if [ "${ethr_cv_have__InterlockedExchange64}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDEXCHANGE64 1" >>confdefs.h else : fi ilckd="_InterlockedCompareExchange64" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedCompareExchange64+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedCompareExchange64=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedCompareExchange64=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange64" >&5 printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange64" >&6; } if [ "${ethr_cv_have__InterlockedCompareExchange64}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64 1" >>confdefs.h ethr_have_native_atomics=yes else : fi ilckd="_InterlockedCompareExchange64_acq" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedCompareExchange64_acq+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedCompareExchange64_acq=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedCompareExchange64_acq=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange64_acq" >&5 printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange64_acq" >&6; } if [ "${ethr_cv_have__InterlockedCompareExchange64_acq}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_ACQ 1" >>confdefs.h ethr_have_native_atomics=yes else : fi ilckd="_InterlockedCompareExchange64_rel" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedCompareExchange64_rel+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedCompareExchange64_rel=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedCompareExchange64_rel=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange64_rel" >&5 printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange64_rel" >&6; } if [ "${ethr_cv_have__InterlockedCompareExchange64_rel}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE64_REL 1" >>confdefs.h ethr_have_native_atomics=yes else : fi ilckd="_InterlockedCompareExchange128" 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ${ilckd}()" >&5 printf %s "checking for ${ilckd}()... " >&6; } if test ${ethr_cv_have__InterlockedCompareExchange128+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_have__InterlockedCompareExchange128=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include #include int main (void) { volatile __int64 *var; volatile __int64 arr[2]; $ilckd_call return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_have__InterlockedCompareExchange128=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_have__InterlockedCompareExchange128" >&5 printf "%s\n" "$ethr_cv_have__InterlockedCompareExchange128" >&6; } if [ "${ethr_cv_have__InterlockedCompareExchange128}" = "yes" ]; then printf "%s\n" "#define ETHR_HAVE__INTERLOCKEDCOMPAREEXCHANGE128 1" >>confdefs.h else : fi 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 printf "%s\n" "#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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SIGUSR1 and SIGUSR2 can be used" >&5 printf %s "checking if SIGUSR1 and SIGUSR2 can be used... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $usable_sigusrx" >&5 printf "%s\n" "$usable_sigusrx" >&6; } if test $usable_sigusrx = cross; then usable_sigusrx=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sigaltstack can be used" >&5 printf %s "checking if sigaltstack can be used... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $usable_sigaltstack" >&5 printf "%s\n" "$usable_sigaltstack" >&6; } if test $usable_sigaltstack = cross; then usable_sigaltstack=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed because of cross compilation" >&5 printf "%s\n" "$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_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" if test "x$ac_cv_header_pthread_h" = xyes then : \ printf "%s\n" "#define ETHR_HAVE_PTHREAD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$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 : \ printf "%s\n" "#define ETHR_HAVE_MIT_PTHREAD_H 1" >>confdefs.h fi if test $NEED_NPTL_PTHREAD_H = yes; then printf "%s\n" "#define ETHR_NEED_NPTL_PTHREAD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default" if test "x$ac_cv_header_sched_h" = xyes then : \ printf "%s\n" "#define ETHR_HAVE_SCHED_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : \ printf "%s\n" "#define ETHR_HAVE_SYS_TIME_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for usable PTHREAD_STACK_MIN" >&5 printf %s "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 (void) { 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.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pthread_stack_min" >&5 printf "%s\n" "$pthread_stack_min" >&6; } test $pthread_stack_min != yes || { printf "%s\n" "#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 \ printf "%s\n" "#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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 printf %s "checking for sched_yield in -lrt... " >&6; } if test ${ac_cv_lib_rt_sched_yield+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char sched_yield (); int main (void) { return sched_yield (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_sched_yield=yes else $as_nop ac_cv_lib_rt_sched_yield=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 printf "%s\n" "$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 : printf "%s\n" "#define ETHR_HAVE_SCHED_YIELD 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sched_yield() returns an int" >&5 printf %s "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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sched_yield_ret_int" >&5 printf "%s\n" "$sched_yield_ret_int" >&6; } if test $sched_yield_ret_int = yes; then printf "%s\n" "#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 : printf "%s\n" "#define ETHR_HAVE_PTHREAD_YIELD 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_yield() returns an int" >&5 printf %s "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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pthread_yield_ret_int" >&5 printf "%s\n" "$pthread_yield_ret_int" >&6; } if test $pthread_yield_ret_int = yes; then printf "%s\n" "#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 : printf "%s\n" "#define ETHR_HAVE_PTHREAD_RWLOCKATTR_SETKIND_NP 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP" >&5 printf %s "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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&5 printf "%s\n" "$ethr_pthread_rwlock_writer_nonrecursive_initializer_np" >&6; } if test $ethr_pthread_rwlock_writer_nonrecursive_initializer_np = yes; then printf "%s\n" "#define ETHR_HAVE_PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 1" >>confdefs.h fi fi fi if test "$force_pthread_rwlocks" = "yes"; then printf "%s\n" "#define ETHR_FORCE_PTHREAD_RWLOCK 1" >>confdefs.h if test $have_pthread_rwlock_init = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Forced usage of pthread rwlocks. Note that this implementation may suffer from starvation issues." >&5 printf "%s\n" "$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 : \ printf "%s\n" "#define ETHR_HAVE_PTHREAD_ATTR_SETGUARDSIZE 1" >>confdefs.h fi if test "x$erl_monotonic_clock_id" != "x" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_cond_timedwait() can use the monotonic clock $erl_monotonic_clock_id for timeout" >&5 printf %s "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 #include #ifdef ETHR_HAVE_SYS_TIME_H # include #endif #if defined(ETHR_HAVE_MACH_CLOCK_GET_TIME) # include # include #endif int main (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pthread_cond_timedwait_monotonic" >&5 printf "%s\n" "$pthread_cond_timedwait_monotonic" >&6; } if test $pthread_cond_timedwait_monotonic = yes; then printf "%s\n" "#define ETHR_HAVE_PTHREAD_COND_TIMEDWAIT_MONOTONIC 1" >>confdefs.h fi fi linux_futex=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Linux futexes" >&5 printf %s "checking for Linux futexes... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $linux_futex" >&5 printf "%s\n" "$linux_futex" >&6; } test $linux_futex = yes && printf "%s\n" "#define ETHR_HAVE_LINUX_FUTEX 1" >>confdefs.h pthread_setname=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_setname_np" >&5 printf %s "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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __USE_GNU #include int main (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _DARWIN_C_SOURCE #include int main (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pthread_setname" >&5 printf "%s\n" "$pthread_setname" >&6; } case $with_threadnames-$pthread_setname in yes-linux) printf "%s\n" "#define ETHR_HAVE_PTHREAD_SETNAME_NP_2 1" >>confdefs.h ;; yes-bsd) printf "%s\n" "#define ETHR_HAVE_PTHREAD_SET_NAME_NP_2 1" >>confdefs.h ;; yes-darwin) printf "%s\n" "#define ETHR_HAVE_PTHREAD_SETNAME_NP_1 1" >>confdefs.h ;; *) ;; esac pthread_getname=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_getname_np" >&5 printf %s "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 (void) { 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.beam \ 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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pthread_getname" >&5 printf "%s\n" "$pthread_getname" >&6; } case $pthread_getname in linux) printf "%s\n" "#define ETHR_HAVE_PTHREAD_GETNAME_NP_3 1" >>confdefs.h ;; ibm) printf "%s\n" "#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 $as_nop # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_short" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf "%s\n" "$ac_cv_sizeof_short" >&6; } printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_int" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of __int128_t" >&5 printf %s "checking size of __int128_t... " >&6; } if test ${ac_cv_sizeof___int128_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int128_t))" "ac_cv_sizeof___int128_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type___int128_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int128_t" >&5 printf "%s\n" "$ac_cv_sizeof___int128_t" >&6; } printf "%s\n" "#define SIZEOF___INT128_T $ac_cv_sizeof___int128_t" >>confdefs.h 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a working __sync_synchronize()" >&5 printf %s "checking for a working __sync_synchronize()... " >&6; } if test ${ethr_cv___sync_synchronize+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv___sync_synchronize=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { __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.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv___sync_synchronize" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___sync_synchronize $have_sync_synchronize_value" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_add_and_fetch()" >&5 printf %s "checking for 32-bit __sync_add_and_fetch()... " >&6; } if test ${ethr_cv_32bit___sync_add_and_fetch+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___sync_add_and_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_add_and_fetch" >&5 printf "%s\n" "$ethr_cv_32bit___sync_add_and_fetch" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_add_and_fetch()" >&5 printf %s "checking for 64-bit __sync_add_and_fetch()... " >&6; } if test ${ethr_cv_64bit___sync_add_and_fetch+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___sync_add_and_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_add_and_fetch" >&5 printf "%s\n" "$ethr_cv_64bit___sync_add_and_fetch" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_add_and_fetch()" >&5 printf %s "checking for 128-bit __sync_add_and_fetch()... " >&6; } if test ${ethr_cv_128bit___sync_add_and_fetch+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___sync_add_and_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_add_and_fetch" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___sync_add_and_fetch $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_fetch_and_and()" >&5 printf %s "checking for 32-bit __sync_fetch_and_and()... " >&6; } if test ${ethr_cv_32bit___sync_fetch_and_and+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___sync_fetch_and_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_fetch_and_and" >&5 printf "%s\n" "$ethr_cv_32bit___sync_fetch_and_and" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_fetch_and_and()" >&5 printf %s "checking for 64-bit __sync_fetch_and_and()... " >&6; } if test ${ethr_cv_64bit___sync_fetch_and_and+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___sync_fetch_and_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_fetch_and_and" >&5 printf "%s\n" "$ethr_cv_64bit___sync_fetch_and_and" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_fetch_and_and()" >&5 printf %s "checking for 128-bit __sync_fetch_and_and()... " >&6; } if test ${ethr_cv_128bit___sync_fetch_and_and+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___sync_fetch_and_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_fetch_and_and" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___sync_fetch_and_and $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_fetch_and_or()" >&5 printf %s "checking for 32-bit __sync_fetch_and_or()... " >&6; } if test ${ethr_cv_32bit___sync_fetch_and_or+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___sync_fetch_and_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_fetch_and_or" >&5 printf "%s\n" "$ethr_cv_32bit___sync_fetch_and_or" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_fetch_and_or()" >&5 printf %s "checking for 64-bit __sync_fetch_and_or()... " >&6; } if test ${ethr_cv_64bit___sync_fetch_and_or+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___sync_fetch_and_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_fetch_and_or" >&5 printf "%s\n" "$ethr_cv_64bit___sync_fetch_and_or" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_fetch_and_or()" >&5 printf %s "checking for 128-bit __sync_fetch_and_or()... " >&6; } if test ${ethr_cv_128bit___sync_fetch_and_or+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___sync_fetch_and_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_fetch_and_or" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___sync_fetch_and_or $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __sync_val_compare_and_swap()" >&5 printf %s "checking for 32-bit __sync_val_compare_and_swap()... " >&6; } if test ${ethr_cv_32bit___sync_val_compare_and_swap+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___sync_val_compare_and_swap=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___sync_val_compare_and_swap" >&5 printf "%s\n" "$ethr_cv_32bit___sync_val_compare_and_swap" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __sync_val_compare_and_swap()" >&5 printf %s "checking for 64-bit __sync_val_compare_and_swap()... " >&6; } if test ${ethr_cv_64bit___sync_val_compare_and_swap+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___sync_val_compare_and_swap=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___sync_val_compare_and_swap" >&5 printf "%s\n" "$ethr_cv_64bit___sync_val_compare_and_swap" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __sync_val_compare_and_swap()" >&5 printf %s "checking for 128-bit __sync_val_compare_and_swap()... " >&6; } if test ${ethr_cv_128bit___sync_val_compare_and_swap+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___sync_val_compare_and_swap=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___sync_val_compare_and_swap" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___sync_val_compare_and_swap $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_store_n()" >&5 printf %s "checking for 32-bit __atomic_store_n()... " >&6; } if test ${ethr_cv_32bit___atomic_store_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___atomic_store_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_store_n" >&5 printf "%s\n" "$ethr_cv_32bit___atomic_store_n" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_store_n()" >&5 printf %s "checking for 64-bit __atomic_store_n()... " >&6; } if test ${ethr_cv_64bit___atomic_store_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___atomic_store_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_store_n" >&5 printf "%s\n" "$ethr_cv_64bit___atomic_store_n" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_store_n()" >&5 printf %s "checking for 128-bit __atomic_store_n()... " >&6; } if test ${ethr_cv_128bit___atomic_store_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___atomic_store_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_store_n" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___atomic_store_n $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_load_n()" >&5 printf %s "checking for 32-bit __atomic_load_n()... " >&6; } if test ${ethr_cv_32bit___atomic_load_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___atomic_load_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_load_n" >&5 printf "%s\n" "$ethr_cv_32bit___atomic_load_n" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_load_n()" >&5 printf %s "checking for 64-bit __atomic_load_n()... " >&6; } if test ${ethr_cv_64bit___atomic_load_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___atomic_load_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_load_n" >&5 printf "%s\n" "$ethr_cv_64bit___atomic_load_n" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_load_n()" >&5 printf %s "checking for 128-bit __atomic_load_n()... " >&6; } if test ${ethr_cv_128bit___atomic_load_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___atomic_load_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_load_n" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___atomic_load_n $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_add_fetch()" >&5 printf %s "checking for 32-bit __atomic_add_fetch()... " >&6; } if test ${ethr_cv_32bit___atomic_add_fetch+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___atomic_add_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_add_fetch" >&5 printf "%s\n" "$ethr_cv_32bit___atomic_add_fetch" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_add_fetch()" >&5 printf %s "checking for 64-bit __atomic_add_fetch()... " >&6; } if test ${ethr_cv_64bit___atomic_add_fetch+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___atomic_add_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_add_fetch" >&5 printf "%s\n" "$ethr_cv_64bit___atomic_add_fetch" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_add_fetch()" >&5 printf %s "checking for 128-bit __atomic_add_fetch()... " >&6; } if test ${ethr_cv_128bit___atomic_add_fetch+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___atomic_add_fetch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_add_fetch" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___atomic_add_fetch $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_fetch_and()" >&5 printf %s "checking for 32-bit __atomic_fetch_and()... " >&6; } if test ${ethr_cv_32bit___atomic_fetch_and+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___atomic_fetch_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_fetch_and" >&5 printf "%s\n" "$ethr_cv_32bit___atomic_fetch_and" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_fetch_and()" >&5 printf %s "checking for 64-bit __atomic_fetch_and()... " >&6; } if test ${ethr_cv_64bit___atomic_fetch_and+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___atomic_fetch_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_fetch_and" >&5 printf "%s\n" "$ethr_cv_64bit___atomic_fetch_and" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_fetch_and()" >&5 printf %s "checking for 128-bit __atomic_fetch_and()... " >&6; } if test ${ethr_cv_128bit___atomic_fetch_and+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___atomic_fetch_and=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_fetch_and" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___atomic_fetch_and $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_fetch_or()" >&5 printf %s "checking for 32-bit __atomic_fetch_or()... " >&6; } if test ${ethr_cv_32bit___atomic_fetch_or+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___atomic_fetch_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_fetch_or" >&5 printf "%s\n" "$ethr_cv_32bit___atomic_fetch_or" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_fetch_or()" >&5 printf %s "checking for 64-bit __atomic_fetch_or()... " >&6; } if test ${ethr_cv_64bit___atomic_fetch_or+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___atomic_fetch_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_fetch_or" >&5 printf "%s\n" "$ethr_cv_64bit___atomic_fetch_or" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_fetch_or()" >&5 printf %s "checking for 128-bit __atomic_fetch_or()... " >&6; } if test ${ethr_cv_128bit___atomic_fetch_or+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___atomic_fetch_or=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_fetch_or" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___atomic_fetch_or $have_atomic_ops" >>confdefs.h # __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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 32-bit __atomic_compare_exchange_n()" >&5 printf %s "checking for 32-bit __atomic_compare_exchange_n()... " >&6; } if test ${ethr_cv_32bit___atomic_compare_exchange_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_32bit___atomic_compare_exchange_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_32bit___atomic_compare_exchange_n" >&5 printf "%s\n" "$ethr_cv_32bit___atomic_compare_exchange_n" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit __atomic_compare_exchange_n()" >&5 printf %s "checking for 64-bit __atomic_compare_exchange_n()... " >&6; } if test ${ethr_cv_64bit___atomic_compare_exchange_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_64bit___atomic_compare_exchange_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_64bit___atomic_compare_exchange_n" >&5 printf "%s\n" "$ethr_cv_64bit___atomic_compare_exchange_n" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 128-bit __atomic_compare_exchange_n()" >&5 printf %s "checking for 128-bit __atomic_compare_exchange_n()... " >&6; } if test ${ethr_cv_128bit___atomic_compare_exchange_n+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_128bit___atomic_compare_exchange_n=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { $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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_128bit___atomic_compare_exchange_n" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_HAVE___atomic_compare_exchange_n $have_atomic_ops" >>confdefs.h 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 ethr_arm_isb_sy_instr_val=0 ethr_arm_dc_cvau_instr_val=0 ethr_arm_ic_ivau_instr_val=0 case "$GCC-$host_cpu" in #( yes-arm*|yes-aarch*) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb sy' instruction" >&5 printf %s "checking for ARM 'dmb sy' instruction... " >&6; } if test ${ethr_cv_arm_dbm_sy_instr+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_arm_dbm_sy_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { __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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_sy_instr" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb st' instruction" >&5 printf %s "checking for ARM 'dmb st' instruction... " >&6; } if test ${ethr_cv_arm_dbm_st_instr+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_arm_dbm_st_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { __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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_st_instr" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM 'dmb ld' instruction" >&5 printf %s "checking for ARM 'dmb ld' instruction... " >&6; } if test ${ethr_cv_arm_dbm_ld_instr+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_arm_dbm_ld_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { __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.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dbm_ld_instr" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM 'isb sy' instruction" >&5 printf %s "checking for ARM 'isb sy' instruction... " >&6; } if test ${ethr_cv_arm_isb_sy_instr+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_arm_isb_sy_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { __asm__ __volatile__("isb sy\n" : : : "memory"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_arm_isb_sy_instr=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_isb_sy_instr" >&5 printf "%s\n" "$ethr_cv_arm_isb_sy_instr" >&6; } if test $ethr_cv_arm_isb_sy_instr = yes; then ethr_arm_isb_sy_instr_val=1 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM 'dc cvau' instruction" >&5 printf %s "checking for ARM 'dc cvau' instruction... " >&6; } if test ${ethr_cv_arm_dc_cvau_instr+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_arm_dc_cvau_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { char data[512]; __asm__ __volatile__("dc cvau, %0\n" :: "r" (data) : "memory"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_arm_dc_cvau_instr=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_dc_cvau_instr" >&5 printf "%s\n" "$ethr_cv_arm_dc_cvau_instr" >&6; } if test $ethr_cv_arm_dc_cvau_instr = yes; then ethr_arm_dc_cvau_instr_val=1 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ARM 'ic ivau' instruction" >&5 printf %s "checking for ARM 'ic ivau' instruction... " >&6; } if test ${ethr_cv_arm_ic_ivau_instr+y} then : printf %s "(cached) " >&6 else $as_nop ethr_cv_arm_ic_ivau_instr=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { char data[512]; __asm__ __volatile__("ic ivau, %0\n" :: "r" (data) : "memory"); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ethr_cv_arm_ic_ivau_instr=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_cv_arm_ic_ivau_instr" >&5 printf "%s\n" "$ethr_cv_arm_ic_ivau_instr" >&6; } if test $ethr_cv_arm_ic_ivau_instr = yes; then ethr_arm_ic_ivau_instr_val=1 fi ;; #( *) : ;; esac printf "%s\n" "#define ETHR_HAVE_GCC_ASM_ARM_DMB_INSTRUCTION $ethr_arm_dbm_sy_instr_val" >>confdefs.h printf "%s\n" "#define ETHR_HAVE_GCC_ASM_ARM_DMB_ST_INSTRUCTION $ethr_arm_dbm_st_instr_val" >>confdefs.h printf "%s\n" "#define ETHR_HAVE_GCC_ASM_ARM_DMB_LD_INSTRUCTION $ethr_arm_dbm_ld_instr_val" >>confdefs.h printf "%s\n" "#define ETHR_HAVE_GCC_ASM_ARM_ISB_SY_INSTRUCTION $ethr_arm_isb_sy_instr_val" >>confdefs.h printf "%s\n" "#define ETHR_HAVE_GCC_ASM_ARM_DC_CVAU_INSTRUCTION $ethr_arm_dc_cvau_instr_val" >>confdefs.h printf "%s\n" "#define ETHR_HAVE_GCC_ASM_ARM_IC_IVAU_INSTRUCTION $ethr_arm_ic_ivau_instr_val" >>confdefs.h 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 printf "%s\n" "#define ETHR_HAVE_GCC___ATOMIC_BUILTINS $ethr_have_gcc_atomic_builtins" >>confdefs.h test $ethr_have_gcc_native_atomics = yes && ethr_have_native_atomics=yes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a usable libatomic_ops implementation" >&5 printf %s "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 (void) { 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.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ethr_have_libatomic_ops" >&5 printf "%s\n" "$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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of AO_t" >&5 printf %s "checking size of AO_t... " >&6; } if test ${ac_cv_sizeof_AO_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (AO_t))" "ac_cv_sizeof_AO_t" " #include #include \"atomic_ops.h\" " then : else $as_nop if test "$ac_cv_type_AO_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_AO_t" >&5 printf "%s\n" "$ac_cv_sizeof_AO_t" >&6; } printf "%s\n" "#define SIZEOF_AO_T $ac_cv_sizeof_AO_t" >>confdefs.h printf "%s\n" "#define ETHR_SIZEOF_AO_T $ac_cv_sizeof_AO_t" >>confdefs.h printf "%s\n" "#define ETHR_HAVE_LIBATOMIC_OPS 1" >>confdefs.h if test "x$with_libatomic_ops" != "xno" && test "x$with_libatomic_ops" != "x"; then printf "%s\n" "#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") printf "%s\n" "#define ETHR_SPARC_TSO 1" >>confdefs.h ;; "PSO") printf "%s\n" "#define ETHR_SPARC_PSO 1" >>confdefs.h ;; "RMO"|"") printf "%s\n" "#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 printf "%s\n" "#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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether default stack size should be modified" >&5 printf %s "checking whether default stack size should be modified... " >&6; } if test "x$ethr_modified_default_stack_size" != "x"; then printf "%s\n" "#define ETHR_MODIFIED_DEFAULT_STACK_SIZE $ethr_modified_default_stack_size" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; to $ethr_modified_default_stack_size kilo words" >&5 printf "%s\n" "yes; to $ethr_modified_default_stack_size kilo words" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 printf %s "checking size of void *... " >&6; } if test ${ac_cv_sizeof_void_p+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_void_p" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h printf "%s\n" "#define ETHR_SIZEOF_PTR $ac_cv_sizeof_void_p" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_int" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h printf "%s\n" "#define ETHR_SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h printf "%s\n" "#define ETHR_SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h printf "%s\n" "#define ETHR_SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of __int64" >&5 printf %s "checking size of __int64... " >&6; } if test ${ac_cv_sizeof___int64+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int64))" "ac_cv_sizeof___int64" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type___int64" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int64" >&5 printf "%s\n" "$ac_cv_sizeof___int64" >&6; } printf "%s\n" "#define SIZEOF___INT64 $ac_cv_sizeof___int64" >>confdefs.h printf "%s\n" "#define ETHR_SIZEOF___INT64 $ac_cv_sizeof___int64" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of __int128_t" >&5 printf %s "checking size of __int128_t... " >&6; } if test ${ac_cv_sizeof___int128_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (__int128_t))" "ac_cv_sizeof___int128_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type___int128_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof___int128_t" >&5 printf "%s\n" "$ac_cv_sizeof___int128_t" >&6; } printf "%s\n" "#define SIZEOF___INT128_T $ac_cv_sizeof___int128_t" >>confdefs.h printf "%s\n" "#define ETHR_SIZEOF___INT128_T $ac_cv_sizeof___int128_t" >>confdefs.h 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 else $as_nop 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.beam 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 (void) { #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 (void) { #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 $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { #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 (void) { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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. */ unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; unsigned 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 (void) { 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.beam conftest.$ac_ext else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) printf "%s\n" "#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 printf "%s\n" "#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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether double word ordering is middle-endian" >&5 printf %s "checking whether double word ordering is middle-endian... " >&6; } if test ${ac_cv_c_double_middle_endian+y} then : printf %s "(cached) " >&6 else $as_nop # It does not; compile a test program. if test "$cross_compiling" = yes then : ac_cv_c_double_middle=unknown else $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_double_middle_endian" >&5 printf "%s\n" "$ac_cv_c_double_middle_endian" >&6; } case $ac_cv_c_double_middle_endian in yes) printf "%s\n" "#define DOUBLE_MIDDLE_ENDIAN 1" >>confdefs.h ;; no) ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown double endianness presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&5 printf "%s\n" "$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) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc sse2 asm support" >&5 printf %s "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 (void) { 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.beam conftest.$ac_ext CFLAGS="$save_CFLAGS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_sse2_asm" >&5 printf "%s\n" "$gcc_sse2_asm" >&6; } if test "$gcc_sse2_asm" = "yes"; then printf "%s\n" "#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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc $pic_text$dw_cmpxchg plain asm support" >&5 printf %s "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 (void) { 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.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $plain_cmpxchg" >&5 printf "%s\n" "$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 (void) { #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 $as_nop pic_cmpxchg=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc pic cmpxchg8b asm support with EBX workaround" >&5 printf %s "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 (void) { 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.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_pic_dw_cmpxchg_asm" >&5 printf "%s\n" "$gcc_pic_dw_cmpxchg_asm" >&6; } if test $gcc_pic_dw_cmpxchg_asm = no then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gcc pic cmpxchg8b asm support with EBX and register shortage workarounds" >&5 printf %s "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 (void) { 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.beam conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_pic_dw_cmpxchg_asm" >&5 printf "%s\n" "$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 printf "%s\n" "#define ETHR_CMPXCHG8B_PIC_NO_CLOBBER_EBX 1" >>confdefs.h fi if test "$gcc_cmpxchg8b_pic_no_clobber_ebx_register_shortage" = "yes"; then printf "%s\n" "#define ETHR_CMPXCHG8B_REGISTER_SHORTAGE 1" >>confdefs.h fi if test "$gcc_dw_cmpxchg_asm" = "yes"; then printf "%s\n" "#define ETHR_GCC_HAVE_DW_CMPXCHG_ASM_SUPPORT 1" >>confdefs.h fi ;; #( *) : ;; esac printf "%s\n" "#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 DEFAULT_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 fi ac_fn_c_check_func "$LINENO" "closefrom" "ac_cv_func_closefrom" if test "x$ac_cv_func_closefrom" = xyes then : printf "%s\n" "#define HAVE_CLOSEFROM 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/falloc.h" "ac_cv_header_linux_falloc_h" "$ac_includes_default" if test "x$ac_cv_header_linux_falloc_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_FALLOC_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fallocate() works" >&5 printf %s "checking whether fallocate() works... " >&6; } if test ${i_cv_fallocate_works+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include #include #include int main (void) { 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 $as_nop i_cv_fallocate_works=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $i_cv_fallocate_works" >&5 printf "%s\n" "$i_cv_fallocate_works" >&6; } if test $i_cv_fallocate_works = yes; then printf "%s\n" "#define HAVE_FALLOCATE 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether posix_fallocate() works" >&5 printf %s "checking whether posix_fallocate() works... " >&6; } if test ${i_cv_posix_fallocate_works+y} then : printf %s "(cached) " >&6 else $as_nop if test "$cross_compiling" = yes then : i_cv_posix_fallocate_works=no else $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $i_cv_posix_fallocate_works" >&5 printf "%s\n" "$i_cv_posix_fallocate_works" >&6; } if test $i_cv_posix_fallocate_works = yes; then printf "%s\n" "#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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lock checking should be enabled" >&5 printf %s "checking whether lock checking should be enabled... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_lock_check" >&5 printf "%s\n" "$enable_lock_check" >&6; } if test "x$enable_lock_check" != "xno"; then EMU_THR_DEFS="$EMU_THR_DEFS -DERTS_ENABLE_LOCK_CHECK" fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether lock counters should be enabled" >&5 printf %s "checking whether lock counters should be enabled... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $enable_lock_count" >&5 printf "%s\n" "$enable_lock_count" >&6; } if test "x$enable_lock_count" != "xno"; then DEFAULT_TYPES="$DEFAULT_TYPES lcnt" fi case $host_os in linux*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether dlopen() needs to be called before first call to dlerror()" >&5 printf %s "checking whether dlopen() needs to be called before first call to dlerror()... " >&6; } if test "x$ETHR_THR_LIB_BASE_TYPE" != "xposix_nptl"; then printf "%s\n" "#define ERTS_NEED_DLOPEN_BEFORE_DLERROR 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 printf %s "checking for kstat_open in -lkstat... " >&6; } if test ${ac_cv_lib_kstat_kstat_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char kstat_open (); int main (void) { return kstat_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_kstat_kstat_open=yes else $as_nop ac_cv_lib_kstat_kstat_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 printf "%s\n" "$ac_cv_lib_kstat_kstat_open" >&6; } if test "x$ac_cv_lib_kstat_kstat_open" = xyes then : printf "%s\n" "#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=`printf "%s\n" "ac_cv_lib_$termcap_lib""_tgetent" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -l$termcap_lib" >&5 printf %s "checking for tgetent in -l$termcap_lib... " >&6; } if eval test \${$as_ac_Lib+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char tgetent (); int main (void) { return tgetent (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : eval "$as_ac_Lib=yes" else $as_nop eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$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 printf "%s\n" "#define HAVE_TERMCAP 1" >>confdefs.h fi if test "X$host" != "Xwin32" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wcwidth" >&5 printf %s "checking for wcwidth... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { wcwidth(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : have_wcwidth=yes else $as_nop have_wcwidth=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $have_wcwidth = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h fi fi # Check whether --enable-builtin-zlib was given. if test ${enable_builtin_zlib+y} then : enableval=$enable_builtin_zlib; case "$enableval" in no) enable_builtin_zlib=no ;; *) enable_builtin_zlib=yes ;; esac else $as_nop enable_builtin_zlib=no fi Z_LIB= if test "x$enable_builtin_zlib" = "xyes" then : printf "%s\n" "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Using our own built-in zlib source" >&5 printf "%s\n" "$as_me: Using our own built-in zlib source" >&6;} else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for zlib 1.2.5 or higher" >&5 printf %s "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 (void) { #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" printf "%s\n" "#define HAVE_LIBZ 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "$Z_LIB" != "" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing inflateGetDictionary" >&5 printf %s "checking for library containing inflateGetDictionary... " >&6; } if test ${ac_cv_search_inflateGetDictionary+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char inflateGetDictionary (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_inflateGetDictionary+y} then : break fi done if test ${ac_cv_search_inflateGetDictionary+y} then : else $as_nop ac_cv_search_inflateGetDictionary=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inflateGetDictionary" >&5 printf "%s\n" "$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" printf "%s\n" "#define HAVE_ZLIB_INFLATEGETDICTIONARY 1" >>confdefs.h fi fi LIBS=$zlib_save_LIBS fi # Check whether --enable-esock was given. if test ${enable_esock+y} then : enableval=$enable_esock; case "$enableval" in no) enable_esock=no ;; *) enable_esock=yes ;; esac else $as_nop enable_esock=yes fi if test "x$enable_esock" = "xyes" then : printf "%s\n" "#define ESOCK_ENABLE 1" >>confdefs.h ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" if test "x$ac_cv_func_localtime_r" = xyes then : printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" if test "x$ac_cv_func_strftime" = xyes then : printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getprotoent" "ac_cv_func_getprotoent" if test "x$ac_cv_func_getprotoent" = xyes then : printf "%s\n" "#define HAVE_GETPROTOENT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setprotoent" "ac_cv_func_setprotoent" if test "x$ac_cv_func_setprotoent" = xyes then : printf "%s\n" "#define HAVE_SETPROTOENT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "endprotoent" "ac_cv_func_endprotoent" if test "x$ac_cv_func_endprotoent" = xyes then : printf "%s\n" "#define HAVE_ENDPROTOENT 1" >>confdefs.h fi fi # Check whether --enable-esock_use_rcvsndtimeo was given. if test ${enable_esock_use_rcvsndtimeo+y} then : enableval=$enable_esock_use_rcvsndtimeo; fi if test "x$enable_esock_rcvsndtimeo" = "xyes"; then printf "%s\n" "#define ESOCK_USE_RCVSNDTIMEO 1" >>confdefs.h fi # Check whether --enable-esock_extended_error_info was given. if test ${enable_esock_extended_error_info+y} then : enableval=$enable_esock_extended_error_info; fi if test "x$enable_esock_extended_error_info" != "xno"; then printf "%s\n" "#define ESOCK_USE_EXTENDED_ERROR_INFO 1" >>confdefs.h fi # Check whether --with-esock-counter-size was given. if test ${with_esock_counter_size+y} then : withval=$with_esock_counter_size; else $as_nop with_esock_counter_size=64 fi case "$with_esock_counter_size" in 16) printf "%s\n" "#define ESOCK_COUNTER_SIZE 16" >>confdefs.h ;; 24) printf "%s\n" "#define ESOCK_COUNTER_SIZE 24" >>confdefs.h ;; 32) printf "%s\n" "#define ESOCK_COUNTER_SIZE 32" >>confdefs.h ;; 48) printf "%s\n" "#define ESOCK_COUNTER_SIZE 48" >>confdefs.h ;; 64) printf "%s\n" "#define ESOCK_COUNTER_SIZE 64" >>confdefs.h ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Invalid esock counter size ($with_esock_counter_size), using default (64)" >&5 printf "%s\n" "$as_me: WARNING: Invalid esock counter size ($with_esock_counter_size), using default (64)" >&2;} printf "%s\n" "#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 : printf "%s\n" "#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 : printf "%s\n" "#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 : printf "%s\n" "#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 : printf "%s\n" "#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 : printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h fi # Check whether --enable-esock-socket-registry was given. if test ${enable_esock_socket_registry+y} then : enableval=$enable_esock_socket_registry; fi if test "x$enable_esock_socket_registry" = "xno" then : printf "%s\n" "#define ESOCK_USE_SOCKET_REGISTRY 0" >>confdefs.h else $as_nop printf "%s\n" "#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 : printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_MAP 1" >>confdefs.h printf "%s\n" "#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 : printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1" >>confdefs.h printf "%s\n" "#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 : printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_IFINDEX 1" >>confdefs.h printf "%s\n" "#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 : printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_INDEX 1" >>confdefs.h printf "%s\n" "#define ESOCK_USE_INDEX /**/" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct sockaddr_dl" "sdl_len" "ac_cv_member_struct_sockaddr_dl_sdl_len" "#ifdef __WIN32__ #else #include #endif " if test "x$ac_cv_member_struct_sockaddr_dl_sdl_len" = xyes then : printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_DL_SDL_LEN 1" >>confdefs.h printf "%s\n" "#define ESOCK_SDL_LEN /**/" >>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 $as_nop erl_checkSocket=1 fi if test "$erl_checkSocket" = 1 then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5 printf %s "checking for main in -lsocket... " >&6; } if test ${ac_cv_lib_socket_main+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_socket_main=yes else $as_nop ac_cv_lib_socket_main=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5 printf "%s\n" "$ac_cv_lib_socket_main" >&6; } if test "x$ac_cv_lib_socket_main" = xyes then : SOCKET_LIBS="-lsocket" else $as_nop 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_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 printf %s "checking for main in -lnsl... " >&6; } if test ${ac_cv_lib_nsl_main+y} then : printf %s "(cached) " >&6 else $as_nop ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_nsl_main=yes else $as_nop ac_cv_lib_nsl_main=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 printf "%s\n" "$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*) : printf "%s\n" "#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 (void) { struct hostent_data hd; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : printf "%s\n" "#define HAVE_GETHOSTBYNAME_R GHBN_R_AIX" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 : printf "%s\n" "#define HAVE_GETHOSTBYNAME_R GHBN_R_GLIBC" >>confdefs.h fi rm -rf conftest* ;; esac fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working posix_openpt implementation" >&5 printf %s "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 (void) { 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 $as_nop working_posix_openpt=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test "X$working_posix_openpt" = "Xyes"; then printf "%s\n" "#define HAVE_WORKING_POSIX_OPENPT 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if netdb.h requires netinet/in.h to be previously included" >&5 printf %s "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 (void) { return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : need_in_h=yes else $as_nop need_in_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext else $as_nop need_in_h=no fi rm -rf conftest* if test $need_in_h = yes; then printf "%s\n" "#define NETDB_H_NEEDS_IN_H 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 printf %s "checking for socklen_t... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { socklen_t test; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : have_socklen_t=yes else $as_nop have_socklen_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext, if test $have_socklen_t = yes; then printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for h_errno declaration in netdb.h" >&5 printf %s "checking for h_errno declaration in netdb.h... " >&6; } if test ${ac_cv_decl_h_errno+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int err = h_errno; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_decl_h_errno=yes else $as_nop ac_cv_decl_h_errno=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_h_errno" >&5 printf "%s\n" "$ac_cv_decl_h_errno" >&6; } if test $ac_cv_decl_h_errno = yes; then printf "%s\n" "#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=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 printf %s "checking for $ac_hdr that defines DIR... " >&6; } if eval test \${$as_ac_Header+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main (void) { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : eval "$as_ac_Header=yes" else $as_nop eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 printf "%s\n" "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes" then : cat >>confdefs.h <<_ACEOF #define `printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char opendir (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 printf %s "checking for library containing opendir... " >&6; } if test ${ac_cv_search_opendir+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char opendir (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_opendir+y} then : break fi done if test ${ac_cv_search_opendir+y} then : else $as_nop ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 printf %s "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if test ${ac_cv_header_sys_wait_h+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 printf "%s\n" "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" if test "x$ac_cv_header_fcntl_h" = xyes then : printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" if test "x$ac_cv_header_limits_h" = xyes then : printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" if test "x$ac_cv_header_unistd_h" = xyes then : printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" if test "x$ac_cv_header_syslog_h" = xyes then : printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" if test "x$ac_cv_header_dlfcn_h" = xyes then : printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "ieeefp.h" "ac_cv_header_ieeefp_h" "$ac_includes_default" if test "x$ac_cv_header_ieeefp_h" = xyes then : printf "%s\n" "#define HAVE_IEEEFP_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/stropts.h" "ac_cv_header_sys_stropts_h" "$ac_includes_default" if test "x$ac_cv_header_sys_stropts_h" = xyes then : printf "%s\n" "#define HAVE_SYS_STROPTS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sysctl_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" if test "x$ac_cv_header_sys_ioctl_h" = xyes then : printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/uio.h" "ac_cv_header_sys_uio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_uio_h" = xyes then : printf "%s\n" "#define HAVE_SYS_UIO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" if test "x$ac_cv_header_sys_mman_h" = xyes then : printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sockio_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/socketio.h" "ac_cv_header_sys_socketio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socketio_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SOCKETIO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "net/errno.h" "ac_cv_header_net_errno_h" "$ac_includes_default" if test "x$ac_cv_header_net_errno_h" = xyes then : printf "%s\n" "#define HAVE_NET_ERRNO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" if test "x$ac_cv_header_malloc_h" = xyes then : printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "arpa/nameser.h" "ac_cv_header_arpa_nameser_h" "$ac_includes_default" if test "x$ac_cv_header_arpa_nameser_h" = xyes then : printf "%s\n" "#define HAVE_ARPA_NAMESER_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "libdlpi.h" "ac_cv_header_libdlpi_h" "$ac_includes_default" if test "x$ac_cv_header_libdlpi_h" = xyes then : printf "%s\n" "#define HAVE_LIBDLPI_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "pty.h" "ac_cv_header_pty_h" "$ac_includes_default" if test "x$ac_cv_header_pty_h" = xyes then : printf "%s\n" "#define HAVE_PTY_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "util.h" "ac_cv_header_util_h" "$ac_includes_default" if test "x$ac_cv_header_util_h" = xyes then : printf "%s\n" "#define HAVE_UTIL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default" if test "x$ac_cv_header_libutil_h" = xyes then : printf "%s\n" "#define HAVE_LIBUTIL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "utmp.h" "ac_cv_header_utmp_h" "$ac_includes_default" if test "x$ac_cv_header_utmp_h" = xyes then : printf "%s\n" "#define HAVE_UTMP_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" if test "x$ac_cv_header_langinfo_h" = xyes then : printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "poll.h" "ac_cv_header_poll_h" "$ac_includes_default" if test "x$ac_cv_header_poll_h" = xyes then : printf "%s\n" "#define HAVE_POLL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default" if test "x$ac_cv_header_sdkddkver_h" = xyes then : printf "%s\n" "#define HAVE_SDKDDKVER_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "elf.h" "ac_cv_header_elf_h" "$ac_includes_default" if test "x$ac_cv_header_elf_h" = xyes then : printf "%s\n" "#define HAVE_ELF_H 1" >>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 : printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_HWADDR 1" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_IFREQ_IFR_ENADDR 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "struct ip_mreqn" "ac_cv_type_struct_ip_mreqn" " #include " if test "x$ac_cv_type_struct_ip_mreqn" = xyes then : printf "%s\n" "#define HAVE_STRUCT_IP_MREQN 1" >>confdefs.h fi if test x"$enable_systemd" != x"no" then : systemd_daemon_save_LIBS=$LIBS LIBS= { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sd_listen_fds" >&5 printf %s "checking for library containing sd_listen_fds... " >&6; } if test ${ac_cv_search_sd_listen_fds+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char sd_listen_fds (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_sd_listen_fds+y} then : break fi done if test ${ac_cv_search_sd_listen_fds+y} then : else $as_nop ac_cv_search_sd_listen_fds=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sd_listen_fds" >&5 printf "%s\n" "$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 $as_nop have_sd_listen_fds=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sd_notify" >&5 printf %s "checking for library containing sd_notify... " >&6; } if test ${ac_cv_search_sd_notify+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char sd_notify (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_sd_notify+y} then : break fi done if test ${ac_cv_search_sd_notify+y} then : else $as_nop ac_cv_search_sd_notify=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sd_notify" >&5 printf "%s\n" "$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 $as_nop have_sd_notify=no fi for ac_header in systemd/sd-daemon.h do : ac_fn_c_check_header_compile "$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 : printf "%s\n" "#define HAVE_SYSTEMD_SD_DAEMON_H 1" >>confdefs.h have_systemd_sd_daemon_h=yes else $as_nop 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 printf "%s\n" "#define HAVE_SYSTEMD_DAEMON 1" >>confdefs.h SYSTEMD_DAEMON_LIBS=$LIBS elif test x"$enable_systemd" = x"yes"; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlpi_open in -ldlpi" >&5 printf %s "checking for dlpi_open in -ldlpi... " >&6; } if test ${ac_cv_lib_dlpi_dlpi_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlpi_open (); int main (void) { return dlpi_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dlpi_dlpi_open=yes else $as_nop ac_cv_lib_dlpi_dlpi_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_open" >&5 printf "%s\n" "$ac_cv_lib_dlpi_dlpi_open" >&6; } if test "x$ac_cv_lib_dlpi_dlpi_open" = xyes then : printf "%s\n" "#define HAVE_LIBDLPI 1" >>confdefs.h 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=$erl_xcomp_sysroot/lib if test x"$ac_cv_sizeof_void_p" = x"8"; then if test -d $erl_xcomp_sysroot/lib64; then try_dlpi_lib=$erl_xcomp_sysroot/lib64 elif test -d $erl_xcomp_sysroot/lib/64; then try_dlpi_lib=$erl_xcomp_sysroot/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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Extending the search to include $erl_xcomp_sysroot/lib" >&5 printf "%s\n" "$as_me: Extending the search to include $erl_xcomp_sysroot/lib" >&6;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlpi_open in -ldlpi" >&5 printf %s "checking for dlpi_open in -ldlpi... " >&6; } if test ${ac_cv_lib_dlpi_dlpi_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char dlpi_open (); int main (void) { return dlpi_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_dlpi_dlpi_open=yes else $as_nop ac_cv_lib_dlpi_dlpi_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_open" >&5 printf "%s\n" "$ac_cv_lib_dlpi_dlpi_open" >&6; } if test "x$ac_cv_lib_dlpi_dlpi_open" = xyes then : printf "%s\n" "#define HAVE_LIBDLPI 1" >>confdefs.h 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } if test ${ac_cv_c_undeclared_builtin_options+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_CFLAGS=$CFLAGS ac_cv_c_undeclared_builtin_options='cannot detect' for ac_arg in '' -fno-builtin; do CFLAGS="$ac_save_CFLAGS $ac_arg" # This test program should *not* compile successfully. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { (void) strchr; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop # This test program should compile successfully. # No library function is consistently available on # freestanding implementations, so test against a dummy # declaration. Include always-available headers on the # off chance that they somehow elicit warnings. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include extern void ac_decl (int, char *); int main (void) { (void) ac_decl (0, (char *) 0); (void) ac_decl; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : if test x"$ac_arg" = x then : ac_cv_c_undeclared_builtin_options='none needed' else $as_nop ac_cv_c_undeclared_builtin_options=$ac_arg fi break fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext done CFLAGS=$ac_save_CFLAGS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } case $ac_cv_c_undeclared_builtin_options in #( 'cannot detect') : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot make $CC report undeclared builtins See \`config.log' for more details" "$LINENO" 5; } ;; #( 'none needed') : ac_c_undeclared_builtin_options='' ;; #( *) : ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; esac ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" if test "x$ac_cv_header_sys_resource_h" = xyes then : printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h ac_fn_check_decl "$LINENO" "getrlimit" "ac_cv_have_decl_getrlimit" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_getrlimit" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_GETRLIMIT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "setrlimit" "ac_cv_have_decl_setrlimit" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_setrlimit" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SETRLIMIT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "RLIMIT_STACK" "ac_cv_have_decl_RLIMIT_STACK" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_RLIMIT_STACK" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_RLIMIT_STACK $ac_have_decl" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" if test "x$ac_cv_func_getrusage" = xyes then : printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h fi have_kernel_poll=no ac_fn_c_check_header_compile "$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_compile "$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_compile "$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 ac_fn_c_check_header_compile "$LINENO" "sys/timerfd.h" "ac_cv_header_sys_timerfd_h" "$ac_includes_default" if test "x$ac_cv_header_sys_timerfd_h" = xyes then : printf "%s\n" "#define HAVE_SYS_TIMERFD_H 1" >>confdefs.h fi for ac_header in netpacket/packet.h do : ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default" if test "x$ac_cv_header_netpacket_packet_h" = xyes then : printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h have_netpacket_packet_h=yes else $as_nop 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 printf "%s\n" "#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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sctp_bindx in -lsctp" >&5 printf %s "checking for sctp_bindx in -lsctp... " >&6; } if test ${ac_cv_lib_sctp_sctp_bindx+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char sctp_bindx (); int main (void) { return sctp_bindx (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_sctp_sctp_bindx=yes else $as_nop ac_cv_lib_sctp_sctp_bindx=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sctp_sctp_bindx" >&5 printf "%s\n" "$ac_cv_lib_sctp_sctp_bindx" >&6; } if test "x$ac_cv_lib_sctp_sctp_bindx" = xyes then : printf "%s\n" "#define HAVE_LIBSCTP 1" >>confdefs.h LIBS="-lsctp $LIBS" fi fi ac_fn_c_check_func "$LINENO" "sctp_bindx" "ac_cv_func_sctp_bindx" if test "x$ac_cv_func_sctp_bindx" = xyes then : printf "%s\n" "#define HAVE_SCTP_BINDX 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sctp_peeloff" "ac_cv_func_sctp_peeloff" if test "x$ac_cv_func_sctp_peeloff" = xyes then : printf "%s\n" "#define HAVE_SCTP_PEELOFF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sctp_getladdrs" "ac_cv_func_sctp_getladdrs" if test "x$ac_cv_func_sctp_getladdrs" = xyes then : printf "%s\n" "#define HAVE_SCTP_GETLADDRS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sctp_freeladdrs" "ac_cv_func_sctp_freeladdrs" if test "x$ac_cv_func_sctp_freeladdrs" = xyes then : printf "%s\n" "#define HAVE_SCTP_FREELADDRS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sctp_getpaddrs" "ac_cv_func_sctp_getpaddrs" if test "x$ac_cv_func_sctp_getpaddrs" = xyes then : printf "%s\n" "#define HAVE_SCTP_GETPADDRS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sctp_freepaddrs" "ac_cv_func_sctp_freepaddrs" if test "x$ac_cv_func_sctp_freepaddrs" = xyes then : printf "%s\n" "#define HAVE_SCTP_FREEPADDRS 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sctp_connectx" "ac_cv_func_sctp_connectx" if test "x$ac_cv_func_sctp_connectx" = xyes then : printf "%s\n" "#define HAVE_SCTP_CONNECTX 1" >>confdefs.h fi 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_ACCOC_VALUE_ASSOC_ID 1" >>confdefs.h fi ac_fn_check_decl "$LINENO" "SCTP_UNORDERED" "ac_cv_have_decl_SCTP_UNORDERED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_UNORDERED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_UNORDERED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_ADDR_OVER" "ac_cv_have_decl_SCTP_ADDR_OVER" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_ADDR_OVER" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_ADDR_OVER $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_ABORT" "ac_cv_have_decl_SCTP_ABORT" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_ABORT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_ABORT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_EOF" "ac_cv_have_decl_SCTP_EOF" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_EOF" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_EOF $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_SENDALL" "ac_cv_have_decl_SCTP_SENDALL" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_SENDALL" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_SENDALL $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_ADDR_CONFIRMED" "ac_cv_have_decl_SCTP_ADDR_CONFIRMED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_ADDR_CONFIRMED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_ADDR_CONFIRMED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_DELAYED_ACK_TIME" "ac_cv_have_decl_SCTP_DELAYED_ACK_TIME" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_DELAYED_ACK_TIME" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_DELAYED_ACK_TIME $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_EMPTY" "ac_cv_have_decl_SCTP_EMPTY" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_EMPTY" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_EMPTY $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_UNCONFIRMED" "ac_cv_have_decl_SCTP_UNCONFIRMED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_UNCONFIRMED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_UNCONFIRMED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_CLOSED" "ac_cv_have_decl_SCTP_CLOSED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_CLOSED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_CLOSED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_IDLE" "ac_cv_have_decl_SCTPS_IDLE" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_IDLE" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_IDLE $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_BOUND" "ac_cv_have_decl_SCTP_BOUND" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_BOUND" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_BOUND $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_BOUND" "ac_cv_have_decl_SCTPS_BOUND" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_BOUND" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_BOUND $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_LISTEN" "ac_cv_have_decl_SCTP_LISTEN" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_LISTEN" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_LISTEN $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_LISTEN" "ac_cv_have_decl_SCTPS_LISTEN" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_LISTEN" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_LISTEN $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_COOKIE_WAIT" "ac_cv_have_decl_SCTP_COOKIE_WAIT" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_COOKIE_WAIT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_COOKIE_WAIT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_COOKIE_WAIT" "ac_cv_have_decl_SCTPS_COOKIE_WAIT" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_COOKIE_WAIT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_COOKIE_WAIT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_COOKIE_ECHOED" "ac_cv_have_decl_SCTP_COOKIE_ECHOED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_COOKIE_ECHOED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_COOKIE_ECHOED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_COOKIE_ECHOED" "ac_cv_have_decl_SCTPS_COOKIE_ECHOED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_COOKIE_ECHOED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_COOKIE_ECHOED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_ESTABLISHED" "ac_cv_have_decl_SCTP_ESTABLISHED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_ESTABLISHED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_ESTABLISHED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_ESTABLISHED" "ac_cv_have_decl_SCTPS_ESTABLISHED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_ESTABLISHED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_ESTABLISHED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_SHUTDOWN_PENDING" "ac_cv_have_decl_SCTP_SHUTDOWN_PENDING" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_PENDING" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_SHUTDOWN_PENDING $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_SHUTDOWN_PENDING" "ac_cv_have_decl_SCTPS_SHUTDOWN_PENDING" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_PENDING" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_SHUTDOWN_PENDING $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_SHUTDOWN_SENT" "ac_cv_have_decl_SCTP_SHUTDOWN_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_SENT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_SHUTDOWN_SENT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_SHUTDOWN_SENT" "ac_cv_have_decl_SCTPS_SHUTDOWN_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_SENT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_SHUTDOWN_SENT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_SHUTDOWN_RECEIVED" "ac_cv_have_decl_SCTP_SHUTDOWN_RECEIVED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_RECEIVED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_SHUTDOWN_RECEIVED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_SHUTDOWN_RECEIVED" "ac_cv_have_decl_SCTPS_SHUTDOWN_RECEIVED" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_RECEIVED" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_SHUTDOWN_RECEIVED $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTP_SHUTDOWN_ACK_SENT" "ac_cv_have_decl_SCTP_SHUTDOWN_ACK_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTP_SHUTDOWN_ACK_SENT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTP_SHUTDOWN_ACK_SENT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "SCTPS_SHUTDOWN_ACK_SENT" "ac_cv_have_decl_SCTPS_SHUTDOWN_ACK_SENT" "#if HAVE_SYS_SOCKET_H #include #endif #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_SCTPS_SHUTDOWN_ACK_SENT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_SCTPS_SHUTDOWN_ACK_SENT $ac_have_decl" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_PATHMTU 1" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_SACKDELAY 1" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_PADDRPARAMS_SPP_FLAGS 1" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_REMOTE_ERROR_SRE_DATA 1" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_SEND_FAILED_SSF_DATA 1" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_AUTHENTICATION_EVENT 1" >>confdefs.h 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 : printf "%s\n" "#define HAVE_STRUCT_SCTP_EVENT_SUBSCRIBE_SCTP_SENDER_DRY_EVENT 1" >>confdefs.h fi fi ac_fn_c_check_header_compile "$LINENO" "sched.h" "ac_cv_header_sched_h" "$ac_includes_default" if test "x$ac_cv_header_sched_h" = xyes then : printf "%s\n" "#define HAVE_SCHED_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "setns.h" "ac_cv_header_setns_h" "$ac_includes_default" if test "x$ac_cv_header_setns_h" = xyes then : printf "%s\n" "#define HAVE_SETNS_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setns" "ac_cv_func_setns" if test "x$ac_cv_func_setns" = xyes then : printf "%s\n" "#define HAVE_SETNS 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/types.h" "ac_cv_header_linux_types_h" "#ifdef HAVE_SYS_TIME_H # include #endif #ifdef HAVE_LINUX_TYPES_H # include #endif " if test "x$ac_cv_header_linux_types_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_TYPES_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "linux/errqueue.h" "ac_cv_header_linux_errqueue_h" "#ifdef HAVE_SYS_TIME_H # include #endif #ifdef HAVE_LINUX_TYPES_H # include #endif " if test "x$ac_cv_header_linux_errqueue_h" = xyes then : printf "%s\n" "#define HAVE_LINUX_ERRQUEUE_H 1" >>confdefs.h fi HAVE_VALGRIND=no ac_fn_c_check_header_compile "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SO_BSDCOMPAT declaration" >&5 printf %s "checking for SO_BSDCOMPAT declaration... " >&6; } if test ${ac_cv_decl_so_bsdcompat+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int i = SO_BSDCOMPAT; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_decl_so_bsdcompat=yes else $as_nop ac_cv_decl_so_bsdcompat=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_so_bsdcompat" >&5 printf "%s\n" "$ac_cv_decl_so_bsdcompat" >&6; } case "${ac_cv_decl_so_bsdcompat}" in "yes" ) printf "%s\n" "#define HAVE_SO_BSDCOMPAT /**/" >>confdefs.h ;; * ) ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in netinet/in.h" >&5 printf %s "checking for INADDR_LOOPBACK in netinet/in.h... " >&6; } if test ${ac_cv_decl_inaddr_loopback+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { int i = INADDR_LOOPBACK; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_decl_inaddr_loopback=yes else $as_nop ac_cv_decl_inaddr_loopback=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback" >&5 printf "%s\n" "$ac_cv_decl_inaddr_loopback" >&6; } if test ${ac_cv_decl_inaddr_loopback} = no then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in rpc/types.h" >&5 printf %s "checking for INADDR_LOOPBACK in rpc/types.h... " >&6; } if test ${ac_cv_decl_inaddr_loopback_rpc+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int i = INADDR_LOOPBACK; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_decl_inaddr_loopback_rpc=yes else $as_nop ac_cv_decl_inaddr_loopback_rpc=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback_rpc" >&5 printf "%s\n" "$ac_cv_decl_inaddr_loopback_rpc" >&6; } if test "${ac_cv_decl_inaddr_loopback_rpc}" = "yes" then : printf "%s\n" "#define DEF_INADDR_LOOPBACK_IN_RPC_TYPES_H /**/" >>confdefs.h else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for INADDR_LOOPBACK in winsock2.h" >&5 printf %s "checking for INADDR_LOOPBACK in winsock2.h... " >&6; } if test ${ac_cv_decl_inaddr_loopback_winsock2+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define WIN32_LEAN_AND_MEAN #include int main (void) { int i = INADDR_LOOPBACK; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_decl_inaddr_loopback_winsock2=yes else $as_nop ac_cv_decl_inaddr_loopback_winsock2=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_inaddr_loopback_winsock2" >&5 printf "%s\n" "$ac_cv_decl_inaddr_loopback_winsock2" >&6; } case "${ac_cv_decl_inaddr_loopback_winsock2}" in "yes" ) printf "%s\n" "#define DEF_INADDR_LOOPBACK_IN_WINSOCK2_H /**/" >>confdefs.h ;; * ) # couldn't find it anywhere printf "%s\n" "#define HAVE_NO_INADDR_LOOPBACK /**/" >>confdefs.h ;; esac fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_errlist declaration in stdio.h or errno.h" >&5 printf %s "checking for sys_errlist declaration in stdio.h or errno.h... " >&6; } if test ${ac_cv_decl_sys_errlist+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { char *msg = *(sys_errlist + 1); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_decl_sys_errlist=yes else $as_nop ac_cv_decl_sys_errlist=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_sys_errlist" >&5 printf "%s\n" "$ac_cv_decl_sys_errlist" >&6; } if test $ac_cv_decl_sys_errlist = yes; then printf "%s\n" "#define SYS_ERRLIST_DECLARED /**/" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if windows.h includes winsock2.h" >&5 printf %s "checking if windows.h includes winsock2.h... " >&6; } if test ${erts_cv_windows_h_includes_winsock2_h+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #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 $as_nop erts_cv_windows_h_includes_winsock2_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_windows_h_includes_winsock2_h" >&5 printf "%s\n" "$erts_cv_windows_h_includes_winsock2_h" >&6; } if test $erts_cv_windows_h_includes_winsock2_h = yes; then printf "%s\n" "#define WINDOWS_H_INCLUDES_WINSOCK2_H 1" >>confdefs.h fi CPPFLAGS=$saved_cppflags { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 printf %s "checking for an ANSI C-conforming const... " >&6; } if test ${ac_cv_c_const+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #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}; /* IBM 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; } { /* IBM 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 $as_nop ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 printf "%s\n" "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then printf "%s\n" "#define const /**/" >>confdefs.h fi 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 $as_nop printf "%s\n" "#define off_t long int" >>confdefs.h 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 $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined _WIN64 && !defined __CYGWIN__ LLP64 #endif int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_pid_type='int' else $as_nop ac_pid_type='__int64' fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h 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 $as_nop printf "%s\n" "#define size_t unsigned int" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } if test ${ac_cv_struct_tm+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 printf "%s\n" "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct sockaddr has sa_len field" >&5 printf %s "checking whether struct sockaddr has sa_len field... " >&6; } if test ${ac_cv_struct_sockaddr_sa_len+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop ac_cv_struct_sockaddr_sa_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_sa_len" >&5 printf "%s\n" "$ac_cv_struct_sockaddr_sa_len" >&6; } case ${ac_cv_struct_sockaddr_sa_len} in "no" ) printf "%s\n" "#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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 printf %s "checking size of char... " >&6; } if test ${ac_cv_sizeof_char+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_char" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 printf "%s\n" "$ac_cv_sizeof_char" >&6; } printf "%s\n" "#define SIZEOF_CHAR $ac_cv_sizeof_char" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 printf %s "checking size of short... " >&6; } if test ${ac_cv_sizeof_short+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_short" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 printf "%s\n" "$ac_cv_sizeof_short" >&6; } printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 printf %s "checking size of int... " >&6; } if test ${ac_cv_sizeof_int+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_int" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 printf "%s\n" "$ac_cv_sizeof_int" >&6; } printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 printf %s "checking size of long... " >&6; } if test ${ac_cv_sizeof_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 printf "%s\n" "$ac_cv_sizeof_long" >&6; } printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 printf %s "checking size of void *... " >&6; } if test ${ac_cv_sizeof_void_p+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_void_p" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 printf %s "checking size of long long... " >&6; } if test ${ac_cv_sizeof_long_long+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_long_long" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 printf %s "checking size of size_t... " >&6; } if test ${ac_cv_sizeof_size_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_size_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 printf %s "checking size of off_t... " >&6; } if test ${ac_cv_sizeof_off_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_off_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 printf "%s\n" "$ac_cv_sizeof_off_t" >&6; } printf "%s\n" "#define SIZEOF_OFF_T $ac_cv_sizeof_off_t" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 printf %s "checking size of time_t... " >&6; } if test ${ac_cv_sizeof_time_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_time_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of suseconds_t" >&5 printf %s "checking size of suseconds_t... " >&6; } if test ${ac_cv_sizeof_suseconds_t+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (suseconds_t))" "ac_cv_sizeof_suseconds_t" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type_suseconds_t" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_suseconds_t" >&5 printf "%s\n" "$ac_cv_sizeof_suseconds_t" >&6; } printf "%s\n" "#define SIZEOF_SUSECONDS_T $ac_cv_sizeof_suseconds_t" >>confdefs.h # 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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of _Float16" >&5 printf %s "checking size of _Float16... " >&6; } if test ${ac_cv_sizeof__Float16+y} then : printf %s "(cached) " >&6 else $as_nop if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (_Float16))" "ac_cv_sizeof__Float16" "$ac_includes_default" then : else $as_nop if test "$ac_cv_type__Float16" = yes; then { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof__Float16" >&5 printf "%s\n" "$ac_cv_sizeof__Float16" >&6; } printf "%s\n" "#define SIZEOF__FLOAT16 $ac_cv_sizeof__Float16" >>confdefs.h BITS64= if test $ac_cv_sizeof_void_p = 8; then BITS64=yes fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler 'restrict' support" >&5 printf %s "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 (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : restrict_keyword=$x fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "x$restrict_keyword" != "x"; then break fi done printf "%s\n" "#define ERTS_RESTRICT $restrict_keyword" >>confdefs.h if test "x$restrict_keyword" != "x"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_compiler_gnu" = "xyes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if we should add -fno-tree-copyrename to CFLAGS for computed gotos to work properly" >&5 printf %s "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 (void) { #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 $as_nop no_tree_copyrename=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test "x$no_tree_copyrename" = "xyes"; then CFLAGS="$CFLAGS -fno-tree-copyrename" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken gcc-4.3.0 compiler" >&5 printf %s "checking for broken gcc-4.3.0 compiler... " >&6; } if test "$cross_compiling" = yes then : gcc_4_3_0_bug=cross else $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gcc_4_3_0_bug_result" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 printf %s "checking whether byte ordering is bigendian... " >&6; } if test ${ac_cv_c_bigendian+y} then : printf %s "(cached) " >&6 else $as_nop 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.beam 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 (void) { #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 (void) { #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 $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { #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 (void) { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_c_bigendian=yes else $as_nop ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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. */ unsigned short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; unsigned short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } unsigned short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; unsigned 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 (void) { 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.beam conftest.$ac_ext else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main (void) { /* 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 printf "%s\n" "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h printf "%s\n" "#define ERTS_ENDIANNESS 1" >>confdefs.h ;; #( no) printf "%s\n" "#define ERTS_ENDIANNESS -1" >>confdefs.h ;; #( universal) printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) case "$erl_xcomp_bigendian" in yes) printf "%s\n" "#define ERTS_ENDIANNESS 1" >>confdefs.h ;; no) printf "%s\n" "#define ERTS_ENDIANNESS -1" >>confdefs.h ;; *) printf "%s\n" "#define ERTS_ENDIANNESS 0" >>confdefs.h ;; esac ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether double word ordering is middle-endian" >&5 printf %s "checking whether double word ordering is middle-endian... " >&6; } if test ${ac_cv_c_double_middle_endian+y} then : printf %s "(cached) " >&6 else $as_nop # It does not; compile a test program. if test "$cross_compiling" = yes then : ac_cv_c_double_middle=unknown else $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_double_middle_endian" >&5 printf "%s\n" "$ac_cv_c_double_middle_endian" >&6; } case $ac_cv_c_double_middle_endian in yes) printf "%s\n" "#define DOUBLE_MIDDLE_ENDIAN 1" >>confdefs.h ;; no) ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unknown double endianness presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&5 printf "%s\n" "$as_me: WARNING: unknown double endianness presetting ac_cv_c_double_middle_endian=no (or yes) will help" >&2;} ;; esac ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" if test "x$ac_cv_func_fdatasync" = xyes then : printf "%s\n" "#define HAVE_FDATASYNC 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing fdatasync" >&5 printf %s "checking for library containing fdatasync... " >&6; } if test ${ac_cv_search_fdatasync+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char fdatasync (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_fdatasync+y} then : break fi done if test ${ac_cv_search_fdatasync+y} then : else $as_nop ac_cv_search_fdatasync=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fdatasync" >&5 printf "%s\n" "$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*) : ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile" if test "x$ac_cv_func_sendfile" = xyes then : printf "%s\n" "#define HAVE_SENDFILE 1" >>confdefs.h fi ;; #( solaris*) : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing sendfilev" >&5 printf %s "checking for library containing sendfilev... " >&6; } if test ${ac_cv_search_sendfilev+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char sendfilev (); int main (void) { 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.beam \ conftest$ac_exeext if test ${ac_cv_search_sendfilev+y} then : break fi done if test ${ac_cv_search_sendfilev+y} then : else $as_nop ac_cv_search_sendfilev=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sendfilev" >&5 printf "%s\n" "$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" printf "%s\n" "#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" ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default" if test "x$ac_cv_header_windows_h" = xyes then : printf "%s\n" "#define HAVE_WINDOWS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" if test "x$ac_cv_header_winsock2_h" = xyes then : printf "%s\n" "#define HAVE_WINSOCK2_H 1" >>confdefs.h fi 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 : printf "%s\n" "#define HAVE_WS2TCPIP_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo" >&5 printf %s "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 (void) { getaddrinfo("","",NULL,NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : have_getaddrinfo=yes else $as_nop have_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $have_getaddrinfo = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getaddrinfo accepts enough flags" >&5 printf %s "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 (void) { 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 $as_nop have_getaddrinfo=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $have_getaddrinfo" >&5 printf "%s\n" "$have_getaddrinfo" >&6; } case $have_getaddrinfo in yes) printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h ;; *) ;; esac else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getnameinfo" >&5 printf %s "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 (void) { getnameinfo(NULL,0,NULL,0,NULL,0,0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : have_getnameinfo=yes else $as_nop have_getnameinfo=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $have_getnameinfo = yes; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_GETNAMEINFO 1" >>confdefs.h else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ac_fn_c_check_func "$LINENO" "getipnodebyname" "ac_cv_func_getipnodebyname" if test "x$ac_cv_func_getipnodebyname" = xyes then : printf "%s\n" "#define HAVE_GETIPNODEBYNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getipnodebyaddr" "ac_cv_func_getipnodebyaddr" if test "x$ac_cv_func_getipnodebyaddr" = xyes then : printf "%s\n" "#define HAVE_GETIPNODEBYADDR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethostbyname2" "ac_cv_func_gethostbyname2" if test "x$ac_cv_func_gethostbyname2" = xyes then : printf "%s\n" "#define HAVE_GETHOSTBYNAME2 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ieee_handler" "ac_cv_func_ieee_handler" if test "x$ac_cv_func_ieee_handler" = xyes then : printf "%s\n" "#define HAVE_IEEE_HANDLER 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fpsetmask" "ac_cv_func_fpsetmask" if test "x$ac_cv_func_fpsetmask" = xyes then : printf "%s\n" "#define HAVE_FPSETMASK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "finite" "ac_cv_func_finite" if test "x$ac_cv_func_finite" = xyes then : printf "%s\n" "#define HAVE_FINITE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan" if test "x$ac_cv_func_isnan" = xyes then : printf "%s\n" "#define HAVE_ISNAN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "isinf" "ac_cv_func_isinf" if test "x$ac_cv_func_isinf" = xyes then : printf "%s\n" "#define HAVE_ISINF 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "res_gethostbyname" "ac_cv_func_res_gethostbyname" if test "x$ac_cv_func_res_gethostbyname" = xyes then : printf "%s\n" "#define HAVE_RES_GETHOSTBYNAME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes then : printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "dlvsym" "ac_cv_func_dlvsym" if test "x$ac_cv_func_dlvsym" = xyes then : printf "%s\n" "#define HAVE_DLVSYM 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "pread" "ac_cv_func_pread" if test "x$ac_cv_func_pread" = xyes then : printf "%s\n" "#define HAVE_PREAD 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "pwrite" "ac_cv_func_pwrite" if test "x$ac_cv_func_pwrite" = xyes then : printf "%s\n" "#define HAVE_PWRITE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes then : printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes then : printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" if test "x$ac_cv_func_strerror_r" = xyes then : printf "%s\n" "#define HAVE_STRERROR_R 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp" if test "x$ac_cv_func_strncasecmp" = xyes then : printf "%s\n" "#define HAVE_STRNCASECMP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "localtime_r" "ac_cv_func_localtime_r" if test "x$ac_cv_func_localtime_r" = xyes then : printf "%s\n" "#define HAVE_LOCALTIME_R 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gmtime_r" "ac_cv_func_gmtime_r" if test "x$ac_cv_func_gmtime_r" = xyes then : printf "%s\n" "#define HAVE_GMTIME_R 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mprotect" "ac_cv_func_mprotect" if test "x$ac_cv_func_mprotect" = xyes then : printf "%s\n" "#define HAVE_MPROTECT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "madvise" "ac_cv_func_madvise" if test "x$ac_cv_func_madvise" = xyes then : printf "%s\n" "#define HAVE_MADVISE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "posix_madvise" "ac_cv_func_posix_madvise" if test "x$ac_cv_func_posix_madvise" = xyes then : printf "%s\n" "#define HAVE_POSIX_MADVISE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" if test "x$ac_cv_func_mmap" = xyes then : printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap" if test "x$ac_cv_func_mremap" = xyes then : printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memcpy" "ac_cv_func_memcpy" if test "x$ac_cv_func_memcpy" = xyes then : printf "%s\n" "#define HAVE_MEMCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" if test "x$ac_cv_func_memrchr" = xyes then : printf "%s\n" "#define HAVE_MEMRCHR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mallopt" "ac_cv_func_mallopt" if test "x$ac_cv_func_mallopt" = xyes then : printf "%s\n" "#define HAVE_MALLOPT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "sbrk" "ac_cv_func_sbrk" if test "x$ac_cv_func_sbrk" = xyes then : printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "_sbrk" "ac_cv_func__sbrk" if test "x$ac_cv_func__sbrk" = xyes then : printf "%s\n" "#define HAVE__SBRK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "__sbrk" "ac_cv_func___sbrk" if test "x$ac_cv_func___sbrk" = xyes then : printf "%s\n" "#define HAVE___SBRK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "brk" "ac_cv_func_brk" if test "x$ac_cv_func_brk" = xyes then : printf "%s\n" "#define HAVE_BRK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "_brk" "ac_cv_func__brk" if test "x$ac_cv_func__brk" = xyes then : printf "%s\n" "#define HAVE__BRK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "__brk" "ac_cv_func___brk" if test "x$ac_cv_func___brk" = xyes then : printf "%s\n" "#define HAVE___BRK 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "flockfile" "ac_cv_func_flockfile" if test "x$ac_cv_func_flockfile" = xyes then : printf "%s\n" "#define HAVE_FLOCKFILE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "fstat" "ac_cv_func_fstat" if test "x$ac_cv_func_fstat" = xyes then : printf "%s\n" "#define HAVE_FSTAT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" if test "x$ac_cv_func_strlcpy" = xyes then : printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" if test "x$ac_cv_func_strlcat" = xyes then : printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setsid" "ac_cv_func_setsid" if test "x$ac_cv_func_setsid" = xyes then : printf "%s\n" "#define HAVE_SETSID 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "posix2time" "ac_cv_func_posix2time" if test "x$ac_cv_func_posix2time" = xyes then : printf "%s\n" "#define HAVE_POSIX2TIME 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "time2posix" "ac_cv_func_time2posix" if test "x$ac_cv_func_time2posix" = xyes then : printf "%s\n" "#define HAVE_TIME2POSIX 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" if test "x$ac_cv_func_setlocale" = xyes then : printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" if test "x$ac_cv_func_nl_langinfo" = xyes then : printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" if test "x$ac_cv_func_poll" = xyes then : printf "%s\n" "#define HAVE_POLL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "mlockall" "ac_cv_func_mlockall" if test "x$ac_cv_func_mlockall" = xyes then : printf "%s\n" "#define HAVE_MLOCKALL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "ppoll" "ac_cv_func_ppoll" if test "x$ac_cv_func_ppoll" = xyes then : printf "%s\n" "#define HAVE_PPOLL 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog" if test "x$ac_cv_func_vsyslog" = xyes then : printf "%s\n" "#define HAVE_VSYSLOG 1" >>confdefs.h fi ## 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... { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_pton" >&5 printf %s "checking for inet_pton... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef WIN32 #include #else #include #endif int main (void) { inet_pton(2,"",(void*)0) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : have_inet_pton=yes else $as_nop have_inet_pton=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $have_inet_pton = yes; then printf "%s\n" "#define HAVE_INET_PTON 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for isfinite" >&5 printf %s "checking for isfinite... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { isfinite(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : have_isfinite=yes else $as_nop have_isfinite=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext if test $have_isfinite = yes; then printf "%s\n" "#define HAVE_ISFINITE 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 : { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$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 $as_nop 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 $as_nop have_posix_memalign=yes fi fi ;; esac if test "$have_posix_memalign" = "yes"; then printf "%s\n" "#define HAVE_POSIX_MEMALIGN 1" >>confdefs.h fi case $host_os in darwin10.8.0) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for writev" >&5 printf %s "checking for writev... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; *) ac_fn_c_check_func "$LINENO" "writev" "ac_cv_func_writev" if test "x$ac_cv_func_writev" = xyes then : printf "%s\n" "#define HAVE_WRITEV 1" >>confdefs.h fi ;; esac ac_fn_check_decl "$LINENO" "posix2time" "ac_cv_have_decl_posix2time" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_posix2time" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_POSIX2TIME $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "time2posix" "ac_cv_have_decl_time2posix" "#include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_time2posix" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_TIME2POSIX $ac_have_decl" >>confdefs.h ac_func= for ac_item in $ac_func_c_list do if test $ac_func; then ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then echo "#define $ac_item 1" >> confdefs.h fi ac_func= else ac_func=$ac_item fi done if test "x$ac_cv_func_vprintf" = xno then : ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes then : printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for conflicting declaration of fread" >&5 printf %s "checking for conflicting declaration of fread... " >&6; } if test ${ac_cv_func_decl_fread+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { 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 $as_nop eval "ac_cv_func_decl_fread=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi if eval "test \"`echo '$ac_cv_func_decl_'fread`\" = yes"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_CONFLICTING_FREAD_DECLARATION 1" >>confdefs.h else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for putc_unlocked" >&5 printf %s "checking for putc_unlocked... " >&6; } if test ${erts_cv_putc_unlocked+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { int res = putc_unlocked('x',stdout); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : erts_cv_putc_unlocked=yes else $as_nop erts_cv_putc_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_putc_unlocked" >&5 printf "%s\n" "$erts_cv_putc_unlocked" >&6; } if test $erts_cv_putc_unlocked = yes; then printf "%s\n" "#define HAVE_PUTC_UNLOCKED 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fwrite_unlocked" >&5 printf %s "checking for fwrite_unlocked... " >&6; } if test ${erts_cv_fwrite_unlocked+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { 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 $as_nop erts_cv_fwrite_unlocked=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_fwrite_unlocked" >&5 printf "%s\n" "$erts_cv_fwrite_unlocked" >&6; } if test $erts_cv_fwrite_unlocked = yes; then printf "%s\n" "#define HAVE_FWRITE_UNLOCKED 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "openpty" "ac_cv_func_openpty" if test "x$ac_cv_func_openpty" = xyes then : printf "%s\n" "#define HAVE_OPENPTY 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default" if test "x$ac_cv_header_net_if_dl_h" = xyes then : printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" if test "x$ac_cv_header_ifaddrs_h" = xyes then : printf "%s\n" "#define HAVE_IFADDRS_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default" if test "x$ac_cv_header_netpacket_packet_h" = xyes then : printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "$ac_includes_default" if test "x$ac_cv_header_sys_un_h" = xyes then : printf "%s\n" "#define HAVE_SYS_UN_H 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" if test "x$ac_cv_func_getifaddrs" = xyes then : printf "%s\n" "#define HAVE_GETIFADDRS 1" >>confdefs.h fi 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 : printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_UN_SUN_PATH 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether in6addr_any is declared" >&5 printf %s "checking whether in6addr_any is declared... " >&6; } if test ${erts_cv_have_in6addr_any+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main (void) { 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 $as_nop erts_cv_have_in6addr_any=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_in6addr_any" >&5 printf "%s\n" "$erts_cv_have_in6addr_any" >&6; } case "$erts_cv_have_in6addr_any" in yes) printf "%s\n" "#define HAVE_IN6ADDR_ANY 1" >>confdefs.h esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether in6addr_loopback is declared" >&5 printf %s "checking whether in6addr_loopback is declared... " >&6; } if test ${erts_cv_have_in6addr_loopback+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main (void) { 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 $as_nop erts_cv_have_in6addr_loopback=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_in6addr_loopback" >&5 printf "%s\n" "$erts_cv_have_in6addr_loopback" >&6; } case "$erts_cv_have_in6addr_loopback" in yes) printf "%s\n" "#define HAVE_IN6ADDR_LOOPBACK 1" >>confdefs.h esac ac_fn_check_decl "$LINENO" "IN6ADDR_ANY_INIT" "ac_cv_have_decl_IN6ADDR_ANY_INIT" " #include #include #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_IN6ADDR_ANY_INIT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_IN6ADDR_ANY_INIT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "IN6ADDR_LOOPBACK_INIT" "ac_cv_have_decl_IN6ADDR_LOOPBACK_INIT" " #include #include #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_IN6ADDR_LOOPBACK_INIT" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_IN6ADDR_LOOPBACK_INIT $ac_have_decl" >>confdefs.h ac_fn_check_decl "$LINENO" "IPV6_V6ONLY" "ac_cv_have_decl_IPV6_V6ONLY" " #include #include #include " "$ac_c_undeclared_builtin_options" "CFLAGS" if test "x$ac_cv_have_decl_IPV6_V6ONLY" = xyes then : ac_have_decl=1 else $as_nop ac_have_decl=0 fi printf "%s\n" "#define HAVE_DECL_IPV6_V6ONLY $ac_have_decl" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_getaffinity/sched_setaffinity" >&5 printf %s "checking for sched_getaffinity/sched_setaffinity... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #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 $as_nop sched_xetaffinity=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $sched_xetaffinity" >&5 printf "%s\n" "$sched_xetaffinity" >&6; } if test $sched_xetaffinity = yes; then printf "%s\n" "#define HAVE_SCHED_xETAFFINITY 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pset functionality" >&5 printf %s "checking for pset functionality... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { 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 $as_nop pset_functionality=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $pset_functionality" >&5 printf "%s\n" "$pset_functionality" >&6; } if test $pset_functionality = yes; then printf "%s\n" "#define HAVE_PSET 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for processor_bind functionality" >&5 printf %s "checking for processor_bind functionality... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main (void) { 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 $as_nop processor_bind_functionality=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $processor_bind_functionality" >&5 printf "%s\n" "$processor_bind_functionality" >&6; } if test $processor_bind_functionality = yes; then printf "%s\n" "#define HAVE_PROCESSOR_BIND 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cpuset_getaffinity/cpuset_setaffinity" >&5 printf %s "checking for cpuset_getaffinity/cpuset_setaffinity... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop cpuset_xetaffinity=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cpuset_xetaffinity" >&5 printf "%s\n" "$cpuset_xetaffinity" >&6; } if test $cpuset_xetaffinity = yes; then printf "%s\n" "#define HAVE_CPUSET_xETAFFINITY 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 'end' symbol" >&5 printf %s "checking for 'end' symbol... " >&6; } if test ${erts_cv_have_end_symbol+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { 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 $as_nop erts_cv_have_end_symbol=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have_end_symbol" >&5 printf "%s\n" "$erts_cv_have_end_symbol" >&6; } if test $erts_cv_have_end_symbol = yes; then printf "%s\n" "#define HAVE_END_SYMBOL 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for '_end' symbol" >&5 printf %s "checking for '_end' symbol... " >&6; } if test ${erts_cv_have__end_symbol+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { 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 $as_nop erts_cv_have__end_symbol=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_have__end_symbol" >&5 printf "%s\n" "$erts_cv_have__end_symbol" >&6; } if test $erts_cv_have__end_symbol = yes; then printf "%s\n" "#define HAVE__END_SYMBOL 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if __after_morecore_hook can track malloc()s core memory use" >&5 printf %s "checking if __after_morecore_hook can track malloc()s core memory use... " >&6; } if test ${erts_cv___after_morecore_hook_can_track_malloc+y} then : printf %s "(cached) " >&6 else $as_nop 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 $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv___after_morecore_hook_can_track_malloc" >&5 printf "%s\n" "$erts_cv___after_morecore_hook_can_track_malloc" >&6; } case $erts_cv___after_morecore_hook_can_track_malloc in yes) printf "%s\n" "#define ERTS___AFTER_MORECORE_HOOK_CAN_TRACK_MALLOC 1" >>confdefs.h ;; cross) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; *) ;; esac if test "x$ac_cv_func_sbrk" = "xyes" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of sbrk()s return value and argument" >&5 printf %s "checking types of sbrk()s return value and argument... " >&6; } if test ${erts_cv_sbrk_ret_arg_types+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { $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.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_sbrk_ret_arg_types" >&5 printf "%s\n" "$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 printf "%s\n" "#define SBRK_ARG_TYPE $arg_type" >>confdefs.h fi fi if test $ac_cv_func_brk = yes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking types of brk()s return value and argument" >&5 printf %s "checking types of brk()s return value and argument... " >&6; } if test ${erts_cv_brk_ret_arg_types+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { $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.beam \ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_brk_ret_arg_types" >&5 printf "%s\n" "$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 printf "%s\n" "#define BRK_ARG_TYPE $arg_type" >>confdefs.h fi fi if test $ac_cv_func_sbrk = yes then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if sbrk()/brk() wrappers can track malloc()s core memory use" >&5 printf %s "checking if sbrk()/brk() wrappers can track malloc()s core memory use... " >&6; } if test ${erts_cv_brk_wrappers_can_track_malloc+y} then : printf %s "(cached) " >&6 else $as_nop 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 $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erts_cv_brk_wrappers_can_track_malloc" >&5 printf "%s\n" "$erts_cv_brk_wrappers_can_track_malloc" >&6; } case $erts_cv_brk_wrappers_can_track_malloc in yes) printf "%s\n" "#define ERTS_BRK_WRAPPERS_CAN_TRACK_MALLOC 1" >>confdefs.h ;; cross) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; *) ;; esac fi LIBS=$saved_libs CPPFLAGS=$saved_cppflags case $ARCH in x86|amd64) printf "%s\n" "#define ERTS_STRUCTURE_ALIGNED_ALLOC 1" >>confdefs.h ;; *) ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for IP version 6 support" >&5 printf %s "checking for IP version 6 support... " >&6; } if test ${ac_cv_sys_ipv6_support+y} then : printf %s "(cached) " >&6 else $as_nop ok_so_far=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __WIN32__ #include #include #else #include #endif int main (void) { struct in6_addr a6; struct sockaddr_in6 s6; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ok_so_far=yes else $as_nop ok_so_far=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext if test $ok_so_far = yes then : ac_cv_sys_ipv6_support=yes else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __WIN32__ #include #include #else #include #endif int main (void) { 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 $as_nop ac_cv_sys_ipv6_support=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi case ${ac_cv_sys_ipv6_support} in yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } printf "%s\n" "#define HAVE_IN6 1" >>confdefs.h ;; in_addr6) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes (but I am redefining in_addr6 to in6_addr)" >&5 printf "%s\n" "yes (but I am redefining in_addr6 to in6_addr)" >&6; } printf "%s\n" "#define HAVE_IN6 1" >>confdefs.h printf "%s\n" "#define HAVE_IN_ADDR6_STRUCT /**/" >>confdefs.h ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multicast support" >&5 printf %s "checking for multicast support... " >&6; } if test ${ac_cv_sys_multicast_support+y} then : printf %s "(cached) " >&6 else $as_nop 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 $as_nop ac_cv_sys_multicast_support=no fi rm -rf conftest* fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_multicast_support" >&5 printf "%s\n" "$ac_cv_sys_multicast_support" >&6; } if test $ac_cv_sys_multicast_support = yes; then printf "%s\n" "#define HAVE_MULTICAST_SUPPORT 1" >>confdefs.h fi # Check whether --with-clock-resolution was given. if test ${with_clock_resolution+y} then : withval=$with_clock_resolution; fi # Check whether --with-clock-gettime-realtime-id was given. if test ${with_clock_gettime_realtime_id+y} then : withval=$with_clock_gettime_realtime_id; fi # Check whether --with-clock-gettime-monotonic-id was given. if test ${with_clock_gettime_monotonic_id+y} 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+y} 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 $as_nop 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+y} 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 $as_nop 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 : ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes then : printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h fi if test "$ac_cv_func_gettimeofday" = "yes"; then printf "%s\n" "#define OS_SYSTEM_TIME_GETTIMEOFDAY 1" >>confdefs.h else as_fn_error $? "No gettimeofday() available" "$LINENO" 5 fi else $as_nop # $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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if test ${erl_cv_clock_gettime_wall_high_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_wall_high_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_high_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_high_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_wall_high_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" = "no" then : ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes then : printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 printf %s "checking for mach clock_get_time() with wall clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_wall+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 printf "%s\n" "$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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if test ${erl_cv_clock_gettime_wall_low_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_wall_low_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_low_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_low_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_wall_low_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" = "no" then : ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes then : printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 printf %s "checking for mach clock_get_time() with wall clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_wall+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 printf "%s\n" "$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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if test ${erl_cv_clock_gettime_wall_default_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_wall_default_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_default_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_default_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_wall_default_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" = "no" then : ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes then : printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 printf %s "checking for mach clock_get_time() with wall clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_wall+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 printf "%s\n" "$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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}wall clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}wall clock type... " >&6; } if test ${erl_cv_clock_gettime_wall_custom_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_wall_custom_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_wall_custom_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_wall_custom_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_wall_custom_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" = "no" then : ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" if test "x$ac_cv_func_gettimeofday" = xyes then : printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with wall clock type" >&5 printf %s "checking for mach clock_get_time() with wall clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_wall+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_wall=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_wall" >&5 printf "%s\n" "$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) printf "%s\n" "#define OS_SYSTEM_TIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; clock_gettime) printf "%s\n" "#define OS_SYSTEM_TIME_USING_CLOCK_GETTIME 1" >>confdefs.h ;; gettimeofday) printf "%s\n" "#define OS_SYSTEM_TIME_GETTIMEOFDAY 1" >>confdefs.h ;; *) ;; esac if test "x$erl_wall_clock_id" != "x"; then printf "%s\n" "#define WALL_CLOCK_ID_STR \"$erl_wall_clock_id\"" >>confdefs.h printf "%s\n" "#define WALL_CLOCK_ID $erl_wall_clock_id" >>confdefs.h 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_MONOTONIC) case $host_os in darwin*) # CLOCK_MONOTONIC is buggy on MacOS (darwin), or at least on Big Sur # and Monterey, since it may step backwards. as_fn_error $? "Invalid clock_gettime() monotonic clock id: Refusing to use $with_clock_gettime_monotonic_id as monotonic clock id since it is buggy on MacOS" "$LINENO" 5;; *) ;; esac;; 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) : # CLOCK_MONOTONIC is buggy on MacOS (darwin), or at least on Big Sur # and Monterey, since it may step backwards. if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW";; *) 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";; esac else case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW" low_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW";; *) 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";; esac 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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 printf %s "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if test ${erl_cv_clock_gettime_monotonic_raw+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_raw" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if test ${erl_cv_clock_gettime_monotonic_high_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_high_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_high_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_high_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_high_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no" then : ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi else $as_nop ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 printf %s "checking for mach clock_get_time() with monotonic clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_monotonic+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 printf "%s\n" "$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) : # CLOCK_MONOTONIC is buggy on MacOS (darwin), or at least on Big Sur # and Monterey, since it may step backwards. if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW";; *) 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";; esac else case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW" low_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW";; *) 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";; esac 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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 printf %s "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if test ${erl_cv_clock_gettime_monotonic_raw+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_raw" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if test ${erl_cv_clock_gettime_monotonic_low_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_low_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_low_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_low_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_low_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no" then : ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi else $as_nop ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 printf %s "checking for mach clock_get_time() with monotonic clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_monotonic+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 printf "%s\n" "$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) : # CLOCK_MONOTONIC is buggy on MacOS (darwin), or at least on Big Sur # and Monterey, since it may step backwards. if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW";; *) 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";; esac else case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW" low_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW";; *) 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";; esac 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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 printf %s "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if test ${erl_cv_clock_gettime_monotonic_raw+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_raw" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if test ${erl_cv_clock_gettime_monotonic_default_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_default_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_default_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_default_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_default_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no" then : ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi else $as_nop ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 printf %s "checking for mach clock_get_time() with monotonic clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_monotonic+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 printf "%s\n" "$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 ;; #( *) : # CLOCK_MONOTONIC is buggy on MacOS (darwin), or at least on Big Sur # and Monterey, since it may step backwards. if test "$prefer_elapsed_monotonic_time_during_suspend" = "yes"; then case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW";; *) 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";; esac else case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW" low_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW";; *) 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";; esac 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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 printf %s "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if test ${erl_cv_clock_gettime_monotonic_raw+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_raw" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if test ${erl_cv_clock_gettime_monotonic_custom_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_custom_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_custom_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_custom_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_custom_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no" then : ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi else $as_nop ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 printf %s "checking for mach clock_get_time() with monotonic clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_monotonic+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 printf "%s\n" "$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) printf "%s\n" "#define OS_MONOTONIC_TIME_USING_TIMES 1" >>confdefs.h ;; mach_clock_get_time) printf "%s\n" "#define OS_MONOTONIC_TIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; clock_gettime) printf "%s\n" "#define OS_MONOTONIC_TIME_USING_CLOCK_GETTIME 1" >>confdefs.h ;; gethrtime) printf "%s\n" "#define OS_MONOTONIC_TIME_USING_GETHRTIME 1" >>confdefs.h ;; *) ;; esac if test $erl_corrected_monotonic_clock = yes; then printf "%s\n" "#define ERTS_HAVE_CORRECTED_OS_MONOTONIC_TIME 1" >>confdefs.h fi if test $erl_monotonic_clock_low_resolution = yes; then printf "%s\n" "#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 printf "%s\n" "#define MONOTONIC_CLOCK_ID_STR \"$erl_monotonic_clock_id\"" >>confdefs.h printf "%s\n" "#define MONOTONIC_CLOCK_ID $erl_monotonic_clock_id" >>confdefs.h fi if test $erl_cv_clock_gettime_monotonic_raw = yes; then printf "%s\n" "#define HAVE_CLOCK_GETTIME_MONOTONIC_RAW 1" >>confdefs.h fi # CLOCK_MONOTONIC is buggy on MacOS (darwin), or at least on Big Sur # and Monterey, since it may step backwards. if test "no" = "yes"; then case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW" low_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_MONOTONIC_RAW";; *) 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";; esac else case $host_os in darwin*) default_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW" low_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW_APPROX" high_resolution_clock_gettime_monotonic="CLOCK_UPTIME_RAW";; *) 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";; esac 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="" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5 printf %s "checking for clock_gettime in -lrt... " >&6; } if test ${ac_cv_lib_rt_clock_gettime+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char clock_gettime (); int main (void) { return clock_gettime (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_rt_clock_gettime=yes else $as_nop ac_cv_lib_rt_clock_gettime=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)" >&5 printf %s "checking for clock_gettime(CLOCK_MONOTONIC_RAW, _)... " >&6; } if test ${erl_cv_clock_gettime_monotonic_raw+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include $trust_test int main (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_raw=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_raw" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_raw" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_gettime() with ${check_msg}monotonic clock type" >&5 printf %s "checking for clock_gettime() with ${check_msg}monotonic clock type... " >&6; } if test ${erl_cv_clock_gettime_monotonic_high_resolution+y} then : printf %s "(cached) " >&6 else $as_nop 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 (void) { 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 $as_nop erl_cv_clock_gettime_monotonic_high_resolution=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext test $erl_cv_clock_gettime_monotonic_high_resolution = no || break done fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_clock_gettime_monotonic_high_resolution" >&5 printf "%s\n" "$erl_cv_clock_gettime_monotonic_high_resolution" >&6; } LIBS="$save_LIBS" if test "$LD_MAY_BE_WEAK" != "no" then : ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi else $as_nop ac_fn_c_check_func "$LINENO" "clock_getres" "ac_cv_func_clock_getres" if test "x$ac_cv_func_clock_getres" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GETRES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "clock_get_attributes" "ac_cv_func_clock_get_attributes" if test "x$ac_cv_func_clock_get_attributes" = xyes then : printf "%s\n" "#define HAVE_CLOCK_GET_ATTRIBUTES 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "gethrtime" "ac_cv_func_gethrtime" if test "x$ac_cv_func_gethrtime" = xyes then : printf "%s\n" "#define HAVE_GETHRTIME 1" >>confdefs.h fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for mach clock_get_time() with monotonic clock type" >&5 printf %s "checking for mach clock_get_time() with monotonic clock type... " >&6; } if test ${erl_cv_mach_clock_get_time_monotonic+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main (void) { 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 $as_nop erl_cv_mach_clock_get_time_monotonic=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_cv_mach_clock_get_time_monotonic" >&5 printf "%s\n" "$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 printf "%s\n" "#define SYS_HRTIME_USING_MACH_CLOCK_GET_TIME 1" >>confdefs.h ;; no-clock_gettime) monotonic_hrtime=yes printf "%s\n" "#define SYS_HRTIME_USING_CLOCK_GETTIME 1" >>confdefs.h ;; no-gethrtime) monotonic_hrtime=yes printf "%s\n" "#define SYS_HRTIME_USING_GETHRTIME 1" >>confdefs.h ;; *) monotonic_hrtime=no ;; esac if test $monotonic_hrtime = yes; then printf "%s\n" "#define HAVE_MONOTONIC_ERTS_SYS_HRTIME 1" >>confdefs.h fi if test "x$erl_monotonic_clock_id" != "x"; then printf "%s\n" "#define HRTIME_CLOCK_ID_STR \"$erl_monotonic_clock_id\"" >>confdefs.h printf "%s\n" "#define HRTIME_CLOCK_ID $erl_monotonic_clock_id" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if gethrvtime works and how to use it" >&5 printf %s "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 $as_nop 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 $as_nop 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 if test "$erl_gethrvtime" = "procfs_ioctl" then : printf "%s\n" "#define HAVE_GETHRVTIME_PROCFS_IOCTL 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: uses ioctl to procfs" >&5 printf "%s\n" "uses ioctl to procfs" >&6; } else $as_nop if test $erl_gethrvtime = cross; then erl_gethrvtime=false { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross" >&5 printf "%s\n" "cross" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result 'not working' guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result 'not working' guessed because of cross compilation" >&2;} else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not working" >&5 printf "%s\n" "not working" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if clock_gettime can be used to get thread CPU time" >&5 printf %s "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 $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $erl_clock_gettime_cpu_time" >&5 printf "%s\n" "$erl_clock_gettime_cpu_time" >&6; } case $erl_clock_gettime_cpu_time in yes) printf "%s\n" "#define HAVE_CLOCK_GETTIME_CPU_TIME /**/" >>confdefs.h LIBRT=-lrt ;; cross) erl_clock_gettime_cpu_time=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result no guessed because of cross compilation" >&2;} ;; *) ;; esac fi # Extract the first word of "m4", so it can be a program name with args. set dummy m4; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_M4+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $M4" >&5 printf "%s\n" "$M4" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi JIT_ARCH= if test ${enable_jit} != no then : case "$ARCH" in amd64) JIT_ARCH=x86 ;; arm64) case "$OPSYS" in win32|darwin) # These platforms have dedicated system calls for clearing # instruction cache, and don't require us to manually issue # instruction barriers on all threads. JIT_ARCH=arm ;; *) # We need to use `DC CVAU`, `IC IVAU`, and `ISB SY` to clear # instruction cache. These have already been tested as part of # ETHR_CHK_GCC_ATOMIC_OPS([]). if test "$ethr_arm_isb_sy_instr_val$ethr_arm_dc_cvau_instr_val$ethr_arm_ic_ivau_instr_val" = "111"; then JIT_ARCH=arm else enable_jit=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: JIT disabled due to lack of cache-clearing instructions" >&5 printf "%s\n" "$as_me: WARNING: JIT disabled due to lack of cache-clearing instructions" >&2;} fi ;; esac ;; *) if test ${enable_jit} = yes; then as_fn_error $? "JIT only works on x86 64-bit and ARM 64-bit" "$LINENO" 5 else enable_jit=no { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: JIT disabled due to lack to support on $ARCH-$OPSYS" >&5 printf "%s\n" "$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" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #if __cplusplus < 201703L #error "Needs C++17 compiler" #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++17 support" >&5 printf %s "checking for C++17 support... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } HAVE_CXX17=true else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++17 support" >&5 printf %s "checking for C++17 support... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } HAVE_CXX17=false fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 printf "%s\n" "$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. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for safe signal delivery" >&5 printf %s "checking for safe signal delivery... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #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 : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } enable_native_stack=yes else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, disabling native stack in JIT" >&5 printf "%s\n" "no, disabling native stack in JIT" >&6; } enable_native_stack=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; esac case "$JIT_ARCH" in x86) if test X${enable_native_stack} = Xyes; then printf "%s\n" "#define NATIVE_ERLANG_STACK /**/" >>confdefs.h fi ;; arm) # ARM JIT doesn't support native stack due to its 16-byte alignment # requirement. enable_native_stack=no ;; *) ;; esac fi case $OPSYS in linux*) if test X${enable_native_stack} = Xyes; then printf "%s\n" "#define ERLANG_FRAME_POINTERS /**/" >>confdefs.h fi printf "%s\n" "#define HAVE_LINUX_PERF_SUPPORT 1" >>confdefs.h ;; *) ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to redefine FD_SETSIZE" >&5 printf %s "checking whether to redefine FD_SETSIZE... " >&6; } case $host_os in bsdi*) printf "%s\n" "#define REDEFINE_FD_SETSIZE /**/" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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(). # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working poll()" >&5 printf %s "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 $as_nop 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 $as_nop 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 $as_nop 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). # printf "%s\n" "#define USE_SELECT 1" >>confdefs.h if test $poll_works = cross; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross" >&5 printf "%s\n" "cross" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result no guessed based on OS ($host_os) because of cross compilation" >&2;} else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; non-existing, broken, or based on select()" >&5 printf "%s\n" "no; non-existing, broken, or based on select()" >&6; } fi poll_works=no;; yes-*|cross-*) printf "%s\n" "#define ERTS_USE_POLL 1" >>confdefs.h if test $poll_works = cross; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cross" >&5 printf "%s\n" "cross" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result yes guessed based on OS ($host_os) because of cross compilation" >&2;} else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether host os has known kqueue bugs" >&5 printf %s "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].*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, disabling kernel poll" >&5 printf "%s\n" "yes, disabling kernel poll" >&6; } have_kernel_poll=no ;; *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } ;; esac fi # # If epoll() found, check that it is level triggered. # if test $have_kernel_poll = epoll then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether epoll is level triggered" >&5 printf %s "checking whether epoll is level triggered... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { #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 $as_nop level_triggered_epoll=no have_kernel_poll=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $level_triggered_epoll" >&5 printf "%s\n" "$level_triggered_epoll" >&6; } fi # # Check if we should enable kernel poll support # { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether kernel poll support should be enabled" >&5 printf %s "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-*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no; disabled by user" >&5 printf "%s\n" "no; disabled by user" >&6; };; yes-no) as_fn_error $? "no; kernel poll support requested but not found" "$LINENO" 5;; *-no) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; };; *) case $have_kernel_poll in epoll) printf "%s\n" "#define HAVE_SYS_EPOLL_H 1" >>confdefs.h ERTS_BUILD_FALLBACK_POLL=yes ;; /dev/poll) printf "%s\n" "#define HAVE_SYS_DEVPOLL_H 1" >>confdefs.h ;; kqueue) printf "%s\n" "#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 printf "%s\n" "#define ERTS_ENABLE_KERNEL_POLL 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes; $have_kernel_poll" >&5 printf "%s\n" "yes; $have_kernel_poll" >&6; };; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether putenv() stores a copy of the key-value pair" >&5 printf %s "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 $as_nop 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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $copying_putenv" >&5 printf "%s\n" "$copying_putenv" >&6; } case $copying_putenv in yes) printf "%s\n" "#define HAVE_COPYING_PUTENV 1" >>confdefs.h ;; cross) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: result no guessed because of cross compilation" >&5 printf "%s\n" "$as_me: WARNING: result no guessed because of cross compilation" >&2;};; *) ;; esac { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a compiler that handles jumptables" >&5 printf %s "checking for a compiler that handles jumptables... " >&6; } if test ${ac_cv_prog_emu_cc+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #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 $as_nop ac_cv_prog_emu_cc=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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 (void) { #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 $as_nop ac_cv_prog_emu_cc=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CC=$save_CC CFLAGS=$save_CFLAGS CPPFLAGS=$save_CPPFLAGS fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_emu_cc" >&5 printf "%s\n" "$ac_cv_prog_emu_cc" >&6; } if test "$ac_cv_prog_emu_cc" = no; then printf "%s\n" "#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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_DTRACE+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5 printf "%s\n" "$DTRACE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_DTRACE+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DTRACE" >&5 printf "%s\n" "$ac_ct_DTRACE" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_DTRACE" = x; then DTRACE="none" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$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 : ac_fn_c_check_header_compile "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sdt_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SDT_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 1-stage DTrace precompilation" >&5 printf %s "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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 2-stage DTrace precompilation" >&5 printf %s "checking for 2-stage DTrace precompilation... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "foo-dtrace.h" int main (void) { 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.beam conftest.$ac_ext rm -f foo-dtrace.h if test "x$DTRACE_ENABLED_2STEP" = "xyes" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "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_nop as_fn_error $? "Dtrace preprocessing test failed." "$LINENO" 5 fi fi if test "$enable_lttng_test" = "yes" then : ac_fn_c_check_header_compile "$LINENO" "lttng/tracepoint.h" "ac_cv_header_lttng_tracepoint_h" "$ac_includes_default" if test "x$ac_cv_header_lttng_tracepoint_h" = xyes then : printf "%s\n" "#define HAVE_LTTNG_TRACEPOINT_H 1" >>confdefs.h fi ac_fn_c_check_header_compile "$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 : printf "%s\n" "#define HAVE_LTTNG_TRACEPOINT_EVENT_H 1" >>confdefs.h fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tracepoint_enabled in lttng/tracepoint.h" >&5 printf %s "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 (void) { if(tracepoint_enabled(org_erlang_otp,dummy)) do {} while(0) ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else $as_nop as_fn_error $? "no (available in lttng-ust v2.7)" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.beam 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. #-------------------------------------------------------------------- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kstat_open in -lkstat" >&5 printf %s "checking for kstat_open in -lkstat... " >&6; } if test ${ac_cv_lib_kstat_kstat_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char kstat_open (); int main (void) { return kstat_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_kstat_kstat_open=yes else $as_nop ac_cv_lib_kstat_kstat_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_kstat_open" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for kvm_open in -lkvm" >&5 printf %s "checking for kvm_open in -lkvm... " >&6; } if test ${ac_cv_lib_kvm_kvm_open+y} then : printf %s "(cached) " >&6 else $as_nop 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. */ char kvm_open (); int main (void) { return kvm_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO" then : ac_cv_lib_kvm_kvm_open=yes else $as_nop ac_cv_lib_kvm_kvm_open=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kvm_kvm_open" >&5 printf "%s\n" "$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+y} 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_JAVAC+y} then : printf %s "(cached) " >&6 else $as_nop 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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" printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5 printf "%s\n" "$JAVAC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$JAVAC" && break done if test -n "$JAVAC" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for JDK version 1.6" >&5 printf %s "checking for JDK version 1.6... " >&6; } if test ${ac_cv_prog_javac_ver_1_6+y} then : printf %s "(cached) " >&6 else $as_nop java_link='$JAVAC conftest.java 1>&5' cat > conftest.java <&5 (eval $java_link) 2>&5 ac_status=$? printf "%s\n" "$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 $as_nop 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_javac_ver_1_6" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not find any usable java compiler, will skip: jinterface" >&5 printf "%s\n" "$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 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 printf "%s\n" "#define ERTS_EMU_CMDLINE_FLAGS \"$STATIC_CFLAGS $CFLAGS $DEBUG_CFLAGS $EMU_THR_DEFS $DEFS $WERRORFLAGS $WFLAGS\"" >>confdefs.h ac_fn_c_check_func "$LINENO" "log2" "ac_cv_func_log2" if test "x$ac_cv_func_log2" = xyes then : printf "%s\n" "#define HAVE_LOG2 1" >>confdefs.h fi saved_CFLAGS="$CFLAGS" CFLAGS="-Werror $CFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { _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 : printf "%s\n" "#define HAVE_GCC_DIAG_IGNORE_WADDRESS_OF_PACKED_MEMBER 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS="$saved_CFLAGS" if test "x$GCC" = xyes; then CFLAGS="$WERRORFLAGS $CFLAGS" fi # Check whether --enable-deterministic-build was given. if test ${enable_deterministic_build+y} then : enableval=$enable_deterministic_build; case "$enableval" in no) ERL_DETERMINISTIC=no ;; *) ERL_DETERMINISTIC=yes ;; esac else $as_nop ERL_DETERMINISTIC=no fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking CFLAGS for -O switch" >&5 printf %s "checking CFLAGS for -O switch... " >&6; } no_opt_CFLAGS=$(echo " $CFLAGS" | sed 's/ -O[^ ]*/ /g') if test "X $CFLAGS" = "X$no_opt_CFLAGS"; then 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 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } DEBUG_CFLAGS="-g -O0 $no_opt_CFLAGS" 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" 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_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$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+y} || &/ 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$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=`printf "%s\n" "$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" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$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 as_nop=: if test ${ZSH_VERSION+y} && (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 $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; 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 # 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 case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac 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 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # 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 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$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_nop 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_nop 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 || printf "%s\n" 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 # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. 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 # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' 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=`printf "%s\n" "$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 || printf "%s\n" 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.71. 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 ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 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 ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$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=`printf "%s\n" "$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 ) printf "%s\n" "$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 \printf "%s\n" "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 printf "%s\n" "$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" ;; "../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+y} || CONFIG_FILES=$config_files test ${CONFIG_HEADERS+y} || 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=`printf "%s\n" "$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 '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$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 || printf "%s\n" 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=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$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@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$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"; } && { printf "%s\n" "$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 printf "%s\n" "$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 { printf "%s\n" "/* $configure_input */" >&1 \ && 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 printf "%s\n" "$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 printf "%s\n" "/* $configure_input */" >&1 \ && 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 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi