From de564ccbde7aadaf63cea44def391166f9ae0c8a Mon Sep 17 00:00:00 2001 From: Jay D Dee Date: Thu, 6 Apr 2023 13:38:37 -0400 Subject: [PATCH] v3.22.2 --- Makefile.am | 2 + RELEASE_NOTES | 10 + aclocal.m4 | 83 +- algo-gate-api.c | 2 + algo/luffa/luffa-hash-2way.c | 49 +- algo/lyra2/lyra2rev2-4way.c | 2 +- algo/sha/sha256dt.c | 268 +++ algo/sha/sha512256d-4way.c | 221 ++ configure | 4355 ++++++++++++++-------------------- configure.ac | 2 +- cpu-miner.c | 54 +- miner.h | 17 +- simd-utils/intrlv.h | 509 +--- simd-utils/simd-128.h | 76 +- simd-utils/simd-256.h | 71 +- simd-utils/simd-512.h | 121 +- simd-utils/simd-int.h | 7 + util.c | 59 +- 18 files changed, 2634 insertions(+), 3274 deletions(-) create mode 100644 algo/sha/sha256dt.c create mode 100644 algo/sha/sha512256d-4way.c diff --git a/Makefile.am b/Makefile.am index eb41711..c7a051f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -175,6 +175,8 @@ cpuminer_SOURCES = \ algo/sha/sha256t.c \ algo/sha/sha256q-4way.c \ algo/sha/sha256q.c \ + algo/sha/sha512256d-4way.c \ + algo/sha/sha256dt.c \ algo/shabal/sph_shabal.c \ algo/shabal/shabal-hash-4way.c \ algo/shavite/sph_shavite.c \ diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 7455d45..ea93451 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -65,6 +65,16 @@ If not what makes it happen or not happen? Change Log ---------- +v3.22.2 + +Added sha512256d & sha256dt algos. +Fixed intermittant invalid shares lyra2v2 AVX512. +Removed application limits on the number of CPUs and threads, HW and OS limits still apply. +Added a log warning if more threads are defined than active CPUs in affinity mask. +Improved merkle tree memory management for stratum. +Added transaction count to New Work log. +Other small improvements. + v3.22.1 #393 fixed segfault in GBT, regression from v3.22.0. diff --git a/aclocal.m4 b/aclocal.m4 index 0fdbb06..fa903ea 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.16.5 -*- Autoconf -*- +# generated automatically by aclocal 1.16.1 -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,13 +14,13 @@ m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, -[m4_warning([this file was generated for autoconf 2.71. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) -# Copyright (C) 2002-2021 Free Software Foundation, Inc. +# Copyright (C) 2002-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -35,7 +35,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.16.5], [], +m4_if([$1], [1.16.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -51,14 +51,14 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.16.5])dnl +[AM_AUTOMAKE_VERSION([1.16.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Figure out how to run the assembler. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -78,7 +78,7 @@ _AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -130,7 +130,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -161,7 +161,7 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -352,7 +352,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -391,9 +391,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE="gmake" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi @@ -420,7 +418,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -448,10 +446,6 @@ m4_defn([AC_PROG_CC]) # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl -m4_ifdef([_$0_ALREADY_INIT], - [m4_fatal([$0 expanded multiple times -]m4_defn([_$0_ALREADY_INIT]))], - [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -488,7 +482,7 @@ m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( - m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl @@ -540,20 +534,6 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi -AC_SUBST([CTAGS]) -if test -z "$ETAGS"; then - ETAGS=etags -fi -AC_SUBST([ETAGS]) -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi -AC_SUBST([CSCOPE]) - AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This @@ -635,7 +615,7 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -656,7 +636,7 @@ if test x"${install_sh+set}" != xset; then fi AC_SUBST([install_sh])]) -# Copyright (C) 2003-2021 Free Software Foundation, Inc. +# Copyright (C) 2003-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -678,7 +658,7 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -713,7 +693,7 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -756,7 +736,7 @@ AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# Copyright (C) 1997-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -777,7 +757,12 @@ AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then @@ -790,7 +775,7 @@ fi # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -819,7 +804,7 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2021 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -866,7 +851,7 @@ AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -885,7 +870,7 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996-2021 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -966,7 +951,7 @@ AC_CONFIG_COMMANDS_PRE( rm -f conftest.file ]) -# Copyright (C) 2009-2021 Free Software Foundation, Inc. +# Copyright (C) 2009-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1026,7 +1011,7 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001-2021 Free Software Foundation, Inc. +# Copyright (C) 2001-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1054,7 +1039,7 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006-2021 Free Software Foundation, Inc. +# Copyright (C) 2006-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1073,7 +1058,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004-2021 Free Software Foundation, Inc. +# Copyright (C) 2004-2018 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, diff --git a/algo-gate-api.c b/algo-gate-api.c index 80584a4..73d6c0f 100644 --- a/algo-gate-api.c +++ b/algo-gate-api.c @@ -337,9 +337,11 @@ bool register_algo_gate( int algo, algo_gate_t *gate ) case ALGO_QUBIT: rc = register_qubit_algo ( gate ); break; case ALGO_SCRYPT: rc = register_scrypt_algo ( gate ); break; case ALGO_SHA256D: rc = register_sha256d_algo ( gate ); break; + case ALGO_SHA256DT: rc = register_sha256dt_algo ( gate ); break; case ALGO_SHA256Q: rc = register_sha256q_algo ( gate ); break; case ALGO_SHA256T: rc = register_sha256t_algo ( gate ); break; case ALGO_SHA3D: rc = register_sha3d_algo ( gate ); break; + case ALGO_SHA512256D: rc = register_sha512256d_algo ( gate ); break; case ALGO_SHAVITE3: rc = register_shavite_algo ( gate ); break; case ALGO_SKEIN: rc = register_skein_algo ( gate ); break; case ALGO_SKEIN2: rc = register_skein2_algo ( gate ); break; diff --git a/algo/luffa/luffa-hash-2way.c b/algo/luffa/luffa-hash-2way.c index bd12e97..a40dddd 100644 --- a/algo/luffa/luffa-hash-2way.c +++ b/algo/luffa/luffa-hash-2way.c @@ -554,20 +554,10 @@ int luffa_4way_update_close( luffa_4way_context *state, a = _mm256_xor_si256( a, c0 ); \ b = _mm256_xor_si256( b, c1 ); -/* -#define MULT2( a0, a1, mask ) \ -do { \ - __m256i b = _mm256_xor_si256( a0, \ - _mm256_shuffle_epi32( _mm256_and_si256(a1,mask), 16 ) ); \ - a0 = _mm256_or_si256( _mm256_srli_si256(b,4), _mm256_slli_si256(a1,12) ); \ - a1 = _mm256_or_si256( _mm256_srli_si256(a1,4), _mm256_slli_si256(b,12) ); \ -} while(0) -*/ - -#define MULT2( a0, a1, mask ) \ +#define MULT2( a0, a1 ) \ { \ - __m256i b = _mm256_xor_si256( a0, \ - _mm256_shuffle_epi32( _mm256_and_si256( a1, mask ), 16 ) ); \ + __m256i b = _mm256_xor_si256( a0, _mm256_shuffle_epi32( \ + _mm256_blend_epi32( a1, m256_zero, 0xee ), 16 ) ); \ a0 = _mm256_alignr_epi8( a1, b, 4 ); \ a1 = _mm256_alignr_epi8( b, a1, 4 ); \ } @@ -682,7 +672,6 @@ void rnd512_2way( luffa_2way_context *state, __m256i *msg ) __m256i *chainv = state->chainv; __m256i msg0, msg1; __m256i x0, x1, x2, x3, x4, x5, x6, x7; - const __m256i MASK = m256_const1_i128( 0xffffffff ); t0 = chainv[0]; t1 = chainv[1]; @@ -696,7 +685,7 @@ void rnd512_2way( luffa_2way_context *state, __m256i *msg ) t0 = _mm256_xor_si256( t0, chainv[8] ); t1 = _mm256_xor_si256( t1, chainv[9] ); - MULT2( t0, t1, MASK ); + MULT2( t0, t1 ); msg0 = _mm256_shuffle_epi32( msg[0], 27 ); msg1 = _mm256_shuffle_epi32( msg[1], 27 ); @@ -715,66 +704,66 @@ void rnd512_2way( luffa_2way_context *state, __m256i *msg ) t0 = chainv[0]; t1 = chainv[1]; - MULT2( chainv[0], chainv[1], MASK ); + MULT2( chainv[0], chainv[1] ); chainv[0] = _mm256_xor_si256( chainv[0], chainv[2] ); chainv[1] = _mm256_xor_si256( chainv[1], chainv[3] ); - MULT2( chainv[2], chainv[3], MASK ); + MULT2( chainv[2], chainv[3] ); chainv[2] = _mm256_xor_si256(chainv[2], chainv[4]); chainv[3] = _mm256_xor_si256(chainv[3], chainv[5]); - MULT2( chainv[4], chainv[5], MASK ); + MULT2( chainv[4], chainv[5] ); chainv[4] = _mm256_xor_si256(chainv[4], chainv[6]); chainv[5] = _mm256_xor_si256(chainv[5], chainv[7]); - MULT2( chainv[6], chainv[7], MASK ); + MULT2( chainv[6], chainv[7] ); chainv[6] = _mm256_xor_si256(chainv[6], chainv[8]); chainv[7] = _mm256_xor_si256(chainv[7], chainv[9]); - MULT2( chainv[8], chainv[9], MASK ); + MULT2( chainv[8], chainv[9] ); chainv[8] = _mm256_xor_si256( chainv[8], t0 ); chainv[9] = _mm256_xor_si256( chainv[9], t1 ); t0 = chainv[8]; t1 = chainv[9]; - MULT2( chainv[8], chainv[9], MASK ); + MULT2( chainv[8], chainv[9] ); chainv[8] = _mm256_xor_si256( chainv[8], chainv[6] ); chainv[9] = _mm256_xor_si256( chainv[9], chainv[7] ); - MULT2( chainv[6], chainv[7], MASK ); + MULT2( chainv[6], chainv[7] ); chainv[6] = _mm256_xor_si256( chainv[6], chainv[4] ); chainv[7] = _mm256_xor_si256( chainv[7], chainv[5] ); - MULT2( chainv[4], chainv[5], MASK ); + MULT2( chainv[4], chainv[5] ); chainv[4] = _mm256_xor_si256( chainv[4], chainv[2] ); chainv[5] = _mm256_xor_si256( chainv[5], chainv[3] ); - MULT2( chainv[2], chainv[3], MASK ); + MULT2( chainv[2], chainv[3] ); chainv[2] = _mm256_xor_si256( chainv[2], chainv[0] ); chainv[3] = _mm256_xor_si256( chainv[3], chainv[1] ); - MULT2( chainv[0], chainv[1], MASK ); + MULT2( chainv[0], chainv[1] ); chainv[0] = _mm256_xor_si256( _mm256_xor_si256( chainv[0], t0 ), msg0 ); chainv[1] = _mm256_xor_si256( _mm256_xor_si256( chainv[1], t1 ), msg1 ); - MULT2( msg0, msg1, MASK ); + MULT2( msg0, msg1 ); chainv[2] = _mm256_xor_si256( chainv[2], msg0 ); chainv[3] = _mm256_xor_si256( chainv[3], msg1 ); - MULT2( msg0, msg1, MASK ); + MULT2( msg0, msg1 ); chainv[4] = _mm256_xor_si256( chainv[4], msg0 ); chainv[5] = _mm256_xor_si256( chainv[5], msg1 ); - MULT2( msg0, msg1, MASK ); + MULT2( msg0, msg1 ); chainv[6] = _mm256_xor_si256( chainv[6], msg0 ); chainv[7] = _mm256_xor_si256( chainv[7], msg1 ); - MULT2( msg0, msg1, MASK ); + MULT2( msg0, msg1 ); chainv[8] = _mm256_xor_si256( chainv[8], msg0 ); chainv[9] = _mm256_xor_si256( chainv[9], msg1 ); - MULT2( msg0, msg1, MASK ); + MULT2( msg0, msg1 ); chainv[3] = mm256_rol_32( chainv[3], 1 ); chainv[5] = mm256_rol_32( chainv[5], 2 ); diff --git a/algo/lyra2/lyra2rev2-4way.c b/algo/lyra2/lyra2rev2-4way.c index 0211a98..9d6a009 100644 --- a/algo/lyra2/lyra2rev2-4way.c +++ b/algo/lyra2/lyra2rev2-4way.c @@ -75,7 +75,7 @@ void lyra2rev2_16way_hash( void *state, const void *input ) keccak256_8way_close( &ctx.keccak, vhash ); dintrlv_8x64( hash8, hash9, hash10, hash11, - hash12, hash13, hash14, hash5, vhash, 256 ); + hash12, hash13, hash14, hash15, vhash, 256 ); cubehash_full( &ctx.cube, (byte*) hash0, 256, (const byte*) hash0, 32 ); cubehash_full( &ctx.cube, (byte*) hash1, 256, (const byte*) hash1, 32 ); diff --git a/algo/sha/sha256dt.c b/algo/sha/sha256dt.c new file mode 100644 index 0000000..45860a0 --- /dev/null +++ b/algo/sha/sha256dt.c @@ -0,0 +1,268 @@ +#include "algo-gate-api.h" +#include +#include +#include +#include +#include "sha-hash-4way.h" + +#if defined(__AVX512F__) && defined(__AVX512VL__) && defined(__AVX512DQ__) && defined(__AVX512BW__) + #define SHA256DT_16WAY 1 +#elif defined(__AVX2__) + #define SHA256DT_8WAY 1 +#else + #define SHA256DT_4WAY 1 +#endif + +#if defined(SHA256DT_16WAY) + +int scanhash_sha256dt_16way( struct work *work, const uint32_t max_nonce, + uint64_t *hashes_done, struct thr_info *mythr ) +{ + __m512i vdata[32] __attribute__ ((aligned (128))); + __m512i block[16] __attribute__ ((aligned (64))); + __m512i hash32[8] __attribute__ ((aligned (64))); + __m512i initstate[8] __attribute__ ((aligned (64))); + __m512i midstate1[8] __attribute__ ((aligned (64))); + __m512i midstate2[8] __attribute__ ((aligned (64))); + __m512i mexp_pre[16] __attribute__ ((aligned (64))); + uint32_t lane_hash[8] __attribute__ ((aligned (64))); + uint32_t *hash32_d7 = (uint32_t*)&( hash32[7] ); + uint32_t *pdata = work->data; + const uint32_t *ptarget = work->target; + const uint32_t targ32_d7 = ptarget[7]; + const uint32_t first_nonce = pdata[19]; + const uint32_t last_nonce = max_nonce - 16; + uint32_t n = first_nonce; + __m512i *noncev = vdata + 19; + const int thr_id = mythr->id; + const bool bench = opt_benchmark; + const __m512i last_byte = m512_const1_32( 0x80000000 ); + const __m512i sixteen = m512_const1_32( 16 ); + + for ( int i = 0; i < 19; i++ ) + vdata[i] = mm512_bcast_i32( pdata[i] ); + + *noncev = _mm512_set_epi32( n+15, n+14, n+13, n+12, n+11, n+10, n+9, n+8, + n+ 7, n+ 6, n+ 5, n+ 4, n+ 3, n+ 2, n+1, n ); + + vdata[16+4] = last_byte; + memset_zero_512( vdata+16 + 5, 10 ); + vdata[16+15] = mm512_bcast_i32( 0x480 ); + + block[ 8] = last_byte; + memset_zero_512( block + 9, 6 ); + block[15] = mm512_bcast_i32( 0x300 ); + + initstate[0] = mm512_bcast_i64( 0xdfa9bf2cdfa9bf2c ); + initstate[1] = mm512_bcast_i64( 0xb72074d4b72074d4 ); + initstate[2] = mm512_bcast_i64( 0x6bb011226bb01122 ); + initstate[3] = mm512_bcast_i64( 0xd338e869d338e869 ); + initstate[4] = mm512_bcast_i64( 0xaa3ff126aa3ff126 ); + initstate[5] = mm512_bcast_i64( 0x475bbf30475bbf30 ); + initstate[6] = mm512_bcast_i64( 0x8fd52e5b8fd52e5b ); + initstate[7] = mm512_bcast_i64( 0x9f75c9ad9f75c9ad ); + + sha256_16way_transform_le( midstate1, vdata, initstate ); + + // Do 3 rounds on the first 12 bytes of the next block + sha256_16way_prehash_3rounds( midstate2, mexp_pre, vdata+16, midstate1 ); + + do + { + sha256_16way_final_rounds( block, vdata+16, midstate1, midstate2, + mexp_pre ); + sha256_16way_transform_le( hash32, block, initstate ); + mm512_block_bswap_32( hash32, hash32 ); + + for ( int lane = 0; lane < 16; lane++ ) + if ( hash32_d7[ lane ] <= targ32_d7 ) + { + extr_lane_16x32( lane_hash, hash32, lane, 256 ); + if ( likely( valid_hash( lane_hash, ptarget ) && !bench ) ) + { + pdata[19] = n + lane; + submit_solution( work, lane_hash, mythr ); + } + } + *noncev = _mm512_add_epi32( *noncev, sixteen ); + n += 16; + } while ( (n < last_nonce) && !work_restart[thr_id].restart ); + pdata[19] = n; + *hashes_done = n - first_nonce; + return 0; +} + + +#endif + +#if defined(SHA256DT_8WAY) + +int scanhash_sha256dt_8way( struct work *work, const uint32_t max_nonce, + uint64_t *hashes_done, struct thr_info *mythr ) +{ + __m256i vdata[32] __attribute__ ((aligned (64))); + __m256i block[16] __attribute__ ((aligned (32))); + __m256i hash32[8] __attribute__ ((aligned (32))); + __m256i initstate[8] __attribute__ ((aligned (32))); + __m256i midstate1[8] __attribute__ ((aligned (32))); + __m256i midstate2[8] __attribute__ ((aligned (32))); + __m256i mexp_pre[16] __attribute__ ((aligned (32))); + uint32_t lane_hash[8] __attribute__ ((aligned (32))); + uint32_t *hash32_d7 = (uint32_t*)&( hash32[7] ); + uint32_t *pdata = work->data; + const uint32_t *ptarget = work->target; + const uint32_t targ32_d7 = ptarget[7]; + const uint32_t first_nonce = pdata[19]; + const uint32_t last_nonce = max_nonce - 8; + uint32_t n = first_nonce; + __m256i *noncev = vdata + 19; + const int thr_id = mythr->id; + const bool bench = opt_benchmark; + const __m256i last_byte = m256_const1_32( 0x80000000 ); + const __m256i eight = m256_const1_32( 8 ); + + for ( int i = 0; i < 19; i++ ) + vdata[i] = mm256_bcast_i32( pdata[i] ); + + *noncev = _mm256_set_epi32( n+ 7, n+ 6, n+ 5, n+ 4, n+ 3, n+ 2, n+1, n ); + + vdata[16+4] = last_byte; + memset_zero_256( vdata+16 + 5, 10 ); + vdata[16+15] = mm256_bcast_i32( 0x480 ); + + block[ 8] = last_byte; + memset_zero_256( block + 9, 6 ); + block[15] = mm256_bcast_i32( 0x300 ); + + // initialize state + initstate[0] = mm256_bcast_i64( 0xdfa9bf2cdfa9bf2c ); + initstate[1] = mm256_bcast_i64( 0xb72074d4b72074d4 ); + initstate[2] = mm256_bcast_i64( 0x6bb011226bb01122 ); + initstate[3] = mm256_bcast_i64( 0xd338e869d338e869 ); + initstate[4] = mm256_bcast_i64( 0xaa3ff126aa3ff126 ); + initstate[5] = mm256_bcast_i64( 0x475bbf30475bbf30 ); + initstate[6] = mm256_bcast_i64( 0x8fd52e5b8fd52e5b ); + initstate[7] = mm256_bcast_i64( 0x9f75c9ad9f75c9ad ); + + sha256_8way_transform_le( midstate1, vdata, initstate ); + + // Do 3 rounds on the first 12 bytes of the next block + sha256_8way_prehash_3rounds( midstate2, mexp_pre, vdata + 16, midstate1 ); + + do + { + sha256_8way_final_rounds( block, vdata+16, midstate1, midstate2, + mexp_pre ); + sha256_8way_transform_le( hash32, block, initstate ); + mm256_block_bswap_32( hash32, hash32 ); + + for ( int lane = 0; lane < 8; lane++ ) + if ( hash32_d7[ lane ] <= targ32_d7 ) + { + extr_lane_8x32( lane_hash, hash32, lane, 256 ); + if ( likely( valid_hash( lane_hash, ptarget ) && !bench ) ) + { + pdata[19] = n + lane; + submit_solution( work, lane_hash, mythr ); + } + } + *noncev = _mm256_add_epi32( *noncev, eight ); + n += 8; + } while ( (n < last_nonce) && !work_restart[thr_id].restart ); + pdata[19] = n; + *hashes_done = n - first_nonce; + return 0; +} + +#endif + + +#if defined(SHA256DT_4WAY) + +int scanhash_sha256dt_4way( struct work *work, const uint32_t max_nonce, + uint64_t *hashes_done, struct thr_info *mythr ) +{ + __m128i vdata[32] __attribute__ ((aligned (64))); + __m128i block[16] __attribute__ ((aligned (32))); + __m128i hash32[8] __attribute__ ((aligned (32))); + __m128i initstate[8] __attribute__ ((aligned (32))); + __m128i midstate[8] __attribute__ ((aligned (32))); + uint32_t lane_hash[8] __attribute__ ((aligned (32))); + uint32_t *hash32_d7 = (uint32_t*)&( hash32[7] ); + uint32_t *pdata = work->data; + const uint32_t *ptarget = work->target; + const uint32_t targ32_d7 = ptarget[7]; + const uint32_t first_nonce = pdata[19]; + const uint32_t last_nonce = max_nonce - 4; + uint32_t n = first_nonce; + __m128i *noncev = vdata + 19; + const int thr_id = mythr->id; + const bool bench = opt_benchmark; + const __m128i last_byte = m128_const1_32( 0x80000000 ); + const __m128i four = m128_const1_32( 4 ); + + for ( int i = 0; i < 19; i++ ) + vdata[i] = mm128_bcast_i32( pdata[i] ); + + *noncev = _mm_set_epi32( n+ 3, n+ 2, n+1, n ); + + vdata[16+4] = last_byte; + memset_zero_128( vdata+16 + 5, 10 ); + vdata[16+15] = mm128_bcast_i32( 0x480 ); + + block[ 8] = last_byte; + memset_zero_128( block + 9, 6 ); + block[15] = mm128_bcast_i32( 0x300 ); + + // initialize state + initstate[0] = mm128_bcast_i64( 0xdfa9bf2cdfa9bf2c ); + initstate[1] = mm128_bcast_i64( 0xb72074d4b72074d4 ); + initstate[2] = mm128_bcast_i64( 0x6bb011226bb01122 ); + initstate[3] = mm128_bcast_i64( 0xd338e869d338e869 ); + initstate[4] = mm128_bcast_i64( 0xaa3ff126aa3ff126 ); + initstate[5] = mm128_bcast_i64( 0x475bbf30475bbf30 ); + initstate[6] = mm128_bcast_i64( 0x8fd52e5b8fd52e5b ); + initstate[7] = mm128_bcast_i64( 0x9f75c9ad9f75c9ad ); + + // hash first 64 bytes of data + sha256_4way_transform_le( midstate, vdata, initstate ); + + do + { + sha256_4way_transform_le( block, vdata+16, midstate ); + sha256_4way_transform_le( hash32, block, initstate ); + mm128_block_bswap_32( hash32, hash32 ); + + for ( int lane = 0; lane < 4; lane++ ) + if ( unlikely( hash32_d7[ lane ] <= targ32_d7 ) ) + { + extr_lane_4x32( lane_hash, hash32, lane, 256 ); + if ( likely( valid_hash( lane_hash, ptarget ) && !bench ) ) + { + pdata[19] = n + lane; + submit_solution( work, lane_hash, mythr ); + } + } + *noncev = _mm_add_epi32( *noncev, four ); + n += 4; + } while ( (n < last_nonce) && !work_restart[thr_id].restart ); + pdata[19] = n; + *hashes_done = n - first_nonce; + return 0; +} + +#endif + +bool register_sha256dt_algo( algo_gate_t* gate ) +{ + gate->optimizations = SSE2_OPT | AVX2_OPT | AVX512_OPT; +#if defined(SHA256DT_16WAY) + gate->scanhash = (void*)&scanhash_sha256dt_16way; +#elif defined(SHA256DT_8WAY) + gate->scanhash = (void*)&scanhash_sha256dt_8way; +#else + gate->scanhash = (void*)&scanhash_sha256dt_4way; +#endif + return true; +} + diff --git a/algo/sha/sha512256d-4way.c b/algo/sha/sha512256d-4way.c new file mode 100644 index 0000000..2111455 --- /dev/null +++ b/algo/sha/sha512256d-4way.c @@ -0,0 +1,221 @@ +#include "algo-gate-api.h" +#include "sha-hash-4way.h" +#include +#include + +#if defined(__AVX512F__) && defined(__AVX512VL__) && defined(__AVX512DQ__) && defined(__AVX512BW__) +#define SHA512256D_8WAY 1 +#elif defined(__AVX2__) +#define SHA512256D_4WAY 1 +#endif + +#if defined(SHA512256D_8WAY) + +static void sha512256d_8way_init( sha512_8way_context *ctx ) +{ + ctx->count = 0; + ctx->initialized = true; + ctx->val[0] = mm512_bcast_i64( 0x22312194FC2BF72C ); + ctx->val[1] = mm512_bcast_i64( 0x9F555FA3C84C64C2 ); + ctx->val[2] = mm512_bcast_i64( 0x2393B86B6F53B151 ); + ctx->val[3] = mm512_bcast_i64( 0x963877195940EABD ); + ctx->val[4] = mm512_bcast_i64( 0x96283EE2A88EFFE3 ); + ctx->val[5] = mm512_bcast_i64( 0xBE5E1E2553863992 ); + ctx->val[6] = mm512_bcast_i64( 0x2B0199FC2C85B8AA ); + ctx->val[7] = mm512_bcast_i64( 0x0EB72DDC81C52CA2 ); +} + +int scanhash_sha512256d_8way( struct work *work, uint32_t max_nonce, + uint64_t *hashes_done, struct thr_info *mythr ) +{ + uint64_t hash[8*8] __attribute__ ((aligned (128))); + uint32_t vdata[20*8] __attribute__ ((aligned (64))); + sha512_8way_context ctx; + uint32_t lane_hash[8] __attribute__ ((aligned (32))); + uint64_t *hash_q3 = &(hash[3*8]); + uint32_t *pdata = work->data; + uint32_t *ptarget = work->target; + const uint64_t targ_q3 = ((uint64_t*)ptarget)[3]; + const uint32_t first_nonce = pdata[19]; + const uint32_t last_nonce = max_nonce - 8; + uint32_t n = first_nonce; + __m512i *noncev = (__m512i*)vdata + 9; + const int thr_id = mythr->id; + const bool bench = opt_benchmark; + const __m512i eight = mm512_bcast_i64( 0x0000000800000000 ); + + mm512_bswap32_intrlv80_8x64( vdata, pdata ); + *noncev = mm512_intrlv_blend_32( + _mm512_set_epi32( n+7, 0, n+6, 0, n+5, 0, n+4, 0, + n+3, 0, n+2, 0, n+1, 0, n , 0 ), *noncev ); + do + { + sha512256d_8way_init( &ctx ); + sha512_8way_update( &ctx, vdata, 80 ); + sha512_8way_close( &ctx, hash ); + + sha512256d_8way_init( &ctx ); + sha512_8way_update( &ctx, hash, 32 ); + sha512_8way_close( &ctx, hash ); + + for ( int lane = 0; lane < 8; lane++ ) + if ( unlikely( hash_q3[ lane ] <= targ_q3 && !bench ) ) + { + extr_lane_8x64( lane_hash, hash, lane, 256 ); + if ( valid_hash( lane_hash, ptarget ) && !bench ) + { + pdata[19] = bswap_32( n + lane ); + submit_solution( work, lane_hash, mythr ); + } + } + *noncev = _mm512_add_epi32( *noncev, eight ); + n += 8; + } while ( likely( (n < last_nonce) && !work_restart[thr_id].restart ) ); + + pdata[19] = n; + *hashes_done = n - first_nonce; + return 0; +} + +#elif defined(SHA512256D_4WAY) + +static void sha512256d_4way_init( sha512_4way_context *ctx ) +{ + ctx->count = 0; + ctx->initialized = true; + ctx->val[0] = mm256_bcast_i64( 0x22312194FC2BF72C ); + ctx->val[1] = mm256_bcast_i64( 0x9F555FA3C84C64C2 ); + ctx->val[2] = mm256_bcast_i64( 0x2393B86B6F53B151 ); + ctx->val[3] = mm256_bcast_i64( 0x963877195940EABD ); + ctx->val[4] = mm256_bcast_i64( 0x96283EE2A88EFFE3 ); + ctx->val[5] = mm256_bcast_i64( 0xBE5E1E2553863992 ); + ctx->val[6] = mm256_bcast_i64( 0x2B0199FC2C85B8AA ); + ctx->val[7] = mm256_bcast_i64( 0x0EB72DDC81C52CA2 ); +} + +int scanhash_sha512256d_4way( struct work *work, uint32_t max_nonce, + uint64_t *hashes_done, struct thr_info *mythr ) +{ + uint64_t hash[8*4] __attribute__ ((aligned (64))); + uint32_t vdata[20*4] __attribute__ ((aligned (64))); + sha512_4way_context ctx; + uint32_t lane_hash[8] __attribute__ ((aligned (32))); + uint64_t *hash_q3 = &(hash[3*4]); + uint32_t *pdata = work->data; + uint32_t *ptarget = work->target; + const uint64_t targ_q3 = ((uint64_t*)ptarget)[3]; + const uint32_t first_nonce = pdata[19]; + const uint32_t last_nonce = max_nonce - 4; + uint32_t n = first_nonce; + __m256i *noncev = (__m256i*)vdata + 9; + const int thr_id = mythr->id; + const bool bench = opt_benchmark; + const __m256i four = mm256_bcast_i64( 0x0000000400000000 ); + + mm256_bswap32_intrlv80_4x64( vdata, pdata ); + *noncev = mm256_intrlv_blend_32( + _mm256_set_epi32( n+3, 0, n+2, 0, n+1, 0, n, 0 ), *noncev ); + do + { + sha512256d_4way_init( &ctx ); + sha512_4way_update( &ctx, vdata, 80 ); + sha512_4way_close( &ctx, hash ); + + sha512256d_4way_init( &ctx ); + sha512_4way_update( &ctx, hash, 32 ); + sha512_4way_close( &ctx, hash ); + + for ( int lane = 0; lane < 4; lane++ ) + if ( hash_q3[ lane ] <= targ_q3 ) + { + extr_lane_4x64( lane_hash, hash, lane, 256 ); + if ( valid_hash( lane_hash, ptarget ) && !bench ) + { + pdata[19] = bswap_32( n + lane ); + submit_solution( work, lane_hash, mythr ); + } + } + *noncev = _mm256_add_epi32( *noncev, four ); + n += 4; + } while ( (n < last_nonce) && !work_restart[thr_id].restart ); + + pdata[19] = n; + *hashes_done = n - first_nonce; + return 0; +} + +#else + +#include "sph_sha2.h" + +static const uint64_t H512_256[8] = +{ + 0x22312194FC2BF72C, 0x9F555FA3C84C64C2, + 0x2393B86B6F53B151, 0x963877195940EABD, + 0x96283EE2A88EFFE3, 0xBE5E1E2553863992, + 0x2B0199FC2C85B8AA, 0x0EB72DDC81C52CA2, +}; + +static void sha512256d_init( sph_sha512_context *ctx ) +{ + memcpy( ctx->val, H512_256, sizeof H512_256 ); + ctx->count = 0; +} + +int scanhash_sha512256d( struct work *work, uint32_t max_nonce, + uint64_t *hashes_done, struct thr_info *mythr ) +{ + uint32_t *pdata = work->data; + uint32_t *ptarget = work->target; + uint32_t hash64[8] __attribute__ ((aligned (64))); + uint32_t endiandata[20] __attribute__ ((aligned (64))); + sph_sha512_context ctx; + const uint32_t Htarg = ptarget[7]; + const uint32_t first_nonce = pdata[19]; + uint32_t n = first_nonce; + int thr_id = mythr->id; + + swab32_array( endiandata, pdata, 20 ); + + do { + be32enc( &endiandata[19], n ); + + sha512256d_init( &ctx ); + sph_sha512( &ctx, endiandata, 80 ); + sph_sha512_close( &ctx, hash64 ); + + sha512256d_init( &ctx ); + sph_sha512( &ctx, hash64, 32 ); + sph_sha512_close( &ctx, hash64 ); + + if ( hash64[7] <= Htarg ) + if ( fulltest( hash64, ptarget ) && !opt_benchmark ) + { + pdata[19] = n; + submit_solution( work, hash64, mythr ); + } + n++; + + } while (n < max_nonce && !work_restart[thr_id].restart); + + *hashes_done = n - first_nonce + 1; + pdata[19] = n; + + return 0; +} + +#endif + +bool register_sha512256d_algo( algo_gate_t* gate ) +{ + gate->optimizations = AVX2_OPT | AVX512_OPT; +#if defined(SHA512256D_8WAY) + gate->scanhash = (void*)&scanhash_sha512256d_8way; +#elif defined(SHA512256D_4WAY) + gate->scanhash = (void*)&scanhash_sha512256d_4way; +#else + gate->scanhash = (void*)&scanhash_sha512256d; +#endif + return true; +}; + diff --git a/configure b/configure index 123af59..953ddbd 100755 --- a/configure +++ b/configure @@ -1,10 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for cpuminer-opt 3.22.1. +# Generated by GNU Autoconf 2.69 for cpuminer-opt 3.22.2. # # -# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, -# Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -15,16 +14,14 @@ # 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 : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -34,46 +31,46 @@ 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 +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -82,6 +79,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -90,12 +94,8 @@ case $0 in #(( 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 + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -107,10 +107,30 @@ 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 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. @@ -132,22 +152,20 @@ 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 +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then - as_bourne_compatible="as_nop=: -if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 -then : + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST -else \$as_nop +else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( @@ -167,53 +185,42 @@ 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 : +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : -else \$as_nop +else 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 : + if (eval "$as_required") 2>/dev/null; then : as_have_required=yes -else $as_nop +else as_have_required=no fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null -then : + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -else $as_nop +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. - as_shell=$as_dir$as_base + 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 : + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes - if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null -then : + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi @@ -221,21 +228,14 @@ fi 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 : +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes -fi -fi +fi; } +IFS=$as_save_IFS - if test "x$CONFIG_SHELL" != x -then : + 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 @@ -253,19 +253,18 @@ 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 +$as_echo "$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." + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." else - printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -292,7 +291,6 @@ as_fn_unset () } as_unset=as_fn_unset - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -310,14 +308,6 @@ as_fn_exit () 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 # ------------- @@ -332,7 +322,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -341,7 +331,7 @@ $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" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -380,13 +370,12 @@ as_fn_executable_p () # 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 : +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 +else as_fn_append () { eval $1=\$$1\$2 @@ -398,27 +387,18 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else 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] # ---------------------------------------- @@ -430,9 +410,9 @@ 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 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -459,7 +439,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -503,7 +483,7 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits 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; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall @@ -517,10 +497,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits 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*) @@ -534,13 +510,6 @@ case `echo -n x` in #((((( 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 @@ -608,44 +577,48 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='cpuminer-opt' PACKAGE_TARNAME='cpuminer-opt' -PACKAGE_VERSION='3.22.1' -PACKAGE_STRING='cpuminer-opt 3.22.1' +PACKAGE_VERSION='3.22.2' +PACKAGE_STRING='cpuminer-opt 3.22.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="cpu-miner.c" # Factoring default headers for most tests. ac_includes_default="\ -#include -#ifdef HAVE_STDIO_H -# include +#include +#ifdef HAVE_SYS_TYPES_H +# include #endif -#ifdef HAVE_STDLIB_H +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS # include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif #endif #ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif # include #endif +#ifdef HAVE_STRINGS_H +# include +#endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif -#ifdef HAVE_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_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS @@ -710,9 +683,6 @@ AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V -CSCOPE -ETAGS -CTAGS am__untar am__tar AMTAR @@ -880,6 +850,8 @@ do *) ac_optarg=yes ;; esac + # Accept the important Cygnus configure options, so we can diagnose typos. + case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; @@ -920,9 +892,9 @@ do 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'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -946,9 +918,9 @@ do 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'" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" @@ -1159,9 +1131,9 @@ do 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'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1175,9 +1147,9 @@ do 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'" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt - ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" @@ -1221,9 +1193,9 @@ Try \`$0 --help' for more information" *) # FIXME: should be removed in autoconf 3.0. - printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$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 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; @@ -1239,7 +1211,7 @@ 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 ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1303,7 +1275,7 @@ $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" | +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1360,7 +1332,7 @@ 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 cpuminer-opt 3.22.1 to adapt to many kinds of systems. +\`configure' configures cpuminer-opt 3.22.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1432,7 +1404,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of cpuminer-opt 3.22.1:";; + short | recursive ) echo "Configuration of cpuminer-opt 3.22.2:";; esac cat <<\_ACEOF @@ -1490,9 +1462,9 @@ if test "$ac_init_help" = "recursive"; then 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|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$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|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1520,8 +1492,7 @@ 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. + # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive @@ -1529,7 +1500,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix echo && $SHELL "$ac_srcdir/configure" --help=recursive else - printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1538,10 +1509,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -cpuminer-opt configure 3.22.1 -generated by GNU Autoconf 2.71 +cpuminer-opt configure 3.22.2 +generated by GNU Autoconf 2.69 -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1558,14 +1529,14 @@ fi 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 + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1573,15 +1544,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1603,7 +1573,7 @@ case "(($ac_try" in *) 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 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1611,15 +1581,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1635,14 +1604,14 @@ fi 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 + rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1650,15 +1619,14 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext -then : + } && test -s conftest.$ac_objext; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1668,6 +1636,135 @@ fi } # ac_fn_cxx_try_compile +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in @@ -1675,54 +1772,49 @@ fi ac_fn_c_check_header_compile () { 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile -# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR -# ------------------------------------------------------------------ +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- # 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 () +# accordingly. +ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` - { 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" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { #ifndef $as_decl_name #ifdef __cplusplus @@ -1736,22 +1828,19 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - eval $6=\$ac_save_FLAGS - +rm -f core conftest.err conftest.$ac_objext 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno -} # ac_fn_check_decl +} # ac_fn_c_check_decl # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- @@ -1760,18 +1849,17 @@ printf "%s\n" "$ac_res" >&6; } 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof ($2)) return 0; @@ -1779,13 +1867,12 @@ if (sizeof ($2)) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int -main (void) +main () { if (sizeof (($2))) return 0; @@ -1793,19 +1880,18 @@ if (sizeof (($2))) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else eval "$3=yes" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -1816,14 +1902,14 @@ printf "%s\n" "$ac_res" >&6; } 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 + rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -1831,18 +1917,17 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext - } -then : + }; then : ac_retval=0 -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 @@ -1857,61 +1942,17 @@ fi } # ac_fn_c_try_link -# 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_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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. @@ -1919,9 +1960,16 @@ else $as_nop #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. */ + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif -#include #undef $2 /* Override any GCC internal prototype to avoid an error. @@ -1939,56 +1987,35 @@ choke me #endif int -main (void) +main () { return $2 (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" -else $as_nop +else eval "$3=no" fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func -ac_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 cpuminer-opt $as_me 3.22.1, which was -generated by GNU Autoconf 2.71. Invocation command line was +It was created by cpuminer-opt $as_me 3.22.2, which was +generated by GNU Autoconf 2.69. Invocation command line was - $ $0$ac_configure_args_raw + $ $0 $@ _ACEOF exec 5>>config.log @@ -2021,12 +2048,8 @@ 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" + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" done IFS=$as_save_IFS @@ -2061,7 +2084,7 @@ do | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; @@ -2096,13 +2119,11 @@ done # 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" "## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo @@ -2113,8 +2134,8 @@ trap 'exit_status=$? 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;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -2138,7 +2159,7 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ) echo - printf "%s\n" "## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo @@ -2146,14 +2167,14 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - printf "%s\n" "## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo @@ -2161,15 +2182,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - printf "%s\n" "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - printf "%s\n" "## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo @@ -2177,8 +2198,8 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} echo fi test "$ac_signal" != 0 && - printf "%s\n" "$as_me: caught signal $ac_signal" - printf "%s\n" "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && @@ -2192,48 +2213,63 @@ 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 +$as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. -printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF -printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF -printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF -printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF -printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF -printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_files="$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - ac_site_files="$prefix/share/config.site $prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi - -for ac_site_file in $ac_site_files +for ac_site_file in "$ac_site_file1" "$ac_site_file2" 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;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ - || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi @@ -2243,650 +2279,19 @@ 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -printf "%s\n" "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$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" - -# Auxiliary files required by this configure script. -ac_aux_files="compile missing install-sh config.guess config.sub" - -# Locations in which to look for auxiliary files. -ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." - -# 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 @@ -2897,12 +2302,12 @@ for ac_var in $ac_precious_vars; do 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) @@ -2911,24 +2316,24 @@ printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else - { 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi - { 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -2938,12 +2343,11 @@ printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -2958,30 +2362,55 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_aux_dir= +for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. +# 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 - # 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_build_alias=$build_alias test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` + 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 +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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; @@ -3000,22 +2429,21 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else - ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || - as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 + 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; @@ -3034,22 +2462,21 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if ${ac_cv_target+:} false; then : + $as_echo_n "(cached) " >&6 +else 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 + 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; @@ -3082,8 +2509,7 @@ ac_config_headers="$ac_config_headers cpuminer-config.h" am__api_version='1.16' - - # Find a good install program. We prefer a C program (faster), +# 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 @@ -3097,25 +2523,20 @@ am__api_version='1.16' # 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test ${ac_cv_path_install+y} -then : - printf %s "(cached) " >&6 -else $as_nop +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS - 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]/* | \ + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; @@ -3125,13 +2546,13 @@ case $as_dir in #(( # 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 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 + 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 + 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 @@ -3139,12 +2560,12 @@ case $as_dir in #(( 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/" && + 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" + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi @@ -3160,7 +2581,7 @@ IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi - if test ${ac_cv_path_install+y}; then + if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a @@ -3170,8 +2591,8 @@ fi INSTALL=$ac_install_sh fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -printf "%s\n" "$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -3181,8 +2602,8 @@ 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 whether build environment is sane" >&5 -printf %s "checking whether build environment is sane... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3236,8 +2657,8 @@ else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= @@ -3256,23 +2677,26 @@ test "$program_suffix" != NONE && # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`printf "%s\n" "$program_transform_name" | sed "$ac_script"` - +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` - - if test x"${MISSING+set}" != xset; then - MISSING="\${SHELL} '$am_aux_dir/missing'" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 -printf "%s\n" "$as_me: WARNING: 'missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then @@ -3292,12 +2716,11 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; 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_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else @@ -3305,15 +2728,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3324,11 +2743,11 @@ fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -printf "%s\n" "$STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3337,12 +2756,11 @@ if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; 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_STRIP+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else @@ -3350,15 +2768,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3369,11 +2783,11 @@ fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -printf "%s\n" "$ac_ct_STRIP" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then @@ -3381,8 +2795,8 @@ fi 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;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP @@ -3394,31 +2808,25 @@ fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 -printf %s "checking for a race-free mkdir -p... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test ${ac_cv_path_mkdir+y} -then : - printf %s "(cached) " >&6 -else $as_nop + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS - case $as_dir in #((( - '') as_dir=./ ;; - */) ;; - *) as_dir=$as_dir/ ;; - esac + test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue - case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir ('*'coreutils) '* | \ - 'BusyBox '* | \ + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done @@ -3429,7 +2837,7 @@ IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version - if test ${ac_cv_path_mkdir+y}; then + if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a @@ -3439,19 +2847,18 @@ fi MKDIR_P="$ac_install_sh -d" fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -printf "%s\n" "$MKDIR_P" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk 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_AWK+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else @@ -3459,15 +2866,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" - printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3478,25 +2881,24 @@ fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -printf "%s\n" "$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} -ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval test \${ac_cv_prog_make_${ac_make}_set+y} -then : - printf %s "(cached) " >&6 -else $as_nop +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @@ -3512,12 +2914,12 @@ esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -3531,8 +2933,7 @@ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. -if test ${enable_silent_rules+y} -then : +if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi @@ -3542,13 +2943,12 @@ case $enable_silent_rules in # ((( *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 -printf %s "checking whether $am_make supports nested variables... " >&6; } -if test ${am_cv_make_support_nested_variables+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if printf "%s\n" 'TRUE=$(BAR$(V)) +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 @@ -3560,8 +2960,8 @@ else am_cv_make_support_nested_variables=no fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 -printf "%s\n" "$am_cv_make_support_nested_variables" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' @@ -3593,13 +2993,17 @@ fi # Define the identity of the package. PACKAGE='cpuminer-opt' - VERSION='3.22.1' + VERSION='3.22.2' -printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF -printf "%s\n" "#define VERSION \"$VERSION\"" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF # Some tools Automake needs. @@ -3639,20 +3043,6 @@ am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -# Variables for tags utilities; see am/tags.am -if test -z "$CTAGS"; then - CTAGS=ctags -fi - -if test -z "$ETAGS"; then - ETAGS=etags -fi - -if test -z "$CSCOPE"; then - CSCOPE=cscope -fi - - # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile @@ -3698,18 +3088,17 @@ fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 -printf %s "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. -if test ${enable_maintainer_mode+y} -then : +if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval -else $as_nop +else USE_MAINTAINER_MODE=no fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 -printf "%s\n" "$USE_MAINTAINER_MODE" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' @@ -3722,21 +3111,12 @@ fi - - - - - - - - - DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 -printf %s "checking whether ${MAKE-make} supports the include directive... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 +$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out @@ -3772,12 +3152,11 @@ esac fi done rm -f confinc.* confmf.* -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 -printf "%s\n" "${_am_result}" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 +$as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. -if test ${enable_dependency_tracking+y} -then : +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -3803,12 +3182,11 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3816,15 +3194,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3835,11 +3209,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3848,12 +3222,11 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -3861,15 +3234,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3880,11 +3249,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -3892,8 +3261,8 @@ fi 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;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -3906,12 +3275,11 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3919,15 +3287,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3938,11 +3302,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3951,12 +3315,11 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -3965,19 +3328,15 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then - if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -3993,18 +3352,18 @@ if test $ac_prog_rejected = yes; then # 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+' '}$@" + 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4015,12 +3374,11 @@ if test -z "$CC"; then 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else @@ -4028,15 +3386,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4047,11 +3401,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4064,12 +3418,11 @@ if test -z "$CC"; then 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else @@ -4077,15 +3430,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -4096,11 +3445,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -4112,8 +3461,8 @@ done 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;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -4121,129 +3470,25 @@ esac 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;} +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 -for ac_option in --version -v -V -qversion -version; do +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 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -4253,7 +3498,7 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done @@ -4261,7 +3506,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4273,9 +3518,9 @@ 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[^ ]*//'` +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" @@ -4296,12 +3541,11 @@ case "(($ac_try" in *) 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 +$as_echo "$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 : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -4318,7 +3562,7 @@ do # certainly right. break;; *.* ) - if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -4334,46 +3578,44 @@ do done test "$ac_cv_exeext" = no && ac_cv_exeext= -else $as_nop +else 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 +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -printf %s "checking for suffix of executables... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -printf "%s\n" "$ac_try_echo"; } >&5 +$as_echo "$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 : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -4387,15 +3629,15 @@ for ac_file in conftest.exe conftest conftest.*; do * ) 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;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -printf "%s\n" "$ac_cv_exeext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext @@ -4404,7 +3646,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; @@ -4416,8 +3658,8 @@ _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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in @@ -4425,10 +3667,10 @@ case "(($ac_try" in *) 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 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in @@ -4436,40 +3678,39 @@ printf "%s\n" "$ac_try_echo"; } >&5 *) 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 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else - { { 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. + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -printf "%s\n" "$cross_compiling" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save -{ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4483,12 +3724,11 @@ case "(($ac_try" in *) 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 +$as_echo "$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 : + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in @@ -4497,32 +3737,31 @@ then : break;; esac done -else $as_nop - printf "%s\n" "$as_me: failed program was:" >&5 +else + $as_echo "$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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -printf "%s\n" "$ac_cv_objext" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -4532,33 +3771,29 @@ main (void) return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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 - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi -ac_test_CFLAGS=${CFLAGS+y} +ac_test_CFLAGS=${CFLAGS+set} 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no @@ -4567,60 +3802,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else $as_nop +else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -else $as_nop +else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then @@ -4635,144 +3867,94 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -$ac_c_conftest_c89_program +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} _ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +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 : + 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 +rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC -fi -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 +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + fi ac_ext=c @@ -4781,23 +3963,21 @@ 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_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 whether $CC understands -c and -o together" >&5 -printf %s "checking whether $CC understands -c and -o together... " >&6; } -if test ${am_cv_prog_cc_c_o+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; @@ -4825,8 +4005,8 @@ _ACEOF rm -f core conftest* unset am_i fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -printf "%s\n" "$am_cv_prog_cc_c_o" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. @@ -4844,12 +4024,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CC_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -4956,8 +4135,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if @@ -4971,6 +4150,182 @@ else fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 +$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } +if ${ac_cv_prog_cc_c99+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c99=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include +#include + +// Check varargs macros. These examples are taken from C99 6.10.3.5. +#define debug(...) fprintf (stderr, __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 + your preprocessor is broken; +#endif +#if BIG_OK +#else + 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 void +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; + float fnumber; + + 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); +} + +int +main () +{ + + // Check bool. + _Bool success = false; + + // Check restrict. + if (test_restrict ("String literal") == 0) + success = true; + char *restrict newvar = "Another string"; + + // Check varargs. + 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[ni.number - 1] = 543; + + // work around unused variable warnings + return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' + || dynamic_array[ni.number - 1] != 543); + + ; + return 0; +} +_ACEOF +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 +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 + test "x$ac_cv_prog_cc_c99" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c99" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c99" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 +$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c99" != xno; then : + +fi + ac_ext=c @@ -4978,36 +4333,40 @@ 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if 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 + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -5019,11 +4378,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -5033,8 +4391,7 @@ 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 : +if $ac_preproc_ok; then : break fi @@ -5046,24 +4403,29 @@ fi else ac_cv_prog_CPP=$CPP fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -printf "%s\n" "$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#ifdef __STDC__ +# include +#else +# include +#endif Syntax error _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : -else $as_nop +else # Broken: fails on valid input. continue fi @@ -5075,11 +4437,10 @@ rm -f conftest.err conftest.i conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if ac_fn_c_try_cpp "$LINENO" -then : +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue -else $as_nop +else # Passes both tests. ac_preproc_ok=: break @@ -5089,12 +4450,11 @@ 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 : +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;} +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi @@ -5106,12 +4466,11 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST @@ -5119,15 +4478,10 @@ else $as_nop 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 + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" + 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 @@ -5136,13 +4490,13 @@ case `"$ac_path_GREP" --version 2>&1` in ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5170,17 +4524,16 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -printf "%s\n" "$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else @@ -5191,15 +4544,10 @@ else $as_nop 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 + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" + 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 @@ -5208,13 +4556,13 @@ case `"$ac_path_EGREP" --version 2>&1` in ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - printf %s 0123456789 >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - printf "%s\n" 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val @@ -5243,18 +4591,17 @@ 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; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" if test $ac_cv_c_compiler_gnu = yes; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 -printf %s "checking whether $CC needs -traditional... " >&6; } -if test ${ac_cv_prog_gcc_traditional+y} -then : - printf %s "(cached) " >&6 -else $as_nop + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC needs -traditional" >&5 +$as_echo_n "checking whether $CC needs -traditional... " >&6; } +if ${ac_cv_prog_gcc_traditional+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_pattern="Autoconf.*'x'" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5262,13 +4609,12 @@ else $as_nop Autoconf TIOCGETP _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : + $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes -else $as_nop +else ac_cv_prog_gcc_traditional=no fi -rm -rf conftest* +rm -f conftest* if test $ac_cv_prog_gcc_traditional = no; then @@ -5278,16 +4624,15 @@ rm -rf conftest* Autoconf TCGETA _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "$ac_pattern" >/dev/null 2>&1 -then : + $EGREP "$ac_pattern" >/dev/null 2>&1; then : ac_cv_prog_gcc_traditional=yes fi -rm -rf conftest* +rm -f conftest* fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 -printf "%s\n" "$ac_cv_prog_gcc_traditional" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gcc_traditional" >&5 +$as_echo "$ac_cv_prog_gcc_traditional" >&6; } if test $ac_cv_prog_gcc_traditional = yes; then CC="$CC -traditional" fi @@ -5303,12 +4648,11 @@ test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS depcc="$CCAS" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CCAS_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CCAS_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -5413,8 +4757,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CCAS_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CCAS_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CCAS_dependencies_compiler_type" >&6; } CCASDEPMODE=depmode=$am_cv_CCAS_dependencies_compiler_type if @@ -5431,12 +4775,11 @@ fi 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else @@ -5444,15 +4787,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5463,11 +4802,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5476,12 +4815,11 @@ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else @@ -5489,15 +4827,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5508,11 +4842,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -5520,8 +4854,8 @@ fi 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;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -5530,12 +4864,6 @@ else RANLIB="$ac_cv_prog_RANLIB" fi - - - - - - ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -5546,16 +4874,15 @@ if test -z "$CXX"; 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++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else @@ -5563,15 +4890,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5582,11 +4905,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5595,16 +4918,15 @@ fi 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++ + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else @@ -5612,15 +4934,11 @@ 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 -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then + if 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 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done @@ -5631,11 +4949,11 @@ 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; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -5647,8 +4965,8 @@ done 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;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX @@ -5658,7 +4976,7 @@ fi fi fi # Provide some information about the compiler. -printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do @@ -5668,7 +4986,7 @@ case "(($ac_try" in *) 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 +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then @@ -5678,21 +4996,20 @@ printf "%s\n" "$ac_try_echo"; } >&5 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err - printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + $as_echo "$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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { #ifndef __GNUC__ choke me @@ -5702,33 +5019,29 @@ main (void) return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes -else $as_nop +else ac_compiler_gnu=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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 - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi -ac_test_CXXFLAGS=${CXXFLAGS+y} +ac_test_CXXFLAGS=${CXXFLAGS+set} 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no @@ -5737,60 +5050,57 @@ else $as_nop /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes -else $as_nop +else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +if ac_fn_cxx_try_compile "$LINENO"; then : -else $as_nop +else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_cxx_try_compile "$LINENO" -then : +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 +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext 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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then @@ -5805,100 +5115,6 @@ 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' @@ -5907,12 +5123,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -printf %s "checking dependency style of $depcc... " >&6; } -if test ${am_cv_CXX_dependencies_compiler_type+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For @@ -6019,8 +5234,8 @@ else fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 -printf "%s\n" "$am_cv_CXX_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if @@ -6035,329 +5250,283 @@ fi -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 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + done - - - - - - -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 +for ac_header in sys/endian.h sys/param.h syslog.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF fi -# Autoupdate added the next two lines to ensure that your configure -# script's behavior did not change. They are probably safe to remove. -{ 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_fn_c_check_header_compile "$LINENO" "sys/endian.h" "ac_cv_header_sys_endian_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_endian_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_ENDIAN_H 1" >>confdefs.h - -fi -ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_param_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_PARAM_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 +done # sys/sysctl.h requires sys/types.h on FreeBSD # sys/sysctl.h requires sys/param.h on OpenBSD -ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#include +for ac_header in sys/sysctl.h +do : + ac_fn_c_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#include #ifdef HAVE_SYS_PARAM_H #include #endif " -if test "x$ac_cv_header_sys_sysctl_h" = xyes -then : - printf "%s\n" "#define HAVE_SYS_SYSCTL_H 1" >>confdefs.h - -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; -} +if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SYS_SYSCTL_H 1 _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 *); +fi -int -main (void) -{ -(void) ac_decl (0, (char *) 0); - (void) ac_decl; +done - ; - return 0; -} + +ac_fn_c_check_decl "$LINENO" "be32dec" "ac_cv_have_decl_be32dec" "$ac_includes_default +#ifdef HAVE_SYS_ENDIAN_H +#include +#endif + +" +if test "x$ac_cv_have_decl_be32dec" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BE32DEC $ac_have_decl _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_check_decl "$LINENO" "be32dec" "ac_cv_have_decl_be32dec" "$ac_includes_default +ac_fn_c_check_decl "$LINENO" "le32dec" "ac_cv_have_decl_le32dec" "$ac_includes_default #ifdef HAVE_SYS_ENDIAN_H #include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_be32dec" = xyes -then : +" +if test "x$ac_cv_have_decl_le32dec" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_BE32DEC $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "le32dec" "ac_cv_have_decl_le32dec" "$ac_includes_default + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LE32DEC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "be32enc" "ac_cv_have_decl_be32enc" "$ac_includes_default #ifdef HAVE_SYS_ENDIAN_H #include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_le32dec" = xyes -then : +" +if test "x$ac_cv_have_decl_be32enc" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_LE32DEC $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "be32enc" "ac_cv_have_decl_be32enc" "$ac_includes_default + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_BE32ENC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "le32enc" "ac_cv_have_decl_le32enc" "$ac_includes_default #ifdef HAVE_SYS_ENDIAN_H #include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_be32enc" = xyes -then : +" +if test "x$ac_cv_have_decl_le32enc" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_BE32ENC $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "le32enc" "ac_cv_have_decl_le32enc" "$ac_includes_default + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LE32ENC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "le16dec" "ac_cv_have_decl_le16dec" "$ac_includes_default #ifdef HAVE_SYS_ENDIAN_H #include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_le32enc" = xyes -then : +" +if test "x$ac_cv_have_decl_le16dec" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_LE32ENC $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "le16dec" "ac_cv_have_decl_le16dec" "$ac_includes_default + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LE16DEC $ac_have_decl +_ACEOF +ac_fn_c_check_decl "$LINENO" "le16enc" "ac_cv_have_decl_le16enc" "$ac_includes_default #ifdef HAVE_SYS_ENDIAN_H #include #endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_le16dec" = xyes -then : +" +if test "x$ac_cv_have_decl_le16enc" = xyes; then : ac_have_decl=1 -else $as_nop +else ac_have_decl=0 fi -printf "%s\n" "#define HAVE_DECL_LE16DEC $ac_have_decl" >>confdefs.h -ac_fn_check_decl "$LINENO" "le16enc" "ac_cv_have_decl_le16enc" "$ac_includes_default -#ifdef HAVE_SYS_ENDIAN_H -#include -#endif -" "$ac_c_undeclared_builtin_options" "CFLAGS" -if test "x$ac_cv_have_decl_le16enc" = xyes -then : - ac_have_decl=1 -else $as_nop - ac_have_decl=0 -fi -printf "%s\n" "#define HAVE_DECL_LE16ENC $ac_have_decl" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_LE16ENC $ac_have_decl +_ACEOF 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 : +if test "x$ac_cv_type_size_t" = xyes; then : -else $as_nop +else -printf "%s\n" "#define size_t unsigned int" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -printf %s "checking for working alloca.h... " >&6; } -if test ${ac_cv_working_alloca_h+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 +$as_echo_n "checking for working alloca.h... " >&6; } +if ${ac_cv_working_alloca_h+:} false; then : + $as_echo_n "(cached) " >&6 +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int -main (void) +main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; @@ -6365,52 +5534,52 @@ char *p = (char *) alloca (2 * sizeof (int)); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes -else $as_nop +else ac_cv_working_alloca_h=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -printf "%s\n" "$ac_cv_working_alloca_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 +$as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then -printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -printf %s "checking for alloca... " >&6; } -if test ${ac_cv_func_alloca_works+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test $ac_cv_working_alloca_h = yes; then - ac_cv_func_alloca_works=yes +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 +$as_echo_n "checking for alloca... " >&6; } +if ${ac_cv_func_alloca_works+:} false; then : + $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _MSC_VER +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER # include # define alloca _alloca # else -# ifdef __cplusplus -extern "C" -# endif +# ifdef HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); +# endif +# endif +# endif # endif #endif int -main (void) +main () { char *p = (char *) alloca (1); if (p) return 0; @@ -6418,22 +5587,20 @@ char *p = (char *) alloca (1); return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes -else $as_nop +else ac_cv_func_alloca_works=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -printf "%s\n" "$ac_cv_func_alloca_works" >&6; } -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 +$as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then -printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h +$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions @@ -6443,19 +5610,58 @@ else ALLOCA=\${LIBOBJDIR}alloca.$ac_objext -printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h +$as_echo "#define C_ALLOCA 1" >>confdefs.h -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -printf %s "checking stack direction for C alloca... " >&6; } -if test ${ac_cv_c_stack_direction+y} -then : - printf %s "(cached) " >&6 -else $as_nop - if test "$cross_compiling" = yes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 +$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } +if ${ac_cv_os_cray+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined CRAY && ! defined CRAY2 +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then : + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 +$as_echo "$ac_cv_os_cray" >&6; } +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 +$as_echo_n "checking stack direction for C alloca... " >&6; } +if ${ac_cv_c_stack_direction+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 -else $as_nop +else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default @@ -6476,10 +5682,9 @@ main (int argc, char **argv) return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF -if ac_fn_c_try_run "$LINENO" -then : +if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 -else $as_nop +else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ @@ -6487,19 +5692,25 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ fi fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -printf "%s\n" "$ac_cv_c_stack_direction" >&6; } -printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 +$as_echo "$ac_cv_c_stack_direction" >&6; } +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF fi -ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" -if test "x$ac_cv_func_getopt_long" = xyes -then : - printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h +for ac_func in getopt_long +do : + ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" +if test "x$ac_cv_func_getopt_long" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_GETOPT_LONG 1 +_ACEOF fi +done MINGW_TARGET=`$CC -dumpmachine 2>&1` @@ -6531,143 +5742,137 @@ case $MINGW_TARGET in esac # Check whether --enable-assembly was given. -if test ${enable_assembly+y} -then : +if test "${enable_assembly+set}" = set; then : enableval=$enable_assembly; fi if test x$enable_assembly != xno; then -printf "%s\n" "#define USE_ASM 1" >>confdefs.h +$as_echo "#define USE_ASM 1" >>confdefs.h fi if test x$enable_assembly != xno -a x$have_x86_64 = xtrue then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile AVX code" >&5 -printf %s "checking whether we can compile AVX code... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile AVX code" >&5 +$as_echo_n "checking whether we can compile AVX code... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { asm ("vmovdqa %ymm0, %ymm1"); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define USE_AVX 1" >>confdefs.h +$as_echo "#define USE_AVX 1" >>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}: checking whether we can compile XOP code" >&5 -printf %s "checking whether we can compile XOP code... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile XOP code" >&5 +$as_echo_n "checking whether we can compile XOP code... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { asm ("vprotd \$7, %xmm0, %xmm1"); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define USE_XOP 1" >>confdefs.h +$as_echo "#define USE_XOP 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the XOP instruction set." >&5 -printf "%s\n" "$as_me: WARNING: The assembler does not support the XOP instruction set." >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the XOP instruction set." >&5 +$as_echo "$as_me: WARNING: The assembler does not support the XOP instruction set." >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile AVX2 code" >&5 -printf %s "checking whether we can compile AVX2 code... " >&6; } +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile AVX2 code" >&5 +$as_echo_n "checking whether we can compile AVX2 code... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { asm ("vpaddd %ymm0, %ymm1, %ymm2"); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define USE_AVX2 1" >>confdefs.h +$as_echo "#define USE_AVX2 1" >>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}: checking whether we can compile AVX512 code" >&5 -printf %s "checking whether we can compile AVX512 code... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we can compile AVX512 code" >&5 +$as_echo_n "checking whether we can compile AVX512 code... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int -main (void) +main () { asm ("vpaddd %zmm0, %zmm1, %zmm2{%k1}"); ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define USE_AVX512 1" >>confdefs.h +$as_echo "#define USE_AVX512 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the AVX512 instruction set." >&5 -printf "%s\n" "$as_me: WARNING: The assembler does not support the AVX512 instruction set." >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the AVX512 instruction set." >&5 +$as_echo "$as_me: WARNING: The assembler does not support the AVX512 instruction set." >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the AVX2 instruction set." >&5 -printf "%s\n" "$as_me: WARNING: The assembler does not support the AVX2 instruction set." >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the AVX2 instruction set." >&5 +$as_echo "$as_me: WARNING: The assembler does not support the AVX2 instruction set." >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the AVX instruction set." >&5 -printf "%s\n" "$as_me: WARNING: The assembler does not support the AVX instruction set." >&2;} +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The assembler does not support the AVX instruction set." >&5 +$as_echo "$as_me: WARNING: The assembler does not support the AVX instruction set." >&2;} fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for json_loads in -ljansson" >&5 -printf %s "checking for json_loads in -ljansson... " >&6; } -if test ${ac_cv_lib_jansson_json_loads+y} -then : - printf %s "(cached) " >&6 -else $as_nop +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for json_loads in -ljansson" >&5 +$as_echo_n "checking for json_loads in -ljansson... " >&6; } +if ${ac_cv_lib_jansson_json_loads+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-ljansson $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6676,31 +5881,32 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* 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 json_loads (); int -main (void) +main () { return json_loads (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jansson_json_loads=yes -else $as_nop +else ac_cv_lib_jansson_json_loads=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ 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_jansson_json_loads" >&5 -printf "%s\n" "$ac_cv_lib_jansson_json_loads" >&6; } -if test "x$ac_cv_lib_jansson_json_loads" = xyes -then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jansson_json_loads" >&5 +$as_echo "$ac_cv_lib_jansson_json_loads" >&6; } +if test "x$ac_cv_lib_jansson_json_loads" = xyes; then : request_jansson=false -else $as_nop +else request_jansson=true fi @@ -6708,12 +5914,11 @@ fi # GC2 for GNU static if test "x$have_win32" = "xtrue" ; then # MinGW - { 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6722,39 +5927,39 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char pthread_create (); int -main (void) +main () { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes -else $as_nop +else ac_cv_lib_pthread_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ 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 : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : PTHREAD_LIBS="-lpthreadGC2" fi else - { 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 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 +$as_echo_n "checking for pthread_create in -lpthread... " >&6; } +if ${ac_cv_lib_pthread_pthread_create+:} false; then : + $as_echo_n "(cached) " >&6 +else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6763,29 +5968,30 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif char pthread_create (); int -main (void) +main () { return pthread_create (); ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO" -then : +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes -else $as_nop +else ac_cv_lib_pthread_pthread_create=no fi -rm -f core conftest.err conftest.$ac_objext conftest.beam \ +rm -f core conftest.err conftest.$ac_objext \ 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 : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 +$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } +if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : PTHREAD_LIBS="-lpthread" fi @@ -6794,33 +6000,32 @@ fi LDFLAGS="$PTHREAD_LDFLAGS $LDFLAGS" # PTHREAD_LIBS="$PTHREAD_LIBS" -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether __uint128_t is supported" >&5 -printf %s "checking whether __uint128_t is supported... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __uint128_t is supported" >&5 +$as_echo_n "checking whether __uint128_t is supported... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ static __uint128_t i = 100; int -main (void) +main () { ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO" -then : +if ac_fn_c_try_compile "$LINENO"; then : -printf "%s\n" "#define USE_INT128 1" >>confdefs.h +$as_echo "#define USE_INT128 1" >>confdefs.h - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -else $as_nop - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 -printf "%s\n" "no" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # allow if in Makefile.am if test x$request_jansson = xtrue; then @@ -6889,8 +6094,7 @@ fi # libcurl install path (for mingw : --with-curl=/usr/local) # Check whether --with-curl was given. -if test ${with_curl+y} -then : +if test "${with_curl+set}" = set; then : withval=$with_curl; fi @@ -6905,8 +6109,7 @@ fi # SSL install path (for mingw : --with-crypto=/usr/local/ssl) # Check whether --with-crypto was given. -if test ${with_crypto+y} -then : +if test "${with_crypto+set}" = set; then : withval=$with_crypto; fi @@ -6972,8 +6175,8 @@ _ACEOF 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;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( @@ -7003,15 +6206,15 @@ printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} /^ac_cv_env_/b end t clear :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -printf "%s\n" "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else @@ -7025,8 +6228,8 @@ printf "%s\n" "$as_me: updating cache $cache_file" >&6;} 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -7043,7 +6246,7 @@ 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"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" @@ -7054,14 +6257,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 -printf %s "checking that generated files are newer than configure... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: done" >&5 -printf "%s\n" "done" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -7123,8 +6326,8 @@ fi 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_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL @@ -7147,16 +6350,14 @@ cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 # 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 : +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST -else $as_nop +else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( @@ -7166,46 +6367,46 @@ 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 +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi # The user is always right. -if ${PATH_SEPARATOR+false} :; then +if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || @@ -7214,6 +6415,13 @@ if ${PATH_SEPARATOR+false} :; then fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( @@ -7222,12 +6430,8 @@ case $0 in #(( 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 + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS @@ -7239,10 +6443,30 @@ 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 + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] @@ -7255,14 +6479,13 @@ 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 + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - printf "%s\n" "$as_me: error: $2" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error - # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. @@ -7289,20 +6512,18 @@ 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 : +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 +else as_fn_append () { eval $1=\$$1\$2 @@ -7314,13 +6535,12 @@ fi # as_fn_append # 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 : +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' -else $as_nop +else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` @@ -7351,7 +6571,7 @@ as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -7373,10 +6593,6 @@ 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*) @@ -7390,12 +6606,6 @@ case `echo -n x` in #((((( 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 @@ -7437,7 +6647,7 @@ as_fn_mkdir_p () as_dirs= while :; do case $as_dir in #( - *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" @@ -7446,7 +6656,7 @@ $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" | +$as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -7508,8 +6718,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by cpuminer-opt $as_me 3.22.1, which was -generated by GNU Autoconf 2.71. Invocation command line was +This file was extended by cpuminer-opt $as_me 3.22.2, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -7571,16 +6781,14 @@ $config_commands 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_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -cpuminer-opt config.status 3.22.1 -configured by $0, generated by GNU Autoconf 2.71, +cpuminer-opt config.status 3.22.2 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2021 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -7620,15 +6828,15 @@ do -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 ;; + $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) - printf "%s\n" "$ac_cs_config"; exit ;; + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" @@ -7636,7 +6844,7 @@ do --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in - *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; @@ -7645,7 +6853,7 @@ do as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) - printf "%s\n" "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; @@ -7673,7 +6881,7 @@ 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 + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" @@ -7687,7 +6895,7 @@ exec 5>>config.log sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - printf "%s\n" "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF @@ -7721,9 +6929,9 @@ done # 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 - test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree @@ -8059,7 +7267,7 @@ do 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 + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done @@ -8067,17 +7275,17 @@ do # 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' + $as_echo "$*" | 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) - ac_sed_conf_input=`printf "%s\n" "$configure_input" | + ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac @@ -8094,7 +7302,7 @@ $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" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -8118,9 +7326,9 @@ printf "%s\n" X"$ac_file" | 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|^\.[\\/]||'` + ac_dir_suffix=/`$as_echo "$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|/||'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -8182,8 +7390,8 @@ ac_sed_dataroot=' 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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' @@ -8227,9 +7435,9 @@ 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' + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 -printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" @@ -8245,20 +7453,20 @@ which seems to be undefined. Please make sure it is defined" >&2;} # if test x"$ac_file" != x-; then { - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - printf "%s\n" "/* $configure_input */" >&1 \ + $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi @@ -8278,7 +7486,7 @@ $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$_am_arg" | +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -8298,8 +7506,8 @@ printf "%s\n" X"$_am_arg" | s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -printf "%s\n" "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac @@ -8325,7 +7533,7 @@ esac for am_mf do # Strip MF so we end up with the name of the file. - am_mf=`printf "%s\n" "$am_mf" | sed -e 's/:.*$//'` + am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line @@ -8337,7 +7545,7 @@ $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X"$am_mf" | +$as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -8359,7 +7567,7 @@ printf "%s\n" X"$am_mf" | $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || -printf "%s\n" X/"$am_mf" | +$as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -8384,12 +7592,10 @@ printf "%s\n" X/"$am_mf" | (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; 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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "Something went wrong bootstrapping makefile fragments - for automatic dependency tracking. If GNU make was not used, consider - re-running the configure script with MAKE=\"gmake\" (or whatever is - necessary). You can also try re-running configure with the + for automatic dependency tracking. Try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } @@ -8435,8 +7641,7 @@ if test "$no_create" != yes; then $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;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi - diff --git a/configure.ac b/configure.ac index 4fb62fb..c74b7a0 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([cpuminer-opt], [3.22.1]) +AC_INIT([cpuminer-opt], [3.22.2]) AC_PREREQ([2.59c]) AC_CANONICAL_SYSTEM diff --git a/cpu-miner.c b/cpu-miner.c index e2ba90c..5f59481 100644 --- a/cpu-miner.c +++ b/cpu-miner.c @@ -3,7 +3,7 @@ * Copyright 2012-2014 pooler * Copyright 2014 Lucas Jones * Copyright 2014-2016 Tanguy Pruvot - * Copyright 2016-2021 Jay D Dee + * Copyright 2016-2023 Jay D Dee * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -121,7 +121,6 @@ static uint64_t opt_affinity = 0xFFFFFFFFFFFFFFFFULL; // default, use all cores int opt_priority = 0; // deprecated int num_cpus = 1; int num_cpugroups = 1; // For Windows -#define max_cpus 256 // max for affinity char *rpc_url = NULL; char *rpc_userpass = NULL; char *rpc_user, *rpc_pass; @@ -224,8 +223,7 @@ char* lp_id; static void workio_cmd_free(struct workio_cmd *wc); -// array mapping thread to cpu -static uint8_t thread_affinity_map[ max_cpus ]; +static int *thread_affinity_map; // display affinity mask graphically static void format_affinity_mask( char *mask_str, uint64_t mask ) @@ -867,6 +865,8 @@ static bool gbt_work_decode( const json_t *val, struct work *work ) sha256d( merkle_tree[i], merkle_tree[2*i], 64 ); } + work->tx_count = tx_count; + /* assemble block header */ algo_gate.build_block_header( work, swab32( version ), (uint32_t*) prevhash, (uint32_t*) merkle_tree, @@ -1613,14 +1613,14 @@ start: last_block_height = work->height; last_targetdiff = net_diff; - applog( LOG_BLUE, "New Block %d, Net Diff %.5g, Ntime %08x", - work->height, net_diff, + applog( LOG_BLUE, "New Block %d, Tx %d, Net Diff %.5g, Ntime %08x", + work->height, work->tx_count, net_diff, work->data[ algo_gate.ntime_index ] ); } else if ( memcmp( &work->data[1], &g_work.data[1], 32 ) ) - applog( LOG_BLUE, "New Work: Block %d, Net Diff %.5g, Ntime %08x", - work->height, net_diff, - work->data[ algo_gate.ntime_index ] ); + applog( LOG_BLUE, "New Work: Block %d, Tx %d, Net Diff %.5g, Ntime %08x", + work->height, work->tx_count, net_diff, + work->data[ algo_gate.ntime_index ] ); if ( !opt_quiet ) { @@ -2056,14 +2056,17 @@ static void stratum_gen_work( struct stratum_ctx *sctx, struct work *g_work ) pthread_mutex_unlock( &stats_lock ); if ( stratum_diff != sctx->job.diff ) - applog( LOG_BLUE, "New Stratum Diff %g, Block %d, Job %s", - sctx->job.diff, sctx->block_height, g_work->job_id ); + applog( LOG_BLUE, "New Stratum Diff %g, Block %d, Tx %d, Job %s", + sctx->job.diff, sctx->block_height, + sctx->job.merkle_count, g_work->job_id ); else if ( last_block_height != sctx->block_height ) - applog( LOG_BLUE, "New Block %d, Net diff %.5g, Job %s", - sctx->block_height, net_diff, g_work->job_id ); + applog( LOG_BLUE, "New Block %d, Tx %d, Netdiff %.5g, Job %s", + sctx->block_height, sctx->job.merkle_count, + net_diff, g_work->job_id ); else if ( g_work->job_id && new_job ) - applog( LOG_BLUE, "New Work: Block %d, Net diff %.5g, Job %s", - sctx->block_height, net_diff, g_work->job_id ); + applog( LOG_BLUE, "New Work: Block %d, Tx %d, Netdiff %.5g, Job %s", + sctx->block_height, sctx->job.merkle_count, + net_diff, g_work->job_id ); else if ( !opt_quiet ) { unsigned char *xnonce2str = bebin2hex( g_work->xnonce2, @@ -3769,24 +3772,29 @@ int main(int argc, char *argv[]) #endif #if defined(WIN32) && defined(WINDOWS_CPU_GROUPS_ENABLED) - if ( !opt_quiet ) - applog( LOG_INFO, "Found %d CPUs in %d groups", num_cpus, num_cpugroups ); + if ( opt_debug || ( !opt_quiet && num_cpugroups > 1 ) ) + applog( LOG_INFO, "Found %d CPUs in %d groups", + num_cpus, num_cpugroups ); #endif - if ( opt_affinity && num_cpus > max_cpus ) + const int map_size = opt_n_threads < num_cpus ? num_cpus : opt_n_threads; + thread_affinity_map = malloc( map_size * (sizeof (int)) ); + if ( !thread_affinity_map ) { - applog( LOG_WARNING, "More than %d CPUs, CPU affinity is disabled", - max_cpus ); + applog( LOG_ERR, "CPU Affinity disabled, memory allocation failed" ); opt_affinity = 0ULL; - } - + } if ( opt_affinity ) { - for ( int thr = 0, cpu = 0; thr < opt_n_threads; thr++, cpu++ ) + int active_cpus = 0; // total CPUs available using rolling affinity mask + for ( int thr = 0, cpu = 0; thr < map_size; thr++, cpu++ ) { while ( !( ( opt_affinity >> ( cpu & 63 ) ) & 1ULL ) ) cpu++; thread_affinity_map[ thr ] = cpu % num_cpus; + if ( cpu < num_cpus ) active_cpus++; } + if ( opt_n_threads > active_cpus ) + applog( LOG_WARNING, "Affinity: more threads (%d) than active CPUs (%d)", opt_n_threads, active_cpus ); if ( !opt_quiet ) { char affinity_mask[64]; diff --git a/miner.h b/miner.h index f9bba51..6ff5d4a 100644 --- a/miner.h +++ b/miner.h @@ -24,6 +24,11 @@ #endif /* _MSC_VER */ +// prevent questions from ARM users that don't read the requirements. +#if !defined(__x86_64__) +#error "CPU architecture not supported. Consult the requirements for supported CPUs." +#endif + #include #include #include @@ -410,7 +415,8 @@ struct work double stratum_diff; int height; char *txs; - char *workid; + int tx_count; + char *workid; char *job_id; size_t xnonce2_len; unsigned char *xnonce2; @@ -427,7 +433,8 @@ struct stratum_job unsigned char *coinbase; unsigned char *xnonce2; int merkle_count; - unsigned char **merkle; + int merkle_buf_size; + unsigned char **merkle; unsigned char version[4]; unsigned char nbits[4]; unsigned char ntime[4]; @@ -582,9 +589,11 @@ enum algos { ALGO_QUBIT, ALGO_SCRYPT, ALGO_SHA256D, + ALGO_SHA256DT, ALGO_SHA256Q, ALGO_SHA256T, ALGO_SHA3D, + ALGO_SHA512256D, ALGO_SHAVITE3, ALGO_SKEIN, ALGO_SKEIN2, @@ -675,9 +684,11 @@ static const char* const algo_names[] = { "qubit", "scrypt", "sha256d", + "sha256dt", "sha256q", "sha256t", "sha3d", + "sha512256d", "shavite3", "skein", "skein2", @@ -837,9 +848,11 @@ Options:\n\ scrypt:N scrypt(N, 1, 1)\n\ scryptn2 scrypt(1048576, 1,1)\n\ sha256d Double SHA-256\n\ + sha256dt Modified sha256d (Novo)\n\ sha256q Quad SHA-256, Pyrite (PYE)\n\ sha256t Triple SHA-256, Onecoin (OC)\n\ sha3d Double Keccak256 (BSHA3)\n\ + sha512256d Double SHA-512 (Radiant)\n\ shavite3 Shavite3\n\ skein Skein+Sha (Skeincoin)\n\ skein2 Double Skein (Woodcoin)\n\ diff --git a/simd-utils/intrlv.h b/simd-utils/intrlv.h index 97c2a02..4edb018 100644 --- a/simd-utils/intrlv.h +++ b/simd-utils/intrlv.h @@ -89,18 +89,18 @@ static inline void extr_lane_2x32( void *dst, const void *src, #if defined(__SSE4_1__) #define ILEAVE_4x32( D0, D1, D2, D3, S0, S1, S2, S3 ) \ - D0 = mm128_shuflmov_32( S0, 1, S1, 0 ); \ - D1 = mm128_shuflmov_32( S1, 0, S0, 1 ); \ - D2 = mm128_shuflmov_32( S2, 0, S0, 2 ); \ - D3 = mm128_shuflmov_32( S3, 0, S0, 3 ); \ - D0 = mm128_shuflmov_32( D0, 2, S2, 0 ); \ - D1 = mm128_shuflmov_32( D1, 2, S2, 1 ); \ - D2 = mm128_shuflmov_32( D2, 1, S1, 2 ); \ - D3 = mm128_shuflmov_32( D3, 1, S1, 3 ); \ - D0 = mm128_shuflmov_32( D0, 3, S3, 0 ); \ - D1 = mm128_shuflmov_32( D1, 3, S3, 1 ); \ - D2 = mm128_shuflmov_32( D2, 3, S3, 2 ); \ - D3 = mm128_shuflmov_32( D3, 2, S2, 3 ); + D0 = mm128_mov32_32( S0, 1, S1, 0 ); \ + D1 = mm128_mov32_32( S1, 0, S0, 1 ); \ + D2 = mm128_mov32_32( S2, 0, S0, 2 ); \ + D3 = mm128_mov32_32( S3, 0, S0, 3 ); \ + D0 = mm128_mov32_32( D0, 2, S2, 0 ); \ + D1 = mm128_mov32_32( D1, 2, S2, 1 ); \ + D2 = mm128_mov32_32( D2, 1, S1, 2 ); \ + D3 = mm128_mov32_32( D3, 1, S1, 3 ); \ + D0 = mm128_mov32_32( D0, 3, S3, 0 ); \ + D1 = mm128_mov32_32( D1, 3, S3, 1 ); \ + D2 = mm128_mov32_32( D2, 3, S3, 2 ); \ + D3 = mm128_mov32_32( D3, 2, S2, 3 ); #define LOAD_SRCE( S0, S1, S2, S3, src0, i0, src1, i1, src2, i2, src3, i3 ) \ S0 = _mm_load_si128( (const __m128i*)(src0) + (i0) ); \ @@ -406,28 +406,6 @@ static inline void extr_lane_4x32( void *d, const void *s, ((uint32_t*)d)[15] = ((const uint32_t*)s)[ lane+60 ]; } - - -// Still used by decred due to odd data size: 180 bytes -// bit_len must be multiple of 32 -static inline void mm128_intrlv_4x32x( void *dst, void *src0, void *src1, - void *src2, void *src3, const int bit_len ) -{ - uint32_t *d = (uint32_t*)dst; - uint32_t *s0 = (uint32_t*)src0; - uint32_t *s1 = (uint32_t*)src1; - uint32_t *s2 = (uint32_t*)src2; - uint32_t *s3 = (uint32_t*)src3; - - for ( int i = 0; i < bit_len >> 5; i++, d += 4 ) - { - *d = *(s0+i); - *(d+1) = *(s1+i); - *(d+2) = *(s2+i); - *(d+3) = *(s3+i); - } -} - #if defined(__SSSE3__) static inline void mm128_bswap32_80( void *d, void *s ) @@ -468,32 +446,6 @@ static inline void mm128_bswap32_80( void *d, void *s ) #endif -static inline void mm128_bswap32_intrlv80_4x32( void *d, const void *src ) -{ - uint32_t *s = (uint32_t*)src; - casti_m128i( d, 0 ) = _mm_set1_epi32( bswap_32( s[ 0] ) ); - casti_m128i( d, 1 ) = _mm_set1_epi32( bswap_32( s[ 1] ) ); - casti_m128i( d, 2 ) = _mm_set1_epi32( bswap_32( s[ 2] ) ); - casti_m128i( d, 3 ) = _mm_set1_epi32( bswap_32( s[ 3] ) ); - casti_m128i( d, 4 ) = _mm_set1_epi32( bswap_32( s[ 4] ) ); - casti_m128i( d, 5 ) = _mm_set1_epi32( bswap_32( s[ 5] ) ); - casti_m128i( d, 6 ) = _mm_set1_epi32( bswap_32( s[ 6] ) ); - casti_m128i( d, 7 ) = _mm_set1_epi32( bswap_32( s[ 7] ) ); - casti_m128i( d, 8 ) = _mm_set1_epi32( bswap_32( s[ 8] ) ); - casti_m128i( d, 9 ) = _mm_set1_epi32( bswap_32( s[ 9] ) ); - casti_m128i( d,10 ) = _mm_set1_epi32( bswap_32( s[10] ) ); - casti_m128i( d,11 ) = _mm_set1_epi32( bswap_32( s[11] ) ); - casti_m128i( d,12 ) = _mm_set1_epi32( bswap_32( s[12] ) ); - casti_m128i( d,13 ) = _mm_set1_epi32( bswap_32( s[13] ) ); - casti_m128i( d,14 ) = _mm_set1_epi32( bswap_32( s[14] ) ); - casti_m128i( d,15 ) = _mm_set1_epi32( bswap_32( s[15] ) ); - casti_m128i( d,16 ) = _mm_set1_epi32( bswap_32( s[16] ) ); - casti_m128i( d,17 ) = _mm_set1_epi32( bswap_32( s[17] ) ); - casti_m128i( d,18 ) = _mm_set1_epi32( bswap_32( s[18] ) ); - casti_m128i( d,19 ) = _mm_set1_epi32( bswap_32( s[19] ) ); -} - -/* static inline void mm128_bswap32_intrlv80_4x32( void *d, const void *src ) { __m128i s0 = casti_m128i( src,0 ); @@ -547,77 +499,10 @@ static inline void mm128_bswap32_intrlv80_4x32( void *d, const void *src ) casti_m128i( d,18 ) = _mm_shuffle_epi32( s4, 0xaa ); casti_m128i( d,19 ) = _mm_shuffle_epi32( s4, 0xff ); } -*/ + // 8x32 -#define ILEAVE_8x32( i ) do \ -{ \ - uint32_t *d = (uint32_t*)(dst) + ( (i) << 3 ); \ - d[0] = *( (const uint32_t*)(s0) +(i) ); \ - d[1] = *( (const uint32_t*)(s1) +(i) ); \ - d[2] = *( (const uint32_t*)(s2) +(i) ); \ - d[3] = *( (const uint32_t*)(s3) +(i) ); \ - d[4] = *( (const uint32_t*)(s4) +(i) ); \ - d[5] = *( (const uint32_t*)(s5) +(i) ); \ - d[6] = *( (const uint32_t*)(s6) +(i) ); \ - d[7] = *( (const uint32_t*)(s7) +(i) ); \ -} while(0) - -static inline void intrlv_8x32b( void *dst, const void *s0, const void *s1, - const void *s2, const void *s3, const void *s4, const void *s5, - const void *s6, const void *s7, const int bit_len ) -{ - for ( int i = 0; i < bit_len/32; i++ ) - ILEAVE_8x32( i ); -} - -/* -// default -static inline void intrlv_8x32( void *dst, const void *s0, const void *s1, - const void *s2, const void *s3, const void *s4, const void *s5, - const void *s6, const void *s7, const int bit_len ) -{ - ILEAVE_8x32( 0 ); ILEAVE_8x32( 1 ); - ILEAVE_8x32( 2 ); ILEAVE_8x32( 3 ); - ILEAVE_8x32( 4 ); ILEAVE_8x32( 5 ); - ILEAVE_8x32( 6 ); ILEAVE_8x32( 7 ); - if ( bit_len <= 256 ) return; - ILEAVE_8x32( 8 ); ILEAVE_8x32( 9 ); - ILEAVE_8x32( 10 ); ILEAVE_8x32( 11 ); - ILEAVE_8x32( 12 ); ILEAVE_8x32( 13 ); - ILEAVE_8x32( 14 ); ILEAVE_8x32( 15 ); - if ( bit_len <= 512 ) return; - ILEAVE_8x32( 16 ); ILEAVE_8x32( 17 ); - ILEAVE_8x32( 18 ); ILEAVE_8x32( 19 ); - if ( bit_len <= 640 ) return; - ILEAVE_8x32( 20 ); ILEAVE_8x32( 21 ); - ILEAVE_8x32( 22 ); ILEAVE_8x32( 23 ); - ILEAVE_8x32( 24 ); ILEAVE_8x32( 25 ); - ILEAVE_8x32( 26 ); ILEAVE_8x32( 27 ); - ILEAVE_8x32( 28 ); ILEAVE_8x32( 29 ); - ILEAVE_8x32( 30 ); ILEAVE_8x32( 31 ); -} -*/ - -/* default -static inline void intrlv_8x32_512( void *dst, const void *s0, const void *s1, - const void *s2, const void *s3, const void *s4, const void *s5, - const void *s6, const void *s7 ) -{ - ILEAVE_8x32( 0 ); ILEAVE_8x32( 1 ); - ILEAVE_8x32( 2 ); ILEAVE_8x32( 3 ); - ILEAVE_8x32( 4 ); ILEAVE_8x32( 5 ); - ILEAVE_8x32( 6 ); ILEAVE_8x32( 7 ); - ILEAVE_8x32( 8 ); ILEAVE_8x32( 9 ); - ILEAVE_8x32( 10 ); ILEAVE_8x32( 11 ); - ILEAVE_8x32( 12 ); ILEAVE_8x32( 13 ); - ILEAVE_8x32( 14 ); ILEAVE_8x32( 15 ); -} -*/ - -#undef ILEAVE_8x32 - #if defined(__SSE4_1__) static inline void intrlv_8x32( void *dst, const void *s0, const void *s1, @@ -820,71 +705,6 @@ static inline void dintrlv_8x32_512( void *dst0, void *dst1, void *dst2, #endif // SSE4_1 - -#define DLEAVE_8x32( i ) do \ -{ \ - const uint32_t *s = (const uint32_t*)(src) + ( (i) << 3 ); \ - *( (uint32_t*)(d0) +(i) ) = s[0]; \ - *( (uint32_t*)(d1) +(i) ) = s[1]; \ - *( (uint32_t*)(d2) +(i) ) = s[2]; \ - *( (uint32_t*)(d3) +(i) ) = s[3]; \ - *( (uint32_t*)(d4) +(i) ) = s[4]; \ - *( (uint32_t*)(d5) +(i) ) = s[5]; \ - *( (uint32_t*)(d6) +(i) ) = s[6]; \ - *( (uint32_t*)(d7) +(i) ) = s[7]; \ -} while(0) - -static inline void dintrlv_8x32b( void *d0, void *d1, void *d2, void *d3, - void *d4, void *d5, void *d6, void *d7, const void *src, - const int bit_len ) -{ - for ( int i = 0; i < bit_len/32; i++ ) - DLEAVE_8x32( i ); -} - -/* default -static inline void dintrlv_8x32( void *d0, void *d1, void *d2, void *d3, - void *d4, void *d5, void *d6, void *d7, const void *src, - const int bit_len ) -{ - DLEAVE_8x32( 0 ); DLEAVE_8x32( 1 ); - DLEAVE_8x32( 2 ); DLEAVE_8x32( 3 ); - DLEAVE_8x32( 4 ); DLEAVE_8x32( 5 ); - DLEAVE_8x32( 6 ); DLEAVE_8x32( 7 ); - if ( bit_len <= 256 ) return; - DLEAVE_8x32( 8 ); DLEAVE_8x32( 9 ); - DLEAVE_8x32( 10 ); DLEAVE_8x32( 11 ); - DLEAVE_8x32( 12 ); DLEAVE_8x32( 13 ); - DLEAVE_8x32( 14 ); DLEAVE_8x32( 15 ); - if ( bit_len <= 512 ) return; - DLEAVE_8x32( 16 ); DLEAVE_8x32( 17 ); - DLEAVE_8x32( 18 ); DLEAVE_8x32( 19 ); - if ( bit_len <= 640 ) return; - DLEAVE_8x32( 20 ); DLEAVE_8x32( 21 ); - DLEAVE_8x32( 22 ); DLEAVE_8x32( 23 ); - DLEAVE_8x32( 24 ); DLEAVE_8x32( 25 ); - DLEAVE_8x32( 26 ); DLEAVE_8x32( 27 ); - DLEAVE_8x32( 28 ); DLEAVE_8x32( 29 ); - DLEAVE_8x32( 30 ); DLEAVE_8x32( 31 ); -} -*/ - -/* default -static inline void dintrlv_8x32_512( void *d0, void *d1, void *d2, void *d3, - void *d4, void *d5, void *d6, void *d7, const void *src ) -{ - DLEAVE_8x32( 0 ); DLEAVE_8x32( 1 ); - DLEAVE_8x32( 2 ); DLEAVE_8x32( 3 ); - DLEAVE_8x32( 4 ); DLEAVE_8x32( 5 ); - DLEAVE_8x32( 6 ); DLEAVE_8x32( 7 ); - DLEAVE_8x32( 8 ); DLEAVE_8x32( 9 ); - DLEAVE_8x32( 10 ); DLEAVE_8x32( 11 ); - DLEAVE_8x32( 12 ); DLEAVE_8x32( 13 ); - DLEAVE_8x32( 14 ); DLEAVE_8x32( 15 ); -} -*/ -#undef DLEAVE_8x32 - static inline void extr_lane_8x32( void *d, const void *s, const int lane, const int bit_len ) { @@ -909,31 +729,6 @@ static inline void extr_lane_8x32( void *d, const void *s, #if defined(__AVX2__) -static inline void mm256_bswap32_intrlv80_8x32( void *d, const void *src ) -{ - uint32_t *s = (uint32_t*)src; - casti_m256i( d, 0 ) = _mm256_set1_epi32( bswap_32( s[ 0] ) ); - casti_m256i( d, 1 ) = _mm256_set1_epi32( bswap_32( s[ 1] ) ); - casti_m256i( d, 2 ) = _mm256_set1_epi32( bswap_32( s[ 2] ) ); - casti_m256i( d, 3 ) = _mm256_set1_epi32( bswap_32( s[ 3] ) ); - casti_m256i( d, 4 ) = _mm256_set1_epi32( bswap_32( s[ 4] ) ); - casti_m256i( d, 5 ) = _mm256_set1_epi32( bswap_32( s[ 5] ) ); - casti_m256i( d, 6 ) = _mm256_set1_epi32( bswap_32( s[ 6] ) ); - casti_m256i( d, 7 ) = _mm256_set1_epi32( bswap_32( s[ 7] ) ); - casti_m256i( d, 8 ) = _mm256_set1_epi32( bswap_32( s[ 8] ) ); - casti_m256i( d, 9 ) = _mm256_set1_epi32( bswap_32( s[ 9] ) ); - casti_m256i( d,10 ) = _mm256_set1_epi32( bswap_32( s[10] ) ); - casti_m256i( d,11 ) = _mm256_set1_epi32( bswap_32( s[11] ) ); - casti_m256i( d,12 ) = _mm256_set1_epi32( bswap_32( s[12] ) ); - casti_m256i( d,13 ) = _mm256_set1_epi32( bswap_32( s[13] ) ); - casti_m256i( d,14 ) = _mm256_set1_epi32( bswap_32( s[14] ) ); - casti_m256i( d,15 ) = _mm256_set1_epi32( bswap_32( s[15] ) ); - casti_m256i( d,16 ) = _mm256_set1_epi32( bswap_32( s[16] ) ); - casti_m256i( d,17 ) = _mm256_set1_epi32( bswap_32( s[17] ) ); - casti_m256i( d,18 ) = _mm256_set1_epi32( bswap_32( s[18] ) ); - casti_m256i( d,19 ) = _mm256_set1_epi32( bswap_32( s[19] ) ); -} -/* static inline void mm256_bswap32_intrlv80_8x32( void *d, const void *src ) { __m128i bswap_shuf = m128_const_64( 0x0c0d0e0f08090a0b, 0x0405060700010203 ); @@ -994,7 +789,7 @@ static inline void mm256_bswap32_intrlv80_8x32( void *d, const void *src ) casti_m128i( d,38 ) = casti_m128i( d,39 ) = _mm_shuffle_epi32( s4 , 0xff ); } -*/ + #endif // AVX2 @@ -1355,28 +1150,6 @@ static inline void dintrlv_16x32_512( void *dst00, void *dst01, void *dst02, #endif // SSE4_1 - -#define DLEAVE_16x32( i ) do \ -{ \ - const uint32_t *s = (const uint32_t*)(src) + ( (i) << 4 ); \ - *( (uint32_t*)(d00) +(i) ) = s[ 0]; \ - *( (uint32_t*)(d01) +(i) ) = s[ 1]; \ - *( (uint32_t*)(d02) +(i) ) = s[ 2]; \ - *( (uint32_t*)(d03) +(i) ) = s[ 3]; \ - *( (uint32_t*)(d04) +(i) ) = s[ 4]; \ - *( (uint32_t*)(d05) +(i) ) = s[ 5]; \ - *( (uint32_t*)(d06) +(i) ) = s[ 6]; \ - *( (uint32_t*)(d07) +(i) ) = s[ 7]; \ - *( (uint32_t*)(d08) +(i) ) = s[ 8]; \ - *( (uint32_t*)(d09) +(i) ) = s[ 9]; \ - *( (uint32_t*)(d10) +(i) ) = s[10]; \ - *( (uint32_t*)(d11) +(i) ) = s[11]; \ - *( (uint32_t*)(d12) +(i) ) = s[12]; \ - *( (uint32_t*)(d13) +(i) ) = s[13]; \ - *( (uint32_t*)(d14) +(i) ) = s[14]; \ - *( (uint32_t*)(d15) +(i) ) = s[15]; \ -} while(0) - static inline void extr_lane_16x32( void *d, const void *s, const int lane, const int bit_len ) { @@ -1401,31 +1174,6 @@ static inline void extr_lane_16x32( void *d, const void *s, #if defined(__AVX512F__) && defined(__AVX512VL__) -static inline void mm512_bswap32_intrlv80_16x32( void *d, const void *src ) -{ - uint32_t *s = (uint32_t*)src; - casti_m512i( d, 0 ) = _mm512_set1_epi32( bswap_32( s[ 0] ) ); - casti_m512i( d, 1 ) = _mm512_set1_epi32( bswap_32( s[ 1] ) ); - casti_m512i( d, 2 ) = _mm512_set1_epi32( bswap_32( s[ 2] ) ); - casti_m512i( d, 3 ) = _mm512_set1_epi32( bswap_32( s[ 3] ) ); - casti_m512i( d, 4 ) = _mm512_set1_epi32( bswap_32( s[ 4] ) ); - casti_m512i( d, 5 ) = _mm512_set1_epi32( bswap_32( s[ 5] ) ); - casti_m512i( d, 6 ) = _mm512_set1_epi32( bswap_32( s[ 6] ) ); - casti_m512i( d, 7 ) = _mm512_set1_epi32( bswap_32( s[ 7] ) ); - casti_m512i( d, 8 ) = _mm512_set1_epi32( bswap_32( s[ 8] ) ); - casti_m512i( d, 9 ) = _mm512_set1_epi32( bswap_32( s[ 9] ) ); - casti_m512i( d,10 ) = _mm512_set1_epi32( bswap_32( s[10] ) ); - casti_m512i( d,11 ) = _mm512_set1_epi32( bswap_32( s[11] ) ); - casti_m512i( d,12 ) = _mm512_set1_epi32( bswap_32( s[12] ) ); - casti_m512i( d,13 ) = _mm512_set1_epi32( bswap_32( s[13] ) ); - casti_m512i( d,14 ) = _mm512_set1_epi32( bswap_32( s[14] ) ); - casti_m512i( d,15 ) = _mm512_set1_epi32( bswap_32( s[15] ) ); - casti_m512i( d,16 ) = _mm512_set1_epi32( bswap_32( s[16] ) ); - casti_m512i( d,17 ) = _mm512_set1_epi32( bswap_32( s[17] ) ); - casti_m512i( d,18 ) = _mm512_set1_epi32( bswap_32( s[18] ) ); - casti_m512i( d,19 ) = _mm512_set1_epi32( bswap_32( s[19] ) ); -} -/* static inline void mm512_bswap32_intrlv80_16x32( void *d, const void *src ) { __m128i bswap_shuf = m128_const_64( 0x0c0d0e0f08090a0b, 0x0405060700010203 ); @@ -1441,92 +1189,32 @@ static inline void mm512_bswap32_intrlv80_16x32( void *d, const void *src ) s3 = _mm_shuffle_epi8( s3, bswap_shuf ); s4 = _mm_shuffle_epi8( s4, bswap_shuf ); - casti_m128i( d, 0 ) = - casti_m128i( d, 1 ) = - casti_m128i( d, 2 ) = - casti_m128i( d, 3 ) = _mm_shuffle_epi32( s0 , 0x00 ); - casti_m128i( d, 4 ) = - casti_m128i( d, 5 ) = - casti_m128i( d, 6 ) = - casti_m128i( d, 7 ) = _mm_shuffle_epi32( s0 , 0x55 ); - casti_m128i( d, 8 ) = - casti_m128i( d, 9 ) = - casti_m128i( d,10 ) = - casti_m128i( d,11 ) = _mm_shuffle_epi32( s0 , 0xaa ); - casti_m128i( d,12 ) = - casti_m128i( d,13 ) = - casti_m128i( d,14 ) = - casti_m128i( d,15 ) = _mm_shuffle_epi32( s0 , 0xff ); + casti_m512i( d, 0 ) = mm512_bcast_m128( _mm_shuffle_epi32( s0 , 0x00 ) ); + casti_m512i( d, 1 ) = mm512_bcast_m128( _mm_shuffle_epi32( s0 , 0x55 ) ); + casti_m512i( d, 2 ) = mm512_bcast_m128( _mm_shuffle_epi32( s0 , 0xaa ) ); + casti_m512i( d, 3 ) = mm512_bcast_m128( _mm_shuffle_epi32( s0 , 0xff ) ); - casti_m128i( d,16 ) = - casti_m128i( d,17 ) = - casti_m128i( d,18 ) = - casti_m128i( d,19 ) = _mm_shuffle_epi32( s1 , 0x00 ); - casti_m128i( d,20 ) = - casti_m128i( d,21 ) = - casti_m128i( d,22 ) = - casti_m128i( d,23 ) = _mm_shuffle_epi32( s1 , 0x55 ); - casti_m128i( d,24 ) = - casti_m128i( d,25 ) = - casti_m128i( d,26 ) = - casti_m128i( d,27 ) = _mm_shuffle_epi32( s1 , 0xaa ); - casti_m128i( d,28 ) = - casti_m128i( d,29 ) = - casti_m128i( d,30 ) = - casti_m128i( d,31 ) = _mm_shuffle_epi32( s1 , 0xff ); + casti_m512i( d, 4 ) = mm512_bcast_m128( _mm_shuffle_epi32( s1 , 0x00 ) ); + casti_m512i( d, 5 ) = mm512_bcast_m128( _mm_shuffle_epi32( s1 , 0x55 ) ); + casti_m512i( d, 6 ) = mm512_bcast_m128( _mm_shuffle_epi32( s1 , 0xaa ) ); + casti_m512i( d, 7 ) = mm512_bcast_m128( _mm_shuffle_epi32( s1 , 0xff ) ); - casti_m128i( d,32 ) = - casti_m128i( d,33 ) = - casti_m128i( d,34 ) = - casti_m128i( d,35 ) = _mm_shuffle_epi32( s2 , 0x00 ); - casti_m128i( d,36 ) = - casti_m128i( d,37 ) = - casti_m128i( d,38 ) = - casti_m128i( d,39 ) = _mm_shuffle_epi32( s2 , 0x55 ); - casti_m128i( d,40 ) = - casti_m128i( d,41 ) = - casti_m128i( d,42 ) = - casti_m128i( d,43 ) = _mm_shuffle_epi32( s2 , 0xaa ); - casti_m128i( d,44 ) = - casti_m128i( d,45 ) = - casti_m128i( d,46 ) = - casti_m128i( d,47 ) = _mm_shuffle_epi32( s2 , 0xff ); + casti_m512i( d, 8 ) = mm512_bcast_m128( _mm_shuffle_epi32( s2 , 0x00 ) ); + casti_m512i( d, 9 ) = mm512_bcast_m128( _mm_shuffle_epi32( s2 , 0x55 ) ); + casti_m512i( d,10 ) = mm512_bcast_m128( _mm_shuffle_epi32( s2 , 0xaa ) ); + casti_m512i( d,11 ) = mm512_bcast_m128( _mm_shuffle_epi32( s2 , 0xff ) ); - casti_m128i( d,48 ) = - casti_m128i( d,49 ) = - casti_m128i( d,50 ) = - casti_m128i( d,51 ) = _mm_shuffle_epi32( s3 , 0x00 ); - casti_m128i( d,52 ) = - casti_m128i( d,53 ) = - casti_m128i( d,54 ) = - casti_m128i( d,55 ) = _mm_shuffle_epi32( s3 , 0x55 ); - casti_m128i( d,56 ) = - casti_m128i( d,57 ) = - casti_m128i( d,58 ) = - casti_m128i( d,59 ) = _mm_shuffle_epi32( s3 , 0xaa ); - casti_m128i( d,60 ) = - casti_m128i( d,61 ) = - casti_m128i( d,62 ) = - casti_m128i( d,63 ) = _mm_shuffle_epi32( s3 , 0xff ); + casti_m512i( d,12 ) = mm512_bcast_m128( _mm_shuffle_epi32( s3 , 0x00 ) ); + casti_m512i( d,13 ) = mm512_bcast_m128( _mm_shuffle_epi32( s3 , 0x55 ) ); + casti_m512i( d,14 ) = mm512_bcast_m128( _mm_shuffle_epi32( s3 , 0xaa ) ); + casti_m512i( d,15 ) = mm512_bcast_m128( _mm_shuffle_epi32( s3 , 0xff ) ); - casti_m128i( d,64 ) = - casti_m128i( d,65 ) = - casti_m128i( d,66 ) = - casti_m128i( d,67 ) = _mm_shuffle_epi32( s4 , 0x00 ); - casti_m128i( d,68 ) = - casti_m128i( d,69 ) = - casti_m128i( d,70 ) = - casti_m128i( d,71 ) = _mm_shuffle_epi32( s4 , 0x55 ); - casti_m128i( d,72 ) = - casti_m128i( d,73 ) = - casti_m128i( d,74 ) = - casti_m128i( d,75 ) = _mm_shuffle_epi32( s4 , 0xaa ); - casti_m128i( d,76 ) = - casti_m128i( d,77 ) = - casti_m128i( d,78 ) = - casti_m128i( d,79 ) = _mm_shuffle_epi32( s4 , 0xff ); + casti_m512i( d,16 ) = mm512_bcast_m128( _mm_shuffle_epi32( s4 , 0x00 ) ); + casti_m512i( d,17 ) = mm512_bcast_m128( _mm_shuffle_epi32( s4 , 0x55 ) ); + casti_m512i( d,18 ) = mm512_bcast_m128( _mm_shuffle_epi32( s4 , 0xaa ) ); + casti_m512i( d,19 ) = mm512_bcast_m128( _mm_shuffle_epi32( s4 , 0xff ) ); } -*/ + #endif // AVX512 @@ -1534,47 +1222,6 @@ static inline void mm512_bswap32_intrlv80_16x32( void *d, const void *src ) // // 64 bit data -// 2x64 (SSE2) - -static inline void intrlv_2x64( void *dst, const void *src0, - const void *src1, const int bit_len ) -{ - uint64_t *d = (uint64_t*)dst;; - const uint64_t *s0 = (const uint64_t*)src0; - const uint64_t *s1 = (const uint64_t*)src1; - d[ 0] = s0[ 0]; d[ 1] = s1[ 0]; d[ 2] = s0[ 1]; d[ 3] = s1[ 1]; - d[ 4] = s0[ 2]; d[ 5] = s1[ 2]; d[ 6] = s0[ 3]; d[ 7] = s1[ 3]; - if ( bit_len <= 256 ) return; - d[ 8] = s0[ 4]; d[ 9] = s1[ 4]; d[10] = s0[ 5]; d[11] = s1[ 5]; - d[12] = s0[ 6]; d[13] = s1[ 6]; d[14] = s0[ 7]; d[15] = s1[ 7]; - if ( bit_len <= 512 ) return; - d[16] = s0[ 8]; d[17] = s1[ 8]; d[18] = s0[ 9]; d[19] = s1[ 9]; - if ( bit_len <= 640 ) return; - d[20] = s0[10]; d[21] = s1[10]; d[22] = s0[11]; d[23] = s1[11]; - d[24] = s0[12]; d[25] = s1[12]; d[26] = s0[13]; d[27] = s1[13]; - d[28] = s0[14]; d[29] = s1[14]; d[30] = s0[15]; d[31] = s1[15]; -} - -static inline void dintrlv_2x64( void *dst0, void *dst1, - const void *src, const int bit_len ) -{ - uint64_t *d0 = (uint64_t*)dst0; - uint64_t *d1 = (uint64_t*)dst1; - const uint64_t *s = (const uint64_t*)src; - - d0[ 0] = s[ 0]; d1[ 0] = s[ 1]; d0[ 1] = s[ 2]; d1[ 1] = s[ 3]; - d0[ 2] = s[ 4]; d1[ 2] = s[ 5]; d0[ 3] = s[ 6]; d1[ 3] = s[ 7]; - if ( bit_len <= 256 ) return; - d0[ 4] = s[ 8]; d1[ 4] = s[ 9]; d0[ 5] = s[10]; d1[ 5] = s[11]; - d0[ 6] = s[12]; d1[ 6] = s[13]; d0[ 7] = s[14]; d1[ 7] = s[15]; - if ( bit_len <= 512 ) return; - d0[ 8] = s[16]; d1[ 8] = s[17]; d0[ 9] = s[18]; d1[ 9] = s[19]; - if ( bit_len <= 640 ) return; - d0[10] = s[20]; d1[10] = s[21]; d0[11] = s[22]; d1[11] = s[23]; - d0[12] = s[24]; d1[12] = s[25]; d0[13] = s[26]; d1[13] = s[27]; - d0[14] = s[28]; d1[14] = s[29]; d0[15] = s[30]; d1[15] = s[31]; -} - // 4x64 (AVX2) static inline void intrlv_4x64( void *dst, const void *src0, @@ -2149,19 +1796,19 @@ static inline void extr_lane_8x64( void *dst, const void *src, const int lane, // broadcast to all lanes static inline void mm512_intrlv80_8x64( void *dst, const void *src ) { - __m128i *d = (__m128i*)dst; + __m512i *d = (__m512i*)dst; const __m128i *s = (const __m128i*)src; - d[ 0] = d[ 1] = d[ 2] = d[ 3] = _mm_shuffle_epi32( s[0], 0x44 ); - d[ 4] = d[ 5] = d[ 6] = d[ 7] = _mm_shuffle_epi32( s[0], 0xee ); - d[ 8] = d[ 9] = d[10] = d[11] = _mm_shuffle_epi32( s[1], 0x44 ); - d[12] = d[13] = d[14] = d[15] = _mm_shuffle_epi32( s[1], 0xee ); - d[16] = d[17] = d[18] = d[19] = _mm_shuffle_epi32( s[2], 0x44 ); - d[20] = d[21] = d[22] = d[23] = _mm_shuffle_epi32( s[2], 0xee ); - d[24] = d[25] = d[26] = d[27] = _mm_shuffle_epi32( s[3], 0x44 ); - d[28] = d[29] = d[30] = d[31] = _mm_shuffle_epi32( s[3], 0xee ); - d[32] = d[33] = d[34] = d[35] = _mm_shuffle_epi32( s[4], 0x44 ); - d[36] = d[37] = d[38] = d[39] = _mm_shuffle_epi32( s[4], 0xee ); + d[ 0] = mm512_bcast_m128( _mm_shuffle_epi32( s[0], 0x44 ) ); + d[ 1] = mm512_bcast_m128( _mm_shuffle_epi32( s[0], 0xee ) ); + d[ 2] = mm512_bcast_m128( _mm_shuffle_epi32( s[1], 0x44 ) ); + d[ 3] = mm512_bcast_m128( _mm_shuffle_epi32( s[1], 0xee ) ); + d[ 4] = mm512_bcast_m128( _mm_shuffle_epi32( s[2], 0x44 ) ); + d[ 5] = mm512_bcast_m128( _mm_shuffle_epi32( s[2], 0xee ) ); + d[ 6] = mm512_bcast_m128( _mm_shuffle_epi32( s[3], 0x44 ) ); + d[ 7] = mm512_bcast_m128( _mm_shuffle_epi32( s[3], 0xee ) ); + d[ 8] = mm512_bcast_m128( _mm_shuffle_epi32( s[4], 0x44 ) ); + d[ 9] = mm512_bcast_m128( _mm_shuffle_epi32( s[4], 0xee ) ); } // byte swap and broadcast to al lanes @@ -2180,50 +1827,16 @@ static inline void mm512_bswap32_intrlv80_8x64( void *d, const void *src ) s3 = _mm_shuffle_epi8( s3, bswap_shuf ); s4 = _mm_shuffle_epi8( s4, bswap_shuf ); - casti_m128i( d, 0 ) = - casti_m128i( d, 1 ) = - casti_m128i( d, 2 ) = - casti_m128i( d, 3 ) = _mm_shuffle_epi32( s0, 0x44 ); - casti_m128i( d, 4 ) = - casti_m128i( d, 5 ) = - casti_m128i( d, 6 ) = - casti_m128i( d, 7 ) = _mm_shuffle_epi32( s0, 0xee ); - - casti_m128i( d, 8 ) = - casti_m128i( d, 9 ) = - casti_m128i( d, 10 ) = - casti_m128i( d, 11 ) = _mm_shuffle_epi32( s1, 0x44 ); - casti_m128i( d, 12 ) = - casti_m128i( d, 13 ) = - casti_m128i( d, 14 ) = - casti_m128i( d, 15 ) = _mm_shuffle_epi32( s1, 0xee ); - - casti_m128i( d, 16 ) = - casti_m128i( d, 17 ) = - casti_m128i( d, 18 ) = - casti_m128i( d, 19 ) = _mm_shuffle_epi32( s2, 0x44 ); - casti_m128i( d, 20 ) = - casti_m128i( d, 21 ) = - casti_m128i( d, 22 ) = - casti_m128i( d, 23 ) = _mm_shuffle_epi32( s2, 0xee ); - - casti_m128i( d, 24 ) = - casti_m128i( d, 25 ) = - casti_m128i( d, 26 ) = - casti_m128i( d, 27 ) = _mm_shuffle_epi32( s3, 0x44 ); - casti_m128i( d, 28 ) = - casti_m128i( d, 29 ) = - casti_m128i( d, 30 ) = - casti_m128i( d, 31 ) = _mm_shuffle_epi32( s3, 0xee ); - - casti_m128i( d, 32 ) = - casti_m128i( d, 33 ) = - casti_m128i( d, 34 ) = - casti_m128i( d, 35 ) = _mm_shuffle_epi32( s4, 0x44 ); - casti_m128i( d, 36 ) = - casti_m128i( d, 37 ) = - casti_m128i( d, 38 ) = - casti_m128i( d, 39 ) = _mm_shuffle_epi32( s4, 0xee ); + casti_m512i( d, 0 ) = mm512_bcast_m128( _mm_shuffle_epi32( s0, 0x44 ) ); + casti_m512i( d, 1 ) = mm512_bcast_m128( _mm_shuffle_epi32( s0, 0xee ) ); + casti_m512i( d, 2 ) = mm512_bcast_m128( _mm_shuffle_epi32( s1, 0x44 ) ); + casti_m512i( d, 3 ) = mm512_bcast_m128( _mm_shuffle_epi32( s1, 0xee ) ); + casti_m512i( d, 4 ) = mm512_bcast_m128( _mm_shuffle_epi32( s2, 0x44 ) ); + casti_m512i( d, 5 ) = mm512_bcast_m128( _mm_shuffle_epi32( s2, 0xee ) ); + casti_m512i( d, 6 ) = mm512_bcast_m128( _mm_shuffle_epi32( s3, 0x44 ) ); + casti_m512i( d, 7 ) = mm512_bcast_m128( _mm_shuffle_epi32( s3, 0xee ) ); + casti_m512i( d, 8 ) = mm512_bcast_m128( _mm_shuffle_epi32( s4, 0x44 ) ); + casti_m512i( d, 9 ) = mm512_bcast_m128( _mm_shuffle_epi32( s4, 0xee ) ); } #endif // AVX512 @@ -2395,11 +2008,11 @@ static inline void mm512_bswap32_intrlv80_4x128( void *d, void *src ) s3 = _mm_shuffle_epi8( s3, bswap_shuf ); s4 = _mm_shuffle_epi8( s4, bswap_shuf ); - casti_m512i( d, 0 ) = _mm512_broadcast_i64x2( s0 ); - casti_m512i( d, 1 ) = _mm512_broadcast_i64x2( s1 ); - casti_m512i( d, 2 ) = _mm512_broadcast_i64x2( s2 ); - casti_m512i( d, 3 ) = _mm512_broadcast_i64x2( s3 ); - casti_m512i( d, 4 ) = _mm512_broadcast_i64x2( s4 ); + casti_m512i( d, 0 ) = mm512_bcast_m128( s0 ); + casti_m512i( d, 1 ) = mm512_bcast_m128( s1 ); + casti_m512i( d, 2 ) = mm512_bcast_m128( s2 ); + casti_m512i( d, 3 ) = mm512_bcast_m128( s3 ); + casti_m512i( d, 4 ) = mm512_bcast_m128( s4 ); } #endif diff --git a/simd-utils/simd-128.h b/simd-utils/simd-128.h index 9fd803c..1da34a4 100644 --- a/simd-utils/simd-128.h +++ b/simd-utils/simd-128.h @@ -93,10 +93,15 @@ static inline uint32_t u32_mov128_32( const __m128i a ) return n; } -// Equivalent of set1, broadcast integer to all elements. -#define m128_const_i128( i ) mm128_mov64_128( i ) -#define m128_const1_64( i ) _mm_shuffle_epi32( mm128_mov64_128( i ), 0x44 ) -#define m128_const1_32( i ) _mm_shuffle_epi32( mm128_mov32_128( i ), 0x00 ) +// Emulate broadcast & insert instructions not available in SSE2 +#define mm128_bcast_i64( i ) _mm_shuffle_epi32( mm128_mov64_128( i ), 0x44 ) +#define mm128_bcast_i32( i ) _mm_shuffle_epi32( mm128_mov32_128( i ), 0x00 ) + +#define m128_const_i128( i ) mm128_mov64_128( i ) + +// deprecated +#define m128_const1_64 mm128_bcast_i64 +#define m128_const1_32 mm128_bcast_i32 #if defined(__SSE4_1__) @@ -104,7 +109,7 @@ static inline uint32_t u32_mov128_32( const __m128i a ) #define m128_const_64( hi, lo ) \ _mm_insert_epi64( mm128_mov64_128( lo ), hi, 1 ) -#else // No insert in SSE2 +#else #define m128_const_64 _mm_set_epi64x @@ -114,12 +119,10 @@ static inline uint32_t u32_mov128_32( const __m128i a ) #define m128_zero _mm_setzero_si128() #define m128_one_128 mm128_mov64_128( 1 ) -#define m128_one_64 _mm_shuffle_epi32( mm128_mov64_128( 1 ), 0x44 ) -#define m128_one_32 _mm_shuffle_epi32( mm128_mov32_128( 1 ), 0x00 ) -#define m128_one_16 _mm_shuffle_epi32( \ - mm128_mov32_128( 0x00010001 ), 0x00 ) -#define m128_one_8 _mm_shuffle_epi32( \ - mm128_mov32_128( 0x01010101 ), 0x00 ) +#define m128_one_64 mm128_bcast_i64( 1 ) +#define m128_one_32 mm128_bcast_i32( 1 ) +#define m128_one_16 mm128_bcast_i32( 0x00010001 ) +#define m128_one_8 mm128_bcast_i32( 0x01010101 ) // ASM avoids the need to initialize return variable to avoid compiler warning. // Macro abstracts function parentheses to look like an identifier. @@ -149,7 +152,7 @@ static inline __m128i mm128_neg1_fn() // sizing. It's unique. // // It can: -// - zero 32 bit elements of a 128 bit vector. +// - zero any number of 32 bit elements of a 128 bit vector. // - extract any 32 bit element from one 128 bit vector and insert the // data to any 32 bit element of another 128 bit vector, or the same vector. // - do both simultaneoulsly. @@ -162,14 +165,21 @@ static inline __m128i mm128_neg1_fn() // c[5:4] destination element selector // c[7:6] source element selector -// Convert type and abbreviate name: e"x"tract "i"nsert "m"ask +// Convert type and abbreviate name: eXtract Insert Mask = XIM #define mm128_xim_32( v1, v2, c ) \ _mm_castps_si128( _mm_insert_ps( _mm_castsi128_ps( v1 ), \ _mm_castsi128_ps( v2 ), c ) ) -// Some examples of simple operations: +/* Another way to do it with individual arguments. +#define mm128_xim_32( v1, i1, v2, i2, mask ) \ + _mm_castps_si128( _mm_insert_ps( _mm_castsi128_ps( v1 ), \ + _mm_castsi128_ps( v2 ), \ + (mask) | ((i1)<<4) | ((i2)<<6) ) ) +*/ -// Insert 32 bit integer into v at element c and return modified v. +// Examples of simple operations using xim: + +// Insert 32 bit integer into v at element c and return updated v. static inline __m128i mm128_insert_32( const __m128i v, const uint32_t i, const int c ) { return mm128_xim_32( v, mm128_mov32_128( i ), c<<4 ); } @@ -178,13 +188,12 @@ static inline __m128i mm128_insert_32( const __m128i v, const uint32_t i, static inline uint32_t mm128_extract_32( const __m128i v, const int c ) { return u32_mov128_32( mm128_xim_32( v, v, c<<6 ) ); } -// Clear (zero) 32 bit elements based on bits set in 4 bit mask. +// Zero 32 bit elements when bit in mask is set. static inline __m128i mm128_mask_32( const __m128i v, const int m ) { return mm128_xim_32( v, v, m ); } -// Move element i2 of v2 to element i1 of v1. For reference and convenience, -// it's faster to precalculate the index. -#define mm128_shuflmov_32( v1, i1, v2, i2 ) \ +// Move element i2 of v2 to element i1 of v1 and return updated v1. +#define mm128_mov32_32( v1, i1, v2, i2 ) \ mm128_xim_32( v1, v2, ( (i1)<<4 ) | ( (i2)<<6 ) ) #endif // SSE4_1 @@ -280,7 +289,7 @@ static inline void memcpy_128( __m128i *dst, const __m128i *src, const int n ) // Mask making // Equivalent of AVX512 _mm_movepi64_mask & _mm_movepi32_mask. -// Returns 2 or 4 bit integer mask from MSB of 64 or 32 bit elements. +// Returns 2 or 4 bit integer mask from MSBit of 64 or 32 bit elements. // Effectively a sign test. #define mm_movmask_64( v ) \ @@ -385,6 +394,7 @@ static inline void memcpy_128( __m128i *dst, const __m128i *src, const int n ) #define mm128_rol_var_32( v, c ) \ _mm_or_si128( _mm_slli_epi32( v, c ), _mm_srli_epi32( v, 32-(c) ) ) +// Cross lane shuffles // // Limited 2 input shuffle, combines shuffle with blend. The destination low // half is always taken from v1, and the high half from v2. @@ -396,12 +406,11 @@ static inline void memcpy_128( __m128i *dst, const __m128i *src, const int n ) _mm_castps_si128( _mm_shuffle_ps( _mm_castsi128_ps( v1 ), \ _mm_castsi128_ps( v2 ), c ) ); -// // Rotate vector elements accross all lanes -#define mm128_swap_64( v ) _mm_shuffle_epi32( v, 0x4e ) -#define mm128_shuflr_64 mm128_swap_64 -#define mm128_shufll_64 mm128_swap_64 +#define mm128_swap_64( v ) _mm_shuffle_epi32( v, 0x4e ) +#define mm128_shuflr_64 mm128_swap_64 +#define mm128_shufll_64 mm128_swap_64 #define mm128_shuflr_32( v ) _mm_shuffle_epi32( v, 0x39 ) #define mm128_shufll_32( v ) _mm_shuffle_epi32( v, 0x93 ) @@ -414,13 +423,11 @@ static inline __m128i mm128_shuflr_x8( const __m128i v, const int c ) #endif -// Rotate byte elements within 64 or 32 bit lanes, AKA optimized bit rotations -// for multiples of 8 bits. Uses ror/rol macros when AVX512 is available -// (unlikely but faster), or when SSSE3 is not available (slower). +// Rotate 64 bit lanes #define mm128_swap64_32( v ) _mm_shuffle_epi32( v, 0xb1 ) -#define mm128_shuflr64_32 mm128_swap64_32 -#define mm128_shufll64_32 mm128_swap64_32 +#define mm128_shuflr64_32 mm128_swap64_32 +#define mm128_shufll64_32 mm128_swap64_32 #if defined(__SSSE3__) && !defined(__AVX512VL__) #define mm128_shuflr64_24( v ) \ @@ -438,6 +445,8 @@ static inline __m128i mm128_shuflr_x8( const __m128i v, const int c ) #define mm128_shuflr64_16( v ) mm128_ror_64( v, 16 ) #endif +// Rotate 32 bit lanes + #if defined(__SSSE3__) && !defined(__AVX512VL__) #define mm128_swap32_16( v ) \ _mm_shuffle_epi8( v, _mm_set_epi64x( \ @@ -445,8 +454,8 @@ static inline __m128i mm128_shuflr_x8( const __m128i v, const int c ) #else #define mm128_swap32_16( v ) mm128_ror_32( v, 16 ) #endif -#define mm128_shuflr32_16 mm128_swap32_16 -#define mm128_shufll32_16 mm128_swap32_16 +#define mm128_shuflr32_16 mm128_swap32_16 +#define mm128_shufll32_16 mm128_swap32_16 #if defined(__SSSE3__) && !defined(__AVX512VL__) #define mm128_shuflr32_8( v ) \ @@ -563,9 +572,8 @@ static inline void mm128_block_bswap_32( __m128i *d, const __m128i *s ) v1 = _mm_xor_si128( v1, v2 ); -// alignr for 32 & 64 bit elements is only available with AVX512 but -// emulated here. Shift argument is not needed, it's always 1. -// Behaviour is otherwise consistent with Intel alignr intrinsics. +// alignr instruction for 32 & 64 bit elements is only available with AVX512 +// but emulated here. Behaviour is consistent with Intel alignr intrinsics. #if defined(__SSSE3__) diff --git a/simd-utils/simd-256.h b/simd-utils/simd-256.h index 12ae43b..c2c5457 100644 --- a/simd-utils/simd-256.h +++ b/simd-utils/simd-256.h @@ -68,31 +68,33 @@ typedef union #define u32_mov256_32( v ) u32_mov128_32( _mm256_castsi256_si128( v ) ) // concatenate two 128 bit vectors into one 256 bit vector: { hi, lo } + #define mm256_concat_128( hi, lo ) \ _mm256_inserti128_si256( _mm256_castsi128_si256( lo ), hi, 1 ) +#define mm256_bcast_m128( v ) \ + _mm256_permute4x64_epi64( _mm256_castsi128_si256( v ), 0x44 ) +#define mm256_bcast_i128( i ) mm256_bcast_m128( mm128_mov64_128( i ) ) +#define mm256_bcast_i64( i ) _mm256_broadcastq_epi64( mm128_mov64_128( i ) ) +#define mm256_bcast_i32( i ) _mm256_broadcastd_epi32( mm128_mov32_128( i ) ) +#define mm256_bcast_i16( i ) _mm256_broadcastw_epi16( mm128_mov32_128( i ) ) +#define mm256_bcast_i8( i ) _mm256_broadcastb_epi8 ( mm128_mov32_128( i ) ) // Equivalent of set, move 64 bit integer constants to respective 64 bit // elements. static inline __m256i m256_const_64( const uint64_t i3, const uint64_t i2, const uint64_t i1, const uint64_t i0 ) { - union { __m256i m256i; - uint64_t u64[4]; } v; + union { __m256i m256i; uint64_t u64[4]; } v; v.u64[0] = i0; v.u64[1] = i1; v.u64[2] = i2; v.u64[3] = i3; return v.m256i; } -// Equivalent of set1. -// 128 bit vector argument -#define m256_const1_128( v ) \ - _mm256_permute4x64_epi64( _mm256_castsi128_si256( v ), 0x44 ) -// 64 bit integer argument zero extended to 128 bits. -#define m256_const1_i128( i ) m256_const1_128( mm128_mov64_128( i ) ) -#define m256_const1_64( i ) _mm256_broadcastq_epi64( mm128_mov64_128( i ) ) -#define m256_const1_32( i ) _mm256_broadcastd_epi32( mm128_mov32_128( i ) ) -#define m256_const1_16( i ) _mm256_broadcastw_epi16( mm128_mov32_128( i ) ) -#define m256_const1_8 ( i ) _mm256_broadcastb_epi8 ( mm128_mov32_128( i ) ) +// Deprecated +#define m256_const1_128 mm256_bcast_m128 +#define m256_const1_i128 mm256_bcast_i128 +#define m256_const1_64 mm256_bcast_i64 +#define m256_const1_32 mm256_bcast_i32 #define m256_const2_64( i1, i0 ) \ m256_const1_128( m128_const_64( i1, i0 ) ) @@ -101,13 +103,13 @@ static inline __m256i m256_const_64( const uint64_t i3, const uint64_t i2, // All SIMD constant macros are actually functions containing executable // code and therefore can't be used as compile time initializers. -#define m256_zero _mm256_setzero_si256() -#define m256_one_256 mm256_mov64_256( 1 ) -#define m256_one_128 m256_const1_i128( 1 ) -#define m256_one_64 _mm256_broadcastq_epi64( mm128_mov64_128( 1 ) ) -#define m256_one_32 _mm256_broadcastd_epi32( mm128_mov64_128( 1 ) ) -#define m256_one_16 _mm256_broadcastw_epi16( mm128_mov64_128( 1 ) ) -#define m256_one_8 _mm256_broadcastb_epi8 ( mm128_mov64_128( 1 ) ) +#define m256_zero _mm256_setzero_si256() +#define m256_one_256 mm256_mov64_256( 1 ) +#define m256_one_128 mm256_bcast_i128( 1 ) +#define m256_one_64 mm256_bcast_i64( 1 ) +#define m256_one_32 mm256_bcast_i32( 1 ) +#define m256_one_16 mm256_bcast_i16( 1 ) +#define m256_one_8 mm256_bcast_i8 ( 1 ) static inline __m256i mm256_neg1_fn() { @@ -118,8 +120,8 @@ static inline __m256i mm256_neg1_fn() #define m256_neg1 mm256_neg1_fn() // Consistent naming for similar operations. -#define mm128_extr_lo128_256( v ) _mm256_castsi256_si128( v ) -#define mm128_extr_hi128_256( v ) _mm256_extracti128_si256( v, 1 ) +#define mm128_extr_lo128_256( v ) _mm256_castsi256_si128( v ) +#define mm128_extr_hi128_256( v ) _mm256_extracti128_si256( v, 1 ) // // Memory functions @@ -241,7 +243,7 @@ static inline __m256i mm256_not( const __m256i v ) // Mask making // Equivalent of AVX512 _mm256_movepi64_mask & _mm256_movepi32_mask. -// Returns 4 or 8 bit integer mask from MSB of 64 or 32 bit elements. +// Returns 4 or 8 bit integer mask from MSBit of 64 or 32 bit elements. // Effectively a sign test. #define mm256_movmask_64( v ) \ @@ -355,18 +357,22 @@ static inline __m256i mm256_not( const __m256i v ) _mm256_or_si256( _mm256_slli_epi32( v, c ), \ _mm256_srli_epi32( v, 32-(c) ) ) +// +// Cross lane shuffles // // Rotate elements accross all lanes. // Swap 128 bit elements in 256 bit vector. #define mm256_swap_128( v ) _mm256_permute4x64_epi64( v, 0x4e ) -#define mm256_shuflr_128 mm256_swap_128 -#define mm256_shufll_128 mm256_swap_128 +#define mm256_shuflr_128 mm256_swap_128 +#define mm256_shufll_128 mm256_swap_128 // Rotate 256 bit vector by one 64 bit element #define mm256_shuflr_64( v ) _mm256_permute4x64_epi64( v, 0x39 ) #define mm256_shufll_64( v ) _mm256_permute4x64_epi64( v, 0x93 ) + +/* Not used // Rotate 256 bit vector by one 32 bit element. #if defined(__AVX512VL__) @@ -389,6 +395,7 @@ static inline __m256i mm256_shufll_32( const __m256i v ) 0x0000000200000001, 0x0000000000000007 ) ) #endif +*/ // // Rotate elements within each 128 bit lane of 256 bit vector. @@ -412,13 +419,11 @@ static inline __m256i mm256_shufll_32( const __m256i v ) static inline __m256i mm256_shuflr128_x8( const __m256i v, const int c ) { return _mm256_alignr_epi8( v, v, c ); } -// Rotate byte elements within 64 or 32 bit lanes, AKA optimized bit -// rotations for multiples of 8 bits. Uses faster ror/rol instructions when -// AVX512 is available. +// 64 bit lanes -#define mm256_swap64_32( v ) _mm256_shuffle_epi32( v, 0xb1 ) -#define mm256_shuflr64_32 mm256_swap64_32 -#define mm256_shufll64_32 mm256_swap64_32 +#define mm256_swap64_32( v ) _mm256_shuffle_epi32( v, 0xb1 ) +#define mm256_shuflr64_32 mm256_swap64_32 +#define mm256_shufll64_32 mm256_swap64_32 #if defined(__AVX512VL__) #define mm256_shuflr64_24( v ) _mm256_ror_epi64( v, 24 ) @@ -436,6 +441,8 @@ static inline __m256i mm256_shuflr128_x8( const __m256i v, const int c ) 0x09080f0e0d0c0b0a, 0x0100070605040302 ) ) #endif +// 32 bit lanes + #if defined(__AVX512VL__) #define mm256_swap32_16( v ) _mm256_ror_epi32( v, 16 ) #else @@ -443,8 +450,8 @@ static inline __m256i mm256_shuflr128_x8( const __m256i v, const int c ) _mm256_shuffle_epi8( v, m256_const2_64( \ 0x0d0c0f0e09080b0a, 0x0504070601000302 ) ) #endif -#define mm256_shuflr32_16 mm256_swap32_16 -#define mm256_shufll32_16 mm256_swap32_16 +#define mm256_shuflr32_16 mm256_swap32_16 +#define mm256_shufll32_16 mm256_swap32_16 #if defined(__AVX512VL__) #define mm256_shuflr32_8( v ) _mm256_ror_epi32( v, 8 ) diff --git a/simd-utils/simd-512.h b/simd-utils/simd-512.h index dc3f14d..5321db4 100644 --- a/simd-utils/simd-512.h +++ b/simd-utils/simd-512.h @@ -113,7 +113,17 @@ static inline __m512i mm512_perm_128( const __m512i v, const int c ) #define mm512_concat_256( hi, lo ) \ _mm512_inserti64x4( _mm512_castsi256_si512( lo ), hi, 1 ) -#define m512_const_128( v3, v2, v1, v0 ) \ +// Work in progress. +// modified naming scheme to align more with opcode mnenonic: +// m512_const1 becomes mm512_bcast_m[n] or mm512_bcast_i[n], short for +// broadcast, i indicates integer arg, m is vector. Set1 intrinsics should +// genarally be used for integer data. +// mm512_const should only be used with immediate integer arguments, use +// _mm512_set intrinsic instead. +// mm512_set, mm512_set[n] macros may be defined when no intrinsic exists +// for either the arg size or arg count. + +#define mm512_set_128( v3, v2, v1, v0 ) \ mm512_concat_256( mm256_concat_128( v3, v2 ), \ mm256_concat_128( v1, v0 ) ) @@ -133,29 +143,35 @@ static inline __m512i m512_const_64( const uint64_t i7, const uint64_t i6, return v.m512i; } +// Broadcast with vector argument is generally more efficient except for +// integer immediate constants or when data was most recently referenced as +// integer and is still available in an integer register. + +/* not used // Equivalent of set1, broadcast lo element to all elements. static inline __m512i m512_const1_256( const __m256i v ) { return _mm512_inserti64x4( _mm512_castsi256_si512( v ), v, 1 ); } +*/ -#define m512_const1_128( v ) \ - mm512_perm_128( _mm512_castsi128_si512( v ), 0 ) -// Integer input argument up to 64 bits -#define m512_const1_i128( i ) \ - mm512_perm_128( _mm512_castsi128_si512( mm128_mov64_128( i ) ), 0 ) +#define mm512_bcast_m128( v ) mm512_perm_128( _mm512_castsi128_si512( v ), 0 ) +// Low 64 bits only, high 64 bits are zeroed. +#define mm512_bcast_i128( i ) mm512_bcast_m128( mm128_mov64_128( i ) ) +#define mm512_bcast_i64( i ) _mm512_broadcastq_epi64( mm128_mov64_128( i ) ) +#define mm512_bcast_i32( i ) _mm512_broadcastd_epi32( mm128_mov32_128( i ) ) +#define mm512_bcast_i16( i ) _mm512_broadcastw_epi16( mm128_mov32_128( i ) ) +#define mm512_bcast_i8( i ) _mm512_broadcastb_epi8( mm128_mov32_128( i ) ) -//#define m512_const1_256( v ) _mm512_broadcast_i64x4( v ) -//#define m512_const1_128( v ) _mm512_broadcast_i64x2( v ) -#define m512_const1_64( i ) _mm512_broadcastq_epi64( mm128_mov64_128( i ) ) -#define m512_const1_32( i ) _mm512_broadcastd_epi32( mm128_mov32_128( i ) ) -#define m512_const1_16( i ) _mm512_broadcastw_epi16( mm128_mov32_128( i ) ) -#define m512_const1_8( i ) _mm512_broadcastb_epi8 ( mm128_mov32_128( i ) ) +// const1 is deprecated, use bcast instead +#define m512_const1_128 mm512_bcast_m128 +#define m512_const1_i128 mm512_bcast_i128 +#define m512_const1_64 mm512_bcast_i64 +#define m512_const1_32 mm512_bcast_i32 #define m512_const2_128( v1, v0 ) \ - m512_const1_256( _mm512_inserti64x2( _mm512_castsi128_si512( v0 ), v1, 1 ) ) + _mm512_inserti64x2( _mm512_castsi128_si512( v0 ), v1, 1 ) #define m512_const2_64( i1, i0 ) \ - m512_const1_128( m128_const_64( i1, i0 ) ) - + mm512_bcast_m128( m128_const_64( i1, i0 ) ) static inline __m512i m512_const4_64( const uint64_t i3, const uint64_t i2, const uint64_t i1, const uint64_t i0 ) @@ -179,11 +195,11 @@ static inline __m512i m512_const4_64( const uint64_t i3, const uint64_t i2, #define m512_zero _mm512_setzero_si512() #define m512_one_512 mm512_mov64_512( 1 ) #define m512_one_256 _mm512_inserti64x4( m512_one_512, m256_one_256, 1 ) -#define m512_one_128 m512_const1_i128( 1 ) -#define m512_one_64 m512_const1_64( 1 ) -#define m512_one_32 m512_const1_32( 1 ) -#define m512_one_16 m512_const1_16( 1 ) -#define m512_one_8 m512_const1_8( 1 ) +#define m512_one_128 mm512_bcast_i128( (__uint128_t)1 ) +#define m512_one_64 mm512_bcast_i64( (uint64_t)1 ) +#define m512_one_32 mm512_bcast_i32( (uint32_t)1 ) +#define m512_one_16 mm512_bcast_i16( (uint16_t)1 ) +#define m512_one_8 mm512_bcast_i8( (uint8_t)1 ) // use asm to avoid compiler warning for unitialized local static inline __m512i mm512_neg1_fn() @@ -193,8 +209,6 @@ static inline __m512i mm512_neg1_fn() return a; } #define m512_neg1 mm512_neg1_fn() // 1 clock -//#define m512_neg1 m512_const1_64( 0xffffffffffffffff ) // 5 clocks -//#define m512_neg1 _mm512_movm_epi64( 0xff ) // 2 clocks // // Basic operations without SIMD equivalent @@ -343,10 +357,10 @@ static inline void memcpy_512( __m512i *dst, const __m512i *src, const int n ) // 8 lanes of 64 bytes each #define mm512_block_bswap_64( d, s ) do \ { \ - __m512i ctl = m512_const_64( 0x38393a3b3c3d3e3f, 0x3031323334353637, \ - 0x28292a2b2c2d2e2f, 0x2021222324252627, \ - 0x18191a1b1c1d1e1f, 0x1011121314151617, \ - 0x08090a0b0c0d0e0f, 0x0001020304050607 ); \ + const __m512i ctl = m512_const_64( 0x38393a3b3c3d3e3f, 0x3031323334353637, \ + 0x28292a2b2c2d2e2f, 0x2021222324252627, \ + 0x18191a1b1c1d1e1f, 0x1011121314151617, \ + 0x08090a0b0c0d0e0f, 0x0001020304050607 ); \ casti_m512i( d, 0 ) = _mm512_shuffle_epi8( casti_m512i( s, 0 ), ctl ); \ casti_m512i( d, 1 ) = _mm512_shuffle_epi8( casti_m512i( s, 1 ), ctl ); \ casti_m512i( d, 2 ) = _mm512_shuffle_epi8( casti_m512i( s, 2 ), ctl ); \ @@ -360,10 +374,10 @@ static inline void memcpy_512( __m512i *dst, const __m512i *src, const int n ) // 16 lanes of 32 bytes each #define mm512_block_bswap_32( d, s ) do \ { \ - __m512i ctl = m512_const_64( 0x3c3d3e3f38393a3b, 0x3435363730313233, \ - 0x2c2d2e2f28292a2b, 0x2425262720212223, \ - 0x1c1d1e1f18191a1b, 0x1415161710111213, \ - 0x0c0d0e0f08090a0b, 0x0405060700010203 ); \ + const __m512i ctl = m512_const_64( 0x3c3d3e3f38393a3b, 0x3435363730313233, \ + 0x2c2d2e2f28292a2b, 0x2425262720212223, \ + 0x1c1d1e1f18191a1b, 0x1415161710111213, \ + 0x0c0d0e0f08090a0b, 0x0405060700010203 ); \ casti_m512i( d, 0 ) = _mm512_shuffle_epi8( casti_m512i( s, 0 ), ctl ); \ casti_m512i( d, 1 ) = _mm512_shuffle_epi8( casti_m512i( s, 1 ), ctl ); \ casti_m512i( d, 2 ) = _mm512_shuffle_epi8( casti_m512i( s, 2 ), ctl ); \ @@ -449,7 +463,7 @@ static inline __m512i mm512_shuflr_x32( const __m512i v, const int n ) #define mm512_shuflr256_64( v ) _mm512_permutex_epi64( v, 0x39 ) #define mm512_shufll256_64( v ) _mm512_permutex_epi64( v, 0x93 ) -/* +/* Not used // Rotate 256 bit lanes by one 32 bit element #define mm512_shuflr256_32( v ) \ _mm512_permutexvar_epi32( m512_const_64( \ @@ -496,6 +510,18 @@ static inline __m512i mm512_shuflr_x32( const __m512i v, const int n ) // // Shuffle/rotate elements within 128 bit lanes of 512 bit vector. +#define mm512_swap128_64( v ) _mm512_shuffle_epi32( v, 0x4e ) +#define mm512_shuflr128_64 mm512_swap128_64 +#define mm512_shufll128_64 mm512_swap128_64 + +// Rotate 128 bit lanes by one 32 bit element +#define mm512_shuflr128_32( v ) _mm512_shuffle_epi32( v, 0x39 ) +#define mm512_shufll128_32( v ) _mm512_shuffle_epi32( v, 0x93 ) + +// Rotate 128 bit lanes right by c bytes, versatile and just as fast +static inline __m512i mm512_shuflr128_8( const __m512i v, const int c ) +{ return _mm512_alignr_epi8( v, v, c ); } + // Limited 2 input, 1 output shuffle, combines shuffle with blend. // Like most shuffles it's limited to 128 bit lanes and like some shuffles // destination elements must come from a specific source arg. @@ -507,26 +533,11 @@ static inline __m512i mm512_shuflr_x32( const __m512i v, const int n ) _mm512_castps_si512( _mm512_shuffle_ps( _mm512_castsi512_ps( v1 ), \ _mm512_castsi512_ps( v2 ), c ) ); -// Swap 64 bits in each 128 bit lane -#define mm512_swap128_64( v ) _mm512_shuffle_epi32( v, 0x4e ) -#define mm512_shuflr128_64 mm512_swap128_64 -#define mm512_shufll128_64 mm512_swap128_64 - -// Rotate 128 bit lanes by one 32 bit element -#define mm512_shuflr128_32( v ) _mm512_shuffle_epi32( v, 0x39 ) -#define mm512_shufll128_32( v ) _mm512_shuffle_epi32( v, 0x93 ) - -// Rotate right 128 bit lanes by c bytes, versatile and just as fast -static inline __m512i mm512_shuflr128_8( const __m512i v, const int c ) -{ return _mm512_alignr_epi8( v, v, c ); } - -// Rotate byte elements in each 64 or 32 bit lane. Redundant for AVX512, all -// can be done with ror & rol. Defined only for convenience and consistency -// with AVX2 & SSE2 macros. +// 64 bit lanes #define mm512_swap64_32( v ) _mm512_shuffle_epi32( v, 0xb1 ) -#define mm512_shuflr64_32 mm512_swap64_32 -#define mm512_shufll64_32 mm512_swap64_32 +#define mm512_shuflr64_32 mm512_swap64_32 +#define mm512_shufll64_32 mm512_swap64_32 #define mm512_shuflr64_24( v ) _mm512_ror_epi64( v, 24 ) #define mm512_shufll64_24( v ) _mm512_rol_epi64( v, 24 ) @@ -537,12 +548,14 @@ static inline __m512i mm512_shuflr128_8( const __m512i v, const int c ) #define mm512_shuflr64_8( v ) _mm512_ror_epi64( v, 8 ) #define mm512_shufll64_8( v ) _mm512_rol_epi64( v, 8 ) -#define mm512_swap32_16( v ) _mm512_ror_epi32( v, 16 ) -#define mm512_shuflr32_16 mm512_swap32_16 -#define mm512_shufll32_16 mm512_swap32_16 +// 32 bit lanes -#define mm512_shuflr32_8( v ) _mm512_ror_epi32( v, 8 ) -#define mm512_shufll32_8( v ) _mm512_rol_epi32( v, 8 ) +#define mm512_swap32_16( v ) _mm512_ror_epi32( v, 16 ) +#define mm512_shuflr32_16 mm512_swap32_16 +#define mm512_shufll32_16 mm512_swap32_16 + +#define mm512_shuflr32_8( v ) _mm512_ror_epi32( v, 8 ) +#define mm512_shufll32_8( v ) _mm512_rol_epi32( v, 8 ) #endif // AVX512 #endif // SIMD_512_H__ diff --git a/simd-utils/simd-int.h b/simd-utils/simd-int.h index 58caa3e..1c4bbbe 100644 --- a/simd-utils/simd-int.h +++ b/simd-utils/simd-int.h @@ -55,6 +55,13 @@ typedef __int128 int128_t; typedef unsigned __int128 uint128_t; +typedef union +{ + uint128_t u128; + uint64_t u64[2]; + uint32_t u32[4]; +} __attribute__ ((aligned (16))) u128_ovly; + // Extracting the low bits is a trivial cast. // These specialized functions are optimized while providing a // consistent interface. diff --git a/util.c b/util.c index b0ef430..591ecbe 100644 --- a/util.c +++ b/util.c @@ -2018,23 +2018,41 @@ static bool stratum_notify(struct stratum_ctx *sctx, json_t *params) } } - if ( merkle_count ) - merkle = (uchar**) malloc( merkle_count * sizeof(char *) ); - for ( i = 0; i < merkle_count; i++ ) - { - const char *s = json_string_value( json_array_get( merkle_arr, i ) ); - if ( !s || strlen(s) != 64 ) - { - while ( i-- ) free( merkle[i] ); - free( merkle ); - applog( LOG_ERR, "Stratum notify: invalid Merkle branch" ); - goto out; - } - merkle[i] = (uchar*) malloc( 32 ); - hex2bin( merkle[i], s, 32 ); - } + pthread_mutex_lock( &sctx->work_lock ); - pthread_mutex_lock( &sctx->work_lock ); + if ( merkle_count ) + { + if ( merkle_count > sctx->job.merkle_buf_size ) + { + for ( i = 0; i < sctx->job.merkle_count; i++ ) + free( sctx->job.merkle[i] ); + free( sctx->job.merkle ); + + merkle = (uchar**) malloc( merkle_count * sizeof(char *) ); + for ( i = 0; i < merkle_count; i++ ) + merkle[i] = (uchar*) malloc( 32 ); + sctx->job.merkle_buf_size = merkle_count; + sctx->job.merkle = merkle; + } + + for ( i = 0; i < merkle_count; i++ ) + { + const char *s = json_string_value( json_array_get( merkle_arr, i ) ); + if ( !s || strlen(s) != 64 ) + { + for ( int j = sctx->job.merkle_buf_size; j > 0; j-- ) + free( sctx->job.merkle[i] ); + free( sctx->job.merkle ); + sctx->job.merkle_count = + sctx->job.merkle_buf_size = 0; + pthread_mutex_unlock( &sctx->work_lock ); + applog( LOG_ERR, "Stratum notify: invalid Merkle branch" ); + goto out; + } + hex2bin( sctx->job.merkle[i], s, 32 ); + } + } + sctx->job.merkle_count = merkle_count; coinb1_size = strlen( coinb1 ) / 2; coinb2_size = strlen( coinb2 ) / 2; @@ -2067,18 +2085,9 @@ static bool stratum_notify(struct stratum_ctx *sctx, json_t *params) } sctx->block_height = getblocheight( sctx ); - - for ( i = 0; i < sctx->job.merkle_count; i++ ) - free( sctx->job.merkle[i] ); - - free( sctx->job.merkle ); - sctx->job.merkle = merkle; - sctx->job.merkle_count = merkle_count; - hex2bin( sctx->job.nbits, nbits, 4 ); hex2bin( sctx->job.ntime, stime, 4 ); sctx->job.clean = clean; - sctx->job.diff = sctx->next_diff; pthread_mutex_unlock( &sctx->work_lock );