/* Define to 1 if you have the <netgroup.h> header file. */
#undef HAVE_NETGROUP_H
+/* Define to 1 if you have the `ngettext' function. */
+#undef HAVE_NGETTEXT
+
/* Define to 1 if you have the `nl_langinfo' function. */
#undef HAVE_NL_LANGINFO
eval gettext_result="\$$gettext_name"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gettext_result" >&5
$as_echo "$gettext_result" >&6; }
- test "$gettext_result" = "yes" && break
+ if test "$gettext_result" = "yes"; then
+ for ac_func in ngettext
+do :
+ ac_fn_c_check_func "$LINENO" "ngettext" "ac_cv_func_ngettext"
+if test "x$ac_cv_func_ngettext" = xyes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NGETTEXT 1
+_ACEOF
+
+fi
+done
+
+ break
+ fi
done
LIBS="$OLIBS"
])
eval gettext_result="\$$gettext_name"
AC_MSG_RESULT($gettext_result)
- test "$gettext_result" = "yes" && break
+ if test "$gettext_result" = "yes"; then
+ AC_CHECK_FUNCS(ngettext)
+ break
+ fi
done
LIBS="$OLIBS"
dngettext(DEFAULT_TEXT_DOMAIN, String, String_Plural, N)
# endif
+/*
+ * Older versions of Solaris lack ngettext() so we have to kludge it.
+ */
+# ifndef HAVE_NGETTEXT
+# undef ngettext
+# define ngettext(String, String_Plural, N) \
+ ((N) == 1 ? gettext(String) : gettext(String_Plural))
+# endif
+
/* Gettext convenience macros */
# define _(String) gettext(String)
# define gettext_noop(String) String