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:
Nick Parker 2013-06-21 12:18:42 -05:00
parent 0a767d7c15
commit 836b4b5108
2 changed files with 36 additions and 27 deletions

17
configure vendored
View File

@ -10611,6 +10611,16 @@ 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" = "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"
@ -10663,12 +10673,6 @@ 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"
@ -10723,6 +10727,7 @@ fi
fi
fi
fi
##########
# Do we want to allow a connection created in one thread to be used

View File

@ -257,17 +257,20 @@ 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" = "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
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
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"
@ -276,6 +279,7 @@ else
AC_MSG_ERROR([Library crypto not found. Install openssl!"]))
fi
fi
fi
##########
# Do we want to allow a connection created in one thread to be used