aboutsummaryrefslogtreecommitdiffstats
path: root/dists/autogen/m4
diff options
context:
space:
mode:
authork-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-04-02 14:23:40 +0000
committerk-m_schindler <k-m_schindler@b956fd51-792f-4845-bead-9b4dfca2ff2c>2012-04-02 14:23:40 +0000
commita8decf24f7fad57104babffe20398a31201cd3db (patch)
tree13640d99d3ead7a6102892dfec0b7318398b77fb /dists/autogen/m4
parent866342529e4fc07c2ee2bc835d537ce55a5a0ee7 (diff)
downloadusdx-a8decf24f7fad57104babffe20398a31201cd3db.tar.gz
usdx-a8decf24f7fad57104babffe20398a31201cd3db.tar.xz
usdx-a8decf24f7fad57104babffe20398a31201cd3db.zip
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
Diffstat (limited to 'dists/autogen/m4')
-rw-r--r--dists/autogen/m4/ffmpeg_version.m428
1 files changed, 28 insertions, 0 deletions
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)
+])