1 dnl FC_CHECK_NGETTEXT_RUNTIME(EXTRA-LIBS, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND)
3 dnl This tests whether ngettext works at runtime. Here, "works"
4 dnl means "doesn't dump core", as some versions (for exmaple the
5 dnl version which comes with glibc 2.2.5 is broken, gettext
6 dnl version 0.10.38 however is ok).
8 AC_DEFUN([FC_CHECK_NGETTEXT_RUNTIME],
14 AC_RUN_IFELSE([AC_LANG_SOURCE([[
16 * Check to make sure that ngettext works at runtime. Specifically,
17 * some gettext versions dump core if the ngettext function is called.
18 * (c) 2002 Raimar Falke <rfalke@freeciv.org>
25 int main(int argc, char *argv[])
27 setlocale(LC_ALL, "");
29 if (strcmp(ngettext("unit", "units", 1), "unit") == 0 &&
30 strcmp(ngettext("unit", "units", 2), "units") == 0) {
36 ]])],[AC_MSG_RESULT(yes)
37 [$2]],[AC_MSG_RESULT(no)
38 [$3]],[AC_MSG_RESULT(unknown: cross-compiling)