* Do calendar support only if libical header *and* library are present
authorArt Cancro <ajc@citadel.org>
Mon, 13 Jan 2003 02:55:07 +0000 (02:55 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 13 Jan 2003 02:55:07 +0000 (02:55 +0000)
citadel/ChangeLog
citadel/citadel.h
citadel/ical_dezonify.c
citadel/serv_calendar.c

index 25fab9f6ee55b41d58d7c05ee8650ef4b2fd8977..ba8a8feeed4668e22ac7356e5ffcd79119b1119b 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index b64cb7726bbd2ecee5423531d5deaf7493d554e1..74fb0bf9779fca9ec81349e0e6112cab965db9bb 100644 (file)
 #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"
index a0801e08b8c97ee23988354987e10f63e2965910..6055cc0d87e3c8e01efd953e0e73ff83cc29f31c 100644 (file)
@@ -22,7 +22,7 @@
 #include "support.h"
 #include "config.h"
 
-#ifdef HAVE_ICAL_H
+#ifdef CITADEL_WITH_CALENDAR_SERVICE
 #include <ical.h>
 #include "ical_dezonify.h"
 
@@ -167,4 +167,4 @@ void ical_dezonify(icalcomponent *cal) {
 }
 
 
-#endif /* HAVE_ICAL_H */
+#endif /* CITADEL_WITH_CALENDAR_SERVICE */
index 018d2582155f1275c101761d1343f2df343aa248..60d6db9471414d114ccef06fed662e84cbf53298 100644 (file)
@@ -32,7 +32,7 @@
 #include "mime_parser.h"
 #include "serv_calendar.h"
 
-#ifdef HAVE_ICAL_H
+#ifdef CITADEL_WITH_CALENDAR_SERVICE
 
 #include <ical.h>
 #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);