#!/bin/sh -x

# This file will build stunnel if run with the cwd in a stunnel 4.xx tree.
# --seph  (updating yak's)

prefix=/mit/crypto
eprefix=/mit/crypto/arch/$ATHENA_SYS
LDFLAGS="-Wl,-R${eprefix}/lib -L${eprefix}/lib"
CPPFLAGS="-I${eprefix}/include"
export LDFLAGS CPPFLAGS

rm -f config.cache
./configure --with-ssl=$eprefix \
	    --enable-dh \
            --prefix=$prefix \
	    --exec-prefix=$eprefix \
	    --quiet



# make needs to inherit LDFLAGS, because configure does not store them
make


# NOTE: stunnel 4 dumps stuff in sbin. so you'll have to make a symlink
# or deal otherwise
