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
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 \
$(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
; 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
+
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
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