--- configure.orig	2007-10-08 12:11:23.000000000 -0300
+++ configure	2013-10-08 22:35:24.628157749 -0300
@@ -24544,13 +24544,12 @@
 fi
 
 
-{ echo "$as_me:$LINENO: checking for getopt_long in -lgnugetopt" >&5
-echo $ECHO_N "checking for getopt_long in -lgnugetopt... $ECHO_C" >&6; }
+{ echo "$as_me:$LINENO: checking for getopt_long in -lc" >&5
+echo $ECHO_N "checking for getopt_long in -lc... $ECHO_C" >&6; }
 if test "${ac_cv_lib_gnugetopt_getopt_long+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lgnugetopt  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
@@ -24610,8 +24609,6 @@
 #define HAVE_LIBGNUGETOPT 1
 _ACEOF
 
-  LIBS="-lgnugetopt $LIBS"
-
 fi
 
 { echo "$as_me:$LINENO: checking for library containing inet_addr" >&5
@@ -26431,8 +26428,8 @@
   if test x$have_ffmpeg_arg = xtrue; then
      { echo "$as_me:$LINENO: have enable ffmpeg $enable_ffmpeg" >&5
 echo "$as_me: have enable ffmpeg $enable_ffmpeg" >&6;}
-     FFMPEG_INC=-I${enable_ffmpeg}/libavcodec
-     FFMPEG_LIB="${enable_ffmpeg}/libavcodec/libavcodec.a -lz"
+     FFMPEG_INC=-I${enable_ffmpeg}/include/ffmpeg0
+     FFMPEG_LIB="${enable_ffmpeg}/lib/libavcodec.a -lz"
      saveCFLAGS="$CFLAGS"
      CFLAGS="$CFLAGS $FFMPEG_INC"
      { echo "$as_me:$LINENO: checking for AVRational" >&5
@@ -26613,7 +26610,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <avcodec.h>
+#include <libavcodec/avcodec.h>
 
 int
 main ()
@@ -27008,7 +27005,7 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <ffmpeg/avcodec.h>
+#include <libavcodec/avcodec.h>
 
 int
 main ()