summaryrefslogtreecommitdiffstats
path: root/libkpimexchange/configure.in.in
blob: ddfaf162be8ef54ed9324f08cea259e29decdb86 (plain)
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
dnl build with exchange support

AC_MSG_CHECKING([if kdelibs has recent webdav])
AC_LANG_SAVE
kde_safe_cppflags=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $all_includes"
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE(
[#include <kio/http.h>],
[
  int method = (int) KIO::DAV_SUBSCRIBE;
],
[
  ac_has_recent_webdav="yes"
  AC_MSG_RESULT([yes])
],
[
  ac_has_recent_webdav="no"
  AC_MSG_RESULT([no])
])
CPPFLAGS=$kde_safe_cppflags
AC_LANG_RESTORE

ac_use_exchange="no"
AC_ARG_ENABLE(exchange,
        [  --disable-exchange      disable Microsoft Exchange 2000 support for korganizer [default=enable]], ac_use_exchange=$enableval, ac_use_exchange=yes)
AM_CONDITIONAL(include_exchange_SUBDIR, test "x$ac_use_exchange" = "xyes" && test "x$ac_has_recent_webdav" = "xyes")

if test "x$ac_use_exchange" != "xyes" || test "x$ac_has_recent_webdav" != "xyes"; then
        DO_NOT_COMPILE="$DO_NOT_COMPILE libkpimexchange"
	AC_MSG_WARN([Exchange 2000 support disabled])
else
	AC_DEFINE(TDEPIM_ENABLE_EXCHANGE, 1, [Define if you want Microsoft Exchange 2000 support])
fi