[vlc-devel] commit: vlc-wrapper needs -lsocket on Solaris (fixes: #3035) ( Rémi Denis-Courmont )

git version control git at videolan.org
Thu Aug 6 20:07:21 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Thu Aug  6 21:06:04 2009 +0300| [07767800a84e782f26526f3efac34c5274df1cd4] | committer: Rémi Denis-Courmont 

vlc-wrapper needs -lsocket on Solaris (fixes: #3035)

(cherry picked from commit d17b37cf13328c26acc7faadc5537d95e1d60772)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=07767800a84e782f26526f3efac34c5274df1cd4
---

 bin/Makefile.am |    1 +
 configure.ac    |    6 ++++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bin/Makefile.am b/bin/Makefile.am
index db5aaae..84b076c 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -23,6 +23,7 @@ vlc_SOURCES = winvlc.c
 endif
 
 vlc_wrapper_SOURCES = rootwrap.c
+vlc_wrapper_LDADD = $(SOCKET_LIBS)
 
 vlc_DEPENDENCIES = ../src/libvlc.sym
 vlc_LDFLAGS = `$(VLC_CONFIG) --ldflags vlc`
diff --git a/configure.ac b/configure.ac
index 3b1da08..c587ca1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -594,12 +594,14 @@ if test ${ac_cv_langinfo_codeset} = yes; then
     [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
 fi
 
+SOCKET_LIBS=""
 AC_CHECK_FUNCS(connect,,[
   AC_CHECK_LIB(socket,connect,[
     VLC_ADD_LIBS([libvlccore cdda cddax],-lsocket)
-    LIBS_socket="-lsocket"
+    SOCKET_LIBS="-lsocket"
   ])
 ])
+AC_SUBST(SOCKET_LIBS)
 
 AC_CHECK_FUNCS(send,,[
   AC_CHECK_LIB(socket,send,[
@@ -650,7 +652,7 @@ dnl  -lnsl and -lsocket are needed on Solaris;
 dnl  we purposedly make the test fail on Windows
 LIBS_save="${LIBS}"
 AH_TEMPLATE(HAVE_GETADDRINFO, [Define to 1 if you have the `getaddrinfo' function.])
-AC_SEARCH_LIBS([getaddrinfo], [nsl], [AC_DEFINE(HAVE_GETADDRINFO)],, [${LIBS_socket}])
+AC_SEARCH_LIBS([getaddrinfo], [nsl], [AC_DEFINE(HAVE_GETADDRINFO)],, [${SOCKET_LIBS}])
 
 dnl NOTE: we assume getaddrinfo will be present if getnameinfo or gai_strerro
 dnl are




More information about the vlc-devel mailing list