]> code.citadel.org Git - citadel.git/blobdiff - webcit/configure.ac
The external libiconv test in webcit configure was
[citadel.git] / webcit / configure.ac
index 4cbbc701bddb9434d7ede1ddfffea05f7996e222..4a84bcadf114df7b7271eff455441aad643deed0 100644 (file)
@@ -1,6 +1,6 @@
 dnl Process this file with autoconf to produce a configure script.
 dnl $Id$
-AC_INIT([WebCit], [7.23], [http://www.citadel.org/])
+AC_INIT([WebCit], [7.30], [http://www.citadel.org/])
 
 AC_SUBST(PROG_SUBDIRS)
 AC_DEFINE(PROG_SUBDIRS, [], [Program dirs])
@@ -100,6 +100,24 @@ AC_TYPE_SIGNAL
 dnl AC_FUNC_VPRINTF
 AC_REPLACE_FUNCS(snprintf)
 
+
+dnl Check for libcitadel
+AC_CHECK_HEADER(libcitadel.h,
+       [AC_CHECK_LIB(citadel, libcitadel_version_string,
+               [
+                       LIBS="-lcitadel $LIBS"
+               ],
+               [
+                       AC_MSG_ERROR(libcitadel was not found or is not usable.  Please install libcitadel.)
+               ]
+       ,
+       )],
+       [
+               AC_MSG_ERROR(libcitadel.h was not found or is not usable.  Please install libcitadel.)
+       ]
+)
+
+
 webcit_with_calendar_service=no
 dnl Checks for the libical calendaring library.
 if test "x$with_libical" != xno ; then
@@ -119,11 +137,11 @@ main() {
         sscanf(ICAL_VERSION, "%d.%d", &major, &minor);
         v = 100*major + minor;
         printf("libical version: %i\n", v);
-        if (v >= 24) {
+        if (v >= 30) {
                 printf("This version is ok.\n");
                return(0);
        }
-       printf("libical 0.24 or newer required.\n");
+       printf("libical 0.30 or newer required.\n");
        printf("Citadel will be built without calendar support.\n");
        return(1);
 }
@@ -135,6 +153,8 @@ main() {
                ]
        )
 fi
+ok_libical=$webcit_with_calendar_service
+
 
 if test "$webcit_with_calendar_service" == "yes"; then
                        AC_DEFINE(WEBCIT_WITH_CALENDAR_SERVICE,[],[whether we can do with calendar.])
@@ -299,6 +319,23 @@ if test "$ok_nls" != "no"; then
        )
 fi
 
+dnl Check for iconv in external libiconv
+if test "$ok_nls" != "no"; then
+       if test "$ok_nls" == "no" ; then
+               AC_MSG_RESULT(Checking for an external libiconv...)
+               AC_CHECK_HEADER(iconv.h,
+                       [
+                               AC_CHECK_LIB(iconv, iconv_open,
+                                       [
+                                               LIBS="-liconv $LIBS"
+                                               ok_iconv=yes
+                                       ]
+                               )
+                       ]
+               )
+       fi
+fi
+
 if test "$ok_iconv" != "no"; then
        AC_MSG_RESULT(WebCit will be built with character set conversion.)
        AC_DEFINE(HAVE_ICONV,[],[whether we have iconv for charset conversion])
@@ -309,6 +346,7 @@ fi
 
 
 dnl Here is the check for libintl etc.
+AC_CHECK_FUNCS(strftime_l uselocale gettext)
 
 AC_ARG_ENABLE(nls,
        [  --disable-nls           do not use Native Language Support],