mirror of
https://github.com/open-quantum-safe/liboqs.git
synced 2025-10-18 00:02:54 -04:00
--enable-mcbits needs --with-mcbits-dir option
This commit is contained in:
parent
d6aecfafbd
commit
c9d0404d4f
10
Makefile.am
10
Makefile.am
@ -40,13 +40,13 @@ test_kex_SOURCES = src/kex/test_kex.c
|
|||||||
test_kex_CPPFLAGS = -I./include
|
test_kex_CPPFLAGS = -I./include
|
||||||
test_kex_CPPFLAGS += $(AM_CPPFLAGS)
|
test_kex_CPPFLAGS += $(AM_CPPFLAGS)
|
||||||
if USE_OPENSSL
|
if USE_OPENSSL
|
||||||
test_kex_LDADD += -lcrypto
|
test_kex_LDADD += -L$(OPENSSL_DIR)/lib -lcrypto
|
||||||
endif
|
endif
|
||||||
if USE_MCBITS
|
if USE_MCBITS
|
||||||
test_kex_LDADD += -lsodium
|
test_kex_LDADD += -L${SODIUM_DIR}/lib -lsodium
|
||||||
endif
|
endif
|
||||||
if USE_SIDH_IQC
|
if USE_SIDH_IQC
|
||||||
test_kex_LDADD += -lgmp
|
test_kex_LDADD += -L$(GMP_DIR)/lib -lgmp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_aes_LDADD = liboqs.la -lm
|
test_aes_LDADD = liboqs.la -lm
|
||||||
@ -56,7 +56,7 @@ test_aes_CPPFLAGS += $(AM_CPPFLAGS)
|
|||||||
|
|
||||||
|
|
||||||
if USE_OPENSSL
|
if USE_OPENSSL
|
||||||
test_aes_LDADD += -lcrypto
|
test_aes_LDADD += -L$(OPENSSL_DIR)/lib -lcrypto
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test_rand_SOURCES = src/crypto/rand/test_rand.c
|
test_rand_SOURCES = src/crypto/rand/test_rand.c
|
||||||
@ -65,7 +65,7 @@ test_rand_CPPFLAGS = -Iinclude -Isrc/crypto/rand_urandom_aesctr/
|
|||||||
test_rand_CPPFLAGS += $(AM_CPPFLAGS)
|
test_rand_CPPFLAGS += $(AM_CPPFLAGS)
|
||||||
test_rand_LDADD = liboqs.la
|
test_rand_LDADD = liboqs.la
|
||||||
if USE_OPENSSL
|
if USE_OPENSSL
|
||||||
test_rand_LDADD += -lcrypto
|
test_rand_LDADD += -L$(OPENSSL_DIR)/lib -lcrypto
|
||||||
else
|
else
|
||||||
if USE_AES_NI
|
if USE_AES_NI
|
||||||
test_rand_CPPFLAGS += -maes -msse2
|
test_rand_CPPFLAGS += -maes -msse2
|
||||||
|
52
configure.ac
52
configure.ac
@ -85,37 +85,9 @@ AC_CANONICAL_HOST
|
|||||||
# specifically based on the host
|
# specifically based on the host
|
||||||
case $host_os in
|
case $host_os in
|
||||||
darwin* )
|
darwin* )
|
||||||
AC_ARG_WITH(
|
|
||||||
[openssl-dir],
|
|
||||||
AS_HELP_STRING([--with-openssl-dir=dir],[openssl dir used locally (default /usr/local/opt/openssl).]),
|
|
||||||
[AC_DEFINE_UNQUOTED(OPENSSLDIR, [$withval], [OPENSSL DIR used locally])
|
|
||||||
AC_SUBST(OPENSSL_DIR, [$withval])],
|
|
||||||
[AC_SUBST(OPENSSL_DIR, /usr/local/opt/openssl)]
|
|
||||||
)
|
|
||||||
AC_ARG_WITH(
|
|
||||||
[gmp-dir],
|
|
||||||
AS_HELP_STRING([--with-gmp-dir=dir],[gmp dir used locally (default /usr/local/opt/).]),
|
|
||||||
[AC_DEFINE_UNQUOTED(GMPDIR, [$withval], [GMP DIR used locally])
|
|
||||||
AC_SUBST(GMP_DIR, [$withval])],
|
|
||||||
[AC_SUBST(GMP_DIR, /usr/local)]
|
|
||||||
)
|
|
||||||
AM_CONDITIONAL([ON_DARWIN], [test xtrue = xtrue])
|
AM_CONDITIONAL([ON_DARWIN], [test xtrue = xtrue])
|
||||||
;;
|
;;
|
||||||
linux*)
|
linux*)
|
||||||
AC_ARG_WITH(
|
|
||||||
[openssl-dir],
|
|
||||||
AS_HELP_STRING([--with-openssl-dir=dir],[openssl dir used locally (default /usr).]),
|
|
||||||
[AC_DEFINE_UNQUOTED(OPENSSLDIR, [$withval], [OPENSSL DIR used locally])
|
|
||||||
AC_SUBST(OPENSSL_DIR, [$withval])],
|
|
||||||
[AC_SUBST(OPENSSL_DIR, /usr)]
|
|
||||||
)
|
|
||||||
AC_ARG_WITH(
|
|
||||||
[gmp-dir],
|
|
||||||
AS_HELP_STRING([--with-gmp-dir=dir],[gmp dir used locally (default /usr).]),
|
|
||||||
[AC_DEFINE_UNQUOTED(GMPDIR, [$withval], [GMP DIR used locally])
|
|
||||||
AC_SUBST(GMP_DIR, [$withval])],
|
|
||||||
[AC_SUBST(GMP_DIR, /usr)]
|
|
||||||
)
|
|
||||||
if test x"${ac_cv_sizeof_size_t}" = x"8";then
|
if test x"${ac_cv_sizeof_size_t}" = x"8";then
|
||||||
AM_CPPFLAGS=${AM_CPPFLAGS}" -DSIDH_ASM -march=x86-64"
|
AM_CPPFLAGS=${AM_CPPFLAGS}" -DSIDH_ASM -march=x86-64"
|
||||||
fi
|
fi
|
||||||
@ -127,6 +99,28 @@ case $host_os in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
AC_ARG_WITH(
|
||||||
|
[openssl-dir],
|
||||||
|
AS_HELP_STRING([--with-openssl-dir=dir],[openssl dir used locally (default /usr).]),
|
||||||
|
[AC_DEFINE_UNQUOTED(OPENSSLDIR, [$withval], [OPENSSL DIR used locally])
|
||||||
|
AC_SUBST(OPENSSL_DIR, [$withval])],
|
||||||
|
[AC_SUBST(OPENSSL_DIR, /usr)]
|
||||||
|
)
|
||||||
|
AC_ARG_WITH(
|
||||||
|
[gmp-dir],
|
||||||
|
AS_HELP_STRING([--with-gmp-dir=dir],[gmp dir used locally (default /usr).]),
|
||||||
|
[AC_DEFINE_UNQUOTED(GMPDIR, [$withval], [GMP DIR used locally])
|
||||||
|
AC_SUBST(GMP_DIR, [$withval])],
|
||||||
|
[AC_SUBST(GMP_DIR, /usr)]
|
||||||
|
)
|
||||||
|
AC_ARG_WITH(
|
||||||
|
[sodium-dir],
|
||||||
|
AS_HELP_STRING([--with-sodium-dir=dir],[sodium dir used locally (default /usr).]),
|
||||||
|
[AC_DEFINE_UNQUOTED(SODIUMDIR, [$withval], [SODIUM DIR used locally])
|
||||||
|
AC_SUBST(SODIUM_DIR, [$withval])],
|
||||||
|
[AC_SUBST(SODIUM_DIR, /usr)]
|
||||||
|
)
|
||||||
|
|
||||||
SRCDIR=" src/common src/crypto/aes src/kex src/crypto/rand src/crypto/sha3"
|
SRCDIR=" src/common src/crypto/aes src/kex src/crypto/rand src/crypto/sha3"
|
||||||
SRCDIR=${SRCDIR}" src/crypto/rand_urandom_aesctr src/crypto/rand_urandom_chacha20"
|
SRCDIR=${SRCDIR}" src/crypto/rand_urandom_aesctr src/crypto/rand_urandom_chacha20"
|
||||||
SRCDIR=${SRCDIR}" src/kex_rlwe_bcns15/"
|
SRCDIR=${SRCDIR}" src/kex_rlwe_bcns15/"
|
||||||
@ -161,14 +155,12 @@ fi
|
|||||||
|
|
||||||
AC_SUBST(AM_CPPFLAGS)
|
AC_SUBST(AM_CPPFLAGS)
|
||||||
AC_SUBST(SRCDIR)
|
AC_SUBST(SRCDIR)
|
||||||
AC_SUBST(OPENSSL_DIR)
|
|
||||||
AC_SUBST(USE_OPENSSL)
|
AC_SUBST(USE_OPENSSL)
|
||||||
AC_SUBST(USE_AES_NI)
|
AC_SUBST(USE_AES_NI)
|
||||||
AC_SUBST(USE_NTRU)
|
AC_SUBST(USE_NTRU)
|
||||||
AC_SUBST(USE_MCBITS)
|
AC_SUBST(USE_MCBITS)
|
||||||
AC_SUBST(USE_SIDH_IQC)
|
AC_SUBST(USE_SIDH_IQC)
|
||||||
AC_SUBST(ON_DARWIN)
|
AC_SUBST(ON_DARWIN)
|
||||||
AC_SUBST(GMP_DIR)
|
|
||||||
|
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile
|
AC_CONFIG_FILES([Makefile
|
||||||
|
@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libmcbits.la
|
|||||||
|
|
||||||
libmcbits_la_SOURCES = external/operations.c kex_code_mcbits.c
|
libmcbits_la_SOURCES = external/operations.c kex_code_mcbits.c
|
||||||
|
|
||||||
libmcbits_la_CPPFLAGS = -I../../include
|
libmcbits_la_CPPFLAGS = -I../../include -I${SODIUM_DIR}/include
|
||||||
|
|
||||||
libmcbits_la_CPPFLAGS += $(AM_CPPFLAGS)
|
libmcbits_la_CPPFLAGS += $(AM_CPPFLAGS)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user