-
Notifications
You must be signed in to change notification settings - Fork 8
/
configure.ac
74 lines (63 loc) · 2.06 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
AC_INIT([Dovecot FTS Flatcurve],[1.x],[slusarz@curecanti.org],[dovecot-fts-flatcurve])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_MACRO_DIR([m4])
AC_DEFINE_UNQUOTED(FTS_FLATCURVE_NAME, "$PACKAGE_NAME",
[Define to the full name of Dovecot FTS Flatcurve.])
AC_DEFINE_UNQUOTED(FTS_FLATCURVE_VERSION, "$PACKAGE_VERSION",
[Define to the version of Dovecot FTS Flatcurve.])
AM_INIT_AUTOMAKE([no-define foreign tar-ustar])
AM_MAINTAINER_MODE
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
LT_INIT
PKG_PROG_PKG_CONFIG
DC_DOVECOT
DC_DOVECOT_CFLAGS
DC_DOVECOT_HARDENING
DC_DOVECOT_MODULEDIR
LIBDOVECOT_INCLUDE="$LIBDOVECOT_INCLUDE"
CFLAGS="$CFLAGS $EXTRA_CFLAGS"
CXXFLAGS="$CXXFLAGS $EXTRA_CXXFLAGS"
LIBS="$DOVECOT_LIBS"
AC_SUBST(LIBDOVECOT_INCLUDE)
XO_LIB_XAPIAN
AS_VERSION_COMPARE([1.3.99], [$XAPIAN_VERSION],
AC_DEFINE([XAPIAN_HAS_COMPACT],[1],[Xapian compaction support (1.4+)]))
AC_MSG_CHECKING([for fts_mail_user_init API version 2.3.17+])
AC_LANG_PUSH(C)
ac_save_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -Werror -DHAVE_CONFIG_H $LIBDOVECOT_INCLUDE $LIBDOVECOT_STORAGE_INCLUDE $LIBDOVECOT_FTS_INCLUDE"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#undef PACKAGE_BUGREPORT]
[#undef PACKAGE_NAME]
[#undef PACKAGE_STRING]
[#undef PACKAGE_TARNAME]
[#undef PACKAGE_VERSION]
[#include "lib.h"]
[#include "mail-storage-hooks.h"]
[#include "fts-user.h"]],
[[int (*ptr)(struct mail_user *, bool, const char **), i = 0;]
[ptr = fts_mail_user_init;]
[if (ptr && i) ++i;]])
],[
AC_MSG_RESULT([yes])
AC_DEFINE(HAVE_FTS_MAIL_USER_INIT_2_3_17, [], [fts_mail_user_init API version 2.3.17+])
],[
AC_MSG_RESULT([no])
])
CFLAGS=$ac_save_CFLAGS
AC_LANG_POP()
if test "$DOVECOT_INSTALLED" != "yes"; then
DOVECOT_FTS_PLUGIN="$abs_dovecotdir/src/plugins/fts/lib20_fts_plugin.la"
else
DOVECOT_FTS_PLUGIN="$dovecot_installed_moduledir/lib20_fts_plugin.la"
fi
AC_SUBST(DOVECOT_FTS_PLUGIN)
AC_CONFIG_HEADERS([dummy-config.h fts-flatcurve-config.h])
AC_CONFIG_FILES([
Makefile
src/Makefile
stamp.h])
AC_OUTPUT