2001-07-14 00:06:14 +04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $RoughId: test.sh,v 1.5 2001/07/13 15:38:27 knu Exp $
|
|
|
|
# $Id$
|
|
|
|
|
|
|
|
RUBY=${RUBY:=ruby}
|
|
|
|
MAKE=${MAKE:=make}
|
|
|
|
CFLAGS=${CFLAGS:=-Wall}
|
|
|
|
|
|
|
|
${RUBY} extconf.rb --with-cflags="${CFLAGS}"
|
|
|
|
${MAKE} clean
|
|
|
|
${MAKE}
|
|
|
|
|
|
|
|
mkdir -p lib/digest
|
|
|
|
|
|
|
|
for algo in md5 rmd160 sha1 sha2; do
|
2002-09-26 21:55:16 +04:00
|
|
|
args=--with-cflags="${CFLAGS}"
|
|
|
|
|
|
|
|
if [ $WITH_BUNDLED_ENGINES ]; then
|
|
|
|
args="$args --with-bundled-$algo"
|
|
|
|
fi
|
|
|
|
|
2001-07-14 00:06:14 +04:00
|
|
|
(cd $algo &&
|
2002-09-26 21:55:16 +04:00
|
|
|
${RUBY} extconf.rb $args;
|
2001-07-14 00:06:14 +04:00
|
|
|
${MAKE} clean;
|
|
|
|
${MAKE})
|
|
|
|
ln -sf ../../$algo/$algo.so lib/digest/
|
|
|
|
done
|
|
|
|
|
2002-09-26 21:55:16 +04:00
|
|
|
${RUBY} -I. -I./lib test.rb
|
2001-07-14 00:06:14 +04:00
|
|
|
|
|
|
|
rm lib/digest/*.so
|
|
|
|
rmdir lib/digest
|