[scons] fix with_pgsql
pg_config --includedir --libdir doesn't print the "-I" or "-l" prefixes, so ParseConfig can't parse it. Use pkg-config instead.
This commit is contained in:
parent
2506e21b08
commit
96e198d621
|
@ -385,14 +385,11 @@ if env['with_mysql']:
|
|||
env['LIBS'] = oldlib
|
||||
|
||||
if env['with_pgsql']:
|
||||
pg_config = checkProgram(env, 'pgsql', 'pg_config')
|
||||
oldlib = env['LIBS']
|
||||
env['LIBS'] = []
|
||||
env.ParseConfig(pg_config + ' --includedir --libdir')
|
||||
env.ParseConfig('pkg-config libpq --cflags --libs')
|
||||
env.Append(CPPFLAGS = [ '-DHAVE_PGSQL_H', '-DHAVE_LIBPGSQL' ], LIBPGSQL = 'pq')
|
||||
env['LIBS'] = oldlib
|
||||
#if autoconf.CheckLibWithHeader('pq', 'libpq-fe.h', 'C'):
|
||||
# env.Append(CPPFLAGS = [ '-DHAVE_PGSQL_H', '-DHAVE_LIBPGSQL' ], LIBPGSQL = 'pq')
|
||||
|
||||
if env['with_dbi']:
|
||||
if autoconf.CheckLibWithHeader('dbi', 'dbi/dbi.h', 'C'):
|
||||
|
|
Loading…
Reference in New Issue