This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: * configure.in: Test for libintl.h.


On Tue, Apr 29, 2003 at 12:31:39PM -0700, Ulrich Drepper wrote:
> > +  # A standalone libintl (e.g., GNU libintl) may be in use.
> > +  if test $USE_NLS = yes; then
> > +    AC_CHECK_LIB(intl, libintl_gettext)
> > +  fi
> > +
> 
> Tests like this are wrong.  You first have to check whether the function
> is available without any further library.  Only if the answer is no you
> search in a separate library.  There are Linux systems which for some
> reason have a libintl installed but of course it's not needed.

Right... okay, keeping in mind my other followup patch, and this chunk
from the autoconf manual,

    Search for a library defining function if it's not already
    available. This equates to calling `AC_LINK_IFELSE([AC_LANG_CALL([],
    [function])])' first with no libraries, then for each library listed
    in search-libs.

    Add `-llibrary' to LIBS for the first library found to contain
    function, and run action-if-found. If the function is not found,
    run action-if-not-found.

how about this instead:

    if test $USE_NLS = yes; then
      AC_SEARCH_LIBS(gettext, intl)
    fi

-- 
If ye love wealth greater than liberty, the tranquility of servitude greater
than the animating contest for freedom, go home and leave us in peace.  We seek
not your counsel, nor your arms.  Crouch down and lick the hand that feeds you;
and may posterity forget that ye were our countrymen.            - Samuel Adams


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]