diff --git a/configure.ac b/configure.ac index 5cb21e3ffc..22643b5b8c 100644 --- a/configure.ac +++ b/configure.ac @@ -187,6 +187,11 @@ AC_COMPILE_IFELSE( CPPFLAGS="$ac_cppflags_save" 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 AC_CHECK_HEADERS([process.h sys/types.h sys/wait.h sys/stat.h]) diff --git a/gst/tcp/Makefile.am b/gst/tcp/Makefile.am index 7c20dc661b..0882761e14 100644 --- a/gst/tcp/Makefile.am +++ b/gst/tcp/Makefile.am @@ -13,10 +13,17 @@ built_headers = gsttcp-enumtypes.h gsttcp-marshal.h BUILT_SOURCES = $(built_sources) $(built_headers) +if HAVE_SYS_SOCKET_H +multifdsink_SOURCES = \ + gstmultifdsink.c +else +multifdsink_SOURCES = +endif + libgsttcp_la_SOURCES = \ gsttcpplugin.c \ gsttcpclientsrc.c gsttcpclientsink.c \ - gstmultifdsink.c \ + $(multifdsink_SOURCES) \ gstmultihandlesink.c \ gstmultisocketsink.c \ gsttcpserversrc.c gsttcpserversink.c diff --git a/gst/tcp/gsttcpplugin.c b/gst/tcp/gsttcpplugin.c index f2a5953db8..2496d19461 100644 --- a/gst/tcp/gsttcpplugin.c +++ b/gst/tcp/gsttcpplugin.c @@ -45,9 +45,11 @@ plugin_init (GstPlugin * plugin) if (!gst_element_register (plugin, "tcpserversrc", GST_RANK_NONE, GST_TYPE_TCP_SERVER_SRC)) return FALSE; +#ifdef HAVE_SYS_SOCKET_H if (!gst_element_register (plugin, "multifdsink", GST_RANK_NONE, GST_TYPE_MULTI_FD_SINK)) return FALSE; +#endif if (!gst_element_register (plugin, "multisocketsink", GST_RANK_NONE, GST_TYPE_MULTI_SOCKET_SINK)) return FALSE;