check_c_headers from tuple array to dictionary
This commit is contained in:
parent
0ca8542329
commit
e9b2af91cf
|
@ -987,9 +987,10 @@ if selected_platform in platform_list:
|
||||||
# Check for the existence of headers
|
# Check for the existence of headers
|
||||||
conf = Configure(env)
|
conf = Configure(env)
|
||||||
if "check_c_headers" in env:
|
if "check_c_headers" in env:
|
||||||
for header in env["check_c_headers"]:
|
headers = env["check_c_headers"]
|
||||||
if conf.CheckCHeader(header[0]):
|
for header in headers:
|
||||||
env.AppendUnique(CPPDEFINES=[header[1]])
|
if conf.CheckCHeader(header):
|
||||||
|
env.AppendUnique(CPPDEFINES=[headers[header]])
|
||||||
|
|
||||||
elif selected_platform != "":
|
elif selected_platform != "":
|
||||||
if selected_platform == "list":
|
if selected_platform == "list":
|
||||||
|
|
|
@ -4,4 +4,4 @@ Import("env")
|
||||||
|
|
||||||
env.add_source_files(env.drivers_sources, "*.cpp")
|
env.add_source_files(env.drivers_sources, "*.cpp")
|
||||||
|
|
||||||
env["check_c_headers"] = [["mntent.h", "HAVE_MNTENT"]]
|
env["check_c_headers"] = {"mntent.h": "HAVE_MNTENT"}
|
||||||
|
|
Loading…
Reference in New Issue