* have LOCALEDIR be customizable by configure
authorWilfried Göesgens <willi@citadel.org>
Wed, 3 Jan 2007 20:09:37 +0000 (20:09 +0000)
committerWilfried Göesgens <willi@citadel.org>
Wed, 3 Jan 2007 20:09:37 +0000 (20:09 +0000)
webcit/Makefile.in
webcit/configure.in
webcit/debian/rules

index a40a2aad7a092128a8421761d533264c0fcfbd8a..2eac9b2b20e20662c0a5be3acf171cb24a1d68e3 100644 (file)
@@ -18,7 +18,7 @@ top_builddir=`pwd`
 LIB_SUBDIRS=
 PROG_SUBDIRS=@PROG_SUBDIRS@
 SUBDIRS=$(LIB_SUBDIRS) $(PROG_SUBDIRS) 
-
+LOCALEDIR=@LOCALEDIR@
 # 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=\"$(prefix)/locale\" $<
+       $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $<
 
 .cpp.o:
-       $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" -DLOCALEDIR=\"$(prefix)/locale\"  $<
+       $(CC) $(CFLAGS) $(DEFS) -c $(PTHREAD_DEFS) -DWEBCITDIR=\"$(prefix)\" -DLOCALEDIR=\"$(LOCALEDIR)\" $<
 
 Makefile: $(srcdir)/Makefile.in config.status
        CONFIG_FILES="Makefile" CONFIG_HEADERS= $(SHELL) ./config.status
index 2cdd1c58e2181088b1f983648f450b14f4936776..b1d9170400c85f39d1f64ca50b0df67eb95ffdfd 100644 (file)
@@ -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
@@ -341,6 +343,21 @@ 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 ------------------------------------------------------------------------
index 255050b29096a22bad2e7896a7f0cf03afe7d632..d46918ae4169349a11fbacbe6a631708dde203f5 100755 (executable)
@@ -28,6 +28,7 @@ configure-stamp:
                --host=$(DEB_HOST_GNU_TYPE) \
                --build=$(DEB_BUILD_GNU_TYPE) \
                --prefix=/etc/citadel/www/ \
+               --with-localedir=/usr/share/locale \
                --with-sysconfdir=/etc/citadel \
                --with-spooldir=/var/spool/citadel \
                --with-datadir=/etc/citadel \