-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
95 lines (71 loc) · 2.41 KB
/
configure.ac
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
#
# Copyright (c) 2018 Tallence AG and the authors
#
# This is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software
# Foundation. See file COPYING.
AC_PREREQ([2.69])
AC_INIT([push-notification-kafka-plugin], [0.0.4])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([no-define foreign tar-ustar subdir-objects])
LT_INIT([shared disable-static pic-only])
AM_MAINTAINER_MODE
AC_DEFINE_UNQUOTED(PUSH_NOTIFICATION_KAFKA_NAME, "$PACKAGE_NAME",
[Define to the full name of push-notification-kafka for Dovecot.])
AC_DEFINE_UNQUOTED(PUSH_NOTIFICATION_KAFKA_VERSION, "$PACKAGE_VERSION",
[Define to the version of push-notification-kafka for Dovecot.])
AC_CHECK_HEADERS([time.h], [], [], [])
AC_CHECK_HEADERS([librdkafka/rdkafka.h], [], [AC_MSG_ERROR([cannot build without Kafka support: librdkafka/rdkafka.h not found])], [])
AC_SEARCH_LIBS([rd_kafka_new], [rdkafka], [], [AC_MSG_ERROR([cannot build without Kafka support: librdkafka not found])], [])
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LIBTOOL
AC_PROG_INSTALL
AC_ENABLE_SHARED
AC_DISABLE_STATIC
AC_ISC_POSIX
# Couple with Dovecot
DC_DOVECOT
DC_DOVECOT_MODULEDIR
# LIBDOVECOT_INCLUDE="$LIBDOVECOT_INCLUDE $LIBDOVECOT_STORAGE_INCLUDE"
CFLAGS="$DOVECOT_CFLAGS"
LIBS="$DOVECOT_LIBS"
AC_SUBST(LIBDOVECOT_INCLUDE)
# Valgrind
AC_ARG_ENABLE(valgrind,
[AC_HELP_STRING([--enable-valgrind], [Enable Valgrind memory leak checks in testsuite [default=yes]])],
if test x$enableval = xno || test x$enableval = xauto; then
want_valgrind=$enableval
else
want_valgrind=yes
fi,
want_valgrind=no)
AM_CONDITIONAL(TESTSUITE_VALGRIND, test "$want_valgrind" = "yes")
AC_ARG_ENABLE(debug,
[AC_HELP_STRING([--enable-debug], [Enable debug [default=no]])],
if test x$enableval = xyes || test x$enableval = xauto; then
enable_debug=$enableval
else
enable_debug=no
fi,
enable_debug=no)
if test "$enable_debug" = yes; then
AC_DEFINE([DEBUG],[],[Debug Mode])
else
enable_debug = false
AC_DEFINE([NDEBUG],[],[Release Mode])
fi
# Makefiles
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT
echo
AC_MSG_NOTICE([DEBUG is enabled ................ : $enable_debug])
AC_MSG_NOTICE([Install prefix ................ : $prefix])
AC_MSG_NOTICE([Dovecot directory ............. : $dovecotdir])