From: Gabe Black Date: Sun, 7 Feb 2021 11:29:38 +0000 (-0800) Subject: scons: Merge redundant checks for the socket library. X-Git-Tag: develop-gem5-snapshot~81 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e375bbba4e159f14a5ac6582aa1e4abbcaac5d54;p=gem5.git scons: Merge redundant checks for the socket library. scons can accept more than one library at a time, so lets check for both at once instead of writing out almost the same check twice. Change-Id: I82f9bdf59a349e28ca75a615d711051256ec73a4 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40869 Tested-by: kokoro Maintainer: Gabe Black Reviewed-by: Andreas Sandberg --- diff --git a/SConstruct b/SConstruct index d0fd852a0..09029f637 100755 --- a/SConstruct +++ b/SConstruct @@ -588,10 +588,9 @@ if main['USE_PYTHON']: warning('Python version too new. Python 3 expected.') # On Solaris you need to use libsocket for socket ops -if not conf.CheckLibWithHeader(None, 'sys/socket.h', 'C++', 'accept(0,0,0);'): - if not conf.CheckLibWithHeader('socket', 'sys/socket.h', - 'C++', 'accept(0,0,0);'): - error("Can't find library with socket calls (e.g. accept()).") +if not conf.CheckLibWithHeader( + [None, 'socket'], 'sys/socket.h', 'C++', 'accept(0,0,0);'): + error("Can't find library with socket calls (e.g. accept()).") # Check for zlib. If the check passes, libz will be automatically # added to the LIBS environment variable.