aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2012-07-02 23:04:09 +0200
committerDiego Biurrun <diego@biurrun.de>2012-07-04 15:10:08 +0200
commit112971af2667b11e8bd3d3d7e6629a0fa8b8151c (patch)
treeeae9f13d0690c9962583198844aeda20d25f6d1a
parent86ab7b0f2fc1e32924603731be9fdee0854f9e7e (diff)
downloadffmpeg-112971af2667b11e8bd3d3d7e6629a0fa8b8151c.tar.gz
configure: simplify get_version()
All libs have version headers now, which allows hardcoding the path.
-rwxr-xr-xconfigure20
1 files changed, 10 insertions, 10 deletions
diff --git a/configure b/configure
index 930fad19bf..9f70a36f74 100755
--- a/configure
+++ b/configure
@@ -3368,22 +3368,22 @@ SAMPLES:=${samples:-\$(LIBAV_SAMPLES)}
EOF
get_version(){
- name=$1
- file=$source_path/$2
+ 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
- lcname=$(tolower $name)
eval echo "${lcname}_VERSION=\$${name}_VERSION" >> config.mak
eval echo "${lcname}_VERSION_MAJOR=\$${name}_VERSION_MAJOR" >> config.mak
}
-get_version LIBAVCODEC libavcodec/version.h
-get_version LIBAVDEVICE libavdevice/version.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 LIBSWSCALE libswscale/version.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! */