build: More robust failure on missing or old nasm.
authorBradley Sepos <bradley@bradleysepos.com>
Wed, 10 Jan 2018 07:43:36 +0000 (02:43 -0500)
committerBradley Sepos <bradley@bradleysepos.com>
Wed, 10 Jan 2018 07:43:36 +0000 (02:43 -0500)
Since Linux and similar use system x264, avoid failure on missing/old nasm, since it should not be needed.

make/configure.py

index f4025981139cbc347f2603b1a0384191c6585e17..0fa7e9a3ba7c403fdf80b06d3699bcbf0e57b122 100644 (file)
@@ -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: