This change mainly intends to prevent linking with libssl when the
crypto provider is NSS, which provides an SSL implementation (the
implementation we must use and prefer when NSS is selected).
Secondarily, actually detect openssl when it is selected, which
happens by default and co-selects with cryptopp. To do this, we
import the ax_check_openssl.m4 from the automake archive.
Since upstream builds now prefer NSS crypto, make this the default.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
ARMv8 defines a set of optional CRC32/CRC32C instructions.
This patch defines an optimized function that uses these
instructions when available rather than table-based lookup.
Optimized function based on a Hadoop patch by Ed Nevill.
Autotools updated to check for compiler support.
Optimized function is selected at runtime based on HWCAP_CRC32.
Added crc32c "performance" unit test and arch unit test.
Tested on AMD Seattle.
Passes all crc32c unit tests.
Unit test shows ~4x performance increase versus sctp.
Signed-off-by: Yazen Ghannam <yazen.ghannam@linaro.org>
Reviewed-by: Steve Capper <steve.capper@linaro.org>
On Debian this fixes FTBFS when gcj-jdk and openjdk-7-jdk are installed at
the same time because build system will use default `javac` executable
provided by current JDK through `update-alternatives` instead of blindly
calling GCJ when it is present.
Signed-off-by: Dmitry Smirnov <onlyjob@member.fsf.org>
SSE4 are only not availabe on older CPUs. Although the compiler could
probably generate the code, there is no point in doing so. The SSE4.1,
SSE4.2 and PCLMUL cpu features are only tested if the target CPU is
AMD64 or x86_64.
Signed-off-by: Loic Dachary <loic@dachary.org>
Rename SIMD to INTEL for clarity.
Instead of agregating all flags in INTEL_FLAGS, create individual flags
for each feature (INTEL_SSE2_FLAGS etc.) for finer control in the
makefiles.
Signed-off-by: Loic Dachary <loic@dachary.org>
For each SSE feature supported by the compiler
* add the corresponding -msse* flag
* define HAVE_SSE*
Remove AX_EXT because it decides based on the CPU capabilities of the
machine compiling the binary which may or may not be the one running
them.
Signed-off-by: Loic Dachary <loic@dachary.org>
Selects __PRETTY_FUNCTION__ or __func__. Linux assumes GNU, and chooses
__PRETTY_FUNCTION__ if gcc/g++ versions are favorable.
This also includes a fix in ax_c_var_func.m4:
AC_TRY_COMPILE will wrap the test in main{}, and then GCC will complain
about nested functions. Just use the original main{} body.
diff --git a/m4/ax_c_var_func.m4 b/m4/ax_c_var_func.m4
index 0ad7d2b..8b57563 100644
--- a/m4/ax_c_var_func.m4
+++ b/m4/ax_c_var_func.m4
@@ -57,9 +57,9 @@ AC_DEFUN([AX_C_VAR_FUNC],
[AC_REQUIRE([AC_PROG_CC])
AC_CACHE_CHECK(whether $CC recognizes __func__, ac_cv_c_var_func,
AC_TRY_COMPILE(,
-[int main() {
+[
char *s = __func__;
-}],
+],
AC_DEFINE(HAVE_FUNC,,
[Define if the C complier supports __func__]) ac_cv_c_var_func=yes,
ac_cv_c_var_func=no) )
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Check for org.junit.rules.ExternalResource if build with
--enable-cephfs-java and --with-debug. Checking for junit4
isn't enough since junit4 has this class not before 4.7.
Added some m4 files to get some JAVA related macros. Changed
autogen.sh to work with local m4 files/macros.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>