Only compile curve25519_ref or curve25519_donna_c64
This commit is contained in:
parent
2916224650
commit
2b2b9846a6
@ -154,6 +154,7 @@ dnl Checks for typedefs, structures, and compiler characteristics.
|
|||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
AC_MSG_CHECKING(for 128-bit arithmetic)
|
AC_MSG_CHECKING(for 128-bit arithmetic)
|
||||||
|
have_ti_mode=no
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
]], [[
|
]], [[
|
||||||
@ -163,9 +164,11 @@ uint128_t x;
|
|||||||
return sizeof(x) / CHAR_BIT != 16U
|
return sizeof(x) / CHAR_BIT != 16U
|
||||||
]])],
|
]])],
|
||||||
[AC_MSG_RESULT(yes)
|
[AC_MSG_RESULT(yes)
|
||||||
AC_DEFINE([HAVE_TI_MODE], [1], [gcc TI mode is available])],
|
AC_DEFINE([HAVE_TI_MODE], [1], [gcc TI mode is available])
|
||||||
|
have_ti_mode=yes],
|
||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)])
|
||||||
AC_SUBST(HAVE_TI_MODE)
|
AM_CONDITIONAL([HAVE_TI_MODE], [test x$have_ti_mode = xyes])
|
||||||
|
AC_SUBST([HAVE_TI_MODE])
|
||||||
|
|
||||||
dnl Checks for functions and headers
|
dnl Checks for functions and headers
|
||||||
|
|
||||||
|
@ -17,12 +17,6 @@ libsodium_la_SOURCES = \
|
|||||||
crypto_generichash/blake2/ref/blake2b-ref.c \
|
crypto_generichash/blake2/ref/blake2b-ref.c \
|
||||||
crypto_generichash/blake2/ref/blake2s-ref.c \
|
crypto_generichash/blake2/ref/blake2s-ref.c \
|
||||||
crypto_generichash/blake2/ref/generichash_blake2b.c \
|
crypto_generichash/blake2/ref/generichash_blake2b.c \
|
||||||
crypto_scalarmult/curve25519/donna_c64/api.h \
|
|
||||||
crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c \
|
|
||||||
crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c \
|
|
||||||
crypto_scalarmult/curve25519/ref/api.h \
|
|
||||||
crypto_scalarmult/curve25519/ref/base_curve25519_ref.c \
|
|
||||||
crypto_scalarmult/curve25519/ref/smult_curve25519_ref.c \
|
|
||||||
crypto_hashblocks/sha256/ref/blocks_sha256.c \
|
crypto_hashblocks/sha256/ref/blocks_sha256.c \
|
||||||
crypto_hashblocks/sha256/ref/api.h \
|
crypto_hashblocks/sha256/ref/api.h \
|
||||||
crypto_hashblocks/sha512/ref/blocks_sha512.c \
|
crypto_hashblocks/sha512/ref/blocks_sha512.c \
|
||||||
@ -152,6 +146,18 @@ libsodium_la_SOURCES = \
|
|||||||
sodium/utils.c \
|
sodium/utils.c \
|
||||||
sodium/version.c
|
sodium/version.c
|
||||||
|
|
||||||
|
if HAVE_TI_MODE
|
||||||
|
libsodium_la_SOURCES += \
|
||||||
|
crypto_scalarmult/curve25519/donna_c64/api.h \
|
||||||
|
crypto_scalarmult/curve25519/donna_c64/base_curve25519_donna_c64.c \
|
||||||
|
crypto_scalarmult/curve25519/donna_c64/smult_curve25519_donna_c64.c
|
||||||
|
else
|
||||||
|
libsodium_la_SOURCES += \
|
||||||
|
crypto_scalarmult/curve25519/ref/api.h \
|
||||||
|
crypto_scalarmult/curve25519/ref/base_curve25519_ref.c \
|
||||||
|
crypto_scalarmult/curve25519/ref/smult_curve25519_ref.c
|
||||||
|
endif
|
||||||
|
|
||||||
libsodium_la_LDFLAGS = \
|
libsodium_la_LDFLAGS = \
|
||||||
$(AM_LDFLAGS) \
|
$(AM_LDFLAGS) \
|
||||||
-export-dynamic \
|
-export-dynamic \
|
||||||
|
Loading…
Reference in New Issue
Block a user