fallback if pkg-config fails for libcurl or libpq
This commit is contained in:
parent
f1dd07fd64
commit
1dd481f8f7
2 changed files with 8 additions and 2 deletions
|
@ -42,7 +42,10 @@ plugin_env['LIBS'] = []
|
|||
if env['RUNTIME_LINK'] == 'static':
|
||||
# pkg-config is more reliable than pg_config across platforms
|
||||
cmd = 'pkg-config libcurl --libs --static'
|
||||
plugin_env.ParseConfig(cmd)
|
||||
try:
|
||||
plugin_env.ParseConfig(cmd)
|
||||
except OSError, e:
|
||||
plugin_env.Append(LIBS='curl')
|
||||
else:
|
||||
plugin_env.Append(LIBS='curl')
|
||||
|
||||
|
|
|
@ -40,7 +40,10 @@ plugin_env['LIBS'] = []
|
|||
if env['RUNTIME_LINK'] == 'static':
|
||||
# pkg-config is more reliable than pg_config across platforms
|
||||
cmd = 'pkg-config libpq --libs --static'
|
||||
plugin_env.ParseConfig(cmd)
|
||||
try:
|
||||
plugin_env.ParseConfig(cmd)
|
||||
except OSError, e:
|
||||
plugin_env.Append(LIBS='pq')
|
||||
else:
|
||||
plugin_env.Append(LIBS='pq')
|
||||
|
||||
|
|
Loading…
Reference in a new issue