summaryrefslogtreecommitdiffstats
path: root/gl/m4/gnulib-i18n.m4
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2026-01-09 14:57:57 +0100
committerGitHub <noreply@github.com>2026-01-09 14:57:57 +0100
commitda4fb28fca51b180d50608b0c847b1c0927cd8c5 (patch)
treed20769e0a61ac2ba76920190050d3e0a3e7c85b7 /gl/m4/gnulib-i18n.m4
parentb09a8b530df8a23610889d0b89b148f22db3568a (diff)
parentf694f4cd4dfead0da6feab04d92335d9bbe185b6 (diff)
downloadmonitoring-plugins-da4fb28f.tar.gz
Merge branch 'master' into refactor/check_ide_smart
Diffstat (limited to 'gl/m4/gnulib-i18n.m4')
-rw-r--r--gl/m4/gnulib-i18n.m461
1 files changed, 61 insertions, 0 deletions
diff --git a/gl/m4/gnulib-i18n.m4 b/gl/m4/gnulib-i18n.m4
new file mode 100644
index 00000000..868043e7
--- /dev/null
+++ b/gl/m4/gnulib-i18n.m4
@@ -0,0 +1,61 @@
1# gnulib-i18n.m4
2# serial 1
3dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
8
9dnl From Bruno Haible.
10
11dnl Support for internationalization of Gnulib code.
12
13dnl GNULIB_I18N
14dnl Sets GNULIB_LOCALEDIR to indicate where to find the gnulib.mo files.
15dnl Also it defines GNULIB_LOCALEDIR as macro in config.h, that expands to
16dnl the corresponding C string.
17AC_DEFUN([GNULIB_I18N],
18[
19 dnl It is best to not test "$USE_NLS" here, because: It would be empty
20 dnl in case the package is internationalized but this macro is used before
21 dnl AM_GNU_GETTEXT. We would need to warn about this situation. But since
22 dnl this module is used as a dependency of many packages, such a warning is
23 dnl not welcome.
24
25 dnl Determine gnulib's localedir.
26 dnl Generally, accept an option --with-gnulib-prefix=PREFIX to indicate
27 dnl where to find gnulib's runtime data.
28 dnl Usually ${prefix}/share/locale, but can be influenced by the configure
29 dnl options --datarootdir and --localedir.
30 GNULIB_LOCALEDIR="${localedir}"
31 AC_ARG_WITH([gnulib-prefix],
32 [[ --with-gnulib-prefix=DIR search for gnulib's runtime data in DIR/share]],
33 [if test "X$withval" != "X" && test "X$withval" != "Xno"; then
34 GNULIB_LOCALEDIR="$withval/share/locale"
35 fi
36 ])
37 AC_SUBST([GNULIB_LOCALEDIR])
38
39 dnl Define GNULIB_LOCALEDIR_c and GNULIB_LOCALEDIR_c_make.
40 dnl Find the final value of GNULIB_LOCALEDIR.
41 gl_saved_prefix="${prefix}"
42 gl_saved_datarootdir="${datarootdir}"
43 gl_saved_localedir="${localedir}"
44 gl_saved_gnuliblocaledir="${GNULIB_LOCALEDIR}"
45 dnl Unfortunately, prefix gets only finally determined at the end of
46 dnl configure.
47 if test "X$prefix" = "XNONE"; then
48 prefix="$ac_default_prefix"
49 fi
50 eval datarootdir="$datarootdir"
51 eval localedir="$localedir"
52 eval GNULIB_LOCALEDIR="$GNULIB_LOCALEDIR"
53 gl_BUILD_TO_HOST([GNULIB_LOCALEDIR])
54 GNULIB_LOCALEDIR="${gl_saved_gnuliblocaledir}"
55 localedir="${gl_saved_localedir}"
56 datarootdir="${gl_saved_datarootdir}"
57 prefix="${gl_saved_prefix}"
58
59 AC_DEFINE_UNQUOTED([GNULIB_LOCALEDIR], [${GNULIB_LOCALEDIR_c}],
60 [Define to the directory where to find the localizations of the translation domain 'gnulib', as a C string.])
61])