The patch is inspired by something I read in the Debian discussion.
Libav and FFmpeg could be installed side by side without conflicts in
the libraries, thanks to using additional suffixes.

However development/include files are still conflicting, so I thought
of a simple configure hack to give more control to FFmpeg.

With this patch you can do `./configure --extra-incdir="/ffmpeg" ` ,
as result the header files would be installed in
"/usr/local/include/ffmpeg"
e.g.
"/usr/local/include/ffmpeg/libavcodec/avcodec.h"
...

The change is reflected in the pkgconfig files too. Since applications
that link to libraries with addition suffixes should be using
pkgconfig, they would be using the correct header includes
automatically.


I did just a rudimentary test and I couldn't spot anything wrong.
Please test it before inclusion.


As for the future, it might be good idea next major release (e.g. 3.0)
to have the $prefix/include/ffmpeg as default include path (for
non-comapt build).


Best Regards
   Ivan Kalvachev
  iive
From 5760ef5c29c02f5e137d4af3199eb71371b02ce1 Mon Sep 17 00:00:00 2001
From: Ivan Kalvachev <ikalvac...@gmail.com>
Date: Mon, 4 Aug 2014 21:40:48 +0300
Subject: [PATCH] Implement --extra-incdir=SUFFIX

Signed-off-by: Ivan Kalvachev <ikalvac...@gmail.com>
---
 configure | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 0ac6132..8c29f52 100755
--- a/configure
+++ b/configure
@@ -302,6 +302,7 @@ Toolchain options:
   --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]
   --extra-ldexeflags=ELDFLAGS add ELDFLAGS to LDEXEFLAGS [$LDEXEFLAGS]
   --extra-libs=ELIBS       add ELIBS [$ELIBS]
+  --extra-incdir=SUFFIX    add suffix to include directory []
   --extra-version=STRING   version string suffix []
   --optflags=OPTFLAGS      override optimization-related compiler flags
   --build-suffix=SUFFIX    library name suffix []
@@ -1901,6 +1902,7 @@ CMDLINE_SET="
     cxx
     dep_cc
     doxygen
+    extra_incdir
     extra_version
     gas
     host_cc
@@ -5434,7 +5436,7 @@ FFMPEG_CONFIGURATION=$FFMPEG_CONFIGURATION
 prefix=$prefix
 LIBDIR=\$(DESTDIR)$libdir
 SHLIBDIR=\$(DESTDIR)$shlibdir
-INCDIR=\$(DESTDIR)$incdir
+INCDIR=\$(DESTDIR)$incdir${extra_incdir}
 BINDIR=\$(DESTDIR)$bindir
 DATADIR=\$(DESTDIR)$datadir
 DOCDIR=\$(DESTDIR)$docdir
@@ -5653,7 +5655,7 @@ pkgconfig_generate(){
 prefix=$prefix
 exec_prefix=\${prefix}
 libdir=$libdir
-includedir=$incdir
+includedir=$incdir$extra_incdir
 
 Name: $name
 Description: $comment
-- 
1.8.4

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to