[29804] in CVS-changelog-for-Kerberos-V5
krb5 commit: Add configure option to disable nls support
daemon@ATHENA.MIT.EDU (Greg Hudson)
Fri Jan 6 13:22:41 2017
Date: Fri, 6 Jan 2017 13:22:36 -0500
From: Greg Hudson <ghudson@mit.edu>
Message-Id: <201701061822.v06IMaCk025797@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu
https://github.com/krb5/krb5/commit/981ed4105729954fbcd95b8447c5b7e0a7922377
commit 981ed4105729954fbcd95b8447c5b7e0a7922377
Author: Zentaro Kavanagh <zentaro@google.com>
Date: Tue Dec 20 16:52:01 2016 -0800
Add configure option to disable nls support
ChromeOS portage disables nls support as users are not expected to see
strings from the packages built. Add a configure option to allow
this.
[ghudson@mit.edu: rewrote commit message, reformatted code]
ticket: 8534 (new)
src/configure.in | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/configure.in b/src/configure.in
index a519a4f..853e7bb 100644
--- a/src/configure.in
+++ b/src/configure.in
@@ -118,15 +118,29 @@ LIBUTIL=-lutil
])
AC_SUBST(LIBUTIL)
-AC_CHECK_HEADER(libintl.h, [
- AC_SEARCH_LIBS(dgettext, intl, [
- AC_DEFINE(ENABLE_NLS, 1,
- [Define if translation functions should be used.])])])
-
-AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt)
+# Determine if NLS is desired and supported.
po=
-if test x"$MSGFMT" != x; then
- po=po
+AC_ARG_ENABLE([nls],
+AC_HELP_STRING([--disable-nls], [disable native language support]),
+ [], [enable_nls=check])
+if test "$enable_nls" != no; then
+ AC_CHECK_HEADER(libintl.h, [
+ AC_SEARCH_LIBS(dgettext, intl, [
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define if translation functions should be used.])
+ nls_enabled=yes])])
+
+ AC_CHECK_PROG(MSGFMT,msgfmt,msgfmt)
+ if test x"$MSGFMT" != x; then
+ po=po
+ fi
+
+ # Error out if --enable-nls was explicitly requested but can't be enabled.
+ if test "$enable_nls" = yes; then
+ if test "$nls_enabled" != yes -o "x$po" = x; then
+ AC_MSG_ERROR([NLS support requested but cannot be built])
+ fi
+ fi
fi
AC_SUBST(po)
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5