summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorHans-Christoph Steiner <hans@eds.org>2013-08-13 15:43:01 -0400
committerHans-Christoph Steiner <hans@eds.org>2013-08-13 15:43:01 -0400
commit4228998fd796fa2f9e84fb73632e0a07cc7cd188 (patch)
tree15b2336f351468fedd0c39e9de4ad905a686f3b0 /configure.ac
parentbdee7cf7d974b2f70d5934786c5666006e7360be (diff)
parent08119c361d1181b3e8f1abb429236e488a664753 (diff)
Merge tag 'upstream/2.2.1'
Upstream version 2.2.1 # gpg: Signature made Tue 13 Aug 2013 03:42:56 PM EDT using RSA key ID 374BBE81 # gpg: Good signature from "Hans-Christoph Steiner <hans@at.or.at>" # gpg: aka "[jpeg image of size 5408]" # gpg: aka "Hans-Christoph Steiner <hs420@nyu.edu>" # gpg: aka "Hans-Christoph Steiner <hans@eds.org>" # gpg: aka "Hans-Christoph Steiner <hans@guardianproject.info>" # gpg: aka "Hans-Christoph Steiner <hansi@nyu.edu>" # gpg: aka "Hans-Christoph Steiner <hans@guardianproject.info>"
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac37
1 files changed, 33 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 882c3cc..f226f14 100644
--- a/configure.ac
+++ b/configure.ac
@@ -87,7 +87,7 @@
# you don't need (for example BLT) by erasing or commenting out
# the corresponding code.
#
-AC_INIT(sqlite, m4_esyscmd([cat VERSION | tr -d '\n']))
+AC_INIT(sqlcipher, m4_esyscmd([cat VERSION | tr -d '\n']))
dnl Make sure the local VERSION file matches this configure script
sqlite_version_sanity_check=`cat $srcdir/VERSION | tr -d '\n'`
@@ -159,7 +159,6 @@ if test "x${TCLLIBDIR+set}" != "xset" ; then
TCLLIBDIR="${TCLLIBDIR}/sqlite3"
fi
-
#########
# Set up an appropriate program prefix
#
@@ -252,6 +251,37 @@ if test "$SQLITE_THREADSAFE" = "1"; then
fi
##########
+# Which crypto library do we use
+#
+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
+ 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
+
+##########
# Do we want to allow a connection created in one thread to be used
# in another thread. This does not work on many Linux systems (ex: RedHat 9)
# due to bugs in the threading implementations. This is thus off by default.
@@ -501,7 +531,6 @@ if test "${use_tcl}" = "yes" ; then
AC_SUBST(TCL_VERSION)
AC_SUBST(TCL_BIN_DIR)
AC_SUBST(TCL_SRC_DIR)
- AC_SUBST(TCL_LIBS)
AC_SUBST(TCL_INCLUDE_SPEC)
AC_SUBST(TCL_LIB_FILE)
@@ -700,5 +729,5 @@ AC_CONFIG_HEADERS(config.h)
AC_SUBST(BUILD_CFLAGS)
AC_OUTPUT([
Makefile
-sqlite3.pc
+sqlcipher.pc
])