mirror of
https://github.com/status-im/sqlcipher.git
synced 2025-02-23 09:18:11 +00:00
Adding 'none' option to --with-crypto-lib
This allows for skipping of the library check, useful when only preparing the amalgamation.
This commit is contained in:
parent
0a767d7c15
commit
836b4b5108
37
configure
vendored
37
configure
vendored
@ -10611,12 +10611,22 @@ fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypto library to use" >&5
|
||||
$as_echo_n "checking for crypto library to use... " >&6; }
|
||||
if test "$crypto_lib" = "libtomcrypt"; then
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: libtomcrypt" >&5
|
||||
if test "$crypto_lib" = "none"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
|
||||
$as_echo "none" >&6; }
|
||||
else
|
||||
if test "$crypto_lib" = "commoncrypto"; then
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: commoncrypto" >&5
|
||||
$as_echo "commoncrypto" >&6; }
|
||||
else
|
||||
if test "$crypto_lib" = "libtomcrypt"; then
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: libtomcrypt" >&5
|
||||
$as_echo "libtomcrypt" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for register_cipher in -ltomcrypt" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for register_cipher in -ltomcrypt" >&5
|
||||
$as_echo_n "checking for register_cipher in -ltomcrypt... " >&6; }
|
||||
if ${ac_cv_lib_tomcrypt_register_cipher+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@ -10663,18 +10673,12 @@ else
|
||||
as_fn_error $? "Library crypto not found. Install libtomcrypt!\"" "$LINENO" 5
|
||||
fi
|
||||
|
||||
else
|
||||
if test "$crypto_lib" = "commoncrypto"; then
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: commoncrypto" >&5
|
||||
$as_echo "commoncrypto" >&6; }
|
||||
else
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: openssl" >&5
|
||||
else
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: openssl" >&5
|
||||
$as_echo "openssl" >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for HMAC_Init_ex in -lcrypto" >&5
|
||||
$as_echo_n "checking for HMAC_Init_ex in -lcrypto... " >&6; }
|
||||
if ${ac_cv_lib_crypto_HMAC_Init_ex+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
@ -10721,6 +10725,7 @@ else
|
||||
as_fn_error $? "Library crypto not found. Install openssl!\"" "$LINENO" 5
|
||||
fi
|
||||
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
26
configure.ac
26
configure.ac
@ -257,23 +257,27 @@ AC_ARG_WITH([crypto-lib],
|
||||
AC_HELP_STRING([--with-crypto-lib],[Specify which crypto library to use]),
|
||||
crypto_lib=$withval)
|
||||
AC_MSG_CHECKING([for crypto library to use])
|
||||
if test "$crypto_lib" = "libtomcrypt"; then
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
AC_MSG_RESULT([libtomcrypt])
|
||||
AC_CHECK_LIB([tomcrypt], [register_cipher], ,
|
||||
AC_MSG_ERROR([Library crypto not found. Install libtomcrypt!"]))
|
||||
if test "$crypto_lib" = "none"; then
|
||||
AC_MSG_RESULT([none])
|
||||
else
|
||||
if test "$crypto_lib" = "commoncrypto"; then
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_CC"
|
||||
AC_MSG_RESULT([commoncrypto])
|
||||
else
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
AC_MSG_RESULT([openssl])
|
||||
AC_CHECK_LIB([crypto], [HMAC_Init_ex], ,
|
||||
AC_MSG_ERROR([Library crypto not found. Install openssl!"]))
|
||||
if test "$crypto_lib" = "libtomcrypt"; then
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_LIBTOMCRYPT"
|
||||
AC_MSG_RESULT([libtomcrypt])
|
||||
AC_CHECK_LIB([tomcrypt], [register_cipher], ,
|
||||
AC_MSG_ERROR([Library crypto not found. Install libtomcrypt!"]))
|
||||
else
|
||||
CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
BUILD_CFLAGS+=" -DSQLCIPHER_CRYPTO_OPENSSL"
|
||||
AC_MSG_RESULT([openssl])
|
||||
AC_CHECK_LIB([crypto], [HMAC_Init_ex], ,
|
||||
AC_MSG_ERROR([Library crypto not found. Install openssl!"]))
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user