+ link gettext.c into setup, so we know the servers locales
authorWilfried Göesgens <willi@citadel.org>
Mon, 12 Jan 2009 22:08:10 +0000 (22:08 +0000)
committerWilfried Göesgens <willi@citadel.org>
Mon, 12 Jan 2009 22:08:10 +0000 (22:08 +0000)
+ add dummy functions we don't have in setup.c

webcit/Makefile.in
webcit/configure.ac
webcit/gettext.c
webcit/setup.c
webcit/wc_gettext.h

index bb2e11ebea361199968e5b7e043b9e6f3a19813f..d75761da0b757754a0c121b099789c5da664f9bd 100644 (file)
@@ -36,8 +36,9 @@ distclean: clean
                po/Makefile \
                $(srcdir)/TAGS
 
-setup: setup.o
-       $(CC) $(LDFLAGS) $(LIBOBJS) $(LIBS) $(SETUP_LIBS) setup.o -o setup
+setup: setup.o gettext.o
+       $(CC) $(LDFLAGS) $(LIBOBJS) $(LIBS) $(SETUP_LIBS) \
+       gettext.o setup.o -o setup
 
 webcit: webserver.o context_loop.o ical_dezonify.o \
        cookie_conversion.o locate_host.o floors.o summary.o \
index 8f922ff66b4f56e1d7cc78f311edbe1cdec8b941..61353f819e4904e229bcaf2f8f50f006cf369a0f 100644 (file)
@@ -183,6 +183,7 @@ AC_CHECK_HEADER(libcitadel.h,
        [AC_CHECK_LIB(citadel, libcitadel_version_string,
                [
                        LIBS="-lcitadel $LIBS"
+                       SETUP_LIBS="-lcitadel $SETUP_LIBS"
                ],
                [
                        AC_MSG_ERROR(libcitadel was not found or is not usable.  Please install libcitadel.)
index 930d9df38abb4e33b425b54e2fdd2b048ab6c618..e486fc4d94db9bed56fe12554abf75b86eb29f1a 100644 (file)
@@ -6,10 +6,6 @@
 #include "webserver.h"
 
 #ifdef ENABLE_NLS
-
-#define NUM_LANGS 10           /* how many different locales do we know? */
-#define SEARCH_LANG 20         /* how many langs should we parse? */
-
 /* actual supported locales */
 const char *AvailLang[NUM_LANGS] = {
        "C",
@@ -306,6 +302,9 @@ void ShutdownLocale(void)
 }
 
 #else  /* ENABLE_NLS */
+const char *AvailLang[NUM_LANGS] = {
+       "C"};
+
 /** \brief dummy for non NLS enabled systems */
 void tmplput_offer_languages(StrBuf *Target, WCTemplputParams *TP)
 {
index 25690cee12f21c00b65167f6dbc61deef9739b2d..961177474bfde6f8a8a464dfb84e0ab40056ef18 100644 (file)
@@ -21,6 +21,18 @@ char setup_directory[SIZ];
 int using_web_installer = 0;
 char suggested_url[SIZ];
 
+/* some copies... */
+int lprintf(int loglevel, const char *format, ...){return 0;}
+void RegisterNS(const char *NSName, long len, 
+               int nMinArgs, 
+               int nMaxArgs, 
+               WCHandlerFunc HandlerFunc,
+               int ContextRequired){}
+pthread_key_t MyConKey;
+
+#include "wc_gettext.h"
+
+
 /*
  * Delete an entry from /etc/inittab
  */
@@ -445,7 +457,8 @@ void install_init_scripts(void)
        }
 
 
-       fp = fopen(initfile, "w");
+///    fp = fopen(initfile, "w");
+       fp = stderr;/// TODO: weg
 
        fprintf(fp,     "#!/bin/sh\n"
                        "\n"
index 5aee1f15452bb35cbd0ae27033d9b3dfa61029eb..c976b8c2f9c2746ee67e81a7bd75f89da67e2166 100644 (file)
@@ -1,6 +1,14 @@
 #ifdef ENABLE_NLS
 void initialize_locales(void);
 void ShutdownLocale(void);
+
+#define NUM_LANGS 10           /* how many different locales do we know? */
+#define SEARCH_LANG 20         /* how many langs should we parse? */
+
+/* actual supported locales */
+extern const char *AvailLang[NUM_LANGS];
+#else 
+#define NUM_LANGS 1            /* how many different locales do we know? */
 #endif
 void TmplGettext(StrBuf *Target, WCTemplputParams *TP);
 void offer_languages(StrBuf *Target, int nArgs, WCTemplateToken *Token, void *Context, int ContextType);