diff --git a/configure.ac b/configure.ac index 2dedd884..3eeaf82c 100644 --- a/configure.ac +++ b/configure.ac @@ -547,7 +547,7 @@ if test "${enable_sm}" = "yes"; then case "${host}" in *-mingw*|*-winnt*|*-cygwin*) DEFAULT_SM_MODULE="smm-local.dll" - DEFAULT_SM_MODULE_PATH="\# module_path = \"\";" + DEFAULT_SM_MODULE_PATH="\#module_path = \"\";" ;; *-apple-*) DEFAULT_SM_MODULE="libsmm-local.dylib" @@ -626,19 +626,22 @@ if test "${enable_pcsc}" = "yes"; then AC_DEFINE([ENABLE_PCSC], [1], [Define if PC/SC is to be enabled]) fi +AC_SUBST(DYN_LIB_EXT) +case "${host}" in + *-mingw*|*-winnt*|*-cygwin*) + DYN_LIB_EXT=".dll" + ;; + *-apple-*) + DYN_LIB_EXT=".dylib" + ;; + *) + DYN_LIB_EXT=".so" + ;; +esac + if test "${with_pkcs11_provider}" = "detect"; then - case "${host}" in - *-*-darwin*) - DEFAULT_PKCS11_PROVIDER="opensc-pkcs11.so" - ;; - *-mingw*|*-winnt*|*-cygwin*) - DEFAULT_PKCS11_PROVIDER="opensc-pkcs11.dll" - ;; - *) - DEFAULT_PKCS11_PROVIDER="opensc-pkcs11.so" - ;; - esac + DEFAULT_PKCS11_PROVIDER="opensc-pkcs11${DYN_LIB_EXT}" else DEFAULT_PKCS11_PROVIDER="${with_pkcs11_provider}" fi diff --git a/etc/Makefile.am b/etc/Makefile.am index 593319eb..60e0c1be 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -22,6 +22,7 @@ opensc.conf: opensc.conf.in force -e 's|@DEFAULT_PCSC_PROVIDER[@]|$(DEFAULT_PCSC_PROVIDER)|g' \ -e 's|@DEFAULT_SM_MODULE[@]|$(DEFAULT_SM_MODULE)|g' \ -e 's|@DEFAULT_SM_MODULE_PATH[@]|$(DEFAULT_SM_MODULE_PATH)|g' \ + -e 's|@DYN_LIB_EXT[@]|$(DYN_LIB_EXT)|g' \ -e 's|@PROFILE_DIR[@]|$(PROFILE_DIR)|g' \ -e 's|@PROFILE_DIR_DEFAULT[@]|$(PROFILE_DIR_DEFAULT)|g' \ < $< > $@ diff --git a/etc/opensc.conf.in b/etc/opensc.conf.in index 68ab1191..37d4ee8e 100644 --- a/etc/opensc.conf.in +++ b/etc/opensc.conf.in @@ -12,7 +12,7 @@ app default { # A greater value means more debug info. # Default: 0 # - debug = 0; + #debug = 3; # The file to which debug output will be written # @@ -53,7 +53,7 @@ app default { # CT-API module configuration. reader_driver ctapi { - # module @libdir@/libtowitoko.so { + # module @libdir@/libtowitoko@DYN_LIB_EXT@ { # CT-API ports: # 0..3 COM1..4 # 4 Printer @@ -134,7 +134,7 @@ app default { # # card_driver customcos { # The location of the driver library - # module = @libdir@/card_customcos.so; + # module = @libdir@/card_customcos@DYN_LIB_EXT@; # } # Force using specific card driver @@ -504,7 +504,7 @@ app default { # # emulate custom { # The location of the driver library - # module = @libdir@/p15emu_custom.so; + # module = @libdir@/p15emu_custom@DYN_LIB_EXT@; # } # some additional application parameters: diff --git a/src/pkcs11/Makefile.am b/src/pkcs11/Makefile.am index 2a88caf3..448cab1b 100644 --- a/src/pkcs11/Makefile.am +++ b/src/pkcs11/Makefile.am @@ -55,14 +55,9 @@ install-exec-hook: done else # see http://wiki.cacert.org/wiki/Pkcs11TaskForce -if CYGWIN -PKCS11_SUFFIX=.dll -else -PKCS11_SUFFIX=.so -endif install-exec-hook: $(MKDIR_P) "$(DESTDIR)$(pkcs11dir)" - for l in opensc-pkcs11$(PKCS11_SUFFIX) onepin-opensc-pkcs11$(PKCS11_SUFFIX) pkcs11-spy$(PKCS11_SUFFIX); do \ + for l in opensc-pkcs11$(DYN_LIB_EXT) onepin-opensc-pkcs11$(DYN_LIB_EXT) pkcs11-spy$(DYN_LIB_EXT); do \ rm -f "$(DESTDIR)$(pkcs11dir)/$$l"; \ $(LN_S) ../$$l "$(DESTDIR)$(pkcs11dir)/$$l"; \ done