forked from edenhill/kcat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.kafkacat
50 lines (39 loc) · 1.65 KB
/
configure.kafkacat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/bash
#
mkl_require good_cflags
mkl_require gitversion as KAFKACAT_VERSION default 1.3.1
function checks {
# Check that librdkafka is available, and allow to link it statically.
mkl_meta_set "rdkafka" "desc" "librdkafka is available at http://github.com/edenhill/librdkafka. To quickly download all dependencies and build kafkacat try ./bootstrap.sh"
mkl_meta_set "rdkafka" "deb" "librdkafka-dev"
mkl_lib_check --static=-lrdkafka "rdkafka" "" fail CC "-lrdkafka" \
"#include <librdkafka/rdkafka.h>"
# Make sure rdkafka is new enough.
mkl_meta_set "librdkafkaver" "name" "librdkafka metadata API"
mkl_meta_set "librdkafkaver" "desc" "librdkafka 0.8.4 or later is required for the Metadata API"
mkl_compile_check "librdkafkaver" "" fail CC "" \
"#include <librdkafka/rdkafka.h>
struct rd_kafka_metadata foo;"
# Enable KafkaConsumer support if librdkafka is new enough
mkl_meta_set "librdkafka_ge_090" "name" "librdkafka KafkaConsumer support"
mkl_compile_check "librdkafka_ge_090" ENABLE_KAFKACONSUMER disable CC "" "
#include <librdkafka/rdkafka.h>
#if RD_KAFKA_VERSION >= 0x00090000
#else
#error \"rdkafka version < 0.9.0\"
#endif"
# mkl_meta_set "yajl" "deb" "libyajl-dev"
# # Check for JSON library (yajl)
# if [[ $WITH_JSON == y ]] && \
# mkl_lib_check --static=-lyajl "yajl" HAVE_YAJL disable CC "-lyajl" \
# "#include <yajl/yajl_version.h>
# #if YAJL_MAJOR >= 2
# #else
# #error \"Requires libyajl2\"
# #endif
# "
# then
# mkl_allvar_set "json" ENABLE_JSON y
# fi
}
mkl_toggle_option "kafkacat" WITH_JSON --enable-json "JSON support (requires libyajl2)" y