scons: fix sqlite_rtree linux configure test in absence of pkg-config
This commit is contained in:
parent
e26132cf9f
commit
2652649ea0
1 changed files with 5 additions and 2 deletions
|
@ -1462,7 +1462,7 @@ if not preconfigured:
|
||||||
sqlite_backup = env.Clone().Dictionary()
|
sqlite_backup = env.Clone().Dictionary()
|
||||||
# if statically linking, on linux we likely
|
# if statically linking, on linux we likely
|
||||||
# need to link sqlite to pthreads and dl
|
# need to link sqlite to pthreads and dl
|
||||||
if env['RUNTIME_LINK'] == 'static':
|
if env['RUNTIME_LINK'] == 'static' and not env['PLATFORM'] == 'Darwin':
|
||||||
if CHECK_PKG_CONFIG and conf.CheckPKG('sqlite3'):
|
if CHECK_PKG_CONFIG and conf.CheckPKG('sqlite3'):
|
||||||
sqlite_env = env.Clone()
|
sqlite_env = env.Clone()
|
||||||
try:
|
try:
|
||||||
|
@ -1472,7 +1472,10 @@ if not preconfigured:
|
||||||
env["SQLITE_LINKFLAGS"].append(lib)
|
env["SQLITE_LINKFLAGS"].append(lib)
|
||||||
env.Append(LIBS=lib)
|
env.Append(LIBS=lib)
|
||||||
except OSError,e:
|
except OSError,e:
|
||||||
pass
|
for lib in ["sqlite3","dl","pthread"]:
|
||||||
|
if not lib in env['LIBS']:
|
||||||
|
env["SQLITE_LINKFLAGS"].append("lib")
|
||||||
|
env.Append(LIBS=lib)
|
||||||
SQLITE_HAS_RTREE = conf.sqlite_has_rtree()
|
SQLITE_HAS_RTREE = conf.sqlite_has_rtree()
|
||||||
if not SQLITE_HAS_RTREE:
|
if not SQLITE_HAS_RTREE:
|
||||||
env.Replace(**sqlite_backup)
|
env.Replace(**sqlite_backup)
|
||||||
|
|
Loading…
Reference in a new issue