From f78f28132d0d0ece7830afd503928d9effe5fdbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Wed, 3 May 2017 08:31:46 +0000 Subject: [PATCH] fix build with download enabled --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index e8148b9..2f1ff5d 100644 --- a/configure.ac +++ b/configure.ac @@ -26,9 +26,12 @@ AC_ARG_ENABLE(pkcs11-download, if test "$download_pkcs11" != "no"; then AC_MSG_NOTICE([downloading pkcs11 library headers]) - test -d usr/include || mkdir -p usr/include - cd usr/include + test -d ${prefix}/include || mkdir -p ${prefix}/include + cd ${prefix}/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 + if test -f "${f##*/}"; then + rm "${f##*/}" + fi wget --unlink $f if ! test -f "${f##*/}"; then AC_MSG_ERROR([download failed of pkcs11 header file: $f])