scons: Explicit the config option HAVE_PKG_CONFIG type boolean

The scons function Detect will return the program name if the program
is exists in the system. However, the HAVE_PKG_CONFIG is used to
check the pkg-config program is exists and it should be the boolean
type.

Change-Id: I18c4813d36eea68b8851a41db41777bdb2a80b7b
This commit is contained in:
Roger Chang
2023-10-20 11:37:59 +08:00
parent fe20f4ada6
commit 1a7014c653

View File

@@ -636,7 +636,7 @@ for variant_path in variant_paths:
LINKFLAGS=['-Wl,--no-as-needed', '-lprofiler',
'-Wl,--as-needed'])
env['HAVE_PKG_CONFIG'] = env.Detect('pkg-config')
env['HAVE_PKG_CONFIG'] = env.Detect('pkg-config') == 'pkg-config'
with gem5_scons.Configure(env) as conf:
# On Solaris you need to use libsocket for socket ops