summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2017-01-18 00:36:49 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2017-01-31 14:36:15 -0500
commit2f83aac9fb757e5676120d44a07c1c5be1cf83c0 (patch)
tree07ed17f8a14039dd68e7d302866f4868b4946b67 /SConstruct
parenteda72ebfc7c47246ac4d93a14eaed98ee3f0cd30 (diff)
downloadlighttpd1.4-2f83aac9fb757e5676120d44a07c1c5be1cf83c0.tar.gz
lighttpd1.4-2f83aac9fb757e5676120d44a07c1c5be1cf83c0.zip
mod_vhostdb* (dbi,mysql,pgsql,ldap) (fixes #485, fixes #1936, fixes #2297)
mod_vhostdb - vhost docroot lookups backends: mod_vhostdb_dbi mod_vhostdb_ldap mod_vhostdb_mysql (now preferred over mod_mysql_vhost.c) mod_vhostdb_pgsql STATUS: experimental (testing and feedback appreciated) x-ref: "PostgreSQL virtual host support" https://redmine.lighttpd.net/issues/485 "LDAP Virtual Host Definition Storage Integration" https://redmine.lighttpd.net/issues/1936 "mod_dbi_vhost (patch included)" https://redmine.lighttpd.net/issues/2297
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct17
1 files changed, 17 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 015ac633..0d65d8b3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -115,6 +115,8 @@ vars.AddVariables(
('sbindir', 'binary directory', '${prefix}/sbin'),
('libdir', 'library directory', '${prefix}/lib'),
PackageVariable('with_mysql', 'enable mysql support', 'no'),
+ PackageVariable('with_pgsql', 'enable pgsql support', 'no'),
+ PackageVariable('with_dbi', 'enable dbi support', 'no'),
PackageVariable('with_xml', 'enable xml support', 'no'),
PackageVariable('with_pcre', 'enable pcre support', 'yes'),
PathVariable('CC', 'path to the c-compiler', None),
@@ -227,6 +229,7 @@ if 1:
checkTypes(autoconf, Split('pid_t size_t off_t'))
autoconf.env.Append( LIBSQLITE3 = '', LIBXML2 = '', LIBMYSQL = '', LIBZ = '',
+ LIBPGSQL = '', LIBDBI = '',
LIBBZ2 = '', LIBCRYPT = '', LIBMEMCACHED = '', LIBFCGI = '', LIBPCRE = '',
LIBLDAP = '', LIBLBER = '', LIBLUA = '', LIBDL = '', LIBUUID = '',
LIBKRB5 = '', LIBGSSAPI_KRB5 = '', LIBGDBM = '', LIBSSL = '', LIBCRYPTO = '')
@@ -362,6 +365,20 @@ if env['with_mysql']:
env.Append(CPPFLAGS = [ '-DHAVE_MYSQL_H', '-DHAVE_LIBMYSQL' ], LIBMYSQL = 'mysqlclient')
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.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'):
+ env.Append(CPPFLAGS = [ '-DHAVE_DBI_H', '-DHAVE_LIBDBI' ], LIBDBI = 'dbi')
+
if re.compile("cygwin|mingw|midipix").search(env['PLATFORM']):
env.Append(COMMON_LIB = 'bin')
elif re.compile("darwin|aix").search(env['PLATFORM']):