From: Art Cancro Date: Mon, 13 Jan 2003 02:55:07 +0000 (+0000) Subject: * Do calendar support only if libical header *and* library are present X-Git-Tag: v7.86~6046 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=065ef6eeb9e33fb820044ef657aeb2e449de1740 * Do calendar support only if libical header *and* library are present --- diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 25fab9f6e..ba8a8feee 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $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 @@ -4361,4 +4364,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citadel.h b/citadel/citadel.h index b64cb7726..74fb0bf97 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -10,6 +10,15 @@ #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 #include "sysconfig.h" diff --git a/citadel/ical_dezonify.c b/citadel/ical_dezonify.c index a0801e08b..6055cc0d8 100644 --- a/citadel/ical_dezonify.c +++ b/citadel/ical_dezonify.c @@ -22,7 +22,7 @@ #include "support.h" #include "config.h" -#ifdef HAVE_ICAL_H +#ifdef CITADEL_WITH_CALENDAR_SERVICE #include #include "ical_dezonify.h" @@ -167,4 +167,4 @@ void ical_dezonify(icalcomponent *cal) { } -#endif /* HAVE_ICAL_H */ +#endif /* CITADEL_WITH_CALENDAR_SERVICE */ diff --git a/citadel/serv_calendar.c b/citadel/serv_calendar.c index 018d25821..60d6db947 100644 --- a/citadel/serv_calendar.c +++ b/citadel/serv_calendar.c @@ -32,7 +32,7 @@ #include "mime_parser.h" #include "serv_calendar.h" -#ifdef HAVE_ICAL_H +#ifdef CITADEL_WITH_CALENDAR_SERVICE #include #include "ical_dezonify.h" @@ -1439,14 +1439,14 @@ void ical_session_startup(void) { } -#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);