Comment 3 for bug 28424

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Thu, 12 Jan 2006 14:58:45 +0000
From: Roger Leigh <email address hidden>
To: akira yamada <email address hidden>
Cc: <email address hidden>
Subject: Re: Bug#347759: ruby1.8-dev: /usr/lib/ruby/1.8/mkmf.rb have_func() fails to find functions
 in libc

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

akira yamada <email address hidden> writes:

> Roger Leigh wrote:
>> $ cat extconf.rb
>> require 'mkmf'
>>
>> $LDFLAGS = "-L/usr/local/lib";
>> $CFLAGS = "-I/usr/local/include";
>> have_library( "xpg4", "setlocale" );
>> have_header( "locale.h" );
>> if ( have_header( "libintl.h" ) and (have_library( "intl", "gettext" )
>> or have_func( "gettext" )) )
>> create_makefile( "intl" );
>> end
>>
>> This fails to find gettext() in libc, and so the build fails.
>
> I think it is not a bug of mkmf.rb.
>
> $ ruby1.8 -rmkmf -e 'have_func("gettext")'
> checking for gettext()... no
> $ ruby1.8 -rmkmf -e 'have_func("gettext", "libintl.h")'
> checking for gettext()... yes
>
> How about the following patch?:

This looks great, thanks.

I'm not a Ruby hacker myself, and assumed it was emulating the
autoconf AC_TRY_LINK, which does not require the header to be present.

I'll post the patch to the original bug.

Many thanks,
Roger

- --
Roger Leigh
                Printing on GNU/Linux? http://gimp-print.sourceforge.net/
                Debian GNU/Linux http://www.debian.org/
                GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iD8DBQFDxm6kVcFcaSW/uEgRAgpHAJ4jHpdbNOZ0IRWO6bn3bytbGuhpMQCg5f+T
mbgpOiN84MunDpHv5fPmkCw=
=DHqR
-----END PGP SIGNATURE-----