* Assorted tweaks to activate the translations...
authorArt Cancro <ajc@citadel.org>
Thu, 17 Nov 2005 05:03:54 +0000 (05:03 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 17 Nov 2005 05:03:54 +0000 (05:03 +0000)
webcit/ChangeLog
webcit/Makefile.in
webcit/configure.in
webcit/webserver.c

index 0ebff19a3ede63ba19f2a2d1165916abd96ff2d2..bdc78e35bc8987205a33d664075f126b4e28ed4b 100644 (file)
@@ -1,5 +1,8 @@
 $Id$
 
+Tue Nov 17 00:03:20 EST 2005 ajc
+* Assorted tweaks to activate the translations...
+
 Tue Nov 15 21:58:09 EST 2005 ajc
 * Checked in po/de.po, a German translation submitted by Wilifried Goesgens.
   Now I just have to figure out how to activate it.
index a295d043d11b85fb61e8d4fb9dd76edc38c746ef..600b46ce43f66412814a6b722b85e28e1ce92277 100644 (file)
@@ -12,10 +12,16 @@ SETUP_LIBS=@SETUP_LIBS@
 PTHREAD_DEFS=@PTHREAD_DEFS@
 srcdir=@srcdir@
 prefix=@prefix@
+top_builddir=`pwd`
+
+LIB_SUBDIRS=
+PROG_SUBDIRS=po
+SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) 
 
 # End of configuration section
 
-all: webserver setup
+all: all-progs-recursive webserver setup
+
 
 .SUFFIXES: .c .o
 
@@ -23,7 +29,8 @@ clean:
        rm -f *.o webcit webserver
 
 distclean: clean
-       rm -f Makefile config.cache config.log config.status
+       rm -f Makefile config.cache config.log config.status\
+               $(srcdir)/TAGS
 
 setup: setup.o tools.o
        $(CC) setup.o tools.o \
@@ -57,7 +64,7 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \
        $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" -DLOCALEDIR=\"$(prefix)/locale\" $<
 
 Makefile: $(srcdir)/Makefile.in config.status
-       CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+       CONFIG_FILES="Makefile po/Makefile" CONFIG_HEADERS= $(SHELL) ./config.status
 
 config.status: $(srcdir)/configure
        $(SHELL) ./config.status --recheck
@@ -80,3 +87,35 @@ install:
                ; do \
                $(INSTALL) $$i $(root)$(prefix)/$$i; \
        done
+
+TAGS clean-recursive distclean-recursive depend-recursive check-recursive \
+  mostlyclean-recursive realclean-recursive:
+       @for subdir in $(SUBDIRS); do \
+         if test -d $$subdir ; then \
+           target=`echo $@|$(SED) 's/-recursive//'`; \
+           echo making $$target in $$subdir; \
+           (cd $$subdir && $(MAKE) $$target) || exit 1; \
+         fi ; \
+       done
+
+all-progs-recursive install-progs-recursive install-strip-progs-recursive \
+  uninstall-progs-recursive:
+       @for subdir in $(PROG_SUBDIRS); do \
+         if test -d $$subdir ; then \
+           target=`echo $@|$(SED) 's/-progs-recursive//'`; \
+           echo making $$target in $$subdir; \
+           (cd $$subdir && $(MAKE) $$target) || exit 1; \
+         fi ; \
+       done
+
+all-libs-recursive install-libs-recursive install-strip-libs-recursive \
+  uninstall-libs-recursive install-shlibs-libs-recursive \
+  install-shlibs-strip-libs-recursive uninstall-shlibs-libs-recursive:
+       @for subdir in $(LIB_SUBDIRS); do \
+         if test -d $$subdir ; then \
+           target=`echo $@|$(SED) 's/-libs-recursive//'`; \
+           echo making $$target in $$subdir; \
+           (cd $$subdir && $(MAKE) $$target) || exit 1; \
+         fi ; \
+       done
+
index acabc4268274ea24112ea39644977f4ba6a7ff0d..d45142462adb2fe031f3796065b796fe72a9748d 100644 (file)
@@ -78,6 +78,9 @@ AC_HEADER_STDC
 dnl AC_HEADER_SYS_WAIT
 AC_CHECK_HEADERS(fcntl.h limits.h sys/time.h unistd.h)
 
+
+
+
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
 AC_TYPE_OFF_T
index 092236442b6eb6365e6e397e89af784346c22d93..91a1dfa5ce0754483f44a6bc501203e96ab753c0 100644 (file)
@@ -383,13 +383,7 @@ int main(int argc, char **argv)
        char ip_addr[256];
        char *webcitdir = WEBCITDIR;
        char *locale = NULL;
-
-       /* initialize the International Bright Young Thing */
-#ifdef ENABLE_NLS
-       locale = setlocale(LC_ALL, "");
-       bindtextdomain(PACKAGE, LOCALEDIR);
-       textdomain(PACKAGE);
-#endif
+       char *mo = NULL;
 
        /* Parse command line */
 #ifdef HAVE_OPENSSL
@@ -465,6 +459,21 @@ int main(int argc, char **argv)
                perror("chdir");
        }
 
+       /* initialize the International Bright Young Thing */
+#ifdef ENABLE_NLS
+       locale = setlocale(LC_ALL, "");
+
+       mo = malloc(strlen(webcitdir) + 20);
+       sprintf(mo, "%s/locale", webcitdir);
+       lprintf(9, "Message catalog directory: %s\n",
+               bindtextdomain("webcit", mo)
+       );
+       free(mo);
+       lprintf(9, "Text domain: %s\n",
+               textdomain("webcit")
+       );
+#endif
+
        /*
         * Set up a place to put thread-specific data.
         * We only need a single pointer per thread - it points to the