X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <485D3490.6090700@cwilson.fastmail.fm>
Date: Sat, 21 Jun 2008 13:04:16 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.14) Gecko/20080421 Thunderbird/2.0.0.14 Mnenhy/0.7.5.666
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: cannot find iconv() function
References: <BAY102-W4996FE58370FA0BEC60992BAA50@phx.gbl>  <485A2293.4090103@sbcglobal.net> <BAY102-W332E4B68F129D6F27B6CCBBAA50@phx.gbl> <006301c8d3ad$66c4b6f0$2708a8c0@CAM.ARTIMI.COM>
In-Reply-To: <006301c8d3ad$66c4b6f0$2708a8c0@CAM.ARTIMI.COM>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Dave Korn wrote:

>   The standard autoconf library function detection test, for the sake of
> simplicity, declares the function prototype itself rather than including the
> header, so the name doesn't get translated and the function isn't found at
> link time.
> 
>   A patch such as the attached makes the configure test check if it's
> running on cygwin and look for libiconv() rather than iconv() in that case.
> It made gtmess build for me.

Or, instead of using the AC_CHECK_FUNC([ ... iconv ...]) method in your 
configure.ac or configure.in file, you instead use AM_ICONV defined in 
/usr/share/iconv.m4. This file is part of the gettext-devel pacakge.

This solution assumes that gtmess is using the automake and aclocal 
tools, and not just autoconf.  Otherwise, you could cut-n-paste the 
contents of /usr/share/iconv.m4 into gtmess's aclocal.m4 file -- and 
then use AM_ICONV in your configure.ac|configure.in file.

--
Chuck

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

