Files
libpcscxx/configure.ac

73 lines
2.3 KiB
Plaintext
Raw Normal View History

# $Id$
2015-03-03 15:56:02 +00:00
m4_define(x_package_name, libpcscxx)
2018-11-21 23:40:22 +00:00
m4_define(x_major, 4)
m4_define(x_minor, 0)
m4_define(x_least_diff, 423)
m4_include(ax_init_standard_project.m4)
2015-05-08 23:12:28 +00:00
AC_INIT(x_package_name, x_version, x_bugreport, x_package_name)
2015-03-03 15:56:02 +00:00
AM_INIT_AUTOMAKE([1.9 tar-pax])
AX_INIT_STANDARD_PROJECT
2009-06-17 12:24:37 +00:00
# languages
AX_USE_CXX
AX_USE_LIBTOOL
AX_USE_DOXYGEN
AX_USE_DEBIAN_PACKAGING
AX_USE_RPM_PACKAGING
#AX_USE_CPPUNIT
AX_BUILD_EXAMPLES
# special optional library download
AC_ARG_ENABLE(pkcs11-download,
[AS_HELP_STRING([--enable-pkcs11-download],
[download pkcs11 header])],
2017-04-11 10:25:14 +00:00
[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])
2017-05-03 08:31:46 +00:00
test -d ${prefix}/include || mkdir -p ${prefix}/include
cd ${prefix}/include
2017-04-11 10:25:14 +00:00
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
2017-05-03 08:31:46 +00:00
if test -f "${f##*/}"; then
rm "${f##*/}"
fi
2017-04-11 10:25:14 +00:00
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
2017-04-07 14:15:24 +00:00
AC_MSG_ERROR([download failed of pkcs11 headers - have you installed xml2?])
2017-04-11 10:25:14 +00:00
fi
AM_CPPFLAGS+=" -I$(pwd)"
cd -
fi
# qt features
AX_CHECK_QT([QTGUI], [QtCore QtGui], [QtWidgets])
2015-05-12 13:32:41 +00:00
AX_CHECK_QT([QTNETWORK], [Qt5Network >= 5.2])
CPPFLAGS="${CPPFLAGS} -DQT_NO_KEYWORDS"
# libraries used
if test -z "$MINGW"; then
2018-07-05 13:42:33 +00:00
AX_PKG_REQUIRE([pcsc], [libpcsclite], [pcsclite.h], [lib64pcsclite lib64pcsclite1 libpcsclite pcsc-lite])
AX_PKG_REQUIRE([pkcs11], [p11-kit-1], [pkcs11.h], [lib64p11-kit p11-kit libgnutls28 gnutls libpkcs11-helper1 libpkcs11-helper-1])
AX_PKG_REQUIRE([ssl], [libssl], [openssl/crypto.h], [lib64openssl openssl libopenssl])
AX_PKG_REQUIRE([crypto], [libcrypto], [openssl/crypto.h], [lib64openssl libssl openssl libopenssl])
2015-07-22 10:04:40 +00:00
else
LDFLAGS+=" -lwinscard -lssl -lcrypto"
2015-07-21 08:42:14 +00:00
fi
AX_PKG_REQUIRE([mrwcxx], [mrw-c++], [mrw/checkcxx11.hxx])
2009-06-17 12:24:37 +00:00
# create output
2017-06-09 11:50:50 +00:00
AX_OUTPUT
2017-04-11 10:25:14 +00:00
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