diff options
author | Greg Hudson <ghudson@mit.edu> | 2011-06-10 18:17:22 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2011-06-10 18:17:22 +0000 |
commit | cb8b1138d6e349a77507f3c561fc7ee2dde5cd7c (patch) | |
tree | ad5246d1ab834f44aa9a5de30b255d9f044c9663 /src/aclocal.m4 | |
parent | fd2f45cf93bfbf10863011fb1a61fc08041c2f51 (diff) | |
download | krb5-cb8b1138d6e349a77507f3c561fc7ee2dde5cd7c.zip krb5-cb8b1138d6e349a77507f3c561fc7ee2dde5cd7c.tar.gz krb5-cb8b1138d6e349a77507f3c561fc7ee2dde5cd7c.tar.bz2 |
Add localization support to com_err
* Add compile_et arguments --textdomain and --localedir.
* Store text domain and localedir at the end of error tables.
* error_message() calls dgettext if the table has a text domain.
* add_error_table() calls bindtextdomain if the table has a localedir.
* Define N_() as no-op in generated source and mark up error messages.
* When using system compile_et, test for --textdomain support.
* Use --textdomain option when available.
* Run xgettext over generated sources in compile_et rule.
* Translate com_err results in krb5int_get_error() if com_err won't.
ticket: 6918
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@24960 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/aclocal.m4')
-rw-r--r-- | src/aclocal.m4 | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 390a747..57a0a38 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -1417,6 +1417,7 @@ AC_ARG_WITH([system-et], AC_HELP_STRING(--with-system-et,use system compile_et and -lcom_err @<:@default: build and install a local version@:>@)) AC_MSG_CHECKING(which version of com_err to use) if test "x$with_system_et" = xyes ; then + # This will be changed to "intlsys" if textdomain support is present. COM_ERR_VERSION=sys AC_MSG_RESULT(system) else @@ -1445,11 +1446,29 @@ EOF ],[ &et_foo_error_table; ],:, [AC_MSG_ERROR(cannot use et_foo_error_table)]) # Anything else we need to test for? - rm -f conf$$e.et conf$$e.c conf$$e.h + rm -f conf$$e.c conf$$e.h krb5_cv_compile_et_useful=yes ]) + AC_CACHE_CHECK(whether compile_et supports --textdomain, + krb5_cv_compile_et_textdomain,[ + krb5_cv_compile_et_textdomain=no + if compile_et --textdomain=xyzw conf$$e.et >/dev/null 2>&1 ; then + if grep -q xyzw conf$$e.c; then + krb5_cv_compile_et_textdomain=yes + fi + fi + rm -f conf$$e.c conf$$e.h + ]) + if test "$krb5_cv_compile_et_textdomain" = yes; then + COM_ERR_VERSION=intlsys + fi + rm -f conf$$e.et fi AC_SUBST(COM_ERR_VERSION) +if test "$COM_ERR_VERSION" = k5 -o "$COM_ERR_VERSION" = intlsys; then + AC_DEFINE(HAVE_COM_ERR_INTL,1, + [Define if com_err has compatible gettext support]) +fi ]) AC_DEFUN([KRB5_AC_CHOOSE_SS],[ AC_ARG_WITH(system-ss, |