[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gettext-0.11.5] AC_CHECK_FUNCS( bind_textdomain_codeset ngettext )

From: Bruno Haible
Subject: Re: [gettext-0.11.5] AC_CHECK_FUNCS( bind_textdomain_codeset ngettext ) not detecting them
Date: Thu, 7 Nov 2002 15:26:48 +0100 (CET)

Rapp, Perry writes:
> Summary: My AC_CHECK_FUNCS for bind_textdomain_codeset & ngettext is
> failing
> ...
> I have these lines in my configure.in
>  dnl gettext functions missing from 0.10.35
>  AC_CHECK_FUNCS( bind_textdomain_codeset ngettext )

This is a well-known flaw in AC_CHECK_FUNCS. It will not work for
'stat', 'lstat', 'fstat', 'sigmask' either.

Various standards allow functions like sigmask to be defined as
macros. This is also what libintl does.

The conclusion is that in general, you should #include the
corresponding header file before testing for a function. Like this:

  AC_TRY_LINK([#include <libintl.h>], [ngettext("","",0);],
    ac_cv_func_ngettext=yes, ac_cv_func_ngettext=no)
  if test "$ac_cv_func_ngettext" = yes; then
    AC_DEFINE(HAVE_NGETTEXT, 1, [Define if you have the ngettext() function.])


reply via email to

[Prev in Thread] Current Thread [Next in Thread]