diff -Nurd -x'*~' xine-lib-1.1.21.orig/configure xine-lib-1.1.21/configure
--- xine-lib-1.1.21.orig/configure	2012-06-09 12:54:46.000000000 -0400
+++ xine-lib-1.1.21/configure	2015-05-11 00:34:39.000000000 -0400
@@ -20814,7 +20814,7 @@
 
 
 
-host_or_hostalias="$host"
+host_or_hostalias="$target"
 if test "$host_or_hostalias" = ""; then
                             host_or_hostalias="$host_alias"
 fi
diff -Nurd -x'*~' xine-lib-1.1.21.orig/lib/Makefile.in xine-lib-1.1.21/lib/Makefile.in
--- xine-lib-1.1.21.orig/lib/Makefile.in	2012-06-09 12:54:37.000000000 -0400
+++ xine-lib-1.1.21/lib/Makefile.in	2015-05-11 00:34:39.000000000 -0400
@@ -448,7 +448,7 @@
 xinepostdir = $(XINE_PLUGINDIR)/post
 vidixdir = $(XINE_PLUGINDIR)/vidix
 EXTRA_DIST = Makefile.common
-noinst_LTLIBRARIES = libxineposix.la
+noinst_LTLIBRARIES = 
 noinst_HEADERS = os_internal.h
 xineinclude_HEADERS = os_types.h
 libxineposix_la_SOURCES = 
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/audio_out/Makefile.in xine-lib-1.1.21/src/audio_out/Makefile.in
--- xine-lib-1.1.21.orig/src/audio_out/Makefile.in	2012-06-09 12:54:37.000000000 -0400
+++ xine-lib-1.1.21/src/audio_out/Makefile.in	2015-05-11 00:34:39.000000000 -0400
@@ -697,9 +697,9 @@
 # The "-Wl,-framework -Wl,..." is needed for libtool versions before
 # 1.5.x (1.257): the default version that ships with Mac OS X is 1.5 (1.1220)
 xineplug_ao_out_coreaudio_la_LDFLAGS = $(AM_LDFLAGS) \
-	-Wl,-framework -Wl,Cocoa -framework CoreAudio \
-	-Wl,-framework -Wl,AudioUnit -framework AudioUnit \
-xineplug_ao_out_coreaudio_la_CFLAGS = -framework CoreAudio -framework AudioUnit $(VISIBILITY_FLAG)
+	-Wl,-framework,Cocoa -Wl,-framework,CoreAudio \
+	-Wl,-framework,AudioUnit \
+xineplug_ao_out_coreaudio_la_CFLAGS = -Wl,-framework,CoreAudio -Wl,-framework,AudioUnit $(VISIBILITY_FLAG)
 
 xineplug_ao_out_pulseaudio_la_SOURCES = audio_pulse_out.c
 xineplug_ao_out_pulseaudio_la_LIBADD = $(XINE_LIB) $(PULSEAUDIO_LIBS) $(LTLIBINTL)
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/audio_out/audio_coreaudio_out.c xine-lib-1.1.21/src/audio_out/audio_coreaudio_out.c
--- xine-lib-1.1.21.orig/src/audio_out/audio_coreaudio_out.c	2010-03-09 17:17:05.000000000 -0500
+++ xine-lib-1.1.21/src/audio_out/audio_coreaudio_out.c	2015-05-11 00:34:39.000000000 -0400
@@ -51,6 +51,7 @@
 #include <AudioUnit/AudioUnitProperties.h>
 #include <AudioUnit/AudioUnitParameters.h>
 #include <AudioUnit/AudioOutputUnit.h>
+#include <CoreServices/CoreServices.h>
 
 #define AO_OUT_COREAUDIO_IFACE_VERSION 8
 
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/combined/ffmpeg/ff_video_decoder.c xine-lib-1.1.21/src/combined/ffmpeg/ff_video_decoder.c
--- xine-lib-1.1.21.orig/src/combined/ffmpeg/ff_video_decoder.c	2012-06-08 09:36:36.000000000 -0400
+++ xine-lib-1.1.21/src/combined/ffmpeg/ff_video_decoder.c	2015-05-11 00:47:25.000000000 -0400
@@ -1054,8 +1054,9 @@
       case BUF_VIDEO_RV40:
         this->bih.biWidth  = _X_BE_16(&this->buf[12]);
         this->bih.biHeight = _X_BE_16(&this->buf[14]);
-
+#ifdef AVCODEC_HAS_SUB_ID
         this->context->sub_id = _X_BE_32(&this->buf[30]);
+#endif
 
         this->context->slice_offset = calloc(SLICE_OFFSET_SIZE, sizeof(int));
         this->slice_offset_size = SLICE_OFFSET_SIZE;
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/combined/ffmpeg/ffmpeg_compat.h xine-lib-1.1.21/src/combined/ffmpeg/ffmpeg_compat.h
--- xine-lib-1.1.21.orig/src/combined/ffmpeg/ffmpeg_compat.h	2012-06-08 09:36:36.000000000 -0400
+++ xine-lib-1.1.21/src/combined/ffmpeg/ffmpeg_compat.h	2015-05-11 00:46:50.000000000 -0400
@@ -53,6 +53,11 @@
 # define AVCODEC_HAS_COLORSPACE
 #endif
 
+/* "unused" as of v54 */
+#if LIBAVCODEC_VERSION_MAJOR < 54
+# define AVCODEC_HAS_SUB_ID
+#endif
+
 /**/
 #if LIBAVCODEC_VERSION_MAJOR > 53 || (LIBAVCODEC_VERSION_MAJOR == 53 && LIBAVCODEC_VERSION_MINOR >= 8)
 #  define avcodec_init() do {} while(0)
@@ -105,4 +110,8 @@
 #  define AVFRAMEAGE 1
 #endif
 
+#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
+#  define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
+#endif
+
 #endif /* XINE_AVCODEC_COMPAT_H */
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/combined/ffmpeg/ffmpeg_decoder.h xine-lib-1.1.21/src/combined/ffmpeg/ffmpeg_decoder.h
--- xine-lib-1.1.21.orig/src/combined/ffmpeg/ffmpeg_decoder.h	2012-01-18 14:30:08.000000000 -0500
+++ xine-lib-1.1.21/src/combined/ffmpeg/ffmpeg_decoder.h	2015-05-11 00:43:40.000000000 -0400
@@ -35,7 +35,11 @@
 
 typedef struct ff_codec_s {
   uint32_t          type;
+#if defined LIBAVCODEC_VERSION_INT && LIBAVCODEC_VERSION_INT >= ((54<<16)|(25<<8))
+  enum AVCodecID    id;
+#else
   enum CodecID      id;
+#endif
   const char       *name;
 } ff_codec_t;
 
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/demuxers/demux_qt.c xine-lib-1.1.21/src/demuxers/demux_qt.c
--- xine-lib-1.1.21.orig/src/demuxers/demux_qt.c	2012-05-26 16:49:42.000000000 -0400
+++ xine-lib-1.1.21/src/demuxers/demux_qt.c	2015-05-11 00:34:39.000000000 -0400
@@ -130,7 +130,7 @@
 #define QTIM_ATOM QT_ATOM('q', 't', 'i', 'm')
 
 /* placeholder for cutting and pasting */
-#define _ATOM QT_ATOM('', '', '', '')
+/* #define _ATOM QT_ATOM('', '', '', '') */
 
 #define ATOM_PREAMBLE_SIZE 8
 #define PALETTE_COUNT 256
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/libxinevdec/Makefile.in xine-lib-1.1.21/src/libxinevdec/Makefile.in
--- xine-lib-1.1.21.orig/src/libxinevdec/Makefile.in	2012-06-09 12:54:43.000000000 -0400
+++ xine-lib-1.1.21/src/libxinevdec/Makefile.in	2015-05-11 00:34:39.000000000 -0400
@@ -498,7 +498,7 @@
 xinepostdir = $(XINE_PLUGINDIR)/post
 vidixdir = $(XINE_PLUGINDIR)/vidix
 AM_CFLAGS = $(VISIBILITY_FLAG)
-AM_LDFLAGS = $(xineplug_ldflags)
+AM_LDFLAGS = $(xineplug_ldflags) $(X_LIBS)
 EXTRA_DIST = foovideo.c
 @HAVE_WAND_TRUE@image_module = xineplug_decode_image.la
 @HAVE_GDK_PIXBUF_TRUE@gdkpixbuf_module = xineplug_decode_gdk_pixbuf.la
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/post/deinterlace/plugins/Makefile.in xine-lib-1.1.21/src/post/deinterlace/plugins/Makefile.in
--- xine-lib-1.1.21.orig/src/post/deinterlace/plugins/Makefile.in	2012-06-09 12:54:43.000000000 -0400
+++ xine-lib-1.1.21/src/post/deinterlace/plugins/Makefile.in	2015-05-11 00:34:39.000000000 -0400
@@ -72,9 +72,7 @@
 	libdeinterlaceplugins_la-linearblend.lo \
 	libdeinterlaceplugins_la-vfir.lo \
 	libdeinterlaceplugins_la-weave.lo \
-	libdeinterlaceplugins_la-greedy2frame.lo \
 	libdeinterlaceplugins_la-scalerbob.lo \
-	libdeinterlaceplugins_la-kdetv_greedyh.lo \
 	libdeinterlaceplugins_la-kdetv_tomsmocomp.lo
 libdeinterlaceplugins_la_OBJECTS =  \
 	$(am_libdeinterlaceplugins_la_OBJECTS)
@@ -472,9 +470,7 @@
 	linearblend.c \
 	vfir.c \
 	weave.c \
-	greedy2frame.c \
 	scalerbob.c \
-	kdetv_greedyh.c \
 	kdetv_tomsmocomp.c
 
 libdeinterlaceplugins_la_CFLAGS = $(VISIBILITY_FLAG) $(AM_CFLAGS)
@@ -535,8 +531,6 @@
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeinterlaceplugins_la-double.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeinterlaceplugins_la-greedy.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeinterlaceplugins_la-greedy2frame.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeinterlaceplugins_la-kdetv_greedyh.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeinterlaceplugins_la-kdetv_tomsmocomp.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeinterlaceplugins_la-linear.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdeinterlaceplugins_la-linearblend.Plo@am__quote@
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/post/goom/ifs.c xine-lib-1.1.21/src/post/goom/ifs.c
--- xine-lib-1.1.21.orig/src/post/goom/ifs.c	2009-11-30 16:02:56.000000000 -0500
+++ xine-lib-1.1.21/src/post/goom/ifs.c	2015-05-11 00:34:39.000000000 -0400
@@ -517,7 +517,7 @@
 	points = draw_ifs (goomInfo, &nbpt, fx_data);
 	nbpt--;
 
-#ifdef HAVE_MMX
+#if 0
 	movd_m2r (couleursl, mm1);
 	punpckldq_r2r (mm1, mm1);
 	for (i = 0; i < nbpt; i += increment) {
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/post/goom/mmx.h xine-lib-1.1.21/src/post/goom/mmx.h
--- xine-lib-1.1.21.orig/src/post/goom/mmx.h	2009-11-30 15:55:58.000000000 -0500
+++ xine-lib-1.1.21/src/post/goom/mmx.h	2015-05-11 00:34:39.000000000 -0400
@@ -728,8 +728,7 @@
 
 #else
 
-#define	emms() __asm__ __volatile__ ("emms"::: \
-                      "st(1)","st(2)","st(3)","st(4)","st(5)","st(6)","st(7)")
+#define	emms() __asm__ __volatile__ ("emms")
 
 #endif
 
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/xine-engine/Makefile.in xine-lib-1.1.21/src/xine-engine/Makefile.in
--- xine-lib-1.1.21.orig/src/xine-engine/Makefile.in	2012-06-09 12:54:45.000000000 -0400
+++ xine-lib-1.1.21/src/xine-engine/Makefile.in	2015-05-11 00:34:39.000000000 -0400
@@ -454,9 +454,9 @@
 xineplug_ldflags = $(LDFLAGS_NOUNDEFINED) -avoid-version -module
 xinepostdir = $(XINE_PLUGINDIR)/post
 vidixdir = $(XINE_PLUGINDIR)/vidix
-LIBXINEPOSIX = $(top_builddir)/lib/libxineposix.la
+LIBXINEPOSIX = 
 AM_CFLAGS = $(X_CFLAGS) $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS) $(VISIBILITY_FLAG)
-AM_CPPFLAGS = $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE
+AM_CPPFLAGS = $(ZLIB_CPPFLAGS) -DXINE_LIBRARY_COMPILE $(FT2_CFLAGS) $(FONTCONFIG_CFLAGS)
 lib_LTLIBRARIES = libxine.la
 XINEUTILS_LIB = $(top_builddir)/src/xine-utils/libxineutils.la
 DEF_FILE = libxine-$(XINE_MAJOR).def
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/xine-engine/demux.c xine-lib-1.1.21/src/xine-engine/demux.c
--- xine-lib-1.1.21.orig/src/xine-engine/demux.c	2010-07-21 15:10:49.000000000 -0400
+++ xine-lib-1.1.21/src/xine-engine/demux.c	2015-05-11 00:34:39.000000000 -0400
@@ -50,6 +50,27 @@
 #include <winsock.h>
 #endif
 
+#ifndef CLOCK_REALTIME
+#include <time.h>
+
+#define  CLOCK_REALTIME 0 
+static int clock_gettime(int clk_id /*ignored*/, struct timespec *tp)
+{
+  struct timeval now;
+  
+  int rv = gettimeofday(&now, NULL);
+  
+  if (rv != 0) {
+    return rv;
+  }
+  
+  tp->tv_sec = now.tv_sec;
+  tp->tv_nsec = now.tv_usec * 1000;
+  
+  return 0;
+}
+#endif
+
 /*
  *  Flush audio and video buffers. It is called from demuxers on
  *  seek/stop, and may be useful when user input changes a stream and
diff -Nurd -x'*~' xine-lib-1.1.21.orig/src/xine-engine/post.h xine-lib-1.1.21/src/xine-engine/post.h
--- xine-lib-1.1.21.orig/src/xine-engine/post.h	2011-10-11 04:03:42.000000000 -0400
+++ xine-lib-1.1.21/src/xine-engine/post.h	2015-05-11 00:34:39.000000000 -0400
@@ -377,7 +377,7 @@
 
 #define PARAM_ITEM( param_type, var, enumv, min, max, readonly, descr ) \
 { param_type, #var, sizeof(temp_s.var), \
-  (char*)&temp_s.var-(char*)&temp_s, enumv, min, max, readonly, descr },
+  offsetof(__typeof__(temp_s), var), enumv, min, max, readonly, descr },
 
 #define END_PARAM_DESCR( name ) \
   { POST_PARAM_TYPE_LAST, NULL, 0, 0, NULL, 0, 0, 1, NULL } \
