On Wed, May 10, 2006 at 06:08:45PM +0200, Jean-Marc Lasgouttes wrote:
> >>>>> "Enrico" == Enrico Forestieri <[EMAIL PROTECTED]> writes:
> 
> Enrico> I didn't succeed in using AC_CHECK_LIB with a win32 library,
> Enrico> so in the autoview patch I directly used AC_SUBST to add
> Enrico> -lshlwapi. 
> 
> I think it can be made to work.

I didn't say it is not possible, I said I didn't succeed in it.

> Enrico> I think that Joost modeled his patch on that above, so the
> Enrico> answer is that AC_CHECK_LIB is a nightmare to be avoided. 
> 
> It seems
> AC_CHECK_LIB(gdi32,main)
> should work.

Hmmm...

$ nm /usr/lib/w32api/libgdi32.a | grep main
(nothing here)

But then I am an ignorant and perhaps main is special.

> The funnier version would look like
> AC_CHECK_LIB(gdi32, [EMAIL PROTECTED])
> or something else after the @.

Hmmm...

$ nm /usr/lib/w32api/libgdi32.a | grep AddFontResource
00000000 T [EMAIL PROTECTED]
00000000 I [EMAIL PROTECTED]
00000000 T [EMAIL PROTECTED]
00000000 I [EMAIL PROTECTED]
00000000 T [EMAIL PROTECTED]
00000000 I [EMAIL PROTECTED]
00000000 T [EMAIL PROTECTED]
00000000 I [EMAIL PROTECTED]

and I tried any A or W variant, other than trying to add @4 or whatever.

> Enrico> On the other hand, those win32 libraries are present in any
> Enrico> cygwin or mingw distribution, so there is no point for
> Enrico> AC_CHECK_LIB, IMHO.
> 
> Yes, but I prefer to test by feature instead of by os. the shell API
> require Internet Explorer 5, for example. I agree it is there in
> practice, but this might not be the case for all functions we may
> require.

True, and I agree in principle, but then you are trying to fight
against Windows and I will bet on it ;-)

> And what if I want to compile against libwine? :)

Perhaps AC_CHECK_LIB will work in this case ;-)

-- 
Enrico

Reply via email to