File avifile-system_wide_ffmpeg.patch of Package avifile

diff -urN avifile-0.7-0.7.45.orig/configure.in avifile-0.7-0.7.45/configure.in
--- avifile-0.7-0.7.45.orig/configure.in	2013-05-18 21:06:57.053713749 +0800
+++ avifile-0.7-0.7.45/configure.in	2013-05-18 21:40:28.789563590 +0800
@@ -798,11 +798,6 @@
 fi
 
 
-dnl =======================
-dnl Configure ffmpeg plugin
-dnl =======================
-AM_PATH_FFMPEG
-
 dnl use_nasm=
 dnl  not needed right now
 dnl AC_CHECK_PROG(use_nasm, nasm, yes, no)
@@ -1016,20 +1011,6 @@
 AC_OUTPUT(
  Makefile
  admin/Makefile
- ffmpeg/Makefile
- ffmpeg/libavformat/Makefile
- ffmpeg/libavcodec/Makefile
- ffmpeg/libavcodec/alpha/Makefile
- ffmpeg/libavcodec/armv4l/Makefile
- ffmpeg/libavcodec/i386/Makefile
- ffmpeg/libavcodec/liba52/Makefile
- ffmpeg/libavcodec/libpostproc/Makefile
- ffmpeg/libavcodec/mlib/Makefile
- ffmpeg/libavcodec/ppc/Makefile
- ffmpeg/libavcodec/ps2/Makefile
- ffmpeg/libavcodec/sh4/Makefile
- ffmpeg/libavcodec/sparc/Makefile
- ffmpeg/libavutil/Makefile
  drivers/Makefile
  drivers/libdha/Makefile
  drivers/libdha/bin/Makefile
diff -urN avifile-0.7-0.7.45.orig/lib/aviread/Makefile.am avifile-0.7-0.7.45/lib/aviread/Makefile.am
--- avifile-0.7-0.7.45.orig/lib/aviread/Makefile.am	2013-05-18 21:06:57.115712974 +0800
+++ avifile-0.7-0.7.45/lib/aviread/Makefile.am	2013-05-18 21:40:49.593303508 +0800
@@ -45,22 +45,14 @@
 
 if AMM_LINK_SHARED
 FF_LIB = \
- ../../ffmpeg/libavformat/libaviplayavformat.la \
- ../../ffmpeg/libavcodec/libaviplayavcodec.la \
- ../../ffmpeg/libavutil/libaviplayavutil.la
-else 
-FF_LIB = \
- ../../ffmpeg/libavformat/libavformat.la \
- ../../ffmpeg/libavcodec/libavcodec.la \
- ../../ffmpeg/libavutil/libavutil.la
+ -lavformat -lavcodec -lavutil
 endif
 
 libaviread_la_LIBADD = $(FF_LIB)
 
 AM_CPPFLAGS = $(LTNOPIC) \
  -I$(srcdir)/../common \
- -I$(srcdir)/../../ffmpeg/libavformat \
- -I$(srcdir)/../../ffmpeg/libavcodec \
- -I$(srcdir)/../../ffmpeg/libavutil
+ -I/usr/include/libavformat \
+ -I/usr/include/livavcodec 
 
 MAINTAINERCLEANFILES = Makefile.in
diff -urN avifile-0.7-0.7.45.orig/lib/Makefile.am avifile-0.7-0.7.45/lib/Makefile.am
--- avifile-0.7-0.7.45.orig/lib/Makefile.am	2013-05-18 21:06:57.117712949 +0800
+++ avifile-0.7-0.7.45/lib/Makefile.am	2013-05-18 21:41:04.221120635 +0800
@@ -2,9 +2,8 @@
 noinst_HEADERS = Uncompressed.h
 
 COMMONCFLAGS = $(DIVX4_CFLAGS) $(XVID_CFLAGS) -DPLUGIN_PATH=\"$(pkglibdir)\" \
- -I$(srcdir)/../ffmpeg/libavcodec \
- -I$(srcdir)/../ffmpeg/libavformat \
- -I$(srcdir)/../ffmpeg/libavutil
+ -I/usr/include/libavcodec \
+ -I/usr/include/libavformat 
 if AMM_USE_FAST_BUILD
 AVISOURCES = libaviplay.cpp
 AVILIBADD =
diff -urN avifile-0.7-0.7.45.orig/Makefile.am avifile-0.7-0.7.45/Makefile.am
--- avifile-0.7-0.7.45.orig/Makefile.am	2013-05-18 21:06:57.119712924 +0800
+++ avifile-0.7-0.7.45/Makefile.am	2013-05-18 21:40:28.790563578 +0800
@@ -1,4 +1,4 @@
-SUBDIRS = . admin m4 ffmpeg drivers lib plugins bin \
+SUBDIRS = . admin m4 drivers lib plugins bin \
  doc include debian libavqt player samples
 
 EXTRA_DIST = INSTALL autogen.sh avifile.spec.in avifile.pc.in \
diff -urN avifile-0.7-0.7.45.orig/plugins/libffmpeg/Makefile.am avifile-0.7-0.7.45/plugins/libffmpeg/Makefile.am
--- avifile-0.7-0.7.45.orig/plugins/libffmpeg/Makefile.am	2013-05-18 21:06:57.063713624 +0800
+++ avifile-0.7-0.7.45/plugins/libffmpeg/Makefile.am	2013-05-18 21:41:54.869487443 +0800
@@ -18,10 +18,8 @@
 #KPROF_LIBS = -L/var/tmp/kprof/lib -lkprof
 #INSTRUMENT = -finstrument-functions
 AM_CPPFLAGS = $(LTNOPIC) $(INSTRUMENT) \
- -I$(srcdir)/../../ffmpeg/libavcodec \
- -I$(srcdir)/../../ffmpeg/libavformat \
- -I$(srcdir)/../../ffmpeg/libavutil \
- -I$(srcdir)/../../ffmpeg
+ -I/usr/include/libavcodec \
+ -I/usr/include/libavformat 
 AM_CXXFLAGS = $(CXXRTTIEXCEPT)
 
 TEST_LIBS = ../../lib/libaviplay.la $(pkglib_LTLIBRARIES) $(SDL_LIBS) $(MPATROL_LIBS) $(EFENCE_LIBS) $(KPROF_LIBS)
diff -urN avifile-0.7-0.7.45.orig/plugins/Makefile.am avifile-0.7-0.7.45/plugins/Makefile.am
--- avifile-0.7-0.7.45.orig/plugins/Makefile.am	2013-05-18 21:06:57.073713499 +0800
+++ avifile-0.7-0.7.45/plugins/Makefile.am	2013-05-18 21:40:28.790563578 +0800
@@ -20,7 +20,7 @@
 
 AM_CPPFLAGS = -Ilibac3pass -Ilibwin32 -Ilibwin32/audiodec \
  -Ilibwin32/videocodec -Ilibwin32/loader \
- -Ilibwin32/loader/dshow -I../ffmpeg/libavcodec \
+ -Ilibwin32/loader/dshow -I/usr/include/libavcodec \
  -DWIN32_PATH=\"$(WIN32_PATH)\" -D__WINE__ -DUNICODE \
  -Ddbg_printf=__vprintf -DTRACE=__vprintf \
  -Wmissing-prototypes -Wimplicit-function-declaration \