annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/share/aclocal/gettext.m4 @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 # gettext.m4 serial 78 (gettext-0.22.4)
jpayne@68 2 dnl Copyright (C) 1995-2014, 2016, 2018-2023 Free Software Foundation, Inc.
jpayne@68 3 dnl This file is free software; the Free Software Foundation
jpayne@68 4 dnl gives unlimited permission to copy and/or distribute it,
jpayne@68 5 dnl with or without modifications, as long as this notice is preserved.
jpayne@68 6 dnl
jpayne@68 7 dnl This file can be used in projects which are not available under
jpayne@68 8 dnl the GNU General Public License or the GNU Lesser General Public
jpayne@68 9 dnl License but which still want to provide support for the GNU gettext
jpayne@68 10 dnl functionality.
jpayne@68 11 dnl Please note that the actual code of the GNU gettext library is covered
jpayne@68 12 dnl by the GNU Lesser General Public License, and the rest of the GNU
jpayne@68 13 dnl gettext package is covered by the GNU General Public License.
jpayne@68 14 dnl They are *not* in the public domain.
jpayne@68 15
jpayne@68 16 dnl Authors:
jpayne@68 17 dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
jpayne@68 18 dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006, 2008-2010.
jpayne@68 19
jpayne@68 20 dnl Macro to add for using GNU gettext.
jpayne@68 21
jpayne@68 22 dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
jpayne@68 23 dnl INTLSYMBOL must be one of 'external', 'use-libtool', 'here'.
jpayne@68 24 dnl INTLSYMBOL should be 'external' for packages other than GNU gettext.
jpayne@68 25 dnl It should be 'use-libtool' for the packages 'gettext-runtime' and
jpayne@68 26 dnl 'gettext-tools'.
jpayne@68 27 dnl It should be 'here' for the package 'gettext-runtime/intl'.
jpayne@68 28 dnl If INTLSYMBOL is 'here', then a libtool library
jpayne@68 29 dnl $(top_builddir)/libintl.la will be created (shared and/or static,
jpayne@68 30 dnl depending on --{enable,disable}-{shared,static} and on the presence of
jpayne@68 31 dnl AM-DISABLE-SHARED).
jpayne@68 32 dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
jpayne@68 33 dnl implementations (in libc or libintl) without the ngettext() function
jpayne@68 34 dnl will be ignored. If NEEDSYMBOL is specified and is
jpayne@68 35 dnl 'need-formatstring-macros', then GNU gettext implementations that don't
jpayne@68 36 dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
jpayne@68 37 dnl INTLDIR is used to find the intl libraries. If empty,
jpayne@68 38 dnl the value '$(top_builddir)/intl/' is used.
jpayne@68 39 dnl
jpayne@68 40 dnl The result of the configuration is one of three cases:
jpayne@68 41 dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
jpayne@68 42 dnl and used.
jpayne@68 43 dnl Catalog format: GNU --> install in $(datadir)
jpayne@68 44 dnl Catalog extension: .mo after installation, .gmo in source tree
jpayne@68 45 dnl 2) GNU gettext has been found in the system's C library.
jpayne@68 46 dnl Catalog format: GNU --> install in $(datadir)
jpayne@68 47 dnl Catalog extension: .mo after installation, .gmo in source tree
jpayne@68 48 dnl 3) No internationalization, always use English msgid.
jpayne@68 49 dnl Catalog format: none
jpayne@68 50 dnl Catalog extension: none
jpayne@68 51 dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
jpayne@68 52 dnl The use of .gmo is historical (it was needed to avoid overwriting the
jpayne@68 53 dnl GNU format catalogs when building on a platform with an X/Open gettext),
jpayne@68 54 dnl but we keep it in order not to force irrelevant filename changes on the
jpayne@68 55 dnl maintainers.
jpayne@68 56 dnl
jpayne@68 57 AC_DEFUN([AM_GNU_GETTEXT],
jpayne@68 58 [
jpayne@68 59 dnl Argument checking.
jpayne@68 60 m4_if([$1], [], , [m4_if([$1], [external], , [m4_if([$1], [use-libtool], , [m4_if([$1], [here], ,
jpayne@68 61 [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
jpayne@68 62 ])])])])])
jpayne@68 63 m4_if(m4_if([$1], [], [old])[]m4_if([$1], [no-libtool], [old]), [old],
jpayne@68 64 [errprint([ERROR: Use of AM_GNU_GETTEXT without [external] argument is no longer supported.
jpayne@68 65 ])])
jpayne@68 66 m4_if([$2], [], , [m4_if([$2], [need-ngettext], , [m4_if([$2], [need-formatstring-macros], ,
jpayne@68 67 [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
jpayne@68 68 ])])])])
jpayne@68 69 define([gt_building_libintl_in_same_build_tree],
jpayne@68 70 m4_if([$1], [use-libtool], [yes], [m4_if([$1], [here], [yes], [no])]))
jpayne@68 71 gt_NEEDS_INIT
jpayne@68 72 AM_GNU_GETTEXT_NEED([$2])
jpayne@68 73
jpayne@68 74 AC_REQUIRE([AM_PO_SUBDIRS])dnl
jpayne@68 75
jpayne@68 76 dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
jpayne@68 77 AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
jpayne@68 78 AC_REQUIRE([AC_LIB_RPATH])
jpayne@68 79
jpayne@68 80 dnl Sometimes libintl requires libiconv, so first search for libiconv.
jpayne@68 81 dnl Ideally we would do this search only after the
jpayne@68 82 dnl if test "$USE_NLS" = "yes"; then
jpayne@68 83 dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
jpayne@68 84 dnl tests. But if configure.ac invokes AM_ICONV after AM_GNU_GETTEXT
jpayne@68 85 dnl the configure script would need to contain the same shell code
jpayne@68 86 dnl again, outside any 'if'. There are two solutions:
jpayne@68 87 dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
jpayne@68 88 dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
jpayne@68 89 dnl Since AC_PROVIDE_IFELSE is not documented, we avoid it.
jpayne@68 90 m4_if(gt_building_libintl_in_same_build_tree, yes, , [
jpayne@68 91 AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
jpayne@68 92 ])
jpayne@68 93
jpayne@68 94 dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation.
jpayne@68 95 gt_INTL_MACOSX
jpayne@68 96
jpayne@68 97 dnl Set USE_NLS.
jpayne@68 98 AC_REQUIRE([AM_NLS])
jpayne@68 99
jpayne@68 100 m4_if(gt_building_libintl_in_same_build_tree, yes, [
jpayne@68 101 USE_INCLUDED_LIBINTL=no
jpayne@68 102 ])
jpayne@68 103 LIBINTL=
jpayne@68 104 LTLIBINTL=
jpayne@68 105 POSUB=
jpayne@68 106
jpayne@68 107 dnl Add a version number to the cache macros.
jpayne@68 108 case " $gt_needs " in
jpayne@68 109 *" need-formatstring-macros "*) gt_api_version=3 ;;
jpayne@68 110 *" need-ngettext "*) gt_api_version=2 ;;
jpayne@68 111 *) gt_api_version=1 ;;
jpayne@68 112 esac
jpayne@68 113 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
jpayne@68 114 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
jpayne@68 115
jpayne@68 116 dnl If we use NLS figure out what method
jpayne@68 117 if test "$USE_NLS" = "yes"; then
jpayne@68 118 gt_use_preinstalled_gnugettext=no
jpayne@68 119 m4_if(gt_building_libintl_in_same_build_tree, yes, [
jpayne@68 120 AC_MSG_CHECKING([whether included gettext is requested])
jpayne@68 121 AC_ARG_WITH([included-gettext],
jpayne@68 122 [ --with-included-gettext use the GNU gettext library included here],
jpayne@68 123 nls_cv_force_use_gnu_gettext=$withval,
jpayne@68 124 nls_cv_force_use_gnu_gettext=no)
jpayne@68 125 AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
jpayne@68 126
jpayne@68 127 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
jpayne@68 128 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
jpayne@68 129 ])
jpayne@68 130 dnl User does not insist on using GNU NLS library. Figure out what
jpayne@68 131 dnl to use. If GNU gettext is available we use this. Else we have
jpayne@68 132 dnl to fall back to GNU NLS library.
jpayne@68 133
jpayne@68 134 if test $gt_api_version -ge 3; then
jpayne@68 135 gt_revision_test_code='
jpayne@68 136 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
jpayne@68 137 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
jpayne@68 138 #endif
jpayne@68 139 changequote(,)dnl
jpayne@68 140 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
jpayne@68 141 changequote([,])dnl
jpayne@68 142 '
jpayne@68 143 else
jpayne@68 144 gt_revision_test_code=
jpayne@68 145 fi
jpayne@68 146 if test $gt_api_version -ge 2; then
jpayne@68 147 gt_expression_test_code=' + * ngettext ("", "", 0)'
jpayne@68 148 else
jpayne@68 149 gt_expression_test_code=
jpayne@68 150 fi
jpayne@68 151
jpayne@68 152 AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
jpayne@68 153 [AC_LINK_IFELSE(
jpayne@68 154 [AC_LANG_PROGRAM(
jpayne@68 155 [[
jpayne@68 156 #include <libintl.h>
jpayne@68 157 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
jpayne@68 158 extern int _nl_msg_cat_cntr;
jpayne@68 159 extern int *_nl_domain_bindings;
jpayne@68 160 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings)
jpayne@68 161 #else
jpayne@68 162 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
jpayne@68 163 #endif
jpayne@68 164 $gt_revision_test_code
jpayne@68 165 ]],
jpayne@68 166 [[
jpayne@68 167 bindtextdomain ("", "");
jpayne@68 168 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
jpayne@68 169 ]])],
jpayne@68 170 [eval "$gt_func_gnugettext_libc=yes"],
jpayne@68 171 [eval "$gt_func_gnugettext_libc=no"])])
jpayne@68 172
jpayne@68 173 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
jpayne@68 174 dnl Sometimes libintl requires libiconv, so first search for libiconv.
jpayne@68 175 m4_if(gt_building_libintl_in_same_build_tree, yes, , [
jpayne@68 176 AM_ICONV_LINK
jpayne@68 177 ])
jpayne@68 178 dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
jpayne@68 179 dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
jpayne@68 180 dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
jpayne@68 181 dnl even if libiconv doesn't exist.
jpayne@68 182 AC_LIB_LINKFLAGS_BODY([intl])
jpayne@68 183 AC_CACHE_CHECK([for GNU gettext in libintl],
jpayne@68 184 [$gt_func_gnugettext_libintl],
jpayne@68 185 [gt_save_CPPFLAGS="$CPPFLAGS"
jpayne@68 186 CPPFLAGS="$CPPFLAGS $INCINTL"
jpayne@68 187 gt_save_LIBS="$LIBS"
jpayne@68 188 LIBS="$LIBS $LIBINTL"
jpayne@68 189 dnl Now see whether libintl exists and does not depend on libiconv.
jpayne@68 190 AC_LINK_IFELSE(
jpayne@68 191 [AC_LANG_PROGRAM(
jpayne@68 192 [[
jpayne@68 193 #include <libintl.h>
jpayne@68 194 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
jpayne@68 195 extern int _nl_msg_cat_cntr;
jpayne@68 196 extern
jpayne@68 197 #ifdef __cplusplus
jpayne@68 198 "C"
jpayne@68 199 #endif
jpayne@68 200 const char *_nl_expand_alias (const char *);
jpayne@68 201 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
jpayne@68 202 #else
jpayne@68 203 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
jpayne@68 204 #endif
jpayne@68 205 $gt_revision_test_code
jpayne@68 206 ]],
jpayne@68 207 [[
jpayne@68 208 bindtextdomain ("", "");
jpayne@68 209 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
jpayne@68 210 ]])],
jpayne@68 211 [eval "$gt_func_gnugettext_libintl=yes"],
jpayne@68 212 [eval "$gt_func_gnugettext_libintl=no"])
jpayne@68 213 dnl Now see whether libintl exists and depends on libiconv or other
jpayne@68 214 dnl OS dependent libraries, specifically on macOS and AIX.
jpayne@68 215 gt_LIBINTL_EXTRA="$INTL_MACOSX_LIBS"
jpayne@68 216 AC_REQUIRE([AC_CANONICAL_HOST])
jpayne@68 217 case "$host_os" in
jpayne@68 218 aix*) gt_LIBINTL_EXTRA="-lpthread" ;;
jpayne@68 219 esac
jpayne@68 220 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } \
jpayne@68 221 && { test -n "$LIBICONV" || test -n "$gt_LIBINTL_EXTRA"; }; then
jpayne@68 222 LIBS="$LIBS $LIBICONV $gt_LIBINTL_EXTRA"
jpayne@68 223 AC_LINK_IFELSE(
jpayne@68 224 [AC_LANG_PROGRAM(
jpayne@68 225 [[
jpayne@68 226 #include <libintl.h>
jpayne@68 227 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
jpayne@68 228 extern int _nl_msg_cat_cntr;
jpayne@68 229 extern
jpayne@68 230 #ifdef __cplusplus
jpayne@68 231 "C"
jpayne@68 232 #endif
jpayne@68 233 const char *_nl_expand_alias (const char *);
jpayne@68 234 #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias (""))
jpayne@68 235 #else
jpayne@68 236 #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0
jpayne@68 237 #endif
jpayne@68 238 $gt_revision_test_code
jpayne@68 239 ]],
jpayne@68 240 [[
jpayne@68 241 bindtextdomain ("", "");
jpayne@68 242 return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
jpayne@68 243 ]])],
jpayne@68 244 [LIBINTL="$LIBINTL $LIBICONV $gt_LIBINTL_EXTRA"
jpayne@68 245 LTLIBINTL="$LTLIBINTL $LTLIBICONV $gt_LIBINTL_EXTRA"
jpayne@68 246 eval "$gt_func_gnugettext_libintl=yes"
jpayne@68 247 ])
jpayne@68 248 fi
jpayne@68 249 CPPFLAGS="$gt_save_CPPFLAGS"
jpayne@68 250 LIBS="$gt_save_LIBS"])
jpayne@68 251 fi
jpayne@68 252
jpayne@68 253 dnl If an already present or preinstalled GNU gettext() is found,
jpayne@68 254 dnl use it. But if this macro is used in GNU gettext, and GNU
jpayne@68 255 dnl gettext is already preinstalled in libintl, we update this
jpayne@68 256 dnl libintl. (Cf. the install rule in intl/Makefile.in.)
jpayne@68 257 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
jpayne@68 258 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
jpayne@68 259 && test "$PACKAGE" != gettext-runtime \
jpayne@68 260 && test "$PACKAGE" != gettext-tools \
jpayne@68 261 && test "$PACKAGE" != libintl; }; then
jpayne@68 262 gt_use_preinstalled_gnugettext=yes
jpayne@68 263 else
jpayne@68 264 dnl Reset the values set by searching for libintl.
jpayne@68 265 LIBINTL=
jpayne@68 266 LTLIBINTL=
jpayne@68 267 INCINTL=
jpayne@68 268 fi
jpayne@68 269
jpayne@68 270 m4_if(gt_building_libintl_in_same_build_tree, yes, [
jpayne@68 271 if test "$gt_use_preinstalled_gnugettext" != "yes"; then
jpayne@68 272 dnl GNU gettext is not found in the C library.
jpayne@68 273 dnl Fall back on included GNU gettext library.
jpayne@68 274 nls_cv_use_gnu_gettext=yes
jpayne@68 275 fi
jpayne@68 276 fi
jpayne@68 277
jpayne@68 278 if test "$nls_cv_use_gnu_gettext" = "yes"; then
jpayne@68 279 dnl Mark actions used to generate GNU NLS library.
jpayne@68 280 USE_INCLUDED_LIBINTL=yes
jpayne@68 281 LIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LIBICONV $LIBTHREAD"
jpayne@68 282 LTLIBINTL="m4_if([$3],[],\${top_builddir}/intl,[$3])/libintl.la $LTLIBICONV $LTLIBTHREAD"
jpayne@68 283 LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
jpayne@68 284 fi
jpayne@68 285
jpayne@68 286 CATOBJEXT=
jpayne@68 287 if test "$gt_use_preinstalled_gnugettext" = "yes" \
jpayne@68 288 || test "$nls_cv_use_gnu_gettext" = "yes"; then
jpayne@68 289 dnl Mark actions to use GNU gettext tools.
jpayne@68 290 CATOBJEXT=.gmo
jpayne@68 291 fi
jpayne@68 292 ])
jpayne@68 293
jpayne@68 294 if test -n "$INTL_MACOSX_LIBS"; then
jpayne@68 295 if test "$gt_use_preinstalled_gnugettext" = "yes" \
jpayne@68 296 || test "$nls_cv_use_gnu_gettext" = "yes"; then
jpayne@68 297 dnl Some extra flags are needed during linking.
jpayne@68 298 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
jpayne@68 299 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
jpayne@68 300 fi
jpayne@68 301 fi
jpayne@68 302
jpayne@68 303 if test "$gt_use_preinstalled_gnugettext" = "yes" \
jpayne@68 304 || test "$nls_cv_use_gnu_gettext" = "yes"; then
jpayne@68 305 AC_DEFINE([ENABLE_NLS], [1],
jpayne@68 306 [Define to 1 if translation of program messages to the user's native language
jpayne@68 307 is requested.])
jpayne@68 308 else
jpayne@68 309 USE_NLS=no
jpayne@68 310 fi
jpayne@68 311 fi
jpayne@68 312
jpayne@68 313 AC_MSG_CHECKING([whether to use NLS])
jpayne@68 314 AC_MSG_RESULT([$USE_NLS])
jpayne@68 315 if test "$USE_NLS" = "yes"; then
jpayne@68 316 AC_MSG_CHECKING([where the gettext function comes from])
jpayne@68 317 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
jpayne@68 318 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
jpayne@68 319 gt_source="external libintl"
jpayne@68 320 else
jpayne@68 321 gt_source="libc"
jpayne@68 322 fi
jpayne@68 323 else
jpayne@68 324 gt_source="included intl directory"
jpayne@68 325 fi
jpayne@68 326 AC_MSG_RESULT([$gt_source])
jpayne@68 327 fi
jpayne@68 328
jpayne@68 329 if test "$USE_NLS" = "yes"; then
jpayne@68 330
jpayne@68 331 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
jpayne@68 332 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
jpayne@68 333 AC_MSG_CHECKING([how to link with libintl])
jpayne@68 334 AC_MSG_RESULT([$LIBINTL])
jpayne@68 335 AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
jpayne@68 336 fi
jpayne@68 337
jpayne@68 338 dnl For backward compatibility. Some packages may be using this.
jpayne@68 339 AC_DEFINE([HAVE_GETTEXT], [1],
jpayne@68 340 [Define if the GNU gettext() function is already present or preinstalled.])
jpayne@68 341 AC_DEFINE([HAVE_DCGETTEXT], [1],
jpayne@68 342 [Define if the GNU dcgettext() function is already present or preinstalled.])
jpayne@68 343 fi
jpayne@68 344
jpayne@68 345 dnl We need to process the po/ directory.
jpayne@68 346 POSUB=po
jpayne@68 347 fi
jpayne@68 348
jpayne@68 349 m4_if(gt_building_libintl_in_same_build_tree, yes, [
jpayne@68 350 dnl Make all variables we use known to autoconf.
jpayne@68 351 AC_SUBST([USE_INCLUDED_LIBINTL])
jpayne@68 352 AC_SUBST([CATOBJEXT])
jpayne@68 353 ])
jpayne@68 354
jpayne@68 355 m4_if(gt_building_libintl_in_same_build_tree, yes, [], [
jpayne@68 356 dnl For backward compatibility. Some Makefiles may be using this.
jpayne@68 357 INTLLIBS="$LIBINTL"
jpayne@68 358 AC_SUBST([INTLLIBS])
jpayne@68 359 ])
jpayne@68 360
jpayne@68 361 dnl Make all documented variables known to autoconf.
jpayne@68 362 AC_SUBST([LIBINTL])
jpayne@68 363 AC_SUBST([LTLIBINTL])
jpayne@68 364 AC_SUBST([POSUB])
jpayne@68 365
jpayne@68 366 dnl Define localedir_c and localedir_c_make.
jpayne@68 367 dnl Find the final value of localedir.
jpayne@68 368 gt_save_prefix="${prefix}"
jpayne@68 369 gt_save_datarootdir="${datarootdir}"
jpayne@68 370 gt_save_localedir="${localedir}"
jpayne@68 371 dnl Unfortunately, prefix gets only finally determined at the end of
jpayne@68 372 dnl configure.
jpayne@68 373 if test "X$prefix" = "XNONE"; then
jpayne@68 374 prefix="$ac_default_prefix"
jpayne@68 375 fi
jpayne@68 376 eval datarootdir="$datarootdir"
jpayne@68 377 eval localedir="$localedir"
jpayne@68 378 gl_BUILD_TO_HOST([localedir])
jpayne@68 379 localedir="${gt_save_localedir}"
jpayne@68 380 datarootdir="${gt_save_datarootdir}"
jpayne@68 381 prefix="${gt_save_prefix}"
jpayne@68 382 ])
jpayne@68 383
jpayne@68 384
jpayne@68 385 dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
jpayne@68 386 m4_define([gt_NEEDS_INIT],
jpayne@68 387 [
jpayne@68 388 m4_divert_text([DEFAULTS], [gt_needs=])
jpayne@68 389 m4_define([gt_NEEDS_INIT], [])
jpayne@68 390 ])
jpayne@68 391
jpayne@68 392
jpayne@68 393 dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
jpayne@68 394 AC_DEFUN([AM_GNU_GETTEXT_NEED],
jpayne@68 395 [
jpayne@68 396 m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
jpayne@68 397 ])
jpayne@68 398
jpayne@68 399
jpayne@68 400 dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
jpayne@68 401 AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
jpayne@68 402
jpayne@68 403
jpayne@68 404 dnl Usage: AM_GNU_GETTEXT_REQUIRE_VERSION([gettext-version])
jpayne@68 405 AC_DEFUN([AM_GNU_GETTEXT_REQUIRE_VERSION], [])