3 # AX_PROG_YASM_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE])
7 # Makes sure that yasm supports the version indicated. If true
8 # the shell commands in ACTION-IF-TRUE are executed. If not the shell
9 # commands in ACTION-IF-FALSE are run. Note if $YASM is not set
10 # (for example by running AX_WITH_PROG) the macro will fail.
14 # AX_WITH_PROG(YASM,yasm)
15 # AX_PROG_YASM_VERSION([1.1.1],[ ... ],[ ... ])
19 # ax_prog_python_version.m4
21 # Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
23 # Copying and distribution of this file, with or without modification, are
24 # permitted in any medium without royalty provided the copyright notice
25 # and this notice are preserved. This file is offered as-is, without any
28 # ax_prog_yasm_version.m4
30 # Copyright (c) 2013 Vivek Thampi <vivekthampi@users.sourceforge.net>
33 AC_DEFUN([AX_PROG_YASM_VERSION],[
34 AC_REQUIRE([AC_PROG_SED])
35 AC_REQUIRE([AC_PROG_GREP])
38 AS_IF([test -n "$YASM"],[
41 AC_MSG_CHECKING([for yasm version])
43 yasm_version=`$YASM --version 2>&1 | $GREP "^yasm " | $SED -e 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\)/\1/'`
45 AC_MSG_RESULT($yasm_version)
47 AC_SUBST([YASM_VERSION],[$yasm_version])
49 AX_COMPARE_VERSION([$ax_yasm_version],[le],[$yasm_version],[
57 AC_MSG_WARN([could not find the yasm])