[build] SCons support for wolfSSL

This commit is contained in:
Glenn Strauss 2018-10-07 18:07:46 -04:00
parent 778b07a034
commit a950ae15ca
2 changed files with 19 additions and 0 deletions

View File

@ -251,6 +251,7 @@ vars.AddVariables(
BoolVariable('with_memcached', 'enable memcached support', 'no'),
PackageVariable('with_mysql', 'enable mysql support', 'no'),
BoolVariable('with_openssl', 'enable openssl support', 'no'),
PackageVariable('with_wolfssl', 'enable wolfSSL support', 'no'),
BoolVariable('with_pam', 'enable PAM auth support', 'no'),
PackageVariable('with_pcre', 'enable pcre support', 'yes'),
PackageVariable('with_pgsql', 'enable pgsql support', 'no'),
@ -582,6 +583,21 @@ if 1:
LIBCRYPTO = 'crypto',
)
if env['with_wolfssl']:
if type(env['with_wolfssl']) is str:
autoconf.env.AppendUnique(
CPPPATH = [ env['with_wolfssl'] + '/include',
env['with_wolfssl'] + '/include/wolfssl' ],
LIBPATH = [ env['with_wolfssl'] + '/lib' ],
)
if not autoconf.CheckLibWithHeader('wolfssl', 'wolfssl/ssl.h', 'C'):
fail("Couldn't find wolfssl")
autoconf.env.Append(
CPPFLAGS = [ '-DHAVE_WOLFSSL_SSL_H' ],
LIBSSL = '',
LIBCRYPTO = 'wolfssl',
)
if env['with_pam']:
if not autoconf.CheckLibWithHeader('pam', 'security/pam_appl.h', 'C'):
fail("Couldn't find pam")

View File

@ -173,6 +173,9 @@ if env['with_sasl']:
if env['with_openssl']:
modules['mod_openssl'] = { 'src' : [ 'mod_openssl.c' ], 'lib' : [ env['LIBSSL'], env['LIBCRYPTO'] ] }
if env['with_wolfssl']:
modules['mod_openssl'] = { 'src' : [ 'mod_openssl.c' ], 'lib' : [ env['LIBCRYPTO'], 'm' ] }
staticenv = env.Clone(CPPFLAGS=[ env['CPPFLAGS'], '-DLIGHTTPD_STATIC' ])
## all the core-sources + the modules