fi
fi
-dnl Squid now has limited locale handling ...
-DO_TRANSLATE="yes"
-AC_ARG_WITH(po2html,
-[ --without-po2html Translation toolkit is required to auto-build translated
- error pages. If it is not present this option can be used
- to run the 'make dist' target without translating.
- A drop-in bundle of pre-translated files is available from
- http://www.squid-cache.org/Versions/v3/HEAD/
-],
-[ if test "$enableval" != "yes" ; then
- echo "Disabling Translation Toolkit dependency"
- DO_TRANSLATE="no"
- fi
-])
-AC_SUBST(DO_TRANSLATE)
-
+dnl Squid now has .po translation capability, given the right toolkit
+AX_WITH_PROG([PO2HTML],[po2html])
+AC_SUBST(PO2HTML)
dnl Squid now has limited locale handling ...
dnl on error pages
dist-hook:
for lang in $(LANGUAGES); do \
- if test "$$lang" = .; then :; else \
+ if test -d $(srcdir)/$$lang ; then \
test -d $(distdir)/$$lang \
|| mkdir $(distdir)/$$lang \
|| exit 1; \
|| exit 1; \
fi; \
done; \
- if test "$(DO_TRANSLATE)" = "yes" ; then \
- make translate; \
+ make translate; \
+ for lang in $(TRANSLATIONS); do \
+ if test -d $(srcdir)/$$lang ; then \
test -d $(distdir)/$$lang \
|| mkdir $(distdir)/$$lang \
|| exit 1; \
cp -p $(srcdir)/$$lang/ERR_* $(distdir)/$$lang \
|| exit 1; \
- fi
+ fi; \
+ done
translate:
- for lang in $(TRANSLATIONS); do \
+ if test "$(PO2HTML)" != "" ; then \
+ for lang in $(TRANSLATIONS); do \
test -d $$lang && rm -r $$lang; \
mkdir $$lang; \
cd $$lang; \
for f in `ls -1 ../templates`; do \
- echo "po2html -i ../$$lang.po -t ../templates/$$f"; \
- po2html -i ../$$lang.po -t ../templates/$$f >$$f || exit 1; \
+ $(PO2HTML) -i ../$$lang.po -t ../templates/$$f >$$f || exit 1; \
done; \
cd ..; \
- done
+ done; \
+ else \
+ echo "WARNING: Translation toolkit was not detected."; \
+ echo "A drop-in bundle of pre-translated files is available from"; \
+ echo "http://www.squid-cache.org/Versions/langpack/"; \
+ fi
all:
- if test "$(DO_TRANSLATE)" = "yes" ; then \
- make translate; \
- fi
+ make translate