From c9c7edc3c74fb80d6c0192790702a31010304110 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 7 Jan 2007 15:19:21 +0000 Subject: [PATCH] * put LOCALEDIR back in * added WWWDIR-directive for our templates --- webcit/Makefile.in | 39 ++++++++++++++++++++++++--------------- webcit/configure.ac | 30 ++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+), 15 deletions(-) diff --git a/webcit/Makefile.in b/webcit/Makefile.in index 187ae3c42..732301c96 100644 --- a/webcit/Makefile.in +++ b/webcit/Makefile.in @@ -14,11 +14,11 @@ PTHREAD_DEFS=@PTHREAD_DEFS@ srcdir=@srcdir@ prefix=@prefix@ top_builddir=`pwd` - LIB_SUBDIRS= PROG_SUBDIRS=@PROG_SUBDIRS@ SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) LOCALEDIR=@LOCALEDIR@ +WWWDIR=@WWWDIR@ # End of configuration section all: all-progs-recursive webserver setup @@ -65,10 +65,10 @@ webserver: webserver.o context_loop.o tools.o ical_dezonify.o \ $(LIBOBJS) $(LIBS) $(LDFLAGS) -o webserver .c.o: - $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $< + $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(WWWDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $< .cpp.o: - $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $< + $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(WWWDIR)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $< Makefile: $(srcdir)/Makefile.in config.status CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status @@ -82,26 +82,35 @@ $(srcdir)/configure: $(srcdir)/configure.ac $(srcdir)/aclocal.m4 $(srcdir)/aclocal.m4: $(srcdir)/acinclude.m4 cd $(srcdir) && $(ACLOCAL) -install: +install: install-bin install-locale install-wwwdata + +install-bin: test -d $(DESTDIR)$(prefix) || mkdir $(DESTDIR)$(prefix) - test -d $(DESTDIR)$(prefix)/static || mkdir $(DESTDIR)$(prefix)/static - test -d $(DESTDIR)$(prefix)/local || mkdir $(DESTDIR)$(prefix)/local - for i in `find tiny_mce -type d | grep -v .svn` \ - ; do \ - test -d $(DESTDIR)$(prefix)/$$i || mkdir $(DESTDIR)$(prefix)/$$i; \ + for i in webserver setup; do \ + $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \ done - for i in `find locale -type d | grep -v .svn` \ + +install-wwwdata: + test -d $(DESTDIR)$(prefix)/static || mkdir -p $(DESTDIR)$(prefix)/static + for i in `find tiny_mce -type d | grep -v .svn` \ ; do \ - test -d $(DESTDIR)$(prefix)/$$i || mkdir $(DESTDIR)$(prefix)/$$i; \ + test -d $(DESTDIR)$(WWWDIR)/$$i || mkdir -p $(DESTDIR)$(WWWDIR)/$$i; \ done for i in \ - webserver \ - setup \ `find static -type f | grep -v .svn` \ `find tiny_mce -type f | grep -v .svn` \ - `find locale -type f | grep -v .svn` \ ; do \ - $(INSTALL) $$i $(DESTDIR)$(prefix)/$$i; \ + $(INSTALL) $$i $(DESTDIR)$(WWWDIR)/$$i; \ + done + +install-locale: + test -d $(DESTDIR)$(prefix)/local || mkdir -p $(DESTDIR)$(prefix)/local + for i in `find locale -type d | grep -v .svn` \ + ; do \ + test -d $(DESTDIR)$(LOCALEDIR)/$$i || mkdir -p $(DESTDIR)$(LOCALEDIR)/$$i; \ + done + for i in `find locale -type f | grep -v .svn`; do \ + $(INSTALL) $$i $(DESTDIR)$(LOCALEDIR)/$$i; \ done TAGS clean-recursive distclean-recursive depend-recursive check-recursive \ diff --git a/webcit/configure.ac b/webcit/configure.ac index b5eed7a90..ba592c3d3 100644 --- a/webcit/configure.ac +++ b/webcit/configure.ac @@ -343,6 +343,36 @@ fi AC_SUBST(SETUP_LIBS) + +if test "$prefix" = NONE; then + LOCALEDIR=$ac_default_prefix + WWWDIR=$ac_default_prefix +else + LOCALEDIR=$prefix + WWWDIR=$prefix +fi + +dnl where to put the locale files +AC_ARG_WITH(localedir, + [ --with-localedir directory to put the locale files to], + [ if test "x$withval" != "xno" ; then + LOCALEDIR=$withval + fi + ] +) +AC_SUBST(LOCALEDIR) + +dnl Checks where to put our templates +AC_ARG_WITH(wwwdir, + [ --with-wwwdir directory to put our templates], + [ if test "x$withval" != "xno" ; then + WWWDIR=$withval + fi + ] +) +AC_SUBST(WWWDIR) + + AC_OUTPUT(Makefile po/Makefile ) echo ------------------------------------------------------------------------ -- 2.30.2