[FFmpeg-devel] [PATCH] Check for the winsock library name
Måns Rullgård
mans
Tue Jul 14 11:07:15 CEST 2009
Martin Storsj? <martin at martin.st> writes:
> Hi,
>
> On WinCE, the winsock library name is ws2, not ws2_32 as on desktop
> windows. The attached patch is an attempt at detecting this. It's not too
> pretty, but if check_lib is used instead, the lib name would be added
> directly to extralibs, not only to network_extralibs.
>
> // Martin
>
> ---
> configure | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/configure b/configure
> index 79f5695..d7cbe22 100755
> --- a/configure
> +++ b/configure
> @@ -2220,7 +2220,12 @@ 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_ld -lws2 <<EOF && network_extralibs="-lws2" || network_extralibs="-lws2_32"
> +#include <winsock2.h>
> +int main(void) {
> + closesocket(0);
> +}
> +EOF
check_func closesocket -lws2 && ... || ...
--
M?ns Rullg?rd
mans at mansr.com
More information about the ffmpeg-devel
mailing list