diff options
author | Måns Rullgård <mans@mansr.com> | 2008-02-17 00:00:10 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2008-02-17 00:00:10 +0000 |
commit | 719c8e00efc8e28fd112b16e75069454e6fd8df7 (patch) | |
tree | fc9fba9853c701f69599cca47ebb0a6c39a39333 | |
parent | 73ef89807e27e39e400264766296318cb313a285 (diff) | |
download | ffmpeg-719c8e00efc8e28fd112b16e75069454e6fd8df7.tar.gz |
prettify lib* version number extraction
Originally committed as revision 12128 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rwxr-xr-x | configure | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -2002,14 +2002,18 @@ if enabled texi2html; then echo "BUILD_DOC=yes" >> config.mak fi -sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]//g'` -pp_version=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libpostproc/postprocess.h" | sed 's/[^0-9\.]//g'` -lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'` -lavd_version=`grep '#define LIBAVDEVICE_VERSION ' "$source_path/libavdevice/avdevice.h" | sed 's/[^0-9\.]//g'` -lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'` -lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'` - - +get_version(){ + name=$1 + file=$source_path/$2 + grep "#define ${name}_VERSION " "$file" | sed 's/[^0-9\.]//g' +} + +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) if enabled shared; then echo "BUILD_SHARED=yes" >> config.mak |