--- libquicktime-0.9.1/configure.ac
+++ libquicktime-0.9.1/configure.ac
@@ -505,6 +505,7 @@
 if test x${enable_mmx-yes} = xyes ; then
   AC_MSG_CHECKING(for MMX-capable compiler)
   AC_TRY_RUN([
+    #include <stdint.h>
     #include "plugins/rtjpeg/mmx.h"
     main()
     { movq_r2r(mm0, mm1); return 0; }
--- libquicktime-0.9.1/plugins/rtjpeg/Makefile.am
+++ libquicktime-0.9.1/plugins/rtjpeg/Makefile.am
@@ -12,4 +12,4 @@
 INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include/
 
 RTjpeg.lo:	RTjpeg.c RTjpeg.h
-	gcc @RTJPEG_CFLAGS@ -c RTjpeg.c -o RTjpeg.lo
+	$(LIBTOOL) --mode=compile gcc @RTJPEG_CFLAGS@ -fPIC -c RTjpeg.c -o RTjpeg.lo
--- libquicktime-0.9.1/plugins/rtjpeg/mmx.h
+++ libquicktime-0.9.1/plugins/rtjpeg/mmx.h
@@ -44,14 +44,14 @@
 	 they be truncated by the compiler)
 */
 typedef	union {
-	long long		q;	/* Quadword (64-bit) value */
-	unsigned long long	uq;	/* Unsigned Quadword */
-	int			d[2];	/* 2 Doubleword (32-bit) values */
-	unsigned int		ud[2];	/* 2 Unsigned Doubleword */
-	short			w[4];	/* 4 Word (16-bit) values */
-	unsigned short		uw[4];	/* 4 Unsigned Word */
-	char			b[8];	/* 8 Byte (8-bit) values */
-	unsigned char		ub[8];	/* 8 Unsigned Byte */
+	int64_t			q;	/* Quadword (64-bit) value */
+	uint64_t		uq;	/* Unsigned Quadword */
+	int32_t			d[2];	/* 2 Doubleword (32-bit) values */
+	uint32_t		ud[2];	/* 2 Unsigned Doubleword */
+	int16_t			w[4];	/* 4 Word (16-bit) values */
+	uint16_t		uw[4];	/* 4 Unsigned Word */
+	int8_t			b[8];	/* 8 Byte (8-bit) values */
+	uint8_t			ub[8];	/* 8 Unsigned Byte */
 	float			s[2];	/* Single-precision (32-bit) value */
 } __attribute__ ((aligned (8))) mmx_t;	/* On an 8-byte (64-bit) boundary */
 
--- libquicktime-0.9.2/plugins/rtjpeg/RTjpeg.c.64	2004-05-26 10:45:20.000000000 +0200
+++ libquicktime-0.9.2/plugins/rtjpeg/RTjpeg.c	2004-05-26 10:47:30.000000000 +0200
@@ -34,6 +34,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <inttypes.h>
 #define __RTJPEG_INTERNAL__
 #include "RTjpeg.h"
 
@@ -183,8 +184,8 @@
  for(i=0; i<64; i++)qtbl[i]=(int16_t)rtj->cqt[i];
 }
 
-static mmx_t RTjpeg_ones=(mmx_t)(long long)0x0001000100010001LL;
-static mmx_t RTjpeg_half=(mmx_t)(long long)0x7fff7fff7fff7fffLL;
+static mmx_t RTjpeg_ones=(mmx_t)(int64_t)0x0001000100010001LL;
+static mmx_t RTjpeg_half=(mmx_t)(int64_t)0x7fff7fff7fff7fffLL;
 
 void RTjpeg_quant(int16_t *block, int32_t *qtbl)
 {
@@ -241,11 +242,11 @@
  * Perform the forward DCT on one block of samples.
  */
 #ifdef MMX
-static mmx_t RTjpeg_C4   =(mmx_t)(long long)0x2D412D412D412D41LL;
-static mmx_t RTjpeg_C6   =(mmx_t)(long long)0x187E187E187E187ELL;
-static mmx_t RTjpeg_C2mC6=(mmx_t)(long long)0x22A322A322A322A3LL;
-static mmx_t RTjpeg_C2pC6=(mmx_t)(long long)0x539F539F539F539FLL;
-static mmx_t RTjpeg_zero =(mmx_t)(long long)0x0000000000000000LL;
+static mmx_t RTjpeg_C4   =(mmx_t)(int64_t)0x2D412D412D412D41LL;
+static mmx_t RTjpeg_C6   =(mmx_t)(int64_t)0x187E187E187E187ELL;
+static mmx_t RTjpeg_C2mC6=(mmx_t)(int64_t)0x22A322A322A322A3LL;
+static mmx_t RTjpeg_C2pC6=(mmx_t)(int64_t)0x539F539F539F539FLL;
+static mmx_t RTjpeg_zero =(mmx_t)(int64_t)0x0000000000000000LL;
 
 #else
 
@@ -1204,11 +1205,11 @@
 {
 #ifdef MMX
 
-static mmx_t fix_141			= (mmx_t)(long long)0x5a825a825a825a82LL;
-static mmx_t fix_184n261	= (mmx_t)(long long)0xcf04cf04cf04cf04LL;
-static mmx_t fix_184			= (mmx_t)(long long)0x7641764176417641LL;
-static mmx_t fix_n184		= (mmx_t)(long long)0x896f896f896f896fLL;
-static mmx_t fix_108n184	= (mmx_t)(long long)0xcf04cf04cf04cf04LL;
+static mmx_t fix_141			= (mmx_t)(int64_t)0x5a825a825a825a82LL;
+static mmx_t fix_184n261	= (mmx_t)(int64_t)0xcf04cf04cf04cf04LL;
+static mmx_t fix_184			= (mmx_t)(int64_t)0x7641764176417641LL;
+static mmx_t fix_n184		= (mmx_t)(int64_t)0x896f896f896f896fLL;
+static mmx_t fix_108n184	= (mmx_t)(int64_t)0xcf04cf04cf04cf04LL;
 
   mmx_t *wsptr = (mmx_t *)rtj->ws;
   register mmx_t *dataptr = (mmx_t *)odata;
@@ -2774,7 +2775,7 @@
  mmx_t *mold=(mmx_t *)old;
  mmx_t *mblock=(mmx_t *)rblock;
  volatile mmx_t result;
- static mmx_t neg=(mmx_t)(unsigned long long)0xffffffffffffffffULL;
+ static mmx_t neg=(mmx_t)(uint64_t)0xffffffffffffffffULL;
  
  movq_m2r(*mask, mm7);
  movq_m2r(neg, mm6);
