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-15 22:20:56 -0800
commit36659aa666808e5b42f5d98bce8f84bf82e88c0e (patch)
tree77f5b2310b0fac843c588ff549bfc5f6d7669064 /configure.ac
parent6d96dd3d2df7d896a41d770ba380629948ead4d6 (diff)
Integrate gettext support with autotools build system
Mostly cribbed from prior work for libXpm Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
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 77482c6..5deb5d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,26 @@ AM_CONFIG_HEADER(config.h)
AC_PROG_CC
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")
+
### How to check load average on various OS'es: