fallback if pkg-config fails for libcurl or libpq

This commit is contained in:
Dane Springmeyer 2014-04-09 09:40:40 -04:00
parent f1dd07fd64
commit 1dd481f8f7
2 changed files with 8 additions and 2 deletions

View file

@ -42,7 +42,10 @@ plugin_env['LIBS'] = []
if env['RUNTIME_LINK'] == 'static': if env['RUNTIME_LINK'] == 'static':
# pkg-config is more reliable than pg_config across platforms # pkg-config is more reliable than pg_config across platforms
cmd = 'pkg-config libcurl --libs --static' cmd = 'pkg-config libcurl --libs --static'
plugin_env.ParseConfig(cmd) try:
plugin_env.ParseConfig(cmd)
except OSError, e:
plugin_env.Append(LIBS='curl')
else: else:
plugin_env.Append(LIBS='curl') plugin_env.Append(LIBS='curl')

View file

@ -40,7 +40,10 @@ plugin_env['LIBS'] = []
if env['RUNTIME_LINK'] == 'static': if env['RUNTIME_LINK'] == 'static':
# pkg-config is more reliable than pg_config across platforms # pkg-config is more reliable than pg_config across platforms
cmd = 'pkg-config libpq --libs --static' cmd = 'pkg-config libpq --libs --static'
plugin_env.ParseConfig(cmd) try:
plugin_env.ParseConfig(cmd)
except OSError, e:
plugin_env.Append(LIBS='pq')
else: else:
plugin_env.Append(LIBS='pq') plugin_env.Append(LIBS='pq')