Browse Source

Add --without-ssl configure option

v0.7.4-release
Ryan Dahl 15 years ago
parent
commit
a9b962a653
  1. 37
      wscript

37
wscript

@ -38,6 +38,12 @@ def set_options(opt):
, help='Build using system libraries and headers (like a debian build) [Default: False]' , help='Build using system libraries and headers (like a debian build) [Default: False]'
, dest='system' , dest='system'
) )
opt.add_option( '--without-ssl'
, action='store_true'
, default=False
, help='Build without SSL'
, dest='without_ssl'
)
def configure(conf): def configure(conf):
conf.check_tool('compiler_cxx') conf.check_tool('compiler_cxx')
@ -68,23 +74,24 @@ def configure(conf):
if sys.platform.startswith("freebsd"): if sys.platform.startswith("freebsd"):
conf.fatal("Install the libexecinfo port from /usr/ports/devel/libexecinfo.") conf.fatal("Install the libexecinfo port from /usr/ports/devel/libexecinfo.")
if conf.check_cfg(package='openssl', if not Options.options.without_ssl:
args='--cflags --libs', if conf.check_cfg(package='openssl',
uselib_store='OPENSSL'): args='--cflags --libs',
conf.env["USE_OPENSSL"] = True uselib_store='OPENSSL'):
conf.env.append_value("CXXFLAGS", "-DHAVE_OPENSSL=1")
else:
libssl = conf.check_cc(lib='ssl',
header_name='openssl/ssl.h',
function_name='SSL_library_init',
libpath=['/usr/lib', '/usr/local/lib', '/opt/local/lib', '/usr/sfw/lib'],
uselib_store='OPENSSL')
libcrypto = conf.check_cc(lib='crypto',
header_name='openssl/crypto.h',
uselib_store='OPENSSL')
if libcrypto and libssl:
conf.env["USE_OPENSSL"] = True conf.env["USE_OPENSSL"] = True
conf.env.append_value("CXXFLAGS", "-DHAVE_OPENSSL=1") conf.env.append_value("CXXFLAGS", "-DHAVE_OPENSSL=1")
else:
libssl = conf.check_cc(lib='ssl',
header_name='openssl/ssl.h',
function_name='SSL_library_init',
libpath=['/usr/lib', '/usr/local/lib', '/opt/local/lib', '/usr/sfw/lib'],
uselib_store='OPENSSL')
libcrypto = conf.check_cc(lib='crypto',
header_name='openssl/crypto.h',
uselib_store='OPENSSL')
if libcrypto and libssl:
conf.env["USE_OPENSSL"] = True
conf.env.append_value("CXXFLAGS", "-DHAVE_OPENSSL=1")
conf.check(lib='rt', uselib_store='RT') conf.check(lib='rt', uselib_store='RT')

Loading…
Cancel
Save