]> code.citadel.org Git - citadel.git/blobdiff - webcit/configure.in
* have LOCALEDIR be customizable by configure
[citadel.git] / webcit / configure.in
index 07b75866f67f76e518f3726951a321ad0be8eb73..b1d9170400c85f39d1f64ca50b0df67eb95ffdfd 100644 (file)
@@ -4,21 +4,21 @@ AC_INIT(webserver.c)
 
 
 PACKAGE=webcit
-VERSION=6.40
+VERSION=7.02
 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
 AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
 AC_SUBST(PACKAGE)
 AC_SUBST(VERSION)
-AC_SUBST(PROG_SUBDIRS)
 
+AC_SUBST(PROG_SUBDIRS)
 AC_CANONICAL_HOST
 AC_PROG_INSTALL
+AC_CHECK_PROG(AUTOCONF, autoconf)
 AC_CHECK_PROG(SED, sed, sed, no)
 AC_PREFIX_DEFAULT(/usr/local/webcit)
 
 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(with_newt,    [  --with-newt             use newt window library])
 AC_ARG_WITH(ssl,
        [  --with-ssl=PATH         Specify path to OpenSSL installation ],
        [
@@ -27,6 +27,8 @@ AC_ARG_WITH(ssl,
                fi
        ]
 )
+
+
 dnl Set some system-specific variables which are OK to set before compiler
 dnl checks:
 PTHREAD_DEFS=-D_REENTRANT
@@ -64,8 +66,8 @@ if test "$GCC" = yes; then
        esac
 fi
 
-dnl ### missing_dir=`cd $ac_aux_dir && pwd`
-dnl ### AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+# missing_dir=`cd $ac_aux_dir && pwd`
+# AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
 
 dnl Checks for libraries.
 if test "$LIBS" != -pthread; then
@@ -144,19 +146,6 @@ if test "x$ok_zlib" = xyes ; then
         AC_DEFINE(HAVE_ZLIB)
 fi
 
-dnl Checks for the newt window library.
-if test "x$with_newt" != xno ; then
-       AC_CHECK_HEADERS(newt.h,
-               [AC_CHECK_LIB(newt, newtInit,
-                       [ok_newt=yes],,
-       )])
-fi
-
-if test "x$ok_newt" = xyes ; then
-       SETUP_LIBS="-lnewt $SETUP_LIBS"
-       AC_DEFINE(HAVE_NEWT)
-fi
-
 # The big search for OpenSSL
 if test "$with_ssl" != "no"; then
        saved_LIBS="$LIBS"
@@ -305,16 +294,22 @@ AC_ARG_ENABLE(nls,
        ok_nls=no, ok_nls=yes)
 
 if test "$ok_nls" != "no"; then
-       AC_MSG_RESULT(Checking to see if your system supports multithreaded NLS...)
+       AC_MSG_RESULT(Checking for per-thread NLS support...)
        AC_TRY_RUN([
-               #define _GNU_SOURCE
-               #include <locale.h>
-               #include <libintl.h>
-               main() {
-                       char *foo;
-                       uselocale(LC_GLOBAL_LOCALE);
-                       foo = gettext("bar");
-                       exit(0);
+                #define _GNU_SOURCE
+                #include <libintl.h>
+                #include <locale.h>
+                #include <time.h>
+                main() {
+                        char *foo = NULL;
+                        char baz[32];
+                       struct tm *tm;
+                        uselocale(LC_GLOBAL_LOCALE);
+                        foo = gettext("bar");
+                       if (0) {
+                               strftime_l(baz, sizeof baz, "%c", tm, LC_GLOBAL_LOCALE);
+                       }
+                        exit(0);
                }
        ],
                ok_uselocale=yes,
@@ -348,5 +343,26 @@ fi
 
 AC_SUBST(SETUP_LIBS)
 
+dnl where to make webcit search its mo's?
+if test "$prefix" = "NONE"; then
+       LOCALEDIR="$ac_default_prefix/locale/"
+else
+       LOCALEDIR="$prefix/locale/"
+fi
+AC_ARG_WITH(localedir, 
+                   [  --with-locale          directory where to find our mo's],
+                       [ if test "x$withval" != "xno" ; then
+                               LOCALEDIR="$withval/"
+                         fi
+                       ]
+)
+AC_SUBST(LOCALEDIR)
+
 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