Files
xen/tools/blktap2/drivers/check_gcrypt
T
Keir Fraser f1fa336b59 blktap2: fix libgcrypt detection
If we want to check the functionality of libgcrypt, we shouldn't test
a function only exported by openssl, but instead the one actually used
in the code.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
2009-11-23 06:42:12 +00:00

19 lines
251 B
Bash

#!/bin/sh
cat > .gcrypt.c << EOF
#include <gcrypt.h>
int main(void)
{
gcry_md_hash_buffer(GCRY_MD_MD5, NULL, NULL, 0);
return 0;
}
EOF
if $1 -o .gcrypt .gcrypt.c -lgcrypt 2>/dev/null ; then
echo "yes"
else
echo "no"
fi
rm -f .gcrypt*