[vlc-commits] Set SOCKET_LIBS on Windows too
Rémi Denis-Courmont
git at videolan.org
Thu Aug 18 20:30:39 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug 18 21:07:51 2011 +0300| [1485dd1ae4254dcb0522d7a5f64e3cdf7b3eef33] | committer: Rémi Denis-Courmont
Set SOCKET_LIBS on Windows too
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1485dd1ae4254dcb0522d7a5f64e3cdf7b3eef33
---
configure.ac | 16 ++++++----------
modules/access/rtp/Modules.am | 2 +-
modules/stream_out/Modules.am | 2 +-
3 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/configure.ac b/configure.ac
index 4a0d66e..2f33b34 100644
--- a/configure.ac
+++ b/configure.ac
@@ -179,6 +179,7 @@ dnl
dnl Set default values
dnl
LDFLAGS_vlc="${LDFLAGS}"
+SOCKET_LIBS=""
dnl
dnl Check the operating system
@@ -348,8 +349,9 @@ case "${host_os}" in
VLC_ADD_LDFLAGS([vlc],[-mwindows])
VLC_ADD_LIBS([win32text],[-lgdi32])
VLC_ADD_LIBS([cdda vcdx sdl_image vout_sdl],[-lwinmm])
- VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap stream_out_standard stream_out_select stream_out_rtp stream_out_raop vod_rtsp access_realrtsp rtp oldrc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[-lws2_32])
+ VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_shout access_output_rtmp sap stream_out_standard stream_out_select stream_out_rtp stream_out_raop vod_rtsp access_realrtsp oldrc netsync gnutls growl_udp flac ts audioscrobbler lua remoteosd zvbi audiobargraph_a netsync],[-lws2_32])
VLC_ADD_LIBS([filesystem], [-lshlwapi])
+ SOCKET_LIBS="-lws2_32"
dnl
dnl DEP and ASLR options
dnl
@@ -380,7 +382,8 @@ case "${host_os}" in
fi
if test "${SYS}" = "mingwce"; then
# add ws2 for closesocket, select, recv
- VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_rtmp sap netsync audioscrobbler growl rtp stream_out_standard stream_out_select stream_out_rtp remoteosd ts audiobargraph_a netsync],[-lws2])
+ VLC_ADD_LIBS([libvlccore access_http access_mms access_udp access_tcp access_ftp access_rtmp access_output_udp access_output_rtmp sap netsync audioscrobbler growl stream_out_standard stream_out_select stream_out_rtp remoteosd ts audiobargraph_a netsync],[-lws2])
+ SOCKET_LIBS="-lws2"
VLC_ADD_LIBS([libvlccore],[-lmmtimer])
AC_CHECK_PROGS(U2D, [unix2dos todos], unix2dos)
ac_default_prefix="`pwd`/_wince"
@@ -607,21 +610,14 @@ AC_CHECK_FUNCS([accept4 pipe2 eventfd vmsplice sched_getaffinity])
AH_BOTTOM([#include <vlc_fixups.h>])
-SOCKET_LIBS=""
AC_CHECK_FUNCS(connect,,[
AC_CHECK_LIB(socket,connect,[
- VLC_ADD_LIBS([libvlccore cdda],-lsocket)
+ VLC_ADD_LIBS([libvlccore cdda access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp access_output_rtmp stream_out_standard growl_udp remoteosd netsync],[-lsocket])
SOCKET_LIBS="-lsocket"
])
])
AC_SUBST(SOCKET_LIBS)
-AC_CHECK_FUNCS(send,,[
- AC_CHECK_LIB(socket,send,[
- VLC_ADD_LIBS([access_http access_mms access_udp access_tcp access_ftp access_rtmp sap access_output_udp access_output_rtmp stream_out_standard growl_udp remoteosd netsync],[-lsocket])
- ])
-])
-
dnl Check for socklen_t
AH_TEMPLATE(socklen_t, [Define to `int' if <sys/socket.h> does not define.])
diff --git a/modules/access/rtp/Modules.am b/modules/access/rtp/Modules.am
index 57b39ce..032923f 100644
--- a/modules/access/rtp/Modules.am
+++ b/modules/access/rtp/Modules.am
@@ -8,7 +8,7 @@ librtp_plugin_la_SOURCES = \
session.c \
xiph.c
librtp_plugin_la_CFLAGS = $(AM_CFLAGS)
-librtp_plugin_la_LIBADD = $(AM_LIBADD)
+librtp_plugin_la_LIBADD = $(AM_LIBADD) $(SOCKET_LIBS)
librtp_plugin_la_DEPENDENCIES =
if HAVE_GCRYPT
diff --git a/modules/stream_out/Modules.am b/modules/stream_out/Modules.am
index 71e7d79..608229c 100644
--- a/modules/stream_out/Modules.am
+++ b/modules/stream_out/Modules.am
@@ -44,7 +44,7 @@ libvlc_LTLIBRARIES += \
libstream_out_rtp_plugin_la_SOURCES = \
rtp.c rtp.h rtpfmt.c rtcp.c rtsp.c vod.c
libstream_out_rtp_plugin_la_CFLAGS = $(AM_CFLAGS)
-libstream_out_rtp_plugin_la_LIBADD = $(AM_LIBADD)
+libstream_out_rtp_plugin_la_LIBADD = $(AM_LIBADD) $(SOCKET_LIBS)
libstream_out_rtp_plugin_la_DEPENDENCIES =
if HAVE_GCRYPT
SRTP_CFLAGS = -I$(top_srcdir)/libs/srtp
More information about the vlc-commits
mailing list