From a8decf24f7fad57104babffe20398a31201cd3db Mon Sep 17 00:00:00 2001 From: k-m_schindler Date: Mon, 2 Apr 2012 14:23:40 +0000 Subject: macro for detection of the ffmpeg version git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@2852 b956fd51-792f-4845-bead-9b4dfca2ff2c --- dists/autogen/m4/ffmpeg_version.m4 | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dists/autogen/m4/ffmpeg_version.m4 diff --git a/dists/autogen/m4/ffmpeg_version.m4 b/dists/autogen/m4/ffmpeg_version.m4 new file mode 100644 index 00000000..276b5799 --- /dev/null +++ b/dists/autogen/m4/ffmpeg_version.m4 @@ -0,0 +1,28 @@ +# This file is part of UltraStar Deluxe +# Created by the UltraStar Deluxe Team + +# SYNOPSIS +# +# AC_FFMPEG_VERSION +# +# DESCRIPTION +# +# Determines version of ffmpeg. +# +# Description of the steps of the command line +# +# 1) redirect stderr and stdout to stdout +# I did not manage in sh, therefore invoke bash +# 2) grep for the lines with "ffmpeg" +# 3) grep for the line without "version" +# 4) cut out the 2nd word, with ' ' as a separator. +# + +AC_DEFUN([AC_FFMPEG_VERSION], +[ + AC_MSG_CHECKING([for ffmpeg version]) + FFMPEG_VERSION=$(bash -c 'ffmpeg -version' 2>&1 | grep ffmpeg | grep -v version | cut -f2 -d\ ) + AX_EXTRACT_VERSION(FFMPEG, $FFMPEG_VERSION) + AC_MSG_RESULT(@<:@$FFMPEG_VERSION@:>@) + AC_SUBST(FFMPEG_VERSION) +]) -- cgit v1.2.3