From: Art Cancro Date: Sun, 12 Jan 2003 23:22:53 +0000 (+0000) Subject: * configure.in: check for libical v0.24 or newer X-Git-Tag: v7.86~6047 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=ac201f8ac42069c888e909034ca5a68fd1f6840a;p=citadel.git * configure.in: check for libical v0.24 or newer --- diff --git a/webcit/ChangeLog b/webcit/ChangeLog index f082fac44..c3ce7dfeb 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -1,4 +1,7 @@ $Log$ +Revision 400.81 2003/01/12 23:22:53 ajc +* configure.in: check for libical v0.24 or newer + Revision 400.80 2003/01/07 04:56:17 ajc * Complete the free/busy transparency handling in the form * Default times for new events are now in the correct timezone @@ -1231,3 +1234,4 @@ Sun Dec 6 19:50:55 EST 1998 Art Cancro 1998-12-03 Nathan Bryant * webserver.c: warning fix + diff --git a/webcit/configure.in b/webcit/configure.in index 578a9081c..73aa21989 100644 --- a/webcit/configure.in +++ b/webcit/configure.in @@ -79,9 +79,33 @@ if test "x$with_libical" != xno ; then )]) fi -if test "x$ok_libical" != xno ; then - LIBS="-lical $LIBS" - AC_DEFINE(HAVE_LIBICAL) +if test "x$ok_libical" = xyes ; then + + AC_TRY_RUN( + [ +#include +main() { + float v; + int i; + sscanf(ICAL_VERSION, "%f", &v); + printf("libical version: %0.2f\n", v); + v = v * 100.0; + i = (int) v; + if (i >= 24) { + printf("This version is ok.\n"); + printf("WebCit will be built with calendar support.\n"); + return(0); + } + printf("libical 0.24 or newer is required.\n"); + printf("WebCit will be built without calendar support.\n"); + return(1); +} + ], + [ + LIBS="-lical $LIBS" + AC_DEFINE(HAVE_LIBICAL) + ] + ) fi AC_OUTPUT(Makefile)