From c9457c4fdd14f1eef42327548912d82cce206830 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Tue, 6 May 2014 15:42:09 +0000 Subject: [PATCH] configure location of pkcs11.h; refs #30 --- configure.in | 18 ++++++++++++++++++ src/cryptoki.hxx | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index becaef5..c6a358c 100644 --- a/configure.in +++ b/configure.in @@ -94,6 +94,24 @@ AC_CHECK_PROG(have_dot, dot, yes, no) PKG_PROG_PKG_CONFIG # libraries +AC_ARG_ENABLE(pkcs11-download, + [AS_HELP_STRING([--enable-pkcs11-download], + [download pkcs11 header])], + [have_pedantic="$enableval" + if test "$enableval" = "yes"; then + mkdir -p usr/include + cd usr/include + for f in $(wget -q -O- 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 + done + CPPFLAGS="${CPPFLAGS} -I$(pwd)" + cd - + fi + ]) +dnl problem in libs: -Wshadow -Wcast-qual +dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) +AC_CHECK_HEADER([pkcs11.h], [], [AC_MSG_ERROR([Header pkcs11.h is required])]) +AC_CHECK_HEADER([wintypes.h], [], [AC_MSG_ERROR([Header wintypes.h is required])]) PKG_CHECK_MODULES([QT_GUI], [Qt5Core Qt5Gui Qt5Widgets], [AC_DEFINE([HAVE_QTGUI]) UIC=${UIC:-$(pkg-config --variable=uic_location Qt5Core)} diff --git a/src/cryptoki.hxx b/src/cryptoki.hxx index 99c0e94..5be367c 100644 --- a/src/cryptoki.hxx +++ b/src/cryptoki.hxx @@ -10,7 +10,7 @@ // interface #include #ifndef WIN32 -#include +#include #else #include #endif