configure: Disable gstreamer support if headers are not compatible with build environment.
diff --git a/configure.ac b/configure.ac
index ecd74d6..df7a355 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1456,10 +1456,15 @@
         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_MSG_CHECKING([whether gint64 defined by gst/app/gstappsink.h is indeed 64-bit])
+              AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gst/app/gstappsink.h>]],
+                                                 [[int a[sizeof(gint64) > 4 ? 1 : -1]]])],
+                [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])])],
+                [AC_MSG_RESULT([no])])])])
     fi
     CPPFLAGS="$ac_save_CPPFLAGS"
 fi