* configure.in: check for libical v0.24 or newer
authorArt Cancro <ajc@citadel.org>
Sun, 12 Jan 2003 23:22:53 +0000 (23:22 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 12 Jan 2003 23:22:53 +0000 (23:22 +0000)
webcit/ChangeLog
webcit/configure.in

index f082fac44dcee7ee8707c2c212542e329d712e54..c3ce7dfeb431c356757b9aa43d478f81dd5abc8a 100644 (file)
@@ -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 <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index 578a9081cca8601b20c7f820ecff0301aa3ca30e..73aa21989d3c602826cdd00b4c7440c11033ec42 100644 (file)
@@ -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 <ical.h>
+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)