configure location of pkcs11.h; refs #30

master
Marc Wäckerlin 11 years ago
parent e8fdd5ace9
commit c9457c4fdd
  1. 18
      configure.in
  2. 2
      src/cryptoki.hxx

@ -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)}

@ -10,7 +10,7 @@
// interface
#include <openssl.hxx>
#ifndef WIN32
#include <pkcs11/pkcs11.h>
#include <pkcs11.h>
#else
#include <cryptoki.h>
#endif

Loading…
Cancel
Save