$Log$
+ Revision 601.106 2003/01/13 02:55:07 ajc
+ * Do calendar support only if libical header *and* library are present
+
Revision 601.105 2003/01/12 23:07:40 ajc
* configure.ac: Attempt to check for libical 0.24 or newer
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
#ifndef CITADEL_H
#define CITADEL_H
+/* Build Citadel with the calendar service only if the header *and*
+ * library for libical are both present.
+ */
+#ifdef HAVE_LIBICAL
+#ifdef HAVE_ICAL_H
+#define CITADEL_WITH_CALENDAR_SERVICE 1
+#endif
+#endif
+
#include "sysdep.h"
#include <limits.h>
#include "sysconfig.h"
#include "support.h"
#include "config.h"
-#ifdef HAVE_ICAL_H
+#ifdef CITADEL_WITH_CALENDAR_SERVICE
#include <ical.h>
#include "ical_dezonify.h"
}
-#endif /* HAVE_ICAL_H */
+#endif /* CITADEL_WITH_CALENDAR_SERVICE */
#include "mime_parser.h"
#include "serv_calendar.h"
-#ifdef HAVE_ICAL_H
+#ifdef CITADEL_WITH_CALENDAR_SERVICE
#include <ical.h>
#include "ical_dezonify.h"
}
-#endif /* HAVE_ICAL_H */
+#endif /* CITADEL_WITH_CALENDAR_SERVICE */
/*
* Register this module with the Citadel server.
*/
char *Dynamic_Module_Init(void)
{
-#ifdef HAVE_ICAL_H
+#ifdef CITADEL_WITH_CALENDAR_SERVICE
CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE);
CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE);
CtdlRegisterSessionHook(ical_create_room, EVT_LOGIN);