|
|
@ -22,17 +22,18 @@ AC_ARG_ENABLE(pkcs11-download, |
|
|
|
[AS_HELP_STRING([--enable-pkcs11-download], |
|
|
|
[AS_HELP_STRING([--enable-pkcs11-download], |
|
|
|
[download pkcs11 header])], |
|
|
|
[download pkcs11 header])], |
|
|
|
[have_pedantic="$enableval" |
|
|
|
[have_pedantic="$enableval" |
|
|
|
|
|
|
|
AC_MSG_NOTICE([downloading pkcs11 library headers]) |
|
|
|
if test "$enableval" = "yes"; then |
|
|
|
if test "$enableval" = "yes"; then |
|
|
|
test -d usr/include || mkdir -p usr/include |
|
|
|
test -d usr/include || mkdir -p usr/include |
|
|
|
cd usr/include |
|
|
|
cd usr/include |
|
|
|
for f in $(wget -qO- ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/ 2>&1 | html2 | sed -n 's,.*/a/@href=\(.*\.h\)$,\1,gp'); do |
|
|
|
for f in $(wget -qO- ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-11/v2-20/ 2>&1 | html2 | sed -n 's,.*/a/@href=\(.*\.h\)$,\1,gp'); do |
|
|
|
wget --unlink $f |
|
|
|
wget --unlink $f |
|
|
|
if ! test -f "${f##*/}"; then |
|
|
|
if ! test -f "${f##*/}"; then |
|
|
|
AC_MSG_ERROR([download failed of PKCS11 header file: $f]) |
|
|
|
AC_MSG_ERROR([download failed of pkcs11 header file: $f]) |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
done |
|
|
|
if ! test -f cryptoki.h; then |
|
|
|
if ! test -f cryptoki.h; then |
|
|
|
AC_MSG_ERROR([download failed of PKCS11 - have you installed xml2?]) |
|
|
|
AC_MSG_ERROR([download failed of pkcs11 headers - have you installed xml2?]) |
|
|
|
fi |
|
|
|
fi |
|
|
|
AM_CPPFLAGS+=" -I$(pwd)" |
|
|
|
AM_CPPFLAGS+=" -I$(pwd)" |
|
|
|
cd - |
|
|
|
cd - |
|
|
|