multifdsink: depends on sys/socket.h

This commit is contained in:
Thomas Vander Stichele 2012-02-12 22:04:02 +01:00
parent b11c895efe
commit 4d59dc2391
3 changed files with 15 additions and 1 deletions

View file

@ -187,6 +187,11 @@ AC_COMPILE_IFELSE(
CPPFLAGS="$ac_cppflags_save" CPPFLAGS="$ac_cppflags_save"
AM_CONDITIONAL(HAVE_LIBXML_HTML, test "x$HAVE_LIBXML_HTML" = "xyes") AM_CONDITIONAL(HAVE_LIBXML_HTML, test "x$HAVE_LIBXML_HTML" = "xyes")
dnl used in gst/tcp
AC_CHECK_HEADERS([sys/socket.h],
HAVE_SYS_SOCKET_H="yes", HAVE_SYS_SOCKET_H="no")
AM_CONDITIONAL(HAVE_SYS_SOCKET_H, test "x$HAVE_SYS_SOCKET_H" = "xyes")
dnl used in gst-libs/gst/pbutils and associated unit test dnl used in gst-libs/gst/pbutils and associated unit test
AC_CHECK_HEADERS([process.h sys/types.h sys/wait.h sys/stat.h]) AC_CHECK_HEADERS([process.h sys/types.h sys/wait.h sys/stat.h])

View file

@ -13,10 +13,17 @@ built_headers = gsttcp-enumtypes.h gsttcp-marshal.h
BUILT_SOURCES = $(built_sources) $(built_headers) BUILT_SOURCES = $(built_sources) $(built_headers)
if HAVE_SYS_SOCKET_H
multifdsink_SOURCES = \
gstmultifdsink.c
else
multifdsink_SOURCES =
endif
libgsttcp_la_SOURCES = \ libgsttcp_la_SOURCES = \
gsttcpplugin.c \ gsttcpplugin.c \
gsttcpclientsrc.c gsttcpclientsink.c \ gsttcpclientsrc.c gsttcpclientsink.c \
gstmultifdsink.c \ $(multifdsink_SOURCES) \
gstmultihandlesink.c \ gstmultihandlesink.c \
gstmultisocketsink.c \ gstmultisocketsink.c \
gsttcpserversrc.c gsttcpserversink.c gsttcpserversrc.c gsttcpserversink.c

View file

@ -45,9 +45,11 @@ plugin_init (GstPlugin * plugin)
if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE, if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE,
GST_TYPE_TCP_SERVER_SRC)) GST_TYPE_TCP_SERVER_SRC))
return FALSE; return FALSE;
#ifdef HAVE_SYS_SOCKET_H
if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE, if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE,
GST_TYPE_MULTI_FD_SINK)) GST_TYPE_MULTI_FD_SINK))
return FALSE; return FALSE;
#endif
if (!gst_element_register (plugin, "multisocketsink", GST_RANK_NONE, if (!gst_element_register (plugin, "multisocketsink", GST_RANK_NONE,
GST_TYPE_MULTI_SOCKET_SINK)) GST_TYPE_MULTI_SOCKET_SINK))
return FALSE; return FALSE;