Make minidriver installer custom action library optional

Minidriver installer custom action library needs WiX SDK to build.

Since installer is an optional component anyway let's detect whether WiX
SDK is present on build platform and then decide whether to build installer
custom action library or not.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
This commit is contained in:
Maciej S. Szmigiero 2016-08-25 18:11:01 +02:00 committed by Frank Morgner
parent b646a306dc
commit 64f56b83d0
2 changed files with 14 additions and 1 deletions

View File

@ -800,6 +800,18 @@ if test "${enable_ctapi}" = "yes"; then
OPENSC_FEATURES="${OPENSC_FEATURES} ctapi"
fi
if test "${enable_minidriver}" = "yes"; then
AC_MSG_CHECKING([WiX SDK])
AC_CHECK_HEADERS([wcautil.h],[enable_minidriver_ca="yes"],[enable_minidriver_ca="no"])
if test "${enable_minidriver_ca}" = "yes"; then
AC_MSG_RESULT([found, minidriver setup custom action will be built])
else
AC_MSG_RESULT([not found, minidriver setup custom action will be skipped])
fi
else
enable_minidriver_ca="no"
fi
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MAJOR], [${OPENSC_VERSION_MAJOR}], [OpenSC version major component])
AC_DEFINE_UNQUOTED([OPENSC_VERSION_MINOR], [${OPENSC_VERSION_MINOR}], [OpenSC version minor component])
AC_DEFINE_UNQUOTED([OPENSC_VERSION_FIX], [${OPENSC_VERSION_FIX}], [OpenSC version fix component])
@ -864,6 +876,7 @@ AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"])
AM_CONDITIONAL([WIN32], [test "${WIN32}" = "yes"])
AM_CONDITIONAL([CYGWIN], [test "${CYGWIN}" = "yes"])
AM_CONDITIONAL([ENABLE_MINIDRIVER], [test "${enable_minidriver}" = "yes"])
AM_CONDITIONAL([ENABLE_MINIDRIVER_SETUP_CUSTOMACTION], [test "${enable_minidriver_ca}" = "yes"])
AM_CONDITIONAL([ENABLE_SM], [test "${enable_sm}" = "yes"])
AM_CONDITIONAL([ENABLE_DNIE_UI], [test "${enable_dnie_ui}" = "yes"])
AM_CONDITIONAL([ENABLE_NPATOOL], [test "${ENABLE_NPATOOL}" = "yes"])

View File

@ -7,7 +7,7 @@ EXTRA_DIST = ltrc.inc Makefile.mak Make.rules.mak \
versioninfo.rc.in winconfig.h.in OpenSC.iss.in OpenSC.wxs.in versioninfo-customactions.rc.in
dist_noinst_HEADERS = versioninfo.rc winconfig.h OpenSC.iss OpenSC.wxs license.rtf OpenSC.ico dlgbmp.bmp bannrbmp.bmp
if ENABLE_MINIDRIVER
if ENABLE_MINIDRIVER_SETUP_CUSTOMACTION
lib_LTLIBRARIES = customactions@LIBRARY_BITNESS@.la
AM_CPPFLAGS = -I$(top_srcdir)