From 697da25ef38acc65d46da4d1823281daaf948e11 Mon Sep 17 00:00:00 2001 From: Bradley Sepos Date: Wed, 10 Jan 2018 02:43:36 -0500 Subject: [PATCH] build: More robust failure on missing or old nasm. Since Linux and similar use system x264, avoid failure on missing/old nasm, since it should not be needed. --- make/configure.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/make/configure.py b/make/configure.py index f40259811..0fa7e9a3b 100644 --- a/make/configure.py +++ b/make/configure.py @@ -1524,7 +1524,7 @@ try: ranlib = ToolProbe( 'RANLIB.exe', 'ranlib' ) strip = ToolProbe( 'STRIP.exe', 'strip' ) tar = ToolProbe( 'TAR.exe', 'gtar', 'tar' ) - nasm = ToolProbe( 'NASM.exe', 'nasm', abort=True, minversion=[2,13,0] ) + nasm = ToolProbe( 'NASM.exe', 'nasm', abort=False, minversion=[2,13,0] ) yasm = ToolProbe( 'YASM.exe', 'yasm', abort=False, minversion=[1,2,0] ) autoconf = ToolProbe( 'AUTOCONF.exe', 'autoconf', abort=False ) automake = ToolProbe( 'AUTOMAKE.exe', 'automake', abort=False ) @@ -1585,6 +1585,13 @@ try: for action in Action.actions: action.run() + ## fail on missing or old nasm where needed + if host.match( '*-*-darwin*' ) or options.cross: + if Tools.nasm.fail: + raise AbortError( 'error: nasm missing\n' ) + elif Tools.nasm.version.inadequate(): + raise AbortError( 'error: minimum required nasm version is %s and %s is %s\n' % ('.'.join([str(i) for i in Tools.nasm.version.minversion]),Tools.nasm.pathname,Tools.nasm.version.svers) ) + ## enable local yasm when yasm probe fails or version is too old ## x264 requires 1.2.0+ if not options.enable_local_yasm: -- 2.40.0