diff options
| author | tkikuchi | 2005-12-06 04:31:56 +0000 |
|---|---|---|
| committer | tkikuchi | 2005-12-06 04:31:56 +0000 |
| commit | d01c86a5abd679b8d218cef315ad7a9bbdf2cf8b (patch) | |
| tree | e947b558af77c402bcbc9f258222c022f5efc725 | |
| parent | be649bf137fce4c5014a58d6a839e08325d6f4dd (diff) | |
| download | mailman-d01c86a5abd679b8d218cef315ad7a9bbdf2cf8b.tar.gz mailman-d01c86a5abd679b8d218cef315ad7a9bbdf2cf8b.tar.zst mailman-d01c86a5abd679b8d218cef315ad7a9bbdf2cf8b.zip | |
Now the language should be selected during the './configure' run.
| -rw-r--r-- | Makefile.in | 2 | ||||
| -rwxr-xr-x | configure | 80 | ||||
| -rw-r--r-- | configure.in | 84 |
3 files changed, 132 insertions, 34 deletions
diff --git a/Makefile.in b/Makefile.in index 40e04f56e..fac0321e7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -34,6 +34,8 @@ CC= @CC@ INSTALL= @INSTALL@ PYTHON= @PYTHON@ +LANGUAGES= @LANGUAGES@ + DEFS= @DEFS@ # Customizable but not set by configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 2.39.2.7 . +# From configure.in Revision: 2.45 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59. # @@ -311,7 +311,7 @@ ac_includes_default="\ # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_python PYTHON INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE TRUE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT OPT VAR_PREFIX MAILMAN_USER MAILMAN_GROUP MAIL_GROUP CGI_GROUP CGIEXT MAILHOST URLHOST CPP EGREP SCRIPTS LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_python PYTHON INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA SET_MAKE TRUE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT OPT VAR_PREFIX MAILMAN_USER MAILMAN_GROUP MAIL_GROUP CGI_GROUP CGIEXT MAILHOST URLHOST LANGUAGES CPP EGREP SCRIPTS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -846,13 +846,14 @@ Optional Packages: --without-gcc never use gcc --with-var-prefix directory for mutable data /var/mailman --without-permcheck skip the check for target directory permissions - --with-username specify a user name other than \"mailman\" - --with-groupname specify a group name other than \"mailman\" + --with-username specify a user name other than "mailman" + --with-groupname specify a group name other than "mailman" --with-mail-gid group name mail programs run as --with-cgi-gid group name CGI programs run as --with-cgi-ext specify extension for CGI programs (include dot) --with-mailhost specify the hostname part for outgoing email --with-urlhost specify the hostname part of urls + --with-languages add i18n languages: specify "none" for English only. Some influential environment variables: CC C compiler command @@ -3149,6 +3150,72 @@ echo "$as_me:$LINENO: result: $URLHOST" >&5 echo "${ECHO_T}$URLHOST" >&6 rm -f conftest.out conftest.py +# i18n --with-languages +ALL_LINGUAS=`(cd ${srcdir}/messages && ls | grep '^..\(_..\)*$' | tr '\n' ' ')` + +echo "$as_me:$LINENO: checking for --with-languages" >&5 +echo $ECHO_N "checking for --with-languages... $ECHO_C" >&6 + +# Check whether --with-languages or --without-languages was given. +if test "${with_languages+set}" = set; then + withval="$with_languages" + +fi; +if test -z "$with_languages" +then + LANGUAGES="$ALL_LINGUAS" +elif test "$with_languages" = "none" +then + LANGUAGES="" +else + LANGUAGES="$with_languages" +fi +echo "$as_me:$LINENO: result: $with_languages" >&5 +echo "${ECHO_T}$with_languages" >&6 + +# check CJKCodecs +echo "$as_me:$LINENO: checking for CJK codecs" >&5 +echo $ECHO_N "checking for CJK codecs... $ECHO_C" >&6 + +cat > conftest.py <<EOF +langs = "$LANGUAGES".split() +cset = {'ja': 'euc-jp', 'ko': 'euc-kr', + 'zh_CN': 'gb2312', 'zh_TW': 'big5'} +s = 'Not required' +for lang in cset.keys(): + if lang in langs: + try: + s = unicode('OK', cset[lang]).encode('us-ascii') + except LookupError: + s = '' + break +fp = open("conftest.out", "w") +fp.write("%s\n" % s) +fp.close() +EOF + +$PYTHON conftest.py +cjkok=`cat conftest.out` +rm -f conftest.out conftest.py +if test -z "$cjkok" +then + { { echo "$as_me:$LINENO: error: +***** At least one of the CJK codecs missing! +***** You have included ja, ko, or zh_* in --with-languages +***** but valid codecs are not installed. You should +***** either install CJKCodecs from http://cjkpython.i18n.org/ +***** or use Python 2.4 in which CJK languages are supported." >&5 +echo "$as_me: error: +***** At least one of the CJK codecs missing! +***** You have included ja, ko, or zh_* in --with-languages +***** but valid codecs are not installed. You should +***** either install CJKCodecs from http://cjkpython.i18n.org/ +***** or use Python 2.4 in which CJK languages are supported." >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: $cjkok" >&5 +echo "${ECHO_T}$cjkok" >&6 + # Checks for libraries. @@ -4235,6 +4302,8 @@ build/bin/version:bin/version \ build/bin/withlist:bin/withlist \ build/bin/b4b5-archfix:bin/b4b5-archfix \ build/bin/rb-archfix:bin/rb-archfix \ +build/bin/templ2pot.py:bin/templ2pot.py \ +build/bin/po2templ.py:bin/po2templ.py \ build/contrib/check_perms_grsecurity.py:contrib/check_perms_grsecurity.py \ build/contrib/qmail-to-mailman.py:contrib/qmail-to-mailman.py \ build/contrib/rotatelogs.py:contrib/rotatelogs.py \ @@ -4944,6 +5013,7 @@ s,@CGI_GROUP@,$CGI_GROUP,;t t s,@CGIEXT@,$CGIEXT,;t t s,@MAILHOST@,$MAILHOST,;t t s,@URLHOST@,$URLHOST,;t t +s,@LANGUAGES@,$LANGUAGES,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@SCRIPTS@,$SCRIPTS,;t t @@ -5339,5 +5409,3 @@ fi # Make sure all the build scripts are executable. chmod -R +x build -# Test for the Chinese codecs. - diff --git a/configure.in b/configure.in index d1a156b51..bb57b83e1 100644 --- a/configure.in +++ b/configure.in @@ -15,7 +15,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. dnl Process this file with autoconf to produce a configure script. -AC_REVISION($Revision: 7495 $) +AC_REVISION($Revision: 7627 $) AC_PREREQ(2.0) AC_INIT(src/common.h) @@ -273,7 +273,7 @@ rm -f conftest.out conftest.py]) # Check for some other uid to use than `mailman' AC_MSG_CHECKING(for --with-username) AC_ARG_WITH(username, dnl -[ --with-username specify a user name other than \"mailman\"]) +[ --with-username specify a user name other than "mailman"]) if test -z "$with_username" then @@ -303,7 +303,7 @@ AC_MSG_RESULT(okay) # Check for some other gid to use than `mailman' AC_MSG_CHECKING(for --with-groupname) AC_ARG_WITH(groupname, dnl -[ --with-groupname specify a group name other than \"mailman\"]) +[ --with-groupname specify a group name other than "mailman"]) if test -z "$with_groupname" then @@ -507,6 +507,57 @@ fi AC_MSG_RESULT($URLHOST) rm -f conftest.out conftest.py +# i18n --with-languages +ALL_LINGUAS=`(cd ${srcdir}/messages && ls | grep '^..\(_..\)*$' | tr '\n' ' ')` +AC_SUBST(LANGUAGES) +AC_MSG_CHECKING(for --with-languages) +AC_ARG_WITH(languages, dnl +[ --with-languages add i18n languages: specify "none" for English only.]) +if test -z "$with_languages" +then + LANGUAGES="$ALL_LINGUAS" +elif test "$with_languages" = "none" +then + LANGUAGES="" +else + LANGUAGES="$with_languages" +fi +AC_MSG_RESULT($with_languages) + +# check CJKCodecs +AC_MSG_CHECKING(for CJK codecs) +changequote(,) +cat > conftest.py <<EOF +langs = "$LANGUAGES".split() +cset = {'ja': 'euc-jp', 'ko': 'euc-kr', + 'zh_CN': 'gb2312', 'zh_TW': 'big5'} +s = 'Not required' +for lang in cset.keys(): + if lang in langs: + try: + s = unicode('OK', cset[lang]).encode('us-ascii') + except LookupError: + s = '' + break +fp = open("conftest.out", "w") +fp.write("%s\n" % s) +fp.close() +EOF +changequote([, ]) +$PYTHON conftest.py +cjkok=`cat conftest.out` +rm -f conftest.out conftest.py +if test -z "$cjkok" +then + AC_MSG_ERROR([ +***** At least one of the CJK codecs missing! +***** You have included ja, ko, or zh_* in --with-languages +***** but valid codecs are not installed. You should +***** either install CJKCodecs from http://cjkpython.i18n.org/ +***** or use Python 2.4 in which CJK languages are supported.]) +fi +AC_MSG_RESULT($cjkok) + # Checks for libraries. AC_CHECK_FUNCS(strerror setregid syslog) if test $ac_cv_func_syslog = no; then @@ -579,6 +630,8 @@ bin/version \ bin/withlist \ bin/b4b5-archfix \ bin/rb-archfix \ +bin/templ2pot.py \ +bin/po2templ.py \ contrib/check_perms_grsecurity.py \ contrib/qmail-to-mailman.py \ contrib/rotatelogs.py \ @@ -626,28 +679,3 @@ AC_OUTPUT([misc/paths.py Mailman/Defaults.py Mailman/mm_cfg.py.dist # Make sure all the build scripts are executable. chmod -R +x build -# Test for the Chinese codecs. -dnl AC_MSG_CHECKING(for Python Chinese Unicode codecs) -dnl cat > conftest.py <<EOF -dnl try: -dnl unicode("abc", "big5-tw") -dnl print "found" -dnl except LookupError: -dnl print "not found" -dnl EOF -dnl chinese=`$PYTHON conftest.py 2>/dev/null` -dnl rm -f conftest.py -dnl AC_MSG_RESULT($chinese) -dnl if test "x$chinese" != "xfound" -dnl then -dnl AC_MSG_WARN([ - -dnl ***** Python Unicode codecs for Chinese not found. -dnl ***** Chinese emails generated by or manipulated in Mailman will not -dnl ***** be sent in the correct encoding and may be unreadable. -dnl ***** Please uncompress and install the Chinese codecs from: -dnl ***** http://sourceforge.net/projects/python-codecs/ -dnl ***** -dnl ***** Note: Everything else will work just fine. -dnl ]) -dnl fi |
