autoconf
[Top][All Lists]
Advanced

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

Re: Why configure failed to search libws2_32.a in MinGW+MSYS ?


From: Guo Leaveye
Subject: Re: Why configure failed to search libws2_32.a in MinGW+MSYS ?
Date: Mon, 30 Dec 2013 16:07:52 +0800

As a result/summary of the original question, to make all the elsewhere code 
simple and as a replacement of AC_CHECK_LIB, I use the autoconf macro like this:

  AC_CHECK_HEADER([winsock2.h],
    [AC_DEFINE([HAVE_LIBWS2_32], [1], [Define if libws2_32 exists.])
     LIBS="-lws2_32 $LIBS"],
    [],
    [#include <windows.h>])

Which suppose that a build environment should have installed a libws2_32.a in 
case of winsock2.h can be founded in default include directories.

Levi G.
Haskell is a beautiful language.

在 2013/12/30,上午11:04,Guo Leaveye <address@hidden> 写道:

> I have found the answer, and another question still here.
> 
> I have tried `gcc -E' (only preprocessed) on the #include version, and 
> checked the output source to view the WSAGetLastError()'s declaration. Then I 
> know this is a conflict between cdecl and stddecl.
> 
> As google says 
> (http://lists.gnu.org/archive/html/autoconf/2006-01/msg00109.html), there is 
> no standard macro to handle the stddecl checking.
> 
> So before a set of stddecl-checking macros creates, to check the build 
> envionment may be the easiest way to check the libraries' existance.
> 
> And the question is that, is there any open sourced 3rd-party macros to 
> handle this ?
> 
> Levi G.
> Haskell is a beautiful language.

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

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