[PATCH] configure: Disable gstreamer support if headers are not compatible with build environment.

Octavian Voicu octavian.voicu at gmail.com
Sat Jul 30 10:23:27 CDT 2011


When building a 32-bit wine in a 64-bit build environment with
default glib headers (gstreamer uses glib.h), glib 64-bit types
(such as gint64 and guint64) are not properly defined, causing
many compiler warnings* and most likely a broken winegstreamer.dll.

Although both gstreamer and glib are included in the ia32-libs
package (on Ubuntu, and possibly others), the lack of a proper
glibconfig.h makes the gstreamer headers unusable for 32-bit
builds.

---
 configure.ac |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2521c71..f32d9eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1451,10 +1451,18 @@ then
         CPPFLAGS="$CPPFLAGS $ac_gst_incl"
         AC_CHECK_HEADER([gst/gstpad.h],
           [AC_CHECK_HEADER([gst/app/gstappsink.h],
-             [AC_CHECK_LIB(gstreamer-0.10,gst_pad_get_caps_reffed,
-                [AC_CHECK_LIB(gstapp-0.10,gst_app_buffer_new,
-                    [AC_SUBST(GSTREAMER_LIBS,"$ac_gst_libs")
-                     AC_SUBST(GSTREAMER_INCL,"$ac_gst_incl")],,[$ac_gst_libs])])])])
+             [AC_CHECK_SIZEOF([gint64],,[#include <gst/app/gstappsink.h>])
+              AC_CHECK_SIZEOF([guint64],,[#include <gst/app/gstappsink.h>])
+              AC_MSG_CHECKING([whether gint64/guint64 defined by gst/app/gstappsink.h are indeed 64-bit])
+              if test "x$ac_cv_sizeof_gint64" = "x8" -a "x$ac_cv_sizeof_guint64" = "x8"; then
+                  AC_MSG_RESULT([yes])
+                  AC_CHECK_LIB(gstreamer-0.10,gst_pad_get_caps_reffed,
+                    [AC_CHECK_LIB(gstapp-0.10,gst_app_buffer_new,
+                       [AC_SUBST(GSTREAMER_LIBS,"$ac_gst_libs")
+                        AC_SUBST(GSTREAMER_INCL,"$ac_gst_incl")],,[$ac_gst_libs])])
+              else
+                  AC_MSG_RESULT([no])
+              fi])])
     fi
     CPPFLAGS="$ac_save_CPPFLAGS"
 fi
-- 
1.7.4.1




More information about the wine-patches mailing list