From cf934431c7c8c1091b38c0b374f6a3b9293841ca Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Tue, 18 Mar 2008 19:15:08 +0000 Subject: [PATCH] libical, expat, and libsieve are now *required*. If any are missing, configure will abort, telling the user what is missing and pointing them to the relevant page on our web site. --- citadel/citadel.h | 9 -- citadel/citserver.c | 8 +- citadel/configure.ac | 103 +++++++----------- citadel/ical_dezonify.c | 6 +- citadel/modules/calendar/serv_calendar.c | 9 +- citadel/modules/jabber/serv_xmpp.c | 10 +- citadel/modules/jabber/xmpp_messages.c | 7 +- citadel/modules/jabber/xmpp_presence.c | 7 +- citadel/modules/jabber/xmpp_query_namespace.c | 6 +- citadel/modules/jabber/xmpp_queue.c | 7 +- citadel/modules/jabber/xmpp_sasl_service.c | 17 +-- .../modules/managesieve/serv_managesieve.c | 13 --- citadel/modules/rssclient/serv_rssclient.c | 11 +- citadel/modules/sieve/serv_sieve.c | 17 --- citadel/serv_sieve.h | 6 +- citadel/user_ops.c | 2 - webcit/Doxyfile | 2 +- webcit/availability.c | 16 +-- webcit/calendar.c | 63 +---------- webcit/calendar_tools.c | 16 +-- webcit/calendar_view.c | 37 +------ webcit/configure.ac | 51 ++------- webcit/event.c | 15 +-- webcit/ical_dezonify.c | 5 - webcit/iconbar.c | 10 +- webcit/messages.c | 16 +-- webcit/serv_func.c | 4 +- webcit/siteconfig.c | 14 +-- webcit/summary.c | 30 +---- webcit/webcit.c | 14 +-- webcit/webcit.h | 5 - webcit/webserver.c | 2 - 32 files changed, 106 insertions(+), 432 deletions(-) diff --git a/citadel/citadel.h b/citadel/citadel.h index ff2406563..d8d327019 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -11,15 +11,6 @@ #define CITADEL_H /* #include uncomment if using dmalloc */ -/* 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/citserver.c b/citadel/citserver.c index efcaed9e4..6dba61993 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -308,13 +308,7 @@ void cmd_info(void) { cprintf("%f\n", CtdlThreadWorkerAvg); cprintf("%d\n", CtdlThreadGetCount()); - /* Does this server support Sieve mail filtering? */ -#ifdef HAVE_LIBSIEVE - cprintf("1\n"); /* yes */ -#else - cprintf("0\n"); /* no */ -#endif - + cprintf("1\n"); /* yes, Sieve mail filtering is supported */ cprintf("%d\n", config.c_enable_fulltext); cprintf("000\n"); diff --git a/citadel/configure.ac b/citadel/configure.ac index 8778a272d..7746c99cb 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -151,10 +151,7 @@ AC_ARG_WITH(ncurses, [ --without-ncurses don't use ncurses]) AC_ARG_WITH(with_zlib, [ --with-zlib use zlib compression if present]) AC_ARG_WITH(with_ldap, [ --with-ldap use OpenLDAP client library]) -AC_ARG_WITH(with_libical, [ --with-libical use libical calendaring library]) -AC_ARG_WITH(with_libsieve, [ --with-libsieve use libsieve mail sorting library]) AC_ARG_WITH(with_libdspam, [ --with-libdspam use libdspam mail spam scanning library]) -AC_ARG_WITH(with_expat, [ --with-expat use Expat XML parser]) if test "x$with_db" != xno -a "x$with_db" != xyes -a "$with_db"; then db_dir="$with_db" @@ -589,20 +586,6 @@ fi -dnl Checks for the libsieve mailbox sorting library. -if test "x$with_libsieve" != xno ; then - AC_CHECK_HEADERS(sieve2.h, - [AC_CHECK_LIB(sieve, sieve2_license, - [ok_libsieve=yes],, - )]) -fi - -if test "x$ok_libsieve" = xyes ; then - SERVER_LIBS="-lsieve $SERVER_LIBS" - AC_DEFINE(HAVE_LIBSIEVE, [], [define this if you have the libsieve mailbox filtering library available]) -fi - - dnl Checks for the libdspam mail spam scanning library. if test "x$with_libdspam" != xno ; then AC_CHECK_HEADERS(dspam/libdspam.h, @@ -618,56 +601,55 @@ fi - dnl Checks for the Expat XML parser. -if test "x$with_expat" != xno ; then - AC_CHECK_HEADERS(expat.h, - [AC_CHECK_LIB(expat, XML_ParserCreateNS, - [ok_expat=yes],, - )]) -fi - -if test "x$ok_expat" = xyes ; then - SERVER_LIBS="-lexpat $SERVER_LIBS" - AC_DEFINE(HAVE_EXPAT, [], [define this if you have the Expat XML parser available]) -fi - - +AC_CHECK_HEADER(expat.h, + [AC_CHECK_LIB(expat, XML_ParserCreateNS, + [ + SERVER_LIBS="-lexpat $SERVER_LIBS" + ], + [ + AC_MSG_ERROR(The Expat XML parser was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) + ] + , + )], + [ + AC_MSG_ERROR(expat.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) + ] +) -dnl Checks for the libical calendaring library. -if test "x$with_libical" != xno ; then - AC_CHECK_HEADERS(ical.h, - [AC_CHECK_LIB(ical, icalcomponent_new, - [ok_libical=yes],, - )]) -fi +dnl Checks for the libical iCalendar library. +AC_CHECK_HEADER(ical.h, + [AC_CHECK_LIB(ical, icalcomponent_new, + [ + SERVER_LIBS="-lical $SERVER_LIBS" + ], + [ + AC_MSG_ERROR(libical was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) + ] + , + )], + [ + AC_MSG_ERROR(ical.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) + ] +) -if test "x$ok_libical" = xyes ; then - AC_TRY_RUN( +dnl Checks for the libsieve mailbox sorting library. +AC_CHECK_HEADER(sieve2.h, + [AC_CHECK_LIB(sieve, sieve2_license, [ -#include -main() { - int major, minor, v; - sscanf(ICAL_VERSION, "%d.%d", &major, &minor); - v = 100*major + minor; - printf("libical version: %i\n", v); - if (v >= 24) { - printf("This version is ok.\n"); - return(0); - } - printf("libical 0.24 or newer required.\n"); - printf("Citadel will be built without calendar support.\n"); - return(1); -} - ], + SERVER_LIBS="-lsieve $SERVER_LIBS" + ], [ - SERVER_LIBS="-lical $SERVER_LIBS" - AC_DEFINE(HAVE_LIBICAL, [], [define this if you have the libical calendaring library available]) + AC_MSG_ERROR(libsieve was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) ] - ) -fi + , + )], + [ + AC_MSG_ERROR(sieve2.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) + ] +) @@ -899,11 +881,8 @@ fi echo ------------------------------------------------------------------------ echo 'zlib compression: ' $ok_zlib -echo 'Calendar support: ' $ok_libical echo 'LDAP support: ' $ok_ldap -echo 'Sieve mailbox filtering support: ' $ok_libsieve echo 'DSpam Scanning support: ' $ok_libdspam -echo 'Expat XML parser present: ' $ok_expat echo echo 'Note: if you are not using Linux, make sure you are using GNU make' echo '(gmake) to compile Citadel.' diff --git a/citadel/ical_dezonify.c b/citadel/ical_dezonify.c index 70a28600d..d3c7ed5d8 100644 --- a/citadel/ical_dezonify.c +++ b/citadel/ical_dezonify.c @@ -16,15 +16,13 @@ #include #include #include +#include #include "citadel.h" #include "server.h" #include "citserver.h" #include "sysdep_decls.h" #include "support.h" #include "config.h" - -#ifdef CITADEL_WITH_CALENDAR_SERVICE -#include #include "ical_dezonify.h" @@ -228,5 +226,3 @@ void ical_dezonify(icalcomponent *cal) { /* lprintf(9, "ical_dezonify() completed\n"); */ } - -#endif /* CITADEL_WITH_CALENDAR_SERVICE */ diff --git a/citadel/modules/calendar/serv_calendar.c b/citadel/modules/calendar/serv_calendar.c index 4d0144ba2..7e0ed46ab 100644 --- a/citadel/modules/calendar/serv_calendar.c +++ b/citadel/modules/calendar/serv_calendar.c @@ -19,6 +19,7 @@ #ifdef HAVE_STRINGS_H #include #endif +#include #include #include "citadel.h" #include "server.h" @@ -32,10 +33,6 @@ #include "serv_calendar.h" #include "euidindex.h" #include "ctdl_module.h" - -#ifdef CITADEL_WITH_CALENDAR_SERVICE - -#include #include "ical_dezonify.h" @@ -2173,8 +2170,6 @@ void serv_calendar_destroy(void) icaltimezone_free_builtin_timezones(); } -#endif /* CITADEL_WITH_CALENDAR_SERVICE */ - /* * Register this module with the Citadel server. */ @@ -2182,7 +2177,6 @@ CTDL_MODULE_INIT(calendar) { if (!threading) { -#ifdef CITADEL_WITH_CALENDAR_SERVICE CtdlRegisterMessageHook(ical_obj_beforesave, EVT_BEFORESAVE); CtdlRegisterMessageHook(ical_obj_aftersave, EVT_AFTERSAVE); CtdlRegisterSessionHook(ical_create_room, EVT_LOGIN); @@ -2192,7 +2186,6 @@ CTDL_MODULE_INIT(calendar) CtdlRegisterFixedOutputHook("text/calendar", ical_fixed_output); CtdlRegisterFixedOutputHook("application/ics", ical_fixed_output); CtdlRegisterCleanupHook(serv_calendar_destroy); -#endif } /* return our Subversion id for the Log */ diff --git a/citadel/modules/jabber/serv_xmpp.c b/citadel/modules/jabber/serv_xmpp.c index 6fa8a66b9..3b448fbf4 100644 --- a/citadel/modules/jabber/serv_xmpp.c +++ b/citadel/modules/jabber/serv_xmpp.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "citadel.h" #include "server.h" #include "citserver.h" @@ -46,9 +47,6 @@ #include "internet_addressing.h" #include "md5.h" #include "ctdl_module.h" - -#ifdef HAVE_EXPAT -#include #include "serv_xmpp.h" struct xmpp_event *xmpp_queue = NULL; @@ -475,12 +473,9 @@ void xmpp_logout_hook(void) { const char *CitadelServiceXMPP="XMPP"; -#endif /* HAVE_EXPAT */ - CTDL_MODULE_INIT(jabber) { if (!threading) { -#ifdef HAVE_EXPAT CtdlRegisterServiceHook(config.c_xmpp_c2s_port, NULL, xmpp_greeting, @@ -492,9 +487,6 @@ CTDL_MODULE_INIT(jabber) CtdlRegisterSessionHook(xmpp_logout_hook, EVT_LOGOUT); CtdlRegisterSessionHook(xmpp_login_hook, EVT_UNSTEALTH); CtdlRegisterSessionHook(xmpp_logout_hook, EVT_STEALTH); - #else - lprintf(CTDL_INFO, "This server is missing the Expat XML parser. Jabber service will be disabled.\n"); -#endif } /* return our Subversion id for the Log */ diff --git a/citadel/modules/jabber/xmpp_messages.c b/citadel/modules/jabber/xmpp_messages.c index e579c7cfe..5cd540c32 100644 --- a/citadel/modules/jabber/xmpp_messages.c +++ b/citadel/modules/jabber/xmpp_messages.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "citadel.h" #include "server.h" @@ -42,9 +43,6 @@ #include "internet_addressing.h" #include "md5.h" #include "ctdl_module.h" - -#ifdef HAVE_EXPAT -#include #include "serv_xmpp.h" @@ -107,6 +105,3 @@ void jabber_send_message(char *message_to, char *message_body) { XMPP->message_to[0] = 0; } - - -#endif /* HAVE_EXPAT */ diff --git a/citadel/modules/jabber/xmpp_presence.c b/citadel/modules/jabber/xmpp_presence.c index 0855cc898..e3d9cc466 100644 --- a/citadel/modules/jabber/xmpp_presence.c +++ b/citadel/modules/jabber/xmpp_presence.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "citadel.h" #include "server.h" @@ -42,9 +43,6 @@ #include "internet_addressing.h" #include "md5.h" #include "ctdl_module.h" - -#ifdef HAVE_EXPAT -#include #include "serv_xmpp.h" @@ -149,6 +147,3 @@ void xmpp_presence_notify(char *presence_jid, int event_type) { } free(cptr); } - - -#endif /* HAVE_EXPAT */ diff --git a/citadel/modules/jabber/xmpp_query_namespace.c b/citadel/modules/jabber/xmpp_query_namespace.c index 98f62285a..afd80ee71 100644 --- a/citadel/modules/jabber/xmpp_query_namespace.c +++ b/citadel/modules/jabber/xmpp_query_namespace.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "citadel.h" #include "server.h" @@ -42,9 +43,6 @@ #include "internet_addressing.h" #include "md5.h" #include "ctdl_module.h" - -#ifdef HAVE_EXPAT -#include #include "serv_xmpp.h" @@ -138,5 +136,3 @@ void xmpp_query_namespace(char *iq_id, char *iq_from, char *iq_to, char *query_x cprintf(""); } - -#endif /* HAVE_EXPAT */ diff --git a/citadel/modules/jabber/xmpp_queue.c b/citadel/modules/jabber/xmpp_queue.c index 2c97b8431..f11d101e7 100644 --- a/citadel/modules/jabber/xmpp_queue.c +++ b/citadel/modules/jabber/xmpp_queue.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include "citadel.h" #include "server.h" @@ -42,9 +43,6 @@ #include "internet_addressing.h" #include "md5.h" #include "ctdl_module.h" - -#ifdef HAVE_EXPAT -#include #include "serv_xmpp.h" int queue_event_seq = 0; @@ -137,6 +135,3 @@ void xmpp_process_events(void) { XMPP->last_event_processed = highest_event; } - - -#endif /* HAVE_EXPAT */ diff --git a/citadel/modules/jabber/xmpp_sasl_service.c b/citadel/modules/jabber/xmpp_sasl_service.c index f444ba9b9..8a32aee22 100644 --- a/citadel/modules/jabber/xmpp_sasl_service.c +++ b/citadel/modules/jabber/xmpp_sasl_service.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include "citadel.h" #include "server.h" @@ -45,9 +46,6 @@ #include "internet_addressing.h" #include "md5.h" #include "ctdl_module.h" - -#ifdef HAVE_EXPAT -#include #include "serv_xmpp.h" @@ -76,13 +74,8 @@ int xmpp_auth_plain(char *authstring) * do not allow spaces so we can tell the user to substitute underscores if their * login name contains spaces. */ - while (ptr=strstr(ident, "_")) { - *ptr = ' '; - } - - while (ptr=strstr(user, "_")) { - *ptr = ' '; - } + convert_spaces_to_underscores(ident); + convert_spaces_to_underscores(user); /* Now attempt authentication */ @@ -164,7 +157,3 @@ void jabber_non_sasl_authenticate(char *iq_id, char *username, char *password, c "" ); } - - - -#endif /* HAVE_EXPAT */ diff --git a/citadel/modules/managesieve/serv_managesieve.c b/citadel/modules/managesieve/serv_managesieve.c index cf33b0682..1662048d3 100644 --- a/citadel/modules/managesieve/serv_managesieve.c +++ b/citadel/modules/managesieve/serv_managesieve.c @@ -64,11 +64,6 @@ #include "ctdl_module.h" - - - -#ifdef HAVE_LIBSIEVE - #include "serv_sieve.h" @@ -589,13 +584,11 @@ void managesieve_cleanup_function(void) { -#endif /* HAVE_LIBSIEVE */ const char* CitadelServiceManageSieve = "ManageSieve"; CTDL_MODULE_INIT(managesieve) { if (!threading) { -#ifdef HAVE_LIBSIEVE CtdlRegisterServiceHook(config.c_managesieve_port, NULL, managesieve_greeting, @@ -603,12 +596,6 @@ CTDL_MODULE_INIT(managesieve) NULL, CitadelServiceManageSieve); CtdlRegisterSessionHook(managesieve_cleanup_function, EVT_STOP); - -#else /* HAVE_LIBSIEVE */ - - lprintf(CTDL_INFO, "This server is missing libsieve. Managesieve protocol is disabled..\n"); - -#endif /* HAVE_LIBSIEVE */ } /* return our Subversion id for the Log */ diff --git a/citadel/modules/rssclient/serv_rssclient.c b/citadel/modules/rssclient/serv_rssclient.c index 78afc9b87..465d02348 100644 --- a/citadel/modules/rssclient/serv_rssclient.c +++ b/citadel/modules/rssclient/serv_rssclient.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "citadel.h" #include "server.h" @@ -41,9 +42,6 @@ #include "citadel_dirs.h" #include "md5.h" -#ifdef HAVE_EXPAT -#include - struct rssnetcfg { struct rssnetcfg *next; @@ -629,19 +627,12 @@ void *rssclient_scan(void *args) { } -#endif /* HAVE_EXPAT */ - CTDL_MODULE_INIT(rssclient) { if (threading) { -#ifdef HAVE_EXPAT CtdlThreadSchedule ("RSS Client", CTDLTHREAD_BIGSTACK, rssclient_scan, NULL, 0); -#else - lprintf(CTDL_INFO, "This server is missing the Expat XML parser. RSS client will be disabled.\n"); -#endif } - /* return our Subversion id for the Log */ return "$Id: serv_rssclient.c 5652 2007-10-29 20:14:48Z ajc $"; } diff --git a/citadel/modules/sieve/serv_sieve.c b/citadel/modules/sieve/serv_sieve.c index ce466d48a..726d58d50 100644 --- a/citadel/modules/sieve/serv_sieve.c +++ b/citadel/modules/sieve/serv_sieve.c @@ -42,13 +42,7 @@ #include "database.h" #include "msgbase.h" #include "internet_addressing.h" - - #include "ctdl_module.h" - - -#ifdef HAVE_LIBSIEVE - #include "serv_sieve.h" struct RoomProcList *sieve_list = NULL; @@ -1290,26 +1284,15 @@ int serv_sieve_room(struct ctdlroom *room) return 0; } -#endif /* HAVE_LIBSIEVE */ - CTDL_MODULE_INIT(sieve) { if (!threading) { -#ifdef HAVE_LIBSIEVE ctdl_sieve_init(); CtdlRegisterProtoHook(cmd_msiv, "MSIV", "Manage Sieve scripts"); - CtdlRegisterRoomHook(serv_sieve_room); - CtdlRegisterSessionHook(perform_sieve_processing, EVT_HOUSE); - -#else /* HAVE_LIBSIEVE */ - - lprintf(CTDL_INFO, "This server is missing libsieve. Mailbox filtering will be disabled.\n"); - -#endif /* HAVE_LIBSIEVE */ } /* return our Subversion id for the Log */ diff --git a/citadel/serv_sieve.h b/citadel/serv_sieve.h index 168a8574f..516b83420 100644 --- a/citadel/serv_sieve.h +++ b/citadel/serv_sieve.h @@ -1,10 +1,8 @@ /* - * $Id: $ + * $Id$ */ -#ifdef HAVE_LIBSIEVE - #include #include @@ -68,5 +66,3 @@ char *msiv_getscript(struct sdm_userdata *u, char *script_name); int msiv_deletescript(struct sdm_userdata *u, char *script_name); void msiv_putscript(struct sdm_userdata *u, char *script_name, char *script_content); extern char *msiv_extensions; - -#endif /* HAVE_LIBSIEVE */ diff --git a/citadel/user_ops.c b/citadel/user_ops.c index 85f21d695..8b2b9d19a 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -556,8 +556,6 @@ void cmd_user(char *cmdbuf) */ void session_startup(void) { - int i = 0; - lprintf(CTDL_NOTICE, "<%s> logged in\n", CC->curr_user); lgetuser(&CC->user, CC->curr_user); diff --git a/webcit/Doxyfile b/webcit/Doxyfile index 65f044bb0..788ee0f58 100644 --- a/webcit/Doxyfile +++ b/webcit/Doxyfile @@ -1006,7 +1006,7 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = WEBCIT_WITH_CALENDAR_SERVICE HAVE_OPENSSL ENABLE_NLS HAVE_ICONV HAVE_ZLIB +PREDEFINED = HAVE_OPENSSL ENABLE_NLS HAVE_ICONV HAVE_ZLIB # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then diff --git a/webcit/availability.c b/webcit/availability.c index bce91e02f..249859128 100644 --- a/webcit/availability.c +++ b/webcit/availability.c @@ -1,23 +1,13 @@ /* * $Id$ - */ -/** * - * \defgroup CalendarAv Check attendee availability for scheduling a meeting. - * \ingroup Calendaring */ -/*@{*/ #include "webcit.h" #include "webserver.h" -/** only available if we have calendaring */ -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - - - -/** +/* * \brief verify users avaiability * Utility function to fetch a VFREEBUSY type of thing for * any specified user. @@ -261,7 +251,3 @@ void check_attendee_availability(icalcomponent *vevent) { } - -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - -/** @} */ diff --git a/webcit/calendar.c b/webcit/calendar.c index 3a78ac3d8..bb1166d8b 100644 --- a/webcit/calendar.c +++ b/webcit/calendar.c @@ -1,68 +1,14 @@ /* * $Id$ + * + * Functions which handle calendar objects and their processing/display. */ -/** - * \defgroup calav Functions which handle calendar objects and their processing/display. - * \ingroup Calendaring - */ -/* @{ */ #include "webcit.h" #include "webserver.h" -#ifndef WEBCIT_WITH_CALENDAR_SERVICE - -/** - * \brief get around non existing types - * Handler stubs for builds with no calendar library available - * \param part_source dummy pointer to the source - * \param msgnum number of the mesage in the db - * \param cal_partnum number of the calendar part - */ -void cal_process_attachment(char *part_source, long msgnum, char *cal_partnum) { - - wprintf(_("This message contains calendaring/scheduling information," - " but support for calendars is not available on this " - "particular system. Please ask your system administrator to " - "install a new version of the Citadel web service with " - "calendaring enabled.
\n") - ); - -} -/** - * \brief say we can't display calendar items - * \param msgnum number of the mesage in our db - */ -void display_calendar(long msgnum) { - wprintf(_("" - "Cannot display calendar item. You are seeing this error " - "because your WebCit service has not been installed with " - "calendar support. Please contact your system administrator." - "
\n")); -} - -/** - * \brief say we can't display task items - * \param msgnum number of the mesage in our db - */ -void display_task(long msgnum) { - wprintf(_("" - "Cannot display to-do item. You are seeing this error " - "because your WebCit service has not been installed with " - "calendar support. Please contact your system administrator." - "
\n")); -} -/** ok, we have calendaring available */ -#else /* WEBCIT_WITH_CALENDAR_SERVICE */ - - -/****** End of handler stubs. Everything below this line is real. ******/ - - - - -/** +/* * \brief Process a calendar object * ...at this point it's already been deserialized by cal_process_attachment() * \param cal the calendar object @@ -983,6 +929,3 @@ void do_freebusy(char *req) { } - -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - diff --git a/webcit/calendar_tools.c b/webcit/calendar_tools.c index edb17de92..17862aa6c 100644 --- a/webcit/calendar_tools.c +++ b/webcit/calendar_tools.c @@ -1,11 +1,9 @@ /* * $Id$ + * + * Miscellaneous functions which handle calendar components. */ -/** - * \defgroup MiscCal Miscellaneous functions which handle calendar components. - * \ingroup Calendaring - */ -/*@{*/ + #include "webcit.h" #include "webserver.h" @@ -17,9 +15,7 @@ char *hourname[] = { "7pm", "8pm", "9pm", "10pm", "11pm" }; -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - -/** +/* * \brief display and edit date/time * The display_icaltimetype_as_webform() and icaltime_from_webform() functions * handle the display and editing of date/time properties in web pages. The @@ -294,7 +290,3 @@ icalcomponent *ical_encapsulate_subcomponent(icalcomponent *subcomp) { } - - -#endif -/*@}*/ diff --git a/webcit/calendar_view.c b/webcit/calendar_view.c index 699d83e73..2f8421dff 100644 --- a/webcit/calendar_view.c +++ b/webcit/calendar_view.c @@ -1,18 +1,12 @@ - /* +/* * $Id$ + * + * Handles the HTML display of calendar items. */ -/** - * \defgroup CalHtmlHandles Handles the HTML display of calendar items. - * \ingroup Calendaring - */ -/*@{*/ + #include "webcit.h" #include "webserver.h" -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - -/****************************************************************************/ - void embeddable_mini_calendar(int year, int month, char *urlformat) { @@ -1507,26 +1501,3 @@ void do_tasks_view(void) { } -#else /* WEBCIT_WITH_CALENDAR_SERVICE */ - -/**\brief stub for non-libical builds */ -void do_calendar_view(void) { - wprintf("
"); - wprintf(_("The calendar view is not available.")); - wprintf("

\n"); -} - -/**\brief stub for non-libical builds */ -void do_tasks_view(void) { - wprintf("
"); - wprintf(_("The tasks view is not available.")); - wprintf("

\n"); -} - -/**\brief stub for non-libical builds */ -void ajax_mini_calendar(void) { -} - -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - -/** @} */ diff --git a/webcit/configure.ac b/webcit/configure.ac index 068d9f0fb..00bc0c932 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -23,7 +23,6 @@ else ssl_dir="$prefix/keys" fi -AC_ARG_WITH(with_libical, [ --with-libical use libical calendaring library]) AC_ARG_WITH(with_zlib, [ --with-zlib use zlib compression if present]) AC_ARG_WITH(ssl, [ --with-ssl=PATH Specify path to OpenSSL installation ], @@ -176,47 +175,22 @@ AC_CHECK_HEADER(libcitadel.h, ) -webcit_with_calendar_service=no -dnl Checks for the libical calendaring library. -if test "x$with_libical" != xno ; then - AC_CHECK_HEADERS(ical.h, - [AC_CHECK_LIB(ical, icalcomponent_new, - [ok_libical=yes],, - )]) -fi - -if test "x$ok_libical" = xyes ; then - - AC_TRY_RUN( - [ -#include -main() { - int major, minor, v; - sscanf(ICAL_VERSION, "%d.%d", &major, &minor); - v = 100*major + minor; - printf("libical version: %i\n", v); - if (v >= 30) { - printf("This version is ok.\n"); - return(0); - } - printf("libical 0.30 or newer required.\n"); - printf("Citadel will be built without calendar support.\n"); - return(1); -} - ], +dnl Checks for the libical iCalendar library. +AC_CHECK_HEADER(ical.h, + [AC_CHECK_LIB(ical, icalcomponent_new, [ LIBS="-lical $LIBS" - AC_DEFINE(HAVE_LIBICAL,[],[whether we have libical available]) - webcit_with_calendar_service=yes + ], + [ + AC_MSG_ERROR(libical was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) ] - ) -fi -ok_libical=$webcit_with_calendar_service - + , + )], + [ + AC_MSG_ERROR(ical.h was not found and is required. More info: http://www.citadel.org/doku.php/installation:start) + ] +) -if test "$webcit_with_calendar_service" == "yes"; then - AC_DEFINE(WEBCIT_WITH_CALENDAR_SERVICE,[],[whether we can do with calendar.]) -fi dnl Checks for the zlib compression library. if test "x$with_zlib" != xno ; then @@ -483,7 +457,6 @@ AC_OUTPUT(Makefile po/Makefile ) echo ------------------------------------------------------------------------ echo 'zlib compression: ' $ok_zlib -echo 'Calendar support: ' $ok_libical echo 'Character set conversion support:' $ok_iconv echo 'National language support: ' $ok_nls echo diff --git a/webcit/event.c b/webcit/event.c index 000e070f7..c9deb38b6 100644 --- a/webcit/event.c +++ b/webcit/event.c @@ -1,18 +1,14 @@ /* * $Id$ + * + * Editing calendar events. */ -/** - * \defgroup EditCal Editing calendar events. - * \ingroup Calendaring - */ -/*@{*/ + #include "webcit.h" #include "webserver.h" -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - -/** +/* * \brief Display an event by itself (for editing) * \param supplied_vevent the event to edit * \param msgnum reference on the citserver @@ -747,6 +743,3 @@ STARTOVER: for (attendee = icalcomponent_get_first_property(vevent, ICAL_ATTENDE } -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ - -/*@}*/ diff --git a/webcit/ical_dezonify.c b/webcit/ical_dezonify.c index 2b9d6caf7..b3fdab5be 100644 --- a/webcit/ical_dezonify.c +++ b/webcit/ical_dezonify.c @@ -14,9 +14,6 @@ #include "webserver.h" -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - - /* * Figure out which time zone needs to be used for timestamps that are * not UTC and do not have a time zone specified. @@ -212,5 +209,3 @@ void ical_dezonify(icalcomponent *cal) { lprintf(9, "ical_dezonify() completed\n"); } - -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ diff --git a/webcit/iconbar.c b/webcit/iconbar.c index c05bce888..6dd17c810 100644 --- a/webcit/iconbar.c +++ b/webcit/iconbar.c @@ -1,11 +1,9 @@ /* * $Id$ + * + * Displays and customizes the iconbar. */ -/** - * \defgroup IconBar Displays and customizes the iconbar. - * \ingroup MenuInfrastructure - */ -/*@{*/ + #include "webcit.h" @@ -602,7 +600,6 @@ void display_customize_iconbar(void) { _("Your personal notes") ); -#ifdef WEBCIT_WITH_CALENDAR_SERVICE bar = 1 - bar; wprintf("" " %s    " @@ -636,7 +633,6 @@ void display_customize_iconbar(void) { _("Tasks"), _("A shortcut to your personal task list") ); -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ bar = 1 - bar; wprintf("" diff --git a/webcit/messages.c b/webcit/messages.c index 4a5bd704c..d12d54e99 100644 --- a/webcit/messages.c +++ b/webcit/messages.c @@ -1,12 +1,10 @@ /* * $Id$ - */ -/** - * \defgroup MsgDisp Functions which deal with the fetching and displaying of messages. - * \ingroup WebcitDisplayItems + * + * Functions which deal with the fetching and displaying of messages. * */ -/*@{*/ + #include "webcit.h" #include "webserver.h" #include "groupdav.h" @@ -3140,8 +3138,7 @@ void display_enter(void) return; } -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - /** + /* * Are we perhaps in a calendar room? If so, then an "enter * message" command really means "add new calendar item." */ @@ -3150,7 +3147,7 @@ void display_enter(void) return; } - /** + /* * Are we perhaps in a tasks view? If so, then an "enter * message" command really means "add new task." */ @@ -3158,9 +3155,8 @@ void display_enter(void) display_edit_task(); return; } -#endif - /** + /* * Otherwise proceed normally. * Do a custom room banner with no navbar... */ diff --git a/webcit/serv_func.c b/webcit/serv_func.c index 0ce784cf0..a5d37199b 100644 --- a/webcit/serv_func.c +++ b/webcit/serv_func.c @@ -32,15 +32,13 @@ void get_serv_info(char *browser_host, char *user_agent) serv_puts("MSGP text/html|text/plain"); serv_getln(buf, sizeof buf); -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - /** + /* * Tell the server that when we save a calendar event, we * want invitations to be generated by the Citadel server * instead of by the client. */ serv_puts("ICAL sgi|1"); serv_getln(buf, sizeof buf); -#endif /** Now ask the server to tell us a little bit about itself... */ serv_puts("INFO"); diff --git a/webcit/siteconfig.c b/webcit/siteconfig.c index fba65fc7f..fff3a8fd6 100644 --- a/webcit/siteconfig.c +++ b/webcit/siteconfig.c @@ -1,16 +1,14 @@ /* * $Id$ + * + * Administrative screen for site-wide configuration */ -/** - * \defgroup AdminConfig Administrative screen for site-wide configuration - * \ingroup CitadelConfig - */ -/*@{*/ + #include "webcit.h" #include "webserver.h" -/** +/* * \brief display all configuration items */ void display_siteconfig(void) @@ -486,7 +484,6 @@ void display_siteconfig(void) if (strlen(buf) == 0) { strcpy(buf, "UTC"); } -#ifdef WEBCIT_WITH_CALENDAR_SERVICE sprintf(&general[strlen(general)], ""); sprintf(&general[strlen(general)], _("Default timezone for unzoned calendar items")); sprintf(&general[strlen(general)], ""); @@ -526,9 +523,6 @@ void display_siteconfig(void) sprintf(&general[strlen(general)], ""); sprintf(&general[strlen(general)], "\n"); -#else /* WEBCIT_WITH_CALENDAR_SERVICE */ - wprintf("\n", buf); -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ break; case 50: sprintf(&network[strlen(network)], ""); diff --git a/webcit/summary.c b/webcit/summary.c index e8072e5fd..a98e421e0 100644 --- a/webcit/summary.c +++ b/webcit/summary.c @@ -1,15 +1,13 @@ /* * $Id$ + * + * Displays the "Summary Page" */ -/** - * \defgroup SymaryFuncs Displays the "Summary Page" - * \ingroup WebcitDisplayItems - */ -/*@{*/ + #include "webcit.h" -/** - * \brief Display today's date in a friendly format +/* + * Display today's date in a friendly format */ void output_date(void) { struct tm tm; @@ -78,12 +76,9 @@ void new_messages_section(void) { * \brief Task list section */ void tasks_section(void) { -#ifdef WEBCIT_WITH_CALENDAR_SERVICE int num_msgs = 0; int i; -#endif -#ifdef WEBCIT_WITH_CALENDAR_SERVICE gotoroom("_TASKS_"); if (WC->wc_view != VIEW_TASKS) { num_msgs = 0; @@ -104,12 +99,6 @@ void tasks_section(void) { } calendar_summary_view(); - -#else /* WEBCIT_WITH_CALENDAR_SERVICE */ - wprintf(""); - wprintf(_("(This server does not support task lists)")); - wprintf("\n"); -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ } @@ -117,12 +106,9 @@ void tasks_section(void) { * \brief Calendar section */ void calendar_section(void) { -#ifdef WEBCIT_WITH_CALENDAR_SERVICE int num_msgs = 0; int i; -#endif -#ifdef WEBCIT_WITH_CALENDAR_SERVICE gotoroom("_CALENDAR_"); if ( (WC->wc_view != VIEW_CALENDAR) && (WC->wc_view != VIEW_CALBRIEF) ) { num_msgs = 0; @@ -142,12 +128,6 @@ void calendar_section(void) { } calendar_summary_view(); } - -#else /* WEBCIT_WITH_CALENDAR_SERVICE */ - wprintf(""); - wprintf(_("(This server does not support calendars)")); - wprintf("\n"); -#endif /* WEBCIT_WITH_CALENDAR_SERVICE */ } /** diff --git a/webcit/webcit.c b/webcit/webcit.c index b10fe3971..b25347a40 100644 --- a/webcit/webcit.c +++ b/webcit/webcit.c @@ -1,13 +1,11 @@ /* * $Id$ - */ -/** - * \defgroup MainServer This is the main transaction loop of the web service. It maintains a + * + * This is the main transaction loop of the web service. It maintains a * persistent session to the Citadel server, handling HTTP WebCit requests as * they arrive and presenting a user interface. - * \ingroup WebcitHttpServer */ -/*@{*/ + #include "webcit.h" #include "groupdav.h" #include "webserver.h" @@ -15,7 +13,7 @@ #include #include -/** +/* * String to unset the cookie. * Any date "in the past" will work, so I chose my birthday, right down to * the exact minute. :) @@ -1422,12 +1420,10 @@ void session_loop(struct httprequest *req) do_listsub(); goto SKIP_ALL_THIS_CRAP; } -#ifdef WEBCIT_WITH_CALENDAR_SERVICE if (!strcasecmp(action, "freebusy")) { do_freebusy(cmd); goto SKIP_ALL_THIS_CRAP; } -#endif /** * If we're not logged in, but we have HTTP Authentication data, @@ -1786,7 +1782,6 @@ void session_loop(struct httprequest *req) display_floorconfig(NULL); } else if (!strcasecmp(action, "toggle_self_service")) { toggle_self_service(); -#ifdef WEBCIT_WITH_CALENDAR_SERVICE } else if (!strcasecmp(action, "display_edit_task")) { display_edit_task(); } else if (!strcasecmp(action, "save_task")) { @@ -1799,7 +1794,6 @@ void session_loop(struct httprequest *req) respond_to_request(); } else if (!strcasecmp(action, "handle_rsvp")) { handle_rsvp(); -#endif } else if (!strcasecmp(action, "summary")) { summary(); } else if (!strcasecmp(action, "summary_inner_div")) { diff --git a/webcit/webcit.h b/webcit/webcit.h index e7e3e75fa..2265e9bd7 100644 --- a/webcit/webcit.h +++ b/webcit/webcit.h @@ -387,8 +387,6 @@ struct wcsession { char this_page[512]; /**< URL of current page */ char http_host[512]; /**< HTTP Host: header */ HashList *hash_prefs; /**< WebCit preferences for this user */ -#ifdef WEBCIT_WITH_CALENDAR_SERVICE - /** \brief ical???? */ struct disp_cal { icalcomponent *cal; /**< cal items for display */ long cal_msgnum; /**< cal msgids for display */ @@ -396,7 +394,6 @@ struct wcsession { int unread; /**< already seen by the user? */ } *disp_cal; int num_cal; /**< number of calendar items for display */ -#endif struct wc_attachment *first_attachment; /**< linked list of attachments for 'enter message' */ char last_chat_user[256]; /**< ??? todo */ char ImportantMessage[SIZ]; /**< ??? todo */ @@ -697,7 +694,6 @@ void display_pictureview(void); void download_file(char *); void upload_file(void); -#ifdef WEBCIT_WITH_CALENDAR_SERVICE void display_edit_task(void); void save_task(void); void display_edit_event(void); @@ -720,7 +716,6 @@ int ical_ctdl_is_overlap( struct icaltimetype t2start, struct icaltimetype t2end ); -#endif #ifdef ENABLE_NLS void initialize_locales(void); diff --git a/webcit/webserver.c b/webcit/webserver.c index c54755209..c99cff762 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -994,12 +994,10 @@ void worker_entry(void) sleeeeeeeeeep(1); // wait so some others might finish... lprintf(2, "master shutdown: cleaning up sessions\n"); do_housekeeping(); -#ifdef WEBCIT_WITH_CALENDAR_SERVICE lprintf(2, "master shutdown: cleaning up libical\n"); free_zone_directory (); icaltimezone_release_zone_tab (); icalmemory_free_ring (); -#endif lprintf(2, "master shutdown exiting!.\n"); exit(0); } -- 2.30.2