build fixed for windows

master
Marc Wäckerlin 8 years ago
parent bb52e6438e
commit 0a511bc9e7
  1. 2
      COPYING
  2. 16
      ChangeLog
  3. 2
      INSTALL
  4. 39
      ax_check_qt.m4
  5. 42
      configure.ac
  6. 8
      src/suisseid.hxx

@ -1 +1 @@
/usr/share/automake-1.14/COPYING
/usr/share/automake-1.15/COPYING

@ -1,3 +1,19 @@
2017-04-07 14:15
* [r396] COPYING, ChangeLog, INSTALL, configure.ac,
src/suisseid.hxx:
fixed recently introduced bug
2017-04-06 12:52
* [r395] configure.ac:
typo
2017-04-06 12:44
* [r394] configure.ac, src/suisseid.hxx:
improved build scripts
2017-02-08 18:48
* [r393] configure.ac:

@ -1 +1 @@
/usr/share/automake-1.14/INSTALL
/usr/share/automake-1.15/INSTALL

@ -51,18 +51,33 @@
AC_DEFUN([AX_CXX_QT_TOOL], [
PKG_PROG_PKG_CONFIG
if test -z "$HAVE_$1"; then
if test -z "${HAVE_$1}"; then
HAVE_$1=1
AC_MSG_CHECKING([for $2])
AC_ARG_VAR([$1], [path to Qt tool $2])
$1=${$1:-$(${PKG_CONFIG} --variable=$2_location Qt5Core)}
$1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2-qt5}
$1=${$1:-$(${PKG_CONFIG} --variable=host_bins Qt5Core)/$2}
$1=${$1:-$(${PKG_CONFIG} --variable=$2_location QtCore)}
$1=${$1:-$(${PKG_CONFIG} --variable=host_bins QtCore)/$2}
$1=${$1:-$(${PKG_CONFIG} --variable=host_bins QtCore)/$2-qt4}
if ! which "${$1%% *}" > /dev/null; then
if which "$2-qt5" > /dev/null; then
for package in Qt5Core QtCore; do
if test -x "${$1}"; then
break
fi
tool=$(${PKG_CONFIG} --variable=$2_location $package 2> /dev/null)
if test -x "${tool}"; then
$1="${tool}"
break
fi
tool=$(${PKG_CONFIG} --variable=host_bins $package 2> /dev/null)
if test -n "$tool"; then
for name in $2 $2-qt5 $2-qt4; do
if test -x "${tool}/${name}"; then
$1="${tool}/${name}"
break
fi
done
fi
done
if ! test -x "${$1}"; then
if which "$2" > /dev/null; then
$1=$2
elif which "$2-qt5" > /dev/null; then
$1=$2-qt5
elif which "$2" > /dev/null; then
$1=$2
@ -70,15 +85,15 @@ AC_DEFUN([AX_CXX_QT_TOOL], [
$1=$2-qt4
else
HAVE_$1=0
$1=""
unset $1
fi
fi
AC_SUBST($1)
AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1)
if test $HAVE_$1 -eq 1; then
AC_MSG_RESULT([$$1])
AC_MSG_RESULT([$$1])
else
AC_MSG_RESULT([not found])
AC_MSG_RESULT([not found])
fi
fi
])

@ -21,24 +21,25 @@ AX_BUILD_EXAMPLES
AC_ARG_ENABLE(pkcs11-download,
[AS_HELP_STRING([--enable-pkcs11-download],
[download pkcs11 header])],
[have_pedantic="$enableval"
AC_MSG_NOTICE([downloading pkcs11 library headers])
if test "$enableval" = "yes"; then
test -d usr/include || mkdir -p 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
wget --unlink $f
if ! test -f "${f##*/}"; then
AC_MSG_ERROR([download failed of pkcs11 header file: $f])
fi
done
if ! test -f cryptoki.h; then
[download_pkcs11="$enableval"],
[if test -z "$MINGW"; then download_pkcs11="no"; else download_pkcs11="yes"; fi])
if test "$download_pkcs11" != "no"; then
AC_MSG_NOTICE([downloading pkcs11 library headers])
test -d usr/include || mkdir -p 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
wget --unlink $f
if ! test -f "${f##*/}"; then
AC_MSG_ERROR([download failed of pkcs11 header file: $f])
fi
done
if ! test -f cryptoki.h; then
AC_MSG_ERROR([download failed of pkcs11 headers - have you installed xml2?])
fi
AM_CPPFLAGS+=" -I$(pwd)"
cd -
fi
])
fi
AM_CPPFLAGS+=" -I$(pwd)"
cd -
fi
# qt features
AX_CHECK_QT([QTGUI], [QtCore QtGui], [QtWidgets])
@ -64,3 +65,10 @@ AX_PKG_REQUIRE([mrwcxx], [mrw-c++], [mrw/checkcxx11.hxx])
# create output
AC_OUTPUT
if test "${HAVE_QTGUI}" -ne 1; then
AC_MSG_WARN([QtGui not found, ${HAVE_QTGUI} Qt GUI features disabled])
fi
if test "${HAVE_QTNETWORK}" -ne 1; then
AC_MSG_WARN([QtNetwork5 not found, ${HAVE_QTNETWORK} Qt Network features disabled])
fi

@ -13,7 +13,6 @@
#include <pcsc.hxx>
#include <mrw/vector.hxx>
#include <mrw/checkcxx11.hxx>
#include <mrw/regexp.hxx>
#include <memory>
/*! @defgroup gsuisseid C++ library to access SuisseID smart cards
@ -394,12 +393,7 @@ namespace suisseid {
virtual CertStatus certStatus() {
try {
Certificate auth(authenticationCertificate());
//auth.subjectInfo(serialNumber);
// if (mrw::RegExp("^$[0-9]{4}-[0-9]{4}-[0-9]{4}-[0-9]{4}")
// (auth.subjectInfo(serialNumber))) {
// _type = SUISSE_ID;
Certificate sig(digitalSignatureCertificate());
// }
Certificate sig(digitalSignatureCertificate());
return VALID;
} catch (const no_auth& x) {
return MISSING;

Loading…
Cancel
Save