Re: [Ekiga-devel-list] libavcodec.so && avcodec.h



Matthias Apitz wrote:
Damien,

The Opal configuration proc looks for libavcodec.so which is in
FreeBSD in:

$ ls -l /usr/local/lib/libavcodec.so
lrwxr-xr-x  1 root  wheel  21 21 mar 19:23 /usr/local/lib/libavcodec.so
-> libavcodec.so.51.44.0

and the header file is /usr/local/include/ffmpeg/avcodec.h

the problem with the header file is that all the configure stuff
below opal/plugins/ (and as well the sources of the plugins is based
on that the header file is in #include <libavcodec/avcodec.h>

What would be the best strategy to fix this?

Use a patch like this.

--
Eugen
--- opal.orig/debian/patches/ffmpeg-includes.dpatch	1970-01-01 01:00:00.000000000 +0100
+++ opal/debian/patches/ffmpeg-includes.dpatch	2008-04-19 12:11:11.296526894 +0200
@@ -0,0 +1,116 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## libname.dpatch by Kilian Krause <kilian debian org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix ffmpeg includes (work with versions of ffmpeg older than start 2008).
+
+ DPATCH@
+Index: opal/plugins/configure
+===================================================================
+--- opal/plugins/configure	(revision 19925)
++++ opal/plugins/configure	(revision 19926)
+@@ -6857,7 +6857,7 @@
+     LIBS=$saved_LIBS
+     if test "x${ffmpeg_libs}" != "xno"; then
+ 
+-for ac_header in libavcodec/avcodec.h
++for ac_header in ffmpeg/avcodec.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+@@ -7008,7 +7008,7 @@
+ cat confdefs.h >>conftest.$ac_ext
+ cat >>conftest.$ac_ext <<_ACEOF
+ /* end confdefs.h.  */
+-#include <libavcodec/avcodec.h>
++#include <ffmpeg/avcodec.h>
+   	     #ifdef LIBAVCODEC_VERSION_INT
+                #if LIBAVCODEC_VERSION_INT >= ((51<<16)+(11<<8)+0)
+                  yes
+Index: opal/plugins/configure.ac
+===================================================================
+--- opal/plugins/configure.ac	(revision 19925)
++++ opal/plugins/configure.ac	(revision 19926)
+@@ -378,12 +378,12 @@
+     AC_CHECK_LIB(avcodec, avcodec_init, [ffmpeg_libs=true], [ffmpeg_libs=false])
+     LIBS=$saved_LIBS
+     if test "x${ffmpeg_libs}" != "xno"; then
+-        AC_CHECK_HEADERS([libavcodec/avcodec.h], [ffmpeg_headers=true], [ffmpeg_headers=false])
++        AC_CHECK_HEADERS([ffmpeg/avcodec.h], [ffmpeg_headers=true], [ffmpeg_headers=false])
+         if test "x${ffmpeg_headers}" = "xtrue"; then
+ 
+             AC_MSG_CHECKING(for libavcodec version >= 51.11.0)
+             AC_EGREP_CPP([yes],
+-            [#include <libavcodec/avcodec.h>
++            [#include <ffmpeg/avcodec.h>
+   	     #ifdef LIBAVCODEC_VERSION_INT
+                #if LIBAVCODEC_VERSION_INT >= ((51<<16)+(11<<8)+0)
+                  yes
+Index: opal/plugins/video/H.264/h264-x264.h
+===================================================================
+--- opal/plugins/video/H.264/h264-x264.h	(revision 19925)
++++ opal/plugins/video/H.264/h264-x264.h	(revision 19926)
+@@ -56,9 +56,9 @@
+ 
+ extern "C" {
+ #ifdef _MSC_VER
+-  #include "libavcodec/avcodec.h"
++  #include "ffmpeg/avcodec.h"
+ #else
+-  #include <libavcodec/avcodec.h>
++  #include <ffmpeg/avcodec.h>
+ #endif
+ };
+ 
+Index: opal/plugins/video/H.263-1998/h263pframe.h
+===================================================================
+--- opal/plugins/video/H.263-1998/h263pframe.h	(revision 19925)
++++ opal/plugins/video/H.263-1998/h263pframe.h	(revision 19926)
+@@ -28,7 +28,7 @@
+ #include "rtpframe.h"
+
+ extern "C" {
+-#include "libavcodec/avcodec.h"
++#include "ffmpeg/avcodec.h"
+ };
+
+ enum codecInFlags {
+Index: opal/plugins/video/H.263-1998/h263-1998.cxx
+===================================================================
+--- opal/plugins/video/H.263-1998/h263-1998.cxx	(revision 19925)
++++ opal/plugins/video/H.263-1998/h263-1998.cxx	(revision 19926)
+@@ -55,7 +55,7 @@
+ #include "mpi.h"
+ 
+ extern "C" {
+-#include "libavcodec/avcodec.h"
++#include "ffmpeg/avcodec.h"
+ };
+ 
+ static FFMPEGLibrary FFMPEGLibraryInstance(CODEC_ID_H263P);
+Index: opal/plugins/video/common/dyna.h
+===================================================================
+--- opal/plugins/video/common/dyna.h	(revision 19925)
++++ opal/plugins/video/common/dyna.h	(revision 19926)
+@@ -60,7 +60,7 @@
+ #include "trace.h"
+ 
+ extern "C" {
+-#include "libavcodec/avcodec.h"
++#include "ffmpeg/avcodec.h"
+ };
+ 
+ #include <vector>
+Index: opal/plugins/video/MPEG4-ffmpeg/mpeg4.cxx
+===================================================================
+--- opal/plugins/video/MPEG4-ffmpeg/mpeg4.cxx	(revision 19925)
++++ opal/plugins/video/MPEG4-ffmpeg/mpeg4.cxx	(revision 19926)
+@@ -99,7 +99,7 @@
+ #include <libavcodec/mpegvideo.h>
+ 
+ #else /* LIBAVCODEC_HAVE_SOURCE_DIR */
+-#include <libavcodec/avcodec.h>
++#include <ffmpeg/avcodec.h>
+ #endif /* LIBAVCODEC_HAVE_SOURCE_DIR */
+ }
+ 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]