diff options
author | Måns Rullgård <mans@mansr.com> | 2008-02-26 21:18:55 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-02-26 21:18:55 +0000 |
commit | 147e7692074d68bc002d9f395a79d2a74f1222b0 (patch) | |
tree | 61bae9d4743a115e4307d1ed8f2bc5937c9b46d3 /configure | |
parent | e08e6bb6f2fdb07017ccc8a44255ca1eba234c3e (diff) | |
download | ffmpeg-147e7692074d68bc002d9f395a79d2a74f1222b0.tar.gz |
simplify version number extraction
Originally committed as revision 12247 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 39 |
1 files changed, 20 insertions, 19 deletions
@@ -2009,31 +2009,32 @@ fi get_version(){ name=$1 file=$source_path/$2 - printf '%s.%s.%s' $(grep "#define ${name}_VERSION_M" "$file" | sed 's/[^0-9]//g') + eval $(grep "#define ${name}_VERSION_M" "$file" | awk '{ print $2"="$3 }') + eval ${name}_VERSION=\$${name}_VERSION_MAJOR.\$${name}_VERSION_MINOR.\$${name}_VERSION_MICRO } -sws_version=$(get_version LIBSWSCALE libswscale/swscale.h) -pp_version=$(get_version LIBPOSTPROC libpostproc/postprocess.h) -lavc_version=$(get_version LIBAVCODEC libavcodec/avcodec.h) -lavd_version=$(get_version LIBAVDEVICE libavdevice/avdevice.h) -lavf_version=$(get_version LIBAVFORMAT libavformat/avformat.h) -lavu_version=$(get_version LIBAVUTIL libavutil/avutil.h) +get_version LIBSWSCALE libswscale/swscale.h +get_version LIBPOSTPROC libpostproc/postprocess.h +get_version LIBAVCODEC libavcodec/avcodec.h +get_version LIBAVDEVICE libavdevice/avdevice.h +get_version LIBAVFORMAT libavformat/avformat.h +get_version LIBAVUTIL libavutil/avutil.h if enabled shared; then echo "BUILD_SHARED=yes" >> config.mak echo "PIC=-fPIC -DPIC" >> config.mak - echo "SPPMAJOR=${pp_version%%.*}" >> config.mak - echo "SPPVERSION=$pp_version" >> config.mak - echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak - echo "LAVCVERSION=$lavc_version" >> config.mak - echo "LAVDMAJOR=${lavd_version%%.*}" >> config.mak - echo "LAVDVERSION=$lavd_version" >> config.mak - echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak - echo "LAVFVERSION=$lavf_version" >> config.mak - echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak - echo "LAVUVERSION=$lavu_version" >> config.mak - echo "SWSMAJOR=${sws_version%%.*}" >> config.mak - echo "SWSVERSION=$sws_version" >> config.mak + echo "SPPMAJOR=$LIBPOSTPROC_VERSION_MAJOR" >> config.mak + echo "SPPVERSION=$LIBPOSTPROC_VERSION" >> config.mak + echo "LAVCMAJOR=$LIBAVCODEC_VERSION_MAJOR" >> config.mak + echo "LAVCVERSION=$LIBAVCODEC_VERSION" >> config.mak + echo "LAVDMAJOR=$LIBAVDEVICE_VERSION_MAJOR" >> config.mak + echo "LAVDVERSION=$LIBAVDEVICE_VERSION" >> config.mak + echo "LAVFMAJOR=$LIBAVFORMAT_VERSION_MAJOR" >> config.mak + echo "LAVFVERSION=$LIBAVFORMAT_VERSION" >> config.mak + echo "LAVUMAJOR=$LIBAVUTIL_VERSION_MAJOR" >> config.mak + echo "LAVUVERSION=$LIBAVUTIL_VERSION" >> config.mak + echo "SWSMAJOR=$LIBSWSCALE_VERSION_MAJOR" >> config.mak + echo "SWSVERSION=$LIBSWSCALE_VERSION" >> config.mak echo "SLIBNAME=${SLIBNAME}" >> config.mak echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak |