summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure29
1 files changed, 20 insertions, 9 deletions
diff --git a/configure b/configure
index aac77951e1..6ac4051ab5 100755
--- a/configure
+++ b/configure
@@ -3812,6 +3812,16 @@ NOREDZONE_FLAGS=$noredzone_flags
EOF
get_version(){
+ lcname=$1
+ name=$(toupper $lcname)
+ file=$source_path/$lcname/version.h
+ eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }')
+ eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO
+ eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
+ eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
+}
+
+get_version_old(){
name=$1
file=$source_path/$2
# This condition will be removed when we stop supporting old libpostproc versions
@@ -3824,15 +3834,16 @@ fi
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
}
-get_version LIBAVCODEC libavcodec/version.h
-get_version LIBAVDEVICE libavdevice/avdevice.h
-get_version LIBAVFILTER libavfilter/version.h
-get_version LIBAVFORMAT libavformat/version.h
-get_version LIBAVRESAMPLE libavresample/version.h
-get_version LIBAVUTIL libavutil/version.h
-get_version LIBPOSTPROC libpostproc/postprocess.h
-get_version LIBSWRESAMPLE libswresample/swresample.h
-get_version LIBSWSCALE libswscale/swscale.h
+get_version_old LIBPOSTPROC libpostproc/postprocess.h
+get_version_old LIBSWRESAMPLE libswresample/swresample.h
+
+get_version libavcodec
+get_version libavdevice
+get_version libavfilter
+get_version libavformat
+get_version libavresample
+get_version libavutil
+get_version libswscale
cat > $TMPH <<EOF
/* Automatically generated by configure - do not modify! */