Browse Source

[build] SCons support for wolfSSL

personal/stbuehler/fix-fdevent
Glenn Strauss 3 years ago
parent
commit
a950ae15ca
  1. 16
      SConstruct
  2. 3
      src/SConscript

16
SConstruct

@ -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")

3
src/SConscript

@ -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

Loading…
Cancel
Save