summaryrefslogtreecommitdiff
authorAlexander Strasser <eclipse7@gmx.net>2012-01-24 01:54:57 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2012-01-24 16:01:10 (GMT)
commit79f80f5c1f6e292af5d6413600e7129d36cb9be6 (patch)
tree961a032b00220f43798cacf420461f12c50ebe43
parent5dfc7f73427de2c079a1cd0683696dad963f0288 (diff)
downloadffmpeg-79f80f5c1f6e292af5d6413600e7129d36cb9be6.zip
ffmpeg-79f80f5c1f6e292af5d6413600e7129d36cb9be6.tar.gz
ffmpeg-79f80f5c1f6e292af5d6413600e7129d36cb9be6.tar.bz2
build: Allow building old API/ABI libpostproc version
Allows our users to still build against a libpostproc with the old API/ABI. Distributions can use this option to defer the soname bump. Signed-off-by: Alexander Strasser <eclipse7@gmx.net> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rwxr-xr-xconfigure31
-rw-r--r--libpostproc/postprocess.h2
2 files changed, 32 insertions, 1 deletions
diff --git a/configure b/configure
index 2a3975e..f3553e9 100755
--- a/configure
+++ b/configure
@@ -262,6 +262,8 @@ Advanced options (experts only):
--enable-sram allow use of on-chip SRAM
--disable-symver disable symbol versioning
--optflags override optimization-related compiler flags
+ --postproc-version=V build libpostproc version V.
+ Where V can be '$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO' or 'current'. [$postproc_version_default]
Developer options (useful when working on FFmpeg itself):
--enable-coverage build with test coverage instrumentation
@@ -1319,6 +1321,7 @@ CMDLINE_SET="
target_exec
target_os
target_path
+ postproc_version
valgrind
yasmexe
"
@@ -1789,6 +1792,7 @@ incdir_default='${prefix}/include'
libdir_default='${prefix}/lib'
mandir_default='${prefix}/share/man'
shlibdir_default="$libdir_default"
+postproc_version_default="current"
# toolchain
ar_default="ar"
@@ -1816,6 +1820,12 @@ cpu="generic"
target_os_default=$(tolower $(uname -s))
host_os=$target_os_default
+# alternative libpostproc version
+ALT_PP_VER_MAJOR=51
+ALT_PP_VER_MINOR=2
+ALT_PP_VER_MICRO=101
+ALT_PP_VER=$ALT_PP_VER_MAJOR.$ALT_PP_VER_MINOR.$ALT_PP_VER_MICRO
+
# configurable options
enable $PROGRAM_LIST
@@ -2022,7 +2032,17 @@ if enabled cross_compile; then
die "Must specify target arch and OS when cross-compiling"
fi
-set_default arch target_os
+set_default arch target_os postproc_version
+
+# Check if we should build alternative libpostproc version instead of current
+if test "$postproc_version" = $ALT_PP_VER; then
+ LIBPOSTPROC_VERSION=$ALT_PP_VER
+ LIBPOSTPROC_VERSION_MAJOR=$ALT_PP_VER_MAJOR
+ LIBPOSTPROC_VERSION_MINOR=$ALT_PP_VER_MINOR
+ LIBPOSTPROC_VERSION_MICRO=$ALT_PP_VER_MICRO
+elif test "$postproc_version" != current; then
+ die "Invalid argument to --postproc-version. See --help output."
+fi
ar_default="${cross_prefix}${ar_default}"
cc_default="${cross_prefix}${cc_default}"
@@ -3591,8 +3611,11 @@ EOF
get_version(){
name=$1
file=$source_path/$2
+# This condition will be removed when we stop supporting old libpostproc versions
+if ! test "$name" = LIBPOSTPROC || test "$postproc_version" = current; then
eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
+fi
lcname=$(tolower $name)
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
@@ -3669,6 +3692,12 @@ cat > $TMPH <<EOF
#define AVUTIL_AVCONFIG_H
EOF
+test "$postproc_version" != current && cat >> $TMPH <<EOF
+#define LIBPOSTPROC_VERSION_MAJOR $LIBPOSTPROC_VERSION_MAJOR
+#define LIBPOSTPROC_VERSION_MINOR $LIBPOSTPROC_VERSION_MINOR
+#define LIBPOSTPROC_VERSION_MICRO $LIBPOSTPROC_VERSION_MICRO
+EOF
+
print_config AV_HAVE_ $TMPH $HAVE_LIST_PUB
echo "#endif /* AVUTIL_AVCONFIG_H */" >> $TMPH
diff --git a/libpostproc/postprocess.h b/libpostproc/postprocess.h
index 64e63da..c2c5c73 100644
--- a/libpostproc/postprocess.h
+++ b/libpostproc/postprocess.h
@@ -29,9 +29,11 @@
#include "libavutil/avutil.h"
+#ifndef LIBPOSTPROC_VERSION_MAJOR
#define LIBPOSTPROC_VERSION_MAJOR 52
#define LIBPOSTPROC_VERSION_MINOR 0
#define LIBPOSTPROC_VERSION_MICRO 100
+#endif
#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
LIBPOSTPROC_VERSION_MINOR, \