summaryrefslogtreecommitdiffstats
path: root/libkpimexchange/configure.in.in
diff options
context:
space:
mode:
Diffstat (limited to 'libkpimexchange/configure.in.in')
-rw-r--r--libkpimexchange/configure.in.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/libkpimexchange/configure.in.in b/libkpimexchange/configure.in.in
new file mode 100644
index 000000000..4c6a71603
--- /dev/null
+++ b/libkpimexchange/configure.in.in
@@ -0,0 +1,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(KDEPIM_ENABLE_EXCHANGE, 1, [Define if you want Microsoft Exchange 2000 support])
+fi
+