Add a configure option for SSLv2 support
This commit is contained in:
parent
4967880504
commit
548cd1e726
|
|
@ -1,6 +1,7 @@
|
||||||
RUSTC := rustc
|
RUSTC := rustc
|
||||||
BUILDDIR := build
|
BUILDDIR := build
|
||||||
RUSTFLAGS := -O --cfg ndebug
|
RUSTCFGS := %RUSTCFGS%
|
||||||
|
RUSTFLAGS := -O --cfg ndebug $(RUSTCFGS)
|
||||||
INSTALL_DIR := %PREFIX%
|
INSTALL_DIR := %PREFIX%
|
||||||
|
|
||||||
OPENSSL_LIB := lib.rs
|
OPENSSL_LIB := lib.rs
|
||||||
|
|
@ -29,7 +30,7 @@ clean:
|
||||||
rm -rf $(BUILDDIR)
|
rm -rf $(BUILDDIR)
|
||||||
|
|
||||||
doc: $(OPENSSL)
|
doc: $(OPENSSL)
|
||||||
rustdoc $(OPENSSL_LIB)
|
rustdoc $(RUSTCFGS) $(OPENSSL_LIB)
|
||||||
|
|
||||||
install: $(OPENSSL)
|
install: $(OPENSSL)
|
||||||
install $(OPENSSL) $(INSTALL_DIR)
|
install $(OPENSSL) $(INSTALL_DIR)
|
||||||
|
|
|
||||||
|
|
@ -2,19 +2,27 @@
|
||||||
|
|
||||||
cd $(dirname $0)
|
cd $(dirname $0)
|
||||||
|
|
||||||
TEMP=`getopt -o "" --long prefix: -n "$0" -- "$@"`
|
TEMP=`getopt -o "" --long prefix:,enable-sslv2 -n "$0" -- "$@"`
|
||||||
|
|
||||||
if [ $? != 0 ]; then exit 1; fi
|
if [ $? != 0 ]; then exit 1; fi
|
||||||
|
|
||||||
eval set -- "$TEMP"
|
eval set -- "$TEMP"
|
||||||
|
|
||||||
PREFIX=/usr/lib
|
PREFIX=/usr/lib
|
||||||
|
RUSTCFGS=
|
||||||
|
|
||||||
while true ; do
|
while true ; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--prefix) PREFIX=$2; shift 2;;
|
--prefix) PREFIX=$2; shift 2;;
|
||||||
|
--enable-sslv2)
|
||||||
|
RUSTCFGS="$RUSTCFGS --cfg sslv2"
|
||||||
|
shift
|
||||||
|
break
|
||||||
|
;;
|
||||||
--) shift; break;;
|
--) shift; break;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
sed -e "s|%PREFIX%|$PREFIX|" < Makefile.in > Makefile
|
sed -e "s|%PREFIX%|$PREFIX|" \
|
||||||
|
-e "s|%RUSTCFGS%|$RUSTCFGS|" \
|
||||||
|
< Makefile.in > Makefile
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@ mod ffi;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
|
|
||||||
static mut INIT: Once = ONCE_INIT;
|
|
||||||
|
|
||||||
static mut VERIFY_IDX: c_int = -1;
|
static mut VERIFY_IDX: c_int = -1;
|
||||||
static mut MUTEXES: *mut ~[NativeMutex] = 0 as *mut ~[NativeMutex];
|
static mut MUTEXES: *mut ~[NativeMutex] = 0 as *mut ~[NativeMutex];
|
||||||
|
|
||||||
|
|
@ -28,6 +26,8 @@ macro_rules! try_ssl(
|
||||||
)
|
)
|
||||||
|
|
||||||
fn init() {
|
fn init() {
|
||||||
|
static mut INIT: Once = ONCE_INIT;
|
||||||
|
|
||||||
unsafe {
|
unsafe {
|
||||||
INIT.doit(|| {
|
INIT.doit(|| {
|
||||||
ffi::SSL_library_init();
|
ffi::SSL_library_init();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue