diff --git a/ChangeLog b/ChangeLog index 9fc54b27e3..c86b92a660 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-07-04 Sebastian Dröge + + Patch by: Damien Lespiau + + * configure.ac: + * gst/festival/Makefile.am: + * gst/festival/gstfestival.c: + Fix built of the festival plugin with mingw32 by linking to ws2_32.dll + and including winsock headers. Fixes bug #541522. + 2008-07-03 Peter Kjellerstedt * ChangeLog: diff --git a/configure.ac b/configure.ac index c6cf3527f0..ab215942fe 100644 --- a/configure.ac +++ b/configure.ac @@ -303,6 +303,9 @@ dnl FIXME: maybe move to sys, or make work with winsock2 AC_CHECK_HEADERS([sys/socket.h], HAVE_SYS_SOCKET_H=yes) AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes) +dnl needed for festival +AM_CONDITIONAL(HAVE_WINSOCK2_H, test "x$HAVE_WINSOCK2_H" = "xyes") + if test "x$HAVE_SYS_SOCKET_H" != "xyes"; then AG_GST_DISABLE_PLUGIN(librfb) fi diff --git a/gst/festival/Makefile.am b/gst/festival/Makefile.am index 4599442014..8200d0652b 100644 --- a/gst/festival/Makefile.am +++ b/gst/festival/Makefile.am @@ -1,11 +1,18 @@ plugin_LTLIBRARIES = libgstfestival.la +if HAVE_WINSOCK2_H +WINSOCK2_LIBS = -lws2_32 +else +WINSOCK2_LIBS = +endif + libgstfestival_la_SOURCES = gstfestival.c libgstfestival_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) # we use net connection now... perhaps use the lib later # libgstfestival_la_LIBADD = $(FESTIVAL_LIBS) -libgstfestival_la_LIBADD = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) -lgstaudio-0.10 +libgstfestival_la_LIBADD = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) \ + -lgstaudio-0.10 $(WINSOCK2_LIBS) libgstfestival_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) noinst_HEADERS = gstfestival.h diff --git a/gst/festival/gstfestival.c b/gst/festival/gstfestival.c index f6f0a7b0ae..f2ce45a67e 100644 --- a/gst/festival/gstfestival.c +++ b/gst/festival/gstfestival.c @@ -79,16 +79,23 @@ #include "config.h" #endif +#include /* Needed for G_OS_XXXX macros */ + #include #include #include #include #include #include +#ifdef G_OS_WIN32 +#include +#include +#else #include #include #include #include +#endif #include "gstfestival.h" #include