From: Vsevolod Stakhov Date: Fri, 23 Oct 2015 12:25:59 +0000 (+0100) Subject: Fix architecture detection. X-Git-Tag: 1.0.7~23 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f52e8c65413233069a71112606ce2f131249ca83;p=rspamd.git Fix architecture detection. --- diff --git a/src/libcryptobox/curve25519/curve25519.c b/src/libcryptobox/curve25519/curve25519.c index 1d04b973b..34a361d60 100644 --- a/src/libcryptobox/curve25519/curve25519.c +++ b/src/libcryptobox/curve25519/curve25519.c @@ -55,7 +55,7 @@ CURVE25519_DECLARE(avx); CURVE25519_DECLARE(ref); #define CURVE25519_REF CURVE25519_IMPL(0, "ref", ref) -#if (ARCH == x86_64) || (ARCH == i386) +#if defined(CMAKE_ARCH_x86_64) || defined(CMAKE_ARCH_i386) CURVE25519_DECLARE(donna); #define CURVE25519_GENERIC CURVE25519_IMPL(0, "donna", donna) #else diff --git a/src/libcryptobox/platform_config.h.in b/src/libcryptobox/platform_config.h.in index b71306e99..577e8528b 100644 --- a/src/libcryptobox/platform_config.h.in +++ b/src/libcryptobox/platform_config.h.in @@ -1,7 +1,8 @@ #ifndef PLATFORM_H_CONFIG #define PLATFORM_H_CONFIG -#define ARCH ${ARCH} +#define ARCH "${ARCH}" +#define CMAKE_ARCH_${ARCH} 1 #cmakedefine HAVE_AVX2 1 #cmakedefine HAVE_AVX 1 #cmakedefine HAVE_SSE2 1