summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2006-11-21 17:12:18 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-06-27 13:39:29 -0700
commit85a87de3c03ca8be526dedc0a2973f9426518c39 (patch)
tree3df47e43929cbf642d86967a91c5b72146e7b4b2 /configure.ac
parent3c881daddcc251d6e806715d267e4e55934abd1a (diff)
downloadxorg-lib-libXpm-85a87de3c03ca8be526dedc0a2973f9426518c39.tar.gz
Sun bug 4486226: Xpm is not internationalized
<http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4486226> Use gettext() to allow translated messages in sxpm & cxpm (cherry picked from bcda4f17ab3fa9f0572f876dbeb09b45fbc23f3d commit)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 20 insertions, 0 deletions
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>],
+ [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,