From 5b9b2e7779f22c78864496f6c568ddb8f951a4b5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 22 Jul 2008 18:12:54 +0000 Subject: [PATCH] configure.ac: Remove AC_ISC_POSIX macro; it's broken on some platforms and not needed. Original commit message from CVS: * configure.ac: Remove AC_ISC_POSIX macro; it's broken on some platforms and not needed. Add check (taken from -base) for winsock, adds WIN32_LIBS * gst/Makefile.am: Add WIN32_LIBS to LIBADD for libgstreamer. Needed now that gstpoll uses winsock. Define GST_EXPORTS when building libgstreamer (only used on win32) * gst/gst_private.h: * gst/gstinfo.h: Use GST_EXPORT instead of locally-defined (and incorrect IMPORT_SYMBOL) for symbols that we need to export in both these files. * gst/gstpoll.c: Include gst_private.h higher up to avoid some compile problems on win32. --- ChangeLog | 16 +++++++++++ configure.ac | 11 +++++--- gst/Makefile.am | 2 ++ gst/gst_private.h | 68 ++++++++++++++++++++--------------------------- gst/gstinfo.h | 13 +-------- gst/gstpoll.c | 4 +-- 6 files changed, 57 insertions(+), 57 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0a051f0a5b..4839fdeda3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2008-07-22 Michael Smith + + * configure.ac: + Remove AC_ISC_POSIX macro; it's broken on some platforms and not needed. + Add check (taken from -base) for winsock, adds WIN32_LIBS + * gst/Makefile.am: + Add WIN32_LIBS to LIBADD for libgstreamer. Needed now that gstpoll uses + winsock. + Define GST_EXPORTS when building libgstreamer (only used on win32) + * gst/gst_private.h: + * gst/gstinfo.h: + Use GST_EXPORT instead of locally-defined (and incorrect IMPORT_SYMBOL) + for symbols that we need to export in both these files. + * gst/gstpoll.c: + Include gst_private.h higher up to avoid some compile problems on win32. + 2008-07-22 Sebastian Dröge * gst/gstvalue.c: diff --git a/configure.ac b/configure.ac index 3e421f542c..338446474c 100644 --- a/configure.ac +++ b/configure.ac @@ -287,10 +287,6 @@ AG_GST_PLUGIN_DOCS([1.3],[2.1]) dnl *** checks for libraries *** -dnl For interactive UNIX (a Sun thing) -dnl FIXME: this adds -lcposix to LIBS, but I doubt we use LIBS -AC_ISC_POSIX - dnl check for libm, for sin() AC_CHECK_LIBM AC_SUBST(LIBM) @@ -326,6 +322,13 @@ dnl separate from HAVE_VALGRIND because you can have the program, but not dnl the dev package AC_CHECK_HEADERS([valgrind/valgrind.h], HAVE_VALGRIND_H=yes) +dnl used in gst/gstpoll.c +AC_CHECK_HEADERS([winsock2.h], HAVE_WINSOCK2_H=yes) +if test "x$HAVE_WINSOCK2_H" = "xyes"; then + WIN32_LIBS="-lws2_32" + AC_SUBST(WIN32_LIBS) +fi + dnl *** checks for types/defines *** dnl *** checks for structures *** diff --git a/gst/Makefile.am b/gst/Makefile.am index 7852de4da3..7bc271cc03 100644 --- a/gst/Makefile.am +++ b/gst/Makefile.am @@ -138,6 +138,7 @@ DISTCLEANFILES = $(built_header_configure) libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \ -D_GNU_SOURCE \ + -DGST_EXPORTS \ -DG_LOG_DOMAIN=g_log_domain_gstreamer \ -DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" \ -DGST_DISABLE_DEPRECATED \ @@ -147,6 +148,7 @@ libgstreamer_@GST_MAJORMINOR@_la_CFLAGS = \ libgstreamer_@GST_MAJORMINOR@_la_LIBADD = \ $(GST_PARSE_LA) \ $(GST_ALL_LIBS) \ + $(WIN32_LIBS) \ $(XML_LIBS) libgstreamer_@GST_MAJORMINOR@_la_LDFLAGS = \ diff --git a/gst/gst_private.h b/gst/gst_private.h index ba1060cd12..790f4e285f 100644 --- a/gst/gst_private.h +++ b/gst/gst_private.h @@ -93,47 +93,37 @@ gboolean gst_registry_xml_write_cache (GstRegistry * registry, const char *lo #ifndef GST_DISABLE_GST_DEBUG -#ifndef _MSC_VER -#define IMPORT_SYMBOL -#else /* _MSC_VER */ -#ifndef LIBGSTREAMER_EXPORTS -#define IMPORT_SYMBOL __declspec(dllimport) -#else -#define IMPORT_SYMBOL -#endif -#endif - #include -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_GST_INIT; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_AUTOPLUG; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PARENTAGE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_STATES; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_SCHEDULING; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_BUFFER; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_BUS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CAPS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CLOCK; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_ELEMENT_PADS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PADS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PIPELINE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PLUGIN_LOADING; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PLUGIN_INFO; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PROPERTIES; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_XML; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_NEGOTIATION; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_REFCOUNTING; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_ERROR_SYSTEM; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_EVENT; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_MESSAGE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PARAMS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_CALL_TRACE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_SIGNAL; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_PROBE; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_REGISTRY; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_QOS; -extern IMPORT_SYMBOL GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */ +GST_EXPORT GstDebugCategory *GST_CAT_GST_INIT; +GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG; +GST_EXPORT GstDebugCategory *GST_CAT_AUTOPLUG_ATTEMPT; +GST_EXPORT GstDebugCategory *GST_CAT_PARENTAGE; +GST_EXPORT GstDebugCategory *GST_CAT_STATES; +GST_EXPORT GstDebugCategory *GST_CAT_SCHEDULING; +GST_EXPORT GstDebugCategory *GST_CAT_BUFFER; +GST_EXPORT GstDebugCategory *GST_CAT_BUS; +GST_EXPORT GstDebugCategory *GST_CAT_CAPS; +GST_EXPORT GstDebugCategory *GST_CAT_CLOCK; +GST_EXPORT GstDebugCategory *GST_CAT_ELEMENT_PADS; +GST_EXPORT GstDebugCategory *GST_CAT_PADS; +GST_EXPORT GstDebugCategory *GST_CAT_PIPELINE; +GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_LOADING; +GST_EXPORT GstDebugCategory *GST_CAT_PLUGIN_INFO; +GST_EXPORT GstDebugCategory *GST_CAT_PROPERTIES; +GST_EXPORT GstDebugCategory *GST_CAT_XML; +GST_EXPORT GstDebugCategory *GST_CAT_NEGOTIATION; +GST_EXPORT GstDebugCategory *GST_CAT_REFCOUNTING; +GST_EXPORT GstDebugCategory *GST_CAT_ERROR_SYSTEM; +GST_EXPORT GstDebugCategory *GST_CAT_EVENT; +GST_EXPORT GstDebugCategory *GST_CAT_MESSAGE; +GST_EXPORT GstDebugCategory *GST_CAT_PARAMS; +GST_EXPORT GstDebugCategory *GST_CAT_CALL_TRACE; +GST_EXPORT GstDebugCategory *GST_CAT_SIGNAL; +GST_EXPORT GstDebugCategory *GST_CAT_PROBE; +GST_EXPORT GstDebugCategory *GST_CAT_REGISTRY; +GST_EXPORT GstDebugCategory *GST_CAT_QOS; +GST_EXPORT GstDebugCategory *GST_CAT_TYPES; /* FIXME 0.11: remove? */ #else diff --git a/gst/gstinfo.h b/gst/gstinfo.h index 1c3c42282a..801bf98401 100644 --- a/gst/gstinfo.h +++ b/gst/gstinfo.h @@ -28,17 +28,6 @@ #include #include - -#ifndef _MSC_VER -#define IMPORT_SYMBOL -#else /* _MSC_VER */ -#ifndef LIBGSTREAMER_EXPORTS -#define IMPORT_SYMBOL __declspec(dllimport) -#else -#define IMPORT_SYMBOL -#endif -#endif - #ifndef M_PI #define M_PI 3.14159265358979323846 #endif @@ -422,7 +411,7 @@ extern gboolean __gst_debug_enabled; /* since 0.10.7, the min debug level, used for quickly discarding debug * messages that fall under the threshold. */ -extern IMPORT_SYMBOL GstDebugLevel __gst_debug_min; +GST_EXPORT GstDebugLevel __gst_debug_min; /** * GST_CAT_LEVEL_LOG: diff --git a/gst/gstpoll.c b/gst/gstpoll.c index 4a05042a5f..1c771b7253 100644 --- a/gst/gstpoll.c +++ b/gst/gstpoll.c @@ -56,6 +56,8 @@ #include "config.h" #endif +#include "gst_private.h" + #include #ifdef HAVE_UNISTD_H @@ -80,8 +82,6 @@ /* OS/X needs this because of bad headers */ #include -#include "gst_private.h" - #include "gstpoll.h" #ifndef G_OS_WIN32