mirror of
https://github.com/ModOrganizer2/udis86.git
synced 2026-07-27 14:05:57 -07:00
Add configure check for yasm version (>= 1.2.0)
This commit is contained in:
+5
-4
@@ -50,13 +50,14 @@ if test "x$PYTHON" = "x"; then
|
||||
AC_MSG_ERROR( [Python not found. Use --with-python to specify path to python binary] )
|
||||
fi
|
||||
|
||||
# Yasm for testing
|
||||
# Yasm (>= 1.2.0) for testing
|
||||
AX_WITH_PROG(YASM,yasm)
|
||||
AM_CONDITIONAL(HAVE_YASM, [test ! -z "$YASM"])
|
||||
AX_PROG_YASM_VERSION([1.2.0],[ac_have_yasm_version=1],[])
|
||||
AM_CONDITIONAL(HAVE_YASM, [test -n "$ac_have_yasm_version"])
|
||||
|
||||
# Sphix for documentation
|
||||
# Sphinx (>= 1.1.3) for documentation
|
||||
AX_WITH_PROG(SPHINX_BUILD,sphinx-build)
|
||||
AX_PROG_SPHINX([1.1.3],[ac_have_sphinx_version=1][])
|
||||
AX_PROG_SPHINX([1.1.3],[ac_have_sphinx_version=1],[])
|
||||
AM_CONDITIONAL(HAVE_SPHINX_DOC, [test -n "$ac_have_sphinx_version"])
|
||||
|
||||
AC_CHECK_HEADERS([assert.h stdio.h])
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_PROG_YASM_VERSION([VERSION],[ACTION-IF-TRUE],[ACTION-IF-FALSE])
|
||||
#
|
||||
# DESCRIPTION
|
||||
#
|
||||
# Makes sure that yasm supports the version indicated. If true
|
||||
# the shell commands in ACTION-IF-TRUE are executed. If not the shell
|
||||
# commands in ACTION-IF-FALSE are run. Note if $YASM is not set
|
||||
# (for example by running AX_WITH_PROG) the macro will fail.
|
||||
#
|
||||
# Example:
|
||||
#
|
||||
# AX_WITH_PROG(YASM,yasm)
|
||||
# AX_PROG_YASM_VERSION([1.1.1],[ ... ],[ ... ])
|
||||
#
|
||||
# LICENSE
|
||||
#
|
||||
# ax_prog_python_version.m4
|
||||
#
|
||||
# Copyright (c) 2009 Francesco Salvestrini <salvestrini@users.sourceforge.net>
|
||||
#
|
||||
# Copying and distribution of this file, with or without modification, are
|
||||
# permitted in any medium without royalty provided the copyright notice
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
#
|
||||
# ax_prog_yasm_version.m4
|
||||
#
|
||||
# Copyright (c) 2013 Vivek Thampi <vivekthampi@users.sourceforge.net>
|
||||
|
||||
|
||||
AC_DEFUN([AX_PROG_YASM_VERSION],[
|
||||
AC_REQUIRE([AC_PROG_SED])
|
||||
AC_REQUIRE([AC_PROG_GREP])
|
||||
|
||||
|
||||
AS_IF([test -n "$YASM"],[
|
||||
ax_yasm_version="$1"
|
||||
|
||||
AC_MSG_CHECKING([for yasm version])
|
||||
changequote(<<,>>)
|
||||
yasm_version=`$YASM --version 2>&1 | $GREP "^yasm " | $SED -e 's/^.* \([0-9]*\.[0-9]*\.[0-9]*\)/\1/'`
|
||||
changequote([,])
|
||||
AC_MSG_RESULT($yasm_version)
|
||||
|
||||
AC_SUBST([YASM_VERSION],[$yasm_version])
|
||||
|
||||
AX_COMPARE_VERSION([$ax_yasm_version],[le],[$yasm_version],[
|
||||
:
|
||||
$2
|
||||
],[
|
||||
:
|
||||
$3
|
||||
])
|
||||
],[
|
||||
AC_MSG_WARN([could not find the yasm])
|
||||
$3
|
||||
])
|
||||
])
|
||||
Reference in New Issue
Block a user