diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 17:36:47 +0000 |
commit | 0441d265f2bb9da249c7abf333f0f771fadb4ab5 (patch) | |
tree | 3f3789daa2f6db22da6e55e92bee0062a7d613fe /m4/want_cassandra.m4 | |
parent | Initial commit. (diff) | |
download | dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.tar.xz dovecot-0441d265f2bb9da249c7abf333f0f771fadb4ab5.zip |
Adding upstream version 1:2.3.21+dfsg1.upstream/1%2.3.21+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'm4/want_cassandra.m4')
-rw-r--r-- | m4/want_cassandra.m4 | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/m4/want_cassandra.m4 b/m4/want_cassandra.m4 new file mode 100644 index 0000000..1cf3e58 --- /dev/null +++ b/m4/want_cassandra.m4 @@ -0,0 +1,25 @@ + AC_DEFUN([DOVECOT_WANT_CASSANDRA], [ + AS_IF([test "$want_cassandra" != no], [ + AC_CHECK_LIB([cassandra], [cass_session_new], [ + AC_CHECK_HEADER([cassandra.h], [ + CASSANDRA_LIBS="$CASSANDRA_LIBS -lcassandra" + AC_DEFINE(HAVE_CASSANDRA,, [Build with Cassandra support]) + found_sql_drivers="$found_sql_drivers cassandra" + AC_CHECK_LIB(cassandra, cass_cluster_set_constant_speculative_execution_policy, [ + AC_DEFINE(HAVE_CASSANDRA_SPECULATIVE_POLICY, 1, [Cassandra supports speculative execution policy]) + ],, $CASSANDRA_LIBS) + AC_CHECK_LIB(cassandra, cass_cluster_set_use_hostname_resolution, [ + AC_DEFINE(HAVE_CASS_CLUSTER_SET_USE_HOSTNAME_RESOLUTION,, [Build with cass_cluster_set_use_hostname_resolution() support]) + ],, $CASSANDRA_LIBS) + AC_CHECK_DECLS([CASS_SSL_VERIFY_PEER_IDENTITY_DNS], [], [], [[#include <cassandra.h>]]) + ], [ + AS_IF([test "$want_cassandra" = yes], [ + AC_ERROR([Can't build with Cassandra support: cassandra.h not found]) + ]) + ]) + ], [AS_IF([test "$want_cassandra" = yes], [ + AC_ERROR([Can't build with Cassandra support: libcassandra not found]) + ]) + ]) + ]) +]) |