summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2010-01-15 22:20:56 -0800
committerAlan Coopersmith <alan.coopersmith@sun.com>2010-01-29 22:39:19 -0800
commit12a1392fc96e32ed6d55208a2a7fc040617a9cb7 (patch)
tree51f01517b3aed8af3773e0aad43603152f73a2b1 /configure.ac
parentb83ec6e3a79e30b8a7a3947679221ad76441b27f (diff)
Integrate gettext support with autotools build system
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 21c5d7c..173d881 100644
--- a/configure.ac
+++ b/configure.ac
@@ -38,6 +38,25 @@ AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_INSTALL
+# 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], AS_HELP_STRING([--with-localedir=<path>],
+ [Path to install message files in (default: datadir/locale)]),
+ [LOCALEDIR=${withval}], [LOCALEDIR=${datadir}/locale])
+AX_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")
# Checks for pkg-config packages
PKG_CHECK_MODULES(XAW, xaw7)