Index: configure.in =================================================================== RCS file: /server/cvs-server/squid/squid/configure.in,v retrieving revision 1.238 diff -u -p -r1.238 configure.in --- configure.in 2001/10/29 08:45:17 1.238 +++ configure.in 2001/10/29 13:30:16 @@ -32,13 +32,6 @@ CRYPTLIB='' REGEXLIB='' # -lregex LIBREGEX='' # libregex.a -dnl use directory structure of cached as default (hack) -if test "$libexecdir" = '${exec_prefix}/libexec' && - test "$localstatedir" = '${prefix}/var'; then - libexecdir='${prefix}/libexec/squid' - localstatedir='${prefix}' -fi - dnl find out the exe extension for this platform. If it's not empty, use it for CGI's as well. AC_EXEEXT AC_OBJEXT @@ -613,19 +606,41 @@ AC_ARG_ENABLE(cache-digests, fi ]) -dnl Select Error language -AC_ARG_ENABLE(err-language, -[ --enable-err-language=lang - Select language for Error pages (see errors dir) ], +dnl Select Default Error language +AC_ARG_ENABLE(default-err-language, +[ --enable-default-err-language=lang + Select default language for Error pages (see errors dir) ], [ if test -d $srcdir/errors/$enableval; then - ERR_LANGUAGE=$enableval + ERR_DEFAULT_LANGUAGE=$enableval else echo "ERROR! Unknown language $enableval, see errors/" exit 1 fi -],[ERR_LANGUAGE="English"]) -AC_SUBST(ERR_LANGUAGE) +],[ERR_DEFAULT_LANGUAGE="English"]) +AC_SUBST(ERR_DEFAULT_LANGUAGE) + +dnl Select languages to be installed +AC_ARG_ENABLE(err-languages, +[ --enable-err-languages=\"lang1 lang2..\" + Select languages to be installed. (All will be installed by default) ], +[ + for l in $enableval; do + if test -d $srcdir/errors/$l; then :; else + echo "ERROR! Unknown language $$l, see errors/" + exit 1 + fi + done + ERR_LANGUAGES=$enableval +],[ + ERR_LANGUAGES= + for l in $srcdir/errors/*; do + if test -f $l/generic; then + ERR_LANGUAGES="$ERR_LANGUAGES `basename $l`" + fi + done +]) +AC_SUBST(ERR_LANGUAGES) dnl Size of COSS memory buffer AC_ARG_WITH(coss-membuf-size, Index: errors/Makefile.am =================================================================== RCS file: /server/cvs-server/squid/squid/errors/Makefile.am,v retrieving revision 1.1 diff -u -p -r1.1 Makefile.am --- errors/Makefile.am 2001/08/31 11:19:08 1.1 +++ errors/Makefile.am 2001/10/29 13:30:16 @@ -3,14 +3,14 @@ # $Id$ # -errordir = $(sysconfdir)/errors +errordir = $(sharedstatedir)/squid/errors ##dist-hook eveything DEFAULT_ERROR_DIR = $(errordir) -LANGUAGE = @ERR_LANGUAGE@ +INSTALL_LANGUAGES = @ERR_LANGUAGES@ LANGUAGES = Bulgarian Czech Danish Dutch English Estonian Finnish French \ German Hungarian Italian Japanese Korean Polish Portuguese \ Romanian Russian-1251 Russian-koi8-r Serbian Simplify_Chinese \ @@ -18,40 +18,42 @@ LANGUAGES = Bulgarian Czech Danish Dutch install-data-local: - -@$(mkinstalldirs) $(DESTDIR)$(DEFAULT_ERROR_DIR) - @for f in $(srcdir)/$(LANGUAGE)/ERR_*; do \ - if test -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$f ; then \ - :; \ - else \ - echo "$(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)"; \ - $(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR); \ - fi; \ + @for l in $(INSTALL_LANGUAGES); do \ + $(mkinstalldirs) $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l && \ + for f in $(srcdir)/$$l/ERR_*; do \ + echo "$(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l"; \ + $(INSTALL_DATA) $$f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l; \ + done \ done uninstall-local: - @for f in $(srcdir)/$(LANGUAGE)/ERR_*; do \ - if test -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/`echo $$f | echo "$$f" | sed -e "s/.*\///;"` ; then \ - rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/`echo $$f | echo "$$f" | sed -e "s/.*\///;"`; \ - fi; \ + @for l in $(INSTALL_LANGUAGES); do \ + for f in $(srcdir)/$$l/ERR_*; do \ + if test -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`echo $$f | echo "$$f" | sed -e "s/.*\///;"` ; then \ + rm -f $(DESTDIR)$(DEFAULT_ERROR_DIR)/$$l/`echo $$f | echo "$$f" | sed -e "s/.*\///;"`; \ + fi; \ + done \ done # undocumented hack. You can use this target to create multi-lingual # error pages. For example: # -# make ADDLANG=English addlang +# make ADDLANG=English DESTLANG=French addlang # # by Andres Kroonmaa # addlang: all -@if test -d $(srcdir)/$(ADDLANG); then \ + if test -d $(DEFAULT_ERROR_DIR)/$(DESTLANG); then cd $(srcdir)/$(ADDLANG)/ ; \ for f in ERR_*; do \ - if test -f $(DEFAULT_ERROR_DIR)/$$f ; then \ + if test -f $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f ; then \ echo "appending $(ADDLANG)/$$f"; \ - echo "
" >> $(DEFAULT_ERROR_DIR)/$$f ; \ - cat $$f >> $(DEFAULT_ERROR_DIR)/$$f; \ + echo "
" >> $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f ; \ + cat $$f >> $(DEFAULT_ERROR_DIR)/$(DESTLANG)/$$f; \ fi; \ done; \ + fi \ fi dist-hook: Index: icons/Makefile.am =================================================================== RCS file: /server/cvs-server/squid/squid/icons/Makefile.am,v retrieving revision 1.2 diff -u -p -r1.2 Makefile.am --- icons/Makefile.am 2001/10/29 07:40:56 1.2 +++ icons/Makefile.am 2001/10/29 13:30:17 @@ -29,7 +29,7 @@ ICON2 = anthony-bomb.gif \ anthony-xbm.gif \ anthony-xpm.gif -icondir = $(sysconfdir)/icons +icondir = $(sharedstatedir)/squid/icons icon_DATA = $(ICON1) $(ICON2) EXTRA_DIST = $(ICON1) $(ICON2) icons.shar DISTCLEANFILES = $(ICON1) $(ICON2) Index: src/Makefile.am =================================================================== RCS file: /server/cvs-server/squid/squid/src/Makefile.am,v retrieving revision 1.10 diff -u -p -r1.10 Makefile.am --- src/Makefile.am 2001/10/29 08:10:21 1.10 +++ src/Makefile.am 2001/10/29 13:30:17 @@ -270,8 +270,8 @@ DEFAULT_SWAP_DIR = $(localstatedi DEFAULT_PINGER = $(libexecdir)/@OPT_PINGER_EXE@ DEFAULT_UNLINKD = $(libexecdir)/$(UNLINKD_EXE) DEFAULT_DISKD = $(libexecdir)/@OPT_DISKD_EXE@ -DEFAULT_ICON_DIR = $(sysconfdir)/icons -DEFAULT_ERROR_DIR = $(sysconfdir)/errors +DEFAULT_ICON_DIR = $(sharedstatedir)/squid/icons +DEFAULT_ERROR_DIR = $(sharedstatedir)/squid/errors/@ERR_DEFAULT_LANGUAGE@ DEFAULT_MIB_PATH = $(sysconfdir)/mib.txt DEFS = @DEFS@ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\"