From 85a87de3c03ca8be526dedc0a2973f9426518c39 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 21 Nov 2006 17:12:18 -0800 Subject: Sun bug 4486226: Xpm is not internationalized Use gettext() to allow translated messages in sxpm & cxpm (cherry picked from bcda4f17ab3fa9f0572f876dbeb09b45fbc23f3d commit) --- configure.ac | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 5dad93d..ff7e245 100644 --- a/configure.ac +++ b/configure.ac @@ -33,6 +33,26 @@ if test "x$GCC" = "xyes"; then CFLAGS="$GCC_WARNINGS $CFLAGS" fi +# Internationalization & localization support +AC_SEARCH_LIBS([gettext], [intl], [USE_GETTEXT="yes"], [USE_GETTEXT="no"]) +AC_MSG_CHECKING([where to install localized messages]) +AC_ARG_WITH([localedir], AC_HELP_STRING([--with-localedir=], + [Path to install message files in (default: datadir/locale)]), + [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale]) +AC_DEFINE_DIR([LOCALEDIR], [LOCALEDIR], [Location of translated messages]) +if test "x$LOCALEDIR" = "xno" -o "x$USE_GETTEXT" = "xno" ; then + AC_MSG_RESULT([nowhere]) + USE_GETTEXT="no" +else + AC_MSG_RESULT([$LOCALEDIR]) +fi + +if test "x$USE_GETTEXT" = "xyes" ; then + AC_DEFINE([USE_GETTEXT], 1, + [Define to 1 if you want to use the gettext() function.]) +fi +AM_CONDITIONAL(USE_GETTEXT, test "x$USE_GETTEXT" = "xyes") + # Optional feature: When ___.xpm is requested, also look for ___.xpm.Z & .gz # Replaces ZFILEDEF = -DSTAT_ZFILE in old Imakefile AC_ARG_ENABLE(stat-zfile, -- cgit v1.2.1