[FFmpeg-devel] [PATCH] Check for the winsock library name
Måns Rullgård
mans
Tue Jul 14 15:35:13 CEST 2009
Martin Storsj? <martin at martin.st> writes:
> On Tue, 14 Jul 2009, M?ns Rullg?rd wrote:
>
>> This will only enable closesocket in the -lws2 case. Try this:
>
> Ah, true, missed that one.
>
>> check_func_headers winsock2.h closesocket -lws2 &&
>> network_extralibs="-lws2" ||
>> { check_func_headers winsock2.h closesocket -lws2_32 &&
>> network_extralibs="-lws2_32"; }
>
> This seems to work just fine, thanks!
>
> // Martin
>
> ---
> configure | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 79f5695..6d14964 100755
> --- a/configure
> +++ b/configure
> @@ -2220,9 +2220,11 @@ if enabled network; then
> if check_header arpa/inet.h ; then
> check_func closesocket
> elif check_header winsock2.h ; then
> - network_extralibs="-lws2_32"
> + check_func_headers winsock2.h closesocket -lws2 && \
> + network_extralibs="-lws2" || \
> + { check_func_headers winsock2.h closesocket -lws2_32 && \
> + network_extralibs="-lws2_32"; }
> check_type ws2tcpip.h socklen_t
> - check_func_headers winsock2.h closesocket
> else
> disable network
> fi
OK
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list