--- /dev/null
+--- configure 2009-05-21 15:48:14.000000000 +0100
++++ configure 2009-05-21 15:48:14.000000000 +0100
+@@ -4474,9 +4474,6 @@
+ LIBS="-lX11 -lXext"
+ SYSLIBS="$SYSLIBS -L$x_libraries -lX11 -lXext"
+ fi
+-if test x$x_includes != x ; then
+- XINCLUDES="-I$x_includes"
+-fi
+ echo $ac_n "checking for XDGAQueryVersion in -lXxf86dga""... $ac_c" 1>&6
+ echo "configure:4482: checking for XDGAQueryVersion in -lXxf86dga" >&5
+ ac_lib_var=`echo Xxf86dga'_'XDGAQueryVersion | sed 'y%./+-%__p_%'`
--- /dev/null
+--- ppu.h~ 2004-07-11 22:50:59.000000000 +0100
++++ ppu.h 2009-05-21 15:54:06.000000000 +0100
+@@ -332,10 +332,14 @@
+ uint8 _5A22;
+ } SnesModel;
+
++START_EXTERN_C
++
+ extern SnesModel* Model;
+ extern SnesModel M1SNES;
+ extern SnesModel M2SNES;
+
++END_EXTERN_C
++
+ #define MAX_5C77_VERSION 0x01
+ #define MAX_5C78_VERSION 0x03
+ #define MAX_5A22_VERSION 0x02
+--- dsp1.h~ 2004-07-11 22:50:57.000000000 +0100
++++ dsp1.h 2009-05-21 15:53:46.000000000 +0100
+@@ -122,9 +122,10 @@
+ void S9xResetDSP1 ();
+ uint8 S9xGetDSP (uint16 Address);
+ void S9xSetDSP (uint8 Byte, uint16 Address);
+-END_EXTERN_C
+
+ extern struct SDSP1 DSP1;
+
++END_EXTERN_C
++
+ #endif
+
SRC_URI = "http://www.lysator.liu.se/snes9x/1.43-WIP1/snes9x-1.43-WIP1-src.tar.gz \
file://makefile.patch;patch=1;pnum=2 \
file://private.patch;patch=1;pnum=0 \
- file://64bit.patch;patch=1"
+ file://64bit.patch;patch=1 \
+ file://configure.patch;patch=1;pnum=0 \
+ file://linkage.patch;patch=1;pnum=0"
S = "${WORKDIR}/snes9x-1.43-dev-src/snes9x"