[pkg-opensc-commit] [SCM] OpenSC packaging branch, upstream, updated. 344699b200fdb3fd976faee1a7ef1a6da97526a5

Eric Dorland eric at debian.org
Sat Sep 22 08:29:24 UTC 2007


The branch, upstream has been updated
       via  344699b200fdb3fd976faee1a7ef1a6da97526a5 (commit)
      from  b0825fd1d9b3f3d18c5622277eafe77994eb8edb (commit)


- Shortlog ------------------------------------------------------------
344699b Imported opensc-0.11.4

Summary of changes:
 Makefile.in                      |    8 +-
 NEWS                             |    8 +
 aclocal.m4                       | 1104 +-------------------------------------
 aclocal/Makefile.am              |    2 +-
 aclocal/Makefile.in              |   10 +-
 aclocal/libassuan.m4             |  160 ++++++
 configure                        |  824 ++++++-----------------------
 configure.in                     |   44 ++-
 doc/AKIS.html                    |   30 +
 doc/AuthorsAndCredits.html       |    1 +
 doc/CardOs.html                  |    7 +
 doc/ChangeLog                    |  203 +++++++-
 doc/Makefile.in                  |    8 +-
 doc/OperatingSystems.html        |    2 +-
 doc/PrimeCard.html               |    9 +
 doc/PuTTYcard.html               |   29 +
 doc/ReleaseHowto.html            |    2 +-
 doc/TurkishEid.html              |    6 +
 doc/index.html                   |    2 +
 etc/Makefile.in                  |    8 +-
 man/Makefile.in                  |    8 +-
 man/cardos-info.1                |    4 +-
 man/cryptoflex-tool.1            |    4 +-
 man/netkey-tool.1                |    4 +-
 man/opensc-config.1              |    4 +-
 man/opensc-explorer.1            |    4 +-
 man/opensc-tool.1                |    4 +-
 man/pkcs11-tool.1                |    4 +-
 man/pkcs15-crypt.1               |    4 +-
 man/pkcs15-init.1                |    4 +-
 man/pkcs15-profile.5             |    4 +-
 man/pkcs15-tool.1                |    4 +-
 man/sc_app_info_t.3              |    4 +-
 man/sc_append_record.3           |    4 +-
 man/sc_asn1_decode.3             |    4 +-
 man/sc_asn1_encode.3             |    4 +-
 man/sc_asn1_entry.3              |    4 +-
 man/sc_asn1_find_tag.3           |    4 +-
 man/sc_asn1_print_tags.3         |    4 +-
 man/sc_asn1_put_tag.3            |    4 +-
 man/sc_asn1_read_tag.3           |    4 +-
 man/sc_asn1_skip_tag.3           |    4 +-
 man/sc_asn1_verify_tag.3         |    4 +-
 man/sc_base64_decode.3           |    4 +-
 man/sc_base64_encode.3           |    4 +-
 man/sc_card_ctl.3                |    4 +-
 man/sc_card_t.3                  |    4 +-
 man/sc_card_valid.3              |    4 +-
 man/sc_check_sw.3                |    4 +-
 man/sc_connect_card.3            |    4 +-
 man/sc_copy_asn1_entry.3         |    4 +-
 man/sc_create_file.3             |    4 +-
 man/sc_delete_file.3             |    4 +-
 man/sc_delete_record.3           |    4 +-
 man/sc_der_clear.3               |    4 +-
 man/sc_der_copy.3                |    4 +-
 man/sc_detect_card_presence.3    |    4 +-
 man/sc_disconnect_card.3         |    4 +-
 man/sc_enum_apps.3               |    4 +-
 man/sc_establish_context.3       |    4 +-
 man/sc_file_dup.3                |    4 +-
 man/sc_file_free.3               |    4 +-
 man/sc_file_new.3                |    4 +-
 man/sc_file_t.3                  |    4 +-
 man/sc_find_app_by_aid.3         |    4 +-
 man/sc_find_pkcs15_app.3         |    4 +-
 man/sc_format_apdu.3             |    4 +-
 man/sc_format_asn1_entry.3       |    4 +-
 man/sc_free_apps.3               |    4 +-
 man/sc_get_cache_dir.3           |    4 +-
 man/sc_get_challenge.3           |    4 +-
 man/sc_get_data.3                |    4 +-
 man/sc_list_files.3              |    4 +-
 man/sc_lock.3                    |    4 +-
 man/sc_make_cache_dir.3          |    4 +-
 man/sc_put_data.3                |    4 +-
 man/sc_read_binary.3             |    4 +-
 man/sc_read_record.3             |    4 +-
 man/sc_release_context.3         |    4 +-
 man/sc_select_file.3             |    4 +-
 man/sc_set_card_driver.3         |    4 +-
 man/sc_strerror.3                |    4 +-
 man/sc_transmit_apdu.3           |    4 +-
 man/sc_unlock.3                  |    4 +-
 man/sc_update_binary.3           |    4 +-
 man/sc_update_dir.3              |    4 +-
 man/sc_update_record.3           |    4 +-
 man/sc_wait_for_event.3          |    4 +-
 man/sc_write_binary.3            |    4 +-
 man/sc_write_record.3            |    4 +-
 src/Makefile.in                  |    8 +-
 src/common/Makefile.in           |    8 +-
 src/include/Makefile.in          |    8 +-
 src/include/opensc/Makefile.in   |    8 +-
 src/include/winconfig.h          |    2 +-
 src/libopensc/Makefile.am        |    6 +-
 src/libopensc/Makefile.in        |   26 +-
 src/libopensc/Makefile.mak       |    2 +-
 src/libopensc/asn1.c             |    7 +-
 src/libopensc/card-akis.c        |  525 ++++++++++++++++++
 src/libopensc/card-cardos.c      |    9 +-
 src/libopensc/cards.h            |    7 +-
 src/libopensc/ctx.c              |    3 +-
 src/libopensc/opensc.h           |    1 +
 src/libopensc/pkcs15-pubkey.c    |    4 +-
 src/libopensc/pkcs15-sec.c       |   25 +
 src/libopensc/pkcs15.c           |    6 +
 src/libopensc/pkcs15.h           |    1 +
 src/openssh/Makefile.in          |    8 +-
 src/pkcs11/Makefile.am           |    4 +-
 src/pkcs11/Makefile.in           |   12 +-
 src/pkcs15init/Makefile.am       |    2 +-
 src/pkcs15init/Makefile.in       |   10 +-
 src/pkcs15init/pkcs15-cardos.c   |    2 +-
 src/scconf/Makefile.in           |    8 +-
 src/signer/Makefile.am           |    9 +-
 src/signer/Makefile.in           |   16 +-
 src/signer/npinclude/Makefile.in |    8 +-
 src/tests/Makefile.am            |    2 +-
 src/tests/Makefile.in            |   10 +-
 src/tests/regression/Makefile.in |    8 +-
 src/tools/Makefile.am            |    2 +-
 src/tools/Makefile.in            |   12 +-
 src/tools/cardos-info.c          |   11 +
 src/tools/cryptoflex-tool.c      |    2 +-
 src/tools/opensc-explorer.c      |    3 +-
 src/tools/pkcs11-tool.c          |    1 +
 win32/Makefile.in                |    8 +-
 win32/version.rc                 |    8 +-
 129 files changed, 1526 insertions(+), 2027 deletions(-)
-----------------------------------------------------------------------
Details of changes:

commit 344699b200fdb3fd976faee1a7ef1a6da97526a5
Author: Eric Dorland <eric at debian.org>
Date:   Sat Sep 22 03:53:00 2007 -0400

    Imported opensc-0.11.4
    
    Summary: Imported opensc-0.11.4
    Keywords:
    
    Imported opensc-0.11.4
    into Git repository

diff --git a/Makefile.in b/Makefile.in
index b348c71..14631c4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -44,7 +44,7 @@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
 subdir = .
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -99,6 +99,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -123,7 +125,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -131,8 +132,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/NEWS b/NEWS
index 3882957..e08bc44 100644
--- a/NEWS
+++ b/NEWS
@@ -6,6 +6,14 @@ http://www.opensc-project.org/opensc/wiki/WhatsNew
 Also see the svn changelog using svn command
 or doc/ChangeLog.
 
+New in 0.11.4; 2007-09-10; Andreas Jellinghaus
+* Drop AC_LIB_LINKFLAGS for libltdl and aclocal/lib* files.
+* New configure option to disable building nsplugin.
+* Support Siemens CardOS initialized cards (signing with decryption)
+* Add Siemens CardOS M4.2B support (experimental, don't have such a card)
+* Support for AKIS cards added (partial so far) by  Gürer Özen.
+* add aclocal/libassuan.m4 back so developers don't need assuan installed.
+
 New in 0.11.3; 2007-07-11; Andreas Jellinghaus
 * added regression test for raw rsa (crypt0007).
 * regression suite can now use installed binaries with --installed.
diff --git a/aclocal.m4 b/aclocal.m4
index e1de3a4..c55dbe4 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -11,1109 +11,6 @@
 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 # PARTICULAR PURPOSE.
 
-# lib-ld.m4 serial 3 (gettext-0.13)
-dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Subroutines of libtool.m4,
-dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
-dnl with libtool.m4.
-
-dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
-AC_DEFUN([AC_LIB_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
-*)
-  acl_cv_prog_gnu_ld=no ;;
-esac])
-with_gnu_ld=$acl_cv_prog_gnu_ld
-])
-
-dnl From libtool-1.4. Sets the variable LD.
-AC_DEFUN([AC_LIB_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  AC_MSG_CHECKING([for ld used by GCC])
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [[\\/]* | [A-Za-z]:[\\/]*)]
-      [re_direlt='/[^/][^/]*/\.\./']
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  AC_MSG_CHECKING([for GNU ld])
-else
-  AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(acl_cv_path_LD,
-[if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break ;;
-      *)
-	test "$with_gnu_ld" != yes && break ;;
-      esac
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  AC_MSG_RESULT($LD)
-else
-  AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_LIB_PROG_LD_GNU
-])
-
-# lib-link.m4 serial 9 (gettext-0.16)
-dnl Copyright (C) 2001-2006 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-AC_PREREQ(2.50)
-
-dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
-dnl augments the CPPFLAGS variable.
-AC_DEFUN([AC_LIB_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
-    AC_LIB_LINKFLAGS_BODY([$1], [$2])
-    ac_cv_lib[]Name[]_libs="$LIB[]NAME"
-    ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
-    ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
-  ])
-  LIB[]NAME="$ac_cv_lib[]Name[]_libs"
-  LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
-  INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
-  dnl results of this search when this library appears as a dependency.
-  HAVE_LIB[]NAME=yes
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
-dnl searches for libname and the libraries corresponding to explicit and
-dnl implicit dependencies, together with the specified include files and
-dnl the ability to compile and link the specified testcode. If found, it
-dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
-dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
-dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
-dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
-AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  AC_REQUIRE([AC_LIB_RPATH])
-  define([Name],[translit([$1],[./-], [___])])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-
-  dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
-  dnl accordingly.
-  AC_LIB_LINKFLAGS_BODY([$1], [$2])
-
-  dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
-  dnl because if the user has installed lib[]Name and not disabled its use
-  dnl via --without-lib[]Name-prefix, he wants to use it.
-  ac_save_CPPFLAGS="$CPPFLAGS"
-  AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
-
-  AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
-    ac_save_LIBS="$LIBS"
-    LIBS="$LIBS $LIB[]NAME"
-    AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
-    LIBS="$ac_save_LIBS"
-  ])
-  if test "$ac_cv_lib[]Name" = yes; then
-    HAVE_LIB[]NAME=yes
-    AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
-    AC_MSG_CHECKING([how to link with lib[]$1])
-    AC_MSG_RESULT([$LIB[]NAME])
-  else
-    HAVE_LIB[]NAME=no
-    dnl If $LIB[]NAME didn't lead to a usable library, we don't need
-    dnl $INC[]NAME either.
-    CPPFLAGS="$ac_save_CPPFLAGS"
-    LIB[]NAME=
-    LTLIB[]NAME=
-  fi
-  AC_SUBST([HAVE_LIB]NAME)
-  AC_SUBST([LIB]NAME)
-  AC_SUBST([LTLIB]NAME)
-  undefine([Name])
-  undefine([NAME])
-])
-
-dnl Determine the platform dependent parameters needed to use rpath:
-dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
-dnl hardcode_direct, hardcode_minus_L.
-AC_DEFUN([AC_LIB_RPATH],
-[
-  dnl Tell automake >= 1.10 to complain if config.rpath is missing.
-  m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
-  AC_REQUIRE([AC_PROG_CC])                dnl we use $CC, $GCC, $LDFLAGS
-  AC_REQUIRE([AC_LIB_PROG_LD])            dnl we use $LD, $with_gnu_ld
-  AC_REQUIRE([AC_CANONICAL_HOST])         dnl we use $host
-  AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
-  AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-  ])
-  wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
-  dnl Determine whether the user wants rpath handling at all.
-  AC_ARG_ENABLE(rpath,
-    [  --disable-rpath         do not hardcode runtime library paths],
-    :, enable_rpath=yes)
-])
-
-dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
-dnl the libraries corresponding to explicit and implicit dependencies.
-dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
-AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
-[
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
-                               [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib$1-prefix],
-[  --with-lib$1-prefix[=DIR]  search for lib$1 in DIR/include and DIR/lib
-  --without-lib$1-prefix     don't search for lib$1 in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-])
-  dnl Search the library and its dependencies in $additional_libdir and
-  dnl $LDFLAGS. Using breadth-first-seach.
-  LIB[]NAME=
-  LTLIB[]NAME=
-  INC[]NAME=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='$1 $2'
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-        dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
-        dnl or AC_LIB_HAVE_LINKFLAGS call.
-        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
-          else
-            dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
-            dnl that this library doesn't exist. So just drop it.
-            :
-          fi
-        else
-          dnl Search the library lib$name in $additional_libdir and $LDFLAGS
-          dnl and the already constructed $LIBNAME/$LTLIBNAME.
-          found_dir=
-          found_la=
-          found_so=
-          found_a=
-          if test $use_additional = yes; then
-            if test -n "$shlibext" \
-               && { test -f "$additional_libdir/lib$name.$shlibext" \
-                    || { test "$shlibext" = dll \
-                         && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
-              found_dir="$additional_libdir"
-              if test -f "$additional_libdir/lib$name.$shlibext"; then
-                found_so="$additional_libdir/lib$name.$shlibext"
-              else
-                found_so="$additional_libdir/lib$name.dll.a"
-              fi
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
-                fi
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIB[]NAME; do
-              AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" \
-                     && { test -f "$dir/lib$name.$shlibext" \
-                          || { test "$shlibext" = dll \
-                               && test -f "$dir/lib$name.dll.a"; }; }; then
-                    found_dir="$dir"
-                    if test -f "$dir/lib$name.$shlibext"; then
-                      found_so="$dir/lib$name.$shlibext"
-                    else
-                      found_so="$dir/lib$name.dll.a"
-                    fi
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
-                    fi
-                  else
-                    if test -f "$dir/lib$name.$libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
-                      fi
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-            dnl Found the library.
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-              dnl Linking with a shared library. We attempt to hardcode its
-              dnl directory into the executable's runpath, unless it's the
-              dnl standard /usr/lib.
-              if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
-                dnl No hardcoding is needed.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-              else
-                dnl Use an explicit option to hardcode DIR into the resulting
-                dnl binary.
-                dnl Potentially add DIR to ltrpathdirs.
-                dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                dnl The hardcoding into $LIBNAME is system dependent.
-                if test "$hardcode_direct" = yes; then
-                  dnl Using DIR/libNAME.so during linking hardcodes DIR into the
-                  dnl resulting binary.
-                  LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                else
-                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-                    dnl Use an explicit option to hardcode DIR into the resulting
-                    dnl binary.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    dnl Potentially add DIR to rpathdirs.
-                    dnl The rpathdirs will be appended to $LIBNAME at the end.
-                    haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                    dnl Rely on "-L$found_dir".
-                    dnl But don't add it if it's already contained in the LDFLAGS
-                    dnl or the already constructed $LIBNAME
-                    haveit=
-                    for x in $LDFLAGS $LIB[]NAME; do
-                      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
-                    fi
-                    if test "$hardcode_minus_L" != no; then
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
-                    else
-                      dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
-                      dnl here, because this doesn't fit in flags passed to the
-                      dnl compiler. So give up. No hardcoding. This affects only
-                      dnl very old systems.
-                      dnl FIXME: Not sure whether we should use
-                      dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
-                      dnl here.
-                      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                dnl Linking with a static library.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
-              else
-                dnl We shouldn't come here, but anyway it's good to have a
-                dnl fallback.
-                LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
-              fi
-            fi
-            dnl Assume the include files are nearby.
-            additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-              dnl Potentially add $additional_includedir to $INCNAME.
-              dnl But don't add it
-              dnl   1. if it's the standard /usr/include,
-              dnl   2. if it's /usr/local/include and we are using GCC on Linux,
-              dnl   3. if it's already present in $CPPFLAGS or the already
-              dnl      constructed $INCNAME,
-              dnl   4. if it doesn't exist as a directory.
-              if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INC[]NAME; do
-                    AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                      dnl Really add $additional_includedir to $INCNAME.
-                      INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-            dnl Look for dependencies.
-            if test -n "$found_la"; then
-              dnl Read the .la file. It defines the variables
-              dnl dlname, library_names, old_library, dependency_libs, current,
-              dnl age, revision, installed, dlopen, dlpreopen, libdir.
-              save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-              dnl We use only dependency_libs.
-              for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                    dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
-                    dnl But don't add it
-                    dnl   1. if it's the standard /usr/lib,
-                    dnl   2. if it's /usr/local/lib and we are using GCC on Linux,
-                    dnl   3. if it's already present in $LDFLAGS or the already
-                    dnl      constructed $LIBNAME,
-                    dnl   4. if it doesn't exist as a directory.
-                    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LIBNAME.
-                            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIB[]NAME; do
-                          AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                            dnl Really add $additional_libdir to $LTLIBNAME.
-                            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                      dnl Potentially add DIR to rpathdirs.
-                      dnl The rpathdirs will be appended to $LIBNAME at the end.
-                      haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                      dnl Potentially add DIR to ltrpathdirs.
-                      dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
-                      haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                    dnl Handle this in the next round.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                    dnl Handle this in the next round. Throw away the .la's
-                    dnl directory; it is already contained in a preceding -L
-                    dnl option.
-                    names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                    dnl Most likely an immediate library name.
-                    LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
-                    LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-            dnl Didn't find the library; assume it is in the system directories
-            dnl known to the linker and runtime loader. (All the system
-            dnl directories known to the linker should also be known to the
-            dnl runtime loader, otherwise the system is severely misconfigured.)
-            LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
-            LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; then
-      dnl Weird platform: only the last -rpath option counts, the user must
-      dnl pass all path elements in one option. We can arrange that for a
-      dnl single library, but not when more than one $LIBNAMEs are used.
-      alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
-      done
-      dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
-      acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-    else
-      dnl The -rpath options are cumulative.
-      for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-    dnl When using libtool, the option that works for both libraries and
-    dnl executables is -R. The -R options are cumulative.
-    for found_dir in $ltrpathdirs; do
-      LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
-    done
-  fi
-])
-
-dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
-dnl unless already present in VAR.
-dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
-dnl contains two or three consecutive elements that belong together.
-AC_DEFUN([AC_LIB_APPENDTOVAR],
-[
-  for element in [$2]; do
-    haveit=
-    for x in $[$1]; do
-      AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      [$1]="${[$1]}${[$1]:+ }$element"
-    fi
-  done
-])
-
-dnl For those cases where a variable contains several -L and -l options
-dnl referring to unknown libraries and directories, this macro determines the
-dnl necessary additional linker options for the runtime path.
-dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
-dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
-dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
-dnl otherwise linking without libtool is assumed.
-AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
-[
-  AC_REQUIRE([AC_LIB_RPATH])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  $1=
-  if test "$enable_rpath" != no; then
-    if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-      dnl Use an explicit option to hardcode directories into the resulting
-      dnl binary.
-      rpathdirs=
-      next=
-      for opt in $2; do
-        if test -n "$next"; then
-          dir="$next"
-          dnl No need to hardcode the standard /usr/lib.
-          if test "X$dir" != "X/usr/$acl_libdirstem"; then
-            rpathdirs="$rpathdirs $dir"
-          fi
-          next=
-        else
-          case $opt in
-            -L) next=yes ;;
-            -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
-                 dnl No need to hardcode the standard /usr/lib.
-                 if test "X$dir" != "X/usr/$acl_libdirstem"; then
-                   rpathdirs="$rpathdirs $dir"
-                 fi
-                 next= ;;
-            *) next= ;;
-          esac
-        fi
-      done
-      if test "X$rpathdirs" != "X"; then
-        if test -n ""$3""; then
-          dnl libtool is used for linking. Use -R options.
-          for dir in $rpathdirs; do
-            $1="${$1}${$1:+ }-R$dir"
-          done
-        else
-          dnl The linker is used for linking directly.
-          if test -n "$hardcode_libdir_separator"; then
-            dnl Weird platform: only the last -rpath option counts, the user
-            dnl must pass all path elements in one option.
-            alldirs=
-            for dir in $rpathdirs; do
-              alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
-            done
-            acl_save_libdir="$libdir"
-            libdir="$alldirs"
-            eval flag=\"$hardcode_libdir_flag_spec\"
-            libdir="$acl_save_libdir"
-            $1="$flag"
-          else
-            dnl The -rpath options are cumulative.
-            for dir in $rpathdirs; do
-              acl_save_libdir="$libdir"
-              libdir="$dir"
-              eval flag=\"$hardcode_libdir_flag_spec\"
-              libdir="$acl_save_libdir"
-              $1="${$1}${$1:+ }$flag"
-            done
-          fi
-        fi
-      fi
-    fi
-  fi
-  AC_SUBST([$1])
-])
-
-# lib-prefix.m4 serial 5 (gettext-0.15)
-dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-
-dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
-dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
-dnl require excessive bracketing.
-ifdef([AC_HELP_STRING],
-[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
-[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
-
-dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
-dnl to access previously installed libraries. The basic assumption is that
-dnl a user will want packages to use other packages he previously installed
-dnl with the same --prefix option.
-dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
-dnl libraries, but is otherwise very convenient.
-AC_DEFUN([AC_LIB_PREFIX],
-[
-  AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
-  AC_REQUIRE([AC_PROG_CC])
-  AC_REQUIRE([AC_CANONICAL_HOST])
-  AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
-  AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
-  dnl By default, look in $includedir and $libdir.
-  use_additional=yes
-  AC_LIB_WITH_FINAL_PREFIX([
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-  ])
-  AC_LIB_ARG_WITH([lib-prefix],
-[  --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
-  --without-lib-prefix    don't search for libraries in includedir and libdir],
-[
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-        AC_LIB_WITH_FINAL_PREFIX([
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-        ])
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-])
-  if test $use_additional = yes; then
-    dnl Potentially add $additional_includedir to $CPPFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/include,
-    dnl   2. if it's already present in $CPPFLAGS,
-    dnl   3. if it's /usr/local/include and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_includedir" != "X/usr/include"; then
-      haveit=
-      for x in $CPPFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-I$additional_includedir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_includedir" = "X/usr/local/include"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_includedir"; then
-            dnl Really add $additional_includedir to $CPPFLAGS.
-            CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
-          fi
-        fi
-      fi
-    fi
-    dnl Potentially add $additional_libdir to $LDFLAGS.
-    dnl But don't add it
-    dnl   1. if it's the standard /usr/lib,
-    dnl   2. if it's already present in $LDFLAGS,
-    dnl   3. if it's /usr/local/lib and we are using GCC on Linux,
-    dnl   4. if it doesn't exist as a directory.
-    if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-      haveit=
-      for x in $LDFLAGS; do
-        AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
-        if test "X$x" = "X-L$additional_libdir"; then
-          haveit=yes
-          break
-        fi
-      done
-      if test -z "$haveit"; then
-        if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-          if test -n "$GCC"; then
-            case $host_os in
-              linux*) haveit=yes;;
-            esac
-          fi
-        fi
-        if test -z "$haveit"; then
-          if test -d "$additional_libdir"; then
-            dnl Really add $additional_libdir to $LDFLAGS.
-            LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
-          fi
-        fi
-      fi
-    fi
-  fi
-])
-
-dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
-dnl acl_final_exec_prefix, containing the values to which $prefix and
-dnl $exec_prefix will expand at the end of the configure script.
-AC_DEFUN([AC_LIB_PREPARE_PREFIX],
-[
-  dnl Unfortunately, prefix and exec_prefix get only finally determined
-  dnl at the end of configure.
-  if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
-dnl variables prefix and exec_prefix bound to the values they will have
-dnl at the end of the configure script.
-AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
-[
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  $1
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-])
-
-dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
-dnl the basename of the libdir, either "lib" or "lib64".
-AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
-[
-  dnl There is no formal standard regarding lib and lib64. The current
-  dnl practice is that on a system supporting 32-bit and 64-bit instruction
-  dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
-  dnl libraries go under $prefix/lib. We determine the compiler's default
-  dnl mode by looking at the compiler's library search path. If at least
-  dnl of its elements ends in /lib64 or points to a directory whose absolute
-  dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
-  dnl default, namely "lib".
-  acl_libdirstem=lib
-  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-  if test -n "$searchpath"; then
-    acl_save_IFS="${IFS= 	}"; IFS=":"
-    for searchdir in $searchpath; do
-      if test -d "$searchdir"; then
-        case "$searchdir" in
-          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-          *) searchdir=`cd "$searchdir" && pwd`
-             case "$searchdir" in
-               */lib64 ) acl_libdirstem=lib64 ;;
-             esac ;;
-        esac
-      fi
-    done
-    IFS="$acl_save_IFS"
-  fi
-])
-
-dnl Autoconf macros for libassuan
-dnl       Copyright (C) 2002, 2003 Free Software Foundation, Inc.
-dnl
-dnl This file is free software; as a special exception the author gives
-dnl unlimited permission to copy and/or distribute it, with or without
-dnl modifications, as long as this notice is preserved.
-dnl
-dnl This file is distributed in the hope that it will be useful, but
-dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
-dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-dnl
-dnl Common code used for libassuan detection [internal]
-dnl Returns ok set to yes or no.
-dnl
-AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
-[ AC_ARG_WITH(libassuan-prefix,
-              AC_HELP_STRING([--with-libassuan-prefix=PFX],
-                             [prefix where LIBASSUAN is installed (optional)]),
-     libassuan_config_prefix="$withval", libassuan_config_prefix="")
-  if test x$libassuan_config_prefix != x ; then
-    libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix"
-    if test x${LIBASSUAN_CONFIG+set} != xset ; then
-      LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config
-    fi
-  fi
-  AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no)
-
-  tmp=ifelse([$1], ,1:0.9.2,$1)
-  if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
-    req_libassuan_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
-    min_libassuan_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
-  else
-    req_libassuan_api=0
-    min_libassuan_version="$tmp"
-  fi
-
-  if test "$LIBASSUAN_CONFIG" != "no" ; then
-    libassuan_version=`$LIBASSUAN_CONFIG --version`
-  fi
-  libassuan_version_major=`echo $libassuan_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
-  libassuan_version_minor=`echo $libassuan_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
-  libassuan_version_micro=`echo $libassuan_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
-
-  AC_MSG_CHECKING(for LIBASSUAN ifelse([$2], ,,[$2 ])- version >= $min_libassuan_version)
-  ok=no
-  if test "$LIBASSUAN_CONFIG" != "no" ; then
-    ifelse([$2], ,,[if `$LIBASSUAN_CONFIG --thread=$2 2> /dev/null` ; then])
-    req_major=`echo $min_libassuan_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
-    req_minor=`echo $min_libassuan_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
-    req_micro=`echo $min_libassuan_version | \
-               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
-    if test "$libassuan_version_major" -gt "$req_major"; then
-        ok=yes
-    else 
-        if test "$libassuan_version_major" -eq "$req_major"; then
-            if test "$libassuan_version_minor" -gt "$req_minor"; then
-               ok=yes
-            else
-               if test "$libassuan_version_minor" -eq "$req_minor"; then
-                   if test "$libassuan_version_micro" -ge "$req_micro"; then
-                     ok=yes
-                   fi
-               fi
-            fi
-        fi
-    fi
-    ifelse([$2], ,,[fi])
-  fi
-
-  if test $ok = yes; then
-    AC_MSG_RESULT(yes)
-  else
-    AC_MSG_RESULT(no)
-  fi
-
-  if test $ok = yes; then
-    if test "$req_libassuan_api" -gt 0 ; then
-      tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
-      if test "$tmp" -gt 0 ; then
-        AC_MSG_CHECKING([LIBASSUAN ifelse([$2], ,,[$2 ])API version])
-        if test "$req_libassuan_api" -eq "$tmp" ; then
-          AC_MSG_RESULT(okay)
-        else
-          ok=no
-          AC_MSG_RESULT([does not match.  want=$req_libassuan_api got=$tmp.])
-        fi
-      fi
-    fi
-  fi
-
-])
-
-
-
-dnl AM_PATH_LIBASSUAN([MINIMUM-VERSION,
-dnl                   [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for libassuan and define LIBASSUAN_CFLAGS and LIBASSUAN_LIBS
-dnl
-AC_DEFUN([AM_PATH_LIBASSUAN],
-[ _AM_PATH_LIBASSUAN_COMMON($1)
-  if test $ok = yes; then
-    LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
-    LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
-    ifelse([$2], , :, [$2])
-  else
-    LIBASSUAN_CFLAGS=""
-    LIBASSUAN_LIBS=""
-    ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(LIBASSUAN_CFLAGS)
-  AC_SUBST(LIBASSUAN_LIBS)
-])
-
-
-dnl AM_PATH_LIBASSUAN_PTH([MINIMUM-VERSION,
-dnl                      [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for libassuan and define LIBASSUAN_PTH_CFLAGS and LIBASSUAN_PTH_LIBS
-dnl
-AC_DEFUN([AM_PATH_LIBASSUAN_PTH],
-[ _AM_PATH_LIBASSUAN_COMMON($1,pth)
-  if test $ok = yes; then
-    LIBASSUAN_PTH_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --cflags`
-    LIBASSUAN_PTH_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --libs`
-    ifelse([$2], , :, [$2])
-  else
-    LIBASSUAN_PTH_CFLAGS=""
-    LIBASSUAN_PTH_LIBS=""
-    ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(LIBASSUAN_PTH_CFLAGS)
-  AC_SUBST(LIBASSUAN_PTH_LIBS)
-])
-
-
-dnl AM_PATH_LIBASSUAN_PTHREAD([MINIMUM-VERSION,
-dnl                           [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
-dnl Test for libassuan and define LIBASSUAN_PTHREAD_CFLAGS 
-dnl                           and LIBASSUAN_PTHREAD_LIBS
-dnl
-AC_DEFUN([AM_PATH_LIBASSUAN_PTHREAD],
-[ _AM_PATH_LIBASSUAN_COMMON($1,pthread)
-  if test $ok = yes; then
-    LIBASSUAN_PTHREAD_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --cflags`
-    LIBASSUAN_PTHREAD_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --libs`
-    ifelse([$2], , :, [$2])
-  else
-    LIBASSUAN_PTHREAD_CFLAGS=""
-    LIBASSUAN_PTHREAD_LIBS=""
-    ifelse([$3], , :, [$3])
-  fi
-  AC_SUBST(LIBASSUAN_PTHREAD_CFLAGS)
-  AC_SUBST(LIBASSUAN_PTHREAD_LIBS)
-])
-
-
 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
 
 # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
@@ -8541,3 +7438,4 @@ AC_SUBST([am__untar])
 ]) # _AM_PROG_TAR
 
 m4_include([aclocal/acx_pthread.m4])
+m4_include([aclocal/libassuan.m4])
diff --git a/aclocal/Makefile.am b/aclocal/Makefile.am
index dc21ea7..e37cdf1 100644
--- a/aclocal/Makefile.am
+++ b/aclocal/Makefile.am
@@ -2,4 +2,4 @@
 
 MAINTAINERCLEANFILES = Makefile.in
 
-EXTRA_DIST = acx_pthread.m4
+EXTRA_DIST = acx_pthread.m4 libassuan.m4
diff --git a/aclocal/Makefile.in b/aclocal/Makefile.in
index 577b788..0820fe5 100644
--- a/aclocal/Makefile.in
+++ b/aclocal/Makefile.in
@@ -41,7 +41,7 @@ subdir = aclocal
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -76,6 +76,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -100,7 +102,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -108,8 +109,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
@@ -193,7 +195,7 @@ sharedstatedir = @sharedstatedir@
 sysconfdir = @sysconfdir@
 target_alias = @target_alias@
 MAINTAINERCLEANFILES = Makefile.in
-EXTRA_DIST = acx_pthread.m4
+EXTRA_DIST = acx_pthread.m4 libassuan.m4
 all: all-am
 
 .SUFFIXES:
diff --git a/aclocal/libassuan.m4 b/aclocal/libassuan.m4
new file mode 100644
index 0000000..95b6190
--- /dev/null
+++ b/aclocal/libassuan.m4
@@ -0,0 +1,160 @@
+dnl Autoconf macros for libassuan
+dnl       Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+dnl
+dnl This file is free software; as a special exception the author gives
+dnl unlimited permission to copy and/or distribute it, with or without
+dnl modifications, as long as this notice is preserved.
+dnl
+dnl This file is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
+dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+dnl
+dnl Common code used for libassuan detection [internal]
+dnl Returns ok set to yes or no.
+dnl
+AC_DEFUN([_AM_PATH_LIBASSUAN_COMMON],
+[ AC_ARG_WITH(libassuan-prefix,
+              AC_HELP_STRING([--with-libassuan-prefix=PFX],
+                             [prefix where LIBASSUAN is installed (optional)]),
+     libassuan_config_prefix="$withval", libassuan_config_prefix="")
+  if test x$libassuan_config_prefix != x ; then
+    libassuan_config_args="$libassuan_config_args --prefix=$libassuan_config_prefix"
+    if test x${LIBASSUAN_CONFIG+set} != xset ; then
+      LIBASSUAN_CONFIG=$libassuan_config_prefix/bin/libassuan-config
+    fi
+  fi
+  AC_PATH_PROG(LIBASSUAN_CONFIG, libassuan-config, no)
+
+  tmp=ifelse([$1], ,1:0.9.2,$1)
+  if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then
+    req_libassuan_api=`echo "$tmp"     | sed 's/\(.*\):\(.*\)/\1/'`
+    min_libassuan_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'`
+  else
+    req_libassuan_api=0
+    min_libassuan_version="$tmp"
+  fi
+
+  if test "$LIBASSUAN_CONFIG" != "no" ; then
+    libassuan_version=`$LIBASSUAN_CONFIG --version`
+  fi
+  libassuan_version_major=`echo $libassuan_version | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'`
+  libassuan_version_minor=`echo $libassuan_version | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
+  libassuan_version_micro=`echo $libassuan_version | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'`
+
+  AC_MSG_CHECKING(for LIBASSUAN ifelse([$2], ,,[$2 ])- version >= $min_libassuan_version)
+  ok=no
+  if test "$LIBASSUAN_CONFIG" != "no" ; then
+    ifelse([$2], ,,[if `$LIBASSUAN_CONFIG --thread=$2 2> /dev/null` ; then])
+    req_major=`echo $min_libassuan_version | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'`
+    req_minor=`echo $min_libassuan_version | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'`
+    req_micro=`echo $min_libassuan_version | \
+               sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'`
+    if test "$libassuan_version_major" -gt "$req_major"; then
+        ok=yes
+    else 
+        if test "$libassuan_version_major" -eq "$req_major"; then
+            if test "$libassuan_version_minor" -gt "$req_minor"; then
+               ok=yes
+            else
+               if test "$libassuan_version_minor" -eq "$req_minor"; then
+                   if test "$libassuan_version_micro" -ge "$req_micro"; then
+                     ok=yes
+                   fi
+               fi
+            fi
+        fi
+    fi
+    ifelse([$2], ,,[fi])
+  fi
+
+  if test $ok = yes; then
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
+
+  if test $ok = yes; then
+    if test "$req_libassuan_api" -gt 0 ; then
+      tmp=`$LIBASSUAN_CONFIG --api-version 2>/dev/null || echo 0`
+      if test "$tmp" -gt 0 ; then
+        AC_MSG_CHECKING([LIBASSUAN ifelse([$2], ,,[$2 ])API version])
+        if test "$req_libassuan_api" -eq "$tmp" ; then
+          AC_MSG_RESULT(okay)
+        else
+          ok=no
+          AC_MSG_RESULT([does not match.  want=$req_libassuan_api got=$tmp.])
+        fi
+      fi
+    fi
+  fi
+
+])
+
+
+
+dnl AM_PATH_LIBASSUAN([MINIMUM-VERSION,
+dnl                   [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for libassuan and define LIBASSUAN_CFLAGS and LIBASSUAN_LIBS
+dnl
+AC_DEFUN([AM_PATH_LIBASSUAN],
+[ _AM_PATH_LIBASSUAN_COMMON($1)
+  if test $ok = yes; then
+    LIBASSUAN_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --cflags`
+    LIBASSUAN_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --libs`
+    ifelse([$2], , :, [$2])
+  else
+    LIBASSUAN_CFLAGS=""
+    LIBASSUAN_LIBS=""
+    ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(LIBASSUAN_CFLAGS)
+  AC_SUBST(LIBASSUAN_LIBS)
+])
+
+
+dnl AM_PATH_LIBASSUAN_PTH([MINIMUM-VERSION,
+dnl                      [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for libassuan and define LIBASSUAN_PTH_CFLAGS and LIBASSUAN_PTH_LIBS
+dnl
+AC_DEFUN([AM_PATH_LIBASSUAN_PTH],
+[ _AM_PATH_LIBASSUAN_COMMON($1,pth)
+  if test $ok = yes; then
+    LIBASSUAN_PTH_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --cflags`
+    LIBASSUAN_PTH_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pth --libs`
+    ifelse([$2], , :, [$2])
+  else
+    LIBASSUAN_PTH_CFLAGS=""
+    LIBASSUAN_PTH_LIBS=""
+    ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(LIBASSUAN_PTH_CFLAGS)
+  AC_SUBST(LIBASSUAN_PTH_LIBS)
+])
+
+
+dnl AM_PATH_LIBASSUAN_PTHREAD([MINIMUM-VERSION,
+dnl                           [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]])
+dnl Test for libassuan and define LIBASSUAN_PTHREAD_CFLAGS 
+dnl                           and LIBASSUAN_PTHREAD_LIBS
+dnl
+AC_DEFUN([AM_PATH_LIBASSUAN_PTHREAD],
+[ _AM_PATH_LIBASSUAN_COMMON($1,pthread)
+  if test $ok = yes; then
+    LIBASSUAN_PTHREAD_CFLAGS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --cflags`
+    LIBASSUAN_PTHREAD_LIBS=`$LIBASSUAN_CONFIG $libassuan_config_args --thread=pthread --libs`
+    ifelse([$2], , :, [$2])
+  else
+    LIBASSUAN_PTHREAD_CFLAGS=""
+    LIBASSUAN_PTHREAD_LIBS=""
+    ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(LIBASSUAN_PTHREAD_CFLAGS)
+  AC_SUBST(LIBASSUAN_PTHREAD_LIBS)
+])
+
diff --git a/configure b/configure
index 6ac2e5e..11caffe 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.61 for opensc 0.11.3.
+# Generated by GNU Autoconf 2.61 for opensc 0.11.4.
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
 # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
@@ -726,8 +726,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='opensc'
 PACKAGE_TARNAME='opensc'
-PACKAGE_VERSION='0.11.3'
-PACKAGE_STRING='opensc 0.11.3'
+PACKAGE_VERSION='0.11.4'
+PACKAGE_STRING='opensc 0.11.4'
 PACKAGE_BUGREPORT=''
 
 ac_unique_file="src/libopensc/sc.c"
@@ -884,8 +884,8 @@ PTHREAD_LIBS
 PTHREAD_CFLAGS
 LIBREADLINE
 LIBFL
-LIBLTDL
-LTLIBLTDL
+LTLIB_CFLAGS
+LTLIB_LIBS
 OPENCT_CFLAGS
 OPENCT_LIBS
 HAVE_OPENCT_TRUE
@@ -904,6 +904,8 @@ HAVE_ASSUAN_FALSE
 LIBASSUAN_CFLAGS
 LIBASSUAN_LIBS
 PLUGINDIR
+ENABLE_NSPLUGIN_TRUE
+ENABLE_NSPLUGIN_FALSE
 LIBSCCONF
 LIBOPENSC
 OPENSC_LIBS
@@ -927,6 +929,8 @@ CCC
 CXXCPP
 F77
 FFLAGS
+LTLIB_CFLAGS
+LTLIB_LIBS
 OPENCT_CFLAGS
 OPENCT_LIBS
 OPENSSL_CFLAGS
@@ -1435,7 +1439,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures opensc 0.11.3 to adapt to many kinds of systems.
+\`configure' configures opensc 0.11.4 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1505,7 +1509,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of opensc 0.11.3:";;
+     short | recursive ) echo "Configuration of opensc 0.11.4:";;
    esac
   cat <<\_ACEOF
 
@@ -1523,7 +1527,7 @@ Optional Features:
   --enable-fast-install[=PKGS]
                           optimize for fast installation [default=yes]
   --disable-libtool-lock  avoid locking (might break parallel builds)
-  --disable-rpath         do not hardcode runtime library paths
+  --disable-nsplugin      disable nsplugin (signer). [default=no]
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1533,9 +1537,6 @@ Optional Packages:
                           both]
   --with-tags[=TAGS]      include additional configurations [automatic]
   --with-flex-dir=PATH    Specify path to flex installation
-  --with-gnu-ld           assume the C compiler uses GNU ld default=no
-  --with-libltdl-prefix[=DIR]  search for libltdl in DIR/include and DIR/lib
-  --without-libltdl-prefix     don't search for libltdl in includedir and libdir
   --with-libassuan-prefix=PFX
                           prefix where LIBASSUAN is installed (optional)
   --with-plugin-dir=PATH  install Mozilla plugin to PATH
@@ -1557,6 +1558,9 @@ Some influential environment variables:
   CXXCPP      C++ preprocessor
   F77         Fortran 77 compiler command
   FFLAGS      Fortran 77 compiler flags
+  LTLIB_CFLAGS
+              C compiler flags for libltdl
+  LTLIB_LIBS  linker flags for libltdl
   OPENCT_CFLAGS
               C compiler flags for OPENCT, overriding pkg-config
   OPENCT_LIBS linker flags for OPENCT, overriding pkg-config
@@ -1630,7 +1634,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-opensc configure 0.11.3
+opensc configure 0.11.4
 generated by GNU Autoconf 2.61
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1644,7 +1648,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by opensc $as_me 0.11.3, which was
+It was created by opensc $as_me 0.11.4, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   $ $0 $@
@@ -2314,7 +2318,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='opensc'
- VERSION='0.11.3'
+ VERSION='0.11.4'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -5937,7 +5941,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5940 "configure"' > conftest.$ac_ext
+  echo '#line 5944 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8190,11 +8194,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8193: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8197: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8197: \$? = $ac_status" >&5
+   echo "$as_me:8201: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8458,11 +8462,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8461: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8465: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8465: \$? = $ac_status" >&5
+   echo "$as_me:8469: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8562,11 +8566,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8565: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8569: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8569: \$? = $ac_status" >&5
+   echo "$as_me:8573: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10859,7 +10863,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10862 "configure"
+#line 10866 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10959,7 +10963,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10962 "configure"
+#line 10966 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13295,11 +13299,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13298: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13302: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13302: \$? = $ac_status" >&5
+   echo "$as_me:13306: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13399,11 +13403,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13402: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13406: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13406: \$? = $ac_status" >&5
+   echo "$as_me:13410: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14960,11 +14964,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14963: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14967: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14967: \$? = $ac_status" >&5
+   echo "$as_me:14971: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15064,11 +15068,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15067: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15071: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15071: \$? = $ac_status" >&5
+   echo "$as_me:15075: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17251,11 +17255,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17254: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17258: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17258: \$? = $ac_status" >&5
+   echo "$as_me:17262: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17519,11 +17523,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17522: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17526: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17526: \$? = $ac_status" >&5
+   echo "$as_me:17530: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17623,11 +17627,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17626: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17630: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17630: \$? = $ac_status" >&5
+   echo "$as_me:17634: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -22695,635 +22699,82 @@ fi
 { echo "$as_me:$LINENO: result: $ac_cv_flexdir" >&5
 echo "${ECHO_T}$ac_cv_flexdir" >&6; }
 
+if test -z "${LTLIB_LIBS}"; then
 
-      if test "X$prefix" = "XNONE"; then
-    acl_final_prefix="$ac_default_prefix"
-  else
-    acl_final_prefix="$prefix"
-  fi
-  if test "X$exec_prefix" = "XNONE"; then
-    acl_final_exec_prefix='${prefix}'
-  else
-    acl_final_exec_prefix="$exec_prefix"
-  fi
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
-  prefix="$acl_save_prefix"
 
 
-# Check whether --with-gnu-ld was given.
-if test "${with_gnu_ld+set}" = set; then
-  withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
-else
-  with_gnu_ld=no
-fi
-
-# Prepare PATH_SEPARATOR.
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
-  echo "#! /bin/sh" >conf$$.sh
-  echo  "exit 0"   >>conf$$.sh
-  chmod +x conf$$.sh
-  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
-    PATH_SEPARATOR=';'
-  else
-    PATH_SEPARATOR=:
-  fi
-  rm -f conf$$.sh
-fi
-ac_prog=ld
-if test "$GCC" = yes; then
-  # Check if gcc -print-prog-name=ld gives a path.
-  { echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; }
-  case $host in
-  *-*-mingw*)
-    # gcc leaves a trailing carriage return which upsets mingw
-    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
-  *)
-    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
-  esac
-  case $ac_prog in
-    # Accept absolute paths.
-    [\\/]* | [A-Za-z]:[\\/]*)
-      re_direlt='/[^/][^/]*/\.\./'
-      # Canonicalize the path of ld
-      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
-      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
-	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
-      done
-      test -z "$LD" && LD="$ac_prog"
-      ;;
-  "")
-    # If it fails, then pretend we aren't using GCC.
-    ac_prog=ld
-    ;;
-  *)
-    # If it is relative, then search for the first ld in PATH.
-    with_gnu_ld=unknown
-    ;;
-  esac
-elif test "$with_gnu_ld" = yes; then
-  { echo "$as_me:$LINENO: checking for GNU ld" >&5
-echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
-else
-  { echo "$as_me:$LINENO: checking for non-GNU ld" >&5
-echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; }
-fi
-if test "${acl_cv_path_LD+set}" = set; then
+	{ echo "$as_me:$LINENO: checking for lt_dlopen in -lltdl" >&5
+echo $ECHO_N "checking for lt_dlopen in -lltdl... $ECHO_C" >&6; }
+if test "${ac_cv_lib_ltdl_lt_dlopen+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  if test -z "$LD"; then
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
-      acl_cv_path_LD="$ac_dir/$ac_prog"
-      # Check to see if the program is GNU ld.  I'd rather use --version,
-      # but apparently some GNU ld's only accept -v.
-      # Break only if it was the GNU/non-GNU ld that we prefer.
-      case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
-      *GNU* | *'with BFD'*)
-	test "$with_gnu_ld" != no && break ;;
-      *)
-	test "$with_gnu_ld" != yes && break ;;
-      esac
-    fi
-  done
-  IFS="$ac_save_ifs"
-else
-  acl_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
 
-LD="$acl_cv_path_LD"
-if test -n "$LD"; then
-  { echo "$as_me:$LINENO: result: $LD" >&5
-echo "${ECHO_T}$LD" >&6; }
-else
-  { echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6; }
-fi
-test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
-echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
-   { (exit 1); exit 1; }; }
-{ echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
-echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; }
-if test "${acl_cv_prog_gnu_ld+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
-  acl_cv_prog_gnu_ld=yes ;;
-*)
-  acl_cv_prog_gnu_ld=no ;;
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dlopen ();
+int
+main ()
+{
+return lt_dlopen ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
 esac
-fi
-{ echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
-echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$acl_cv_prog_gnu_ld
-
-
-
-
-                                                { echo "$as_me:$LINENO: checking for shared library run path origin" >&5
-echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; }
-if test "${acl_cv_rpath+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_ltdl_lt_dlopen=yes
 else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-    CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
-    ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
-    . ./conftest.sh
-    rm -f ./conftest.sh
-    acl_cv_rpath=done
-
-fi
-{ echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
-echo "${ECHO_T}$acl_cv_rpath" >&6; }
-  wl="$acl_cv_wl"
-  libext="$acl_cv_libext"
-  shlibext="$acl_cv_shlibext"
-  hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
-  hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
-  hardcode_direct="$acl_cv_hardcode_direct"
-  hardcode_minus_L="$acl_cv_hardcode_minus_L"
-    # Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then
-  enableval=$enable_rpath; :
-else
-  enable_rpath=yes
+	ac_cv_lib_ltdl_lt_dlopen=no
 fi
 
-
-
-                  acl_libdirstem=lib
-  searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
-  if test -n "$searchpath"; then
-    acl_save_IFS="${IFS= 	}"; IFS=":"
-    for searchdir in $searchpath; do
-      if test -d "$searchdir"; then
-        case "$searchdir" in
-          */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
-          *) searchdir=`cd "$searchdir" && pwd`
-             case "$searchdir" in
-               */lib64 ) acl_libdirstem=lib64 ;;
-             esac ;;
-        esac
-      fi
-    done
-    IFS="$acl_save_IFS"
-  fi
-
-
-
-
-
-
-  { echo "$as_me:$LINENO: checking how to link with libltdl" >&5
-echo $ECHO_N "checking how to link with libltdl... $ECHO_C" >&6; }
-if test "${ac_cv_libltdl_libs+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
-
-
-
-    use_additional=yes
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-    eval additional_includedir=\"$includedir\"
-    eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-
-# Check whether --with-libltdl-prefix was given.
-if test "${with_libltdl_prefix+set}" = set; then
-  withval=$with_libltdl_prefix;
-    if test "X$withval" = "Xno"; then
-      use_additional=no
-    else
-      if test "X$withval" = "X"; then
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-
-          eval additional_includedir=\"$includedir\"
-          eval additional_libdir=\"$libdir\"
-
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      else
-        additional_includedir="$withval/include"
-        additional_libdir="$withval/$acl_libdirstem"
-      fi
-    fi
-
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
 fi
-
-      LIBLTDL=
-  LTLIBLTDL=
-  INCLTDL=
-  rpathdirs=
-  ltrpathdirs=
-  names_already_handled=
-  names_next_round='ltdl '
-  while test -n "$names_next_round"; do
-    names_this_round="$names_next_round"
-    names_next_round=
-    for name in $names_this_round; do
-      already_handled=
-      for n in $names_already_handled; do
-        if test "$n" = "$name"; then
-          already_handled=yes
-          break
-        fi
-      done
-      if test -z "$already_handled"; then
-        names_already_handled="$names_already_handled $name"
-                        uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
-        eval value=\"\$HAVE_LIB$uppername\"
-        if test -n "$value"; then
-          if test "$value" = yes; then
-            eval value=\"\$LIB$uppername\"
-            test -z "$value" || LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$value"
-            eval value=\"\$LTLIB$uppername\"
-            test -z "$value" || LTLIBLTDL="${LTLIBLTDL}${LTLIBLTDL:+ }$value"
-          else
-                                    :
-          fi
-        else
-                              found_dir=
-          found_la=
-          found_so=
-          found_a=
-          if test $use_additional = yes; then
-            if test -n "$shlibext" \
-               && { test -f "$additional_libdir/lib$name.$shlibext" \
-                    || { test "$shlibext" = dll \
-                         && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
-              found_dir="$additional_libdir"
-              if test -f "$additional_libdir/lib$name.$shlibext"; then
-                found_so="$additional_libdir/lib$name.$shlibext"
-              else
-                found_so="$additional_libdir/lib$name.dll.a"
-              fi
-              if test -f "$additional_libdir/lib$name.la"; then
-                found_la="$additional_libdir/lib$name.la"
-              fi
-            else
-              if test -f "$additional_libdir/lib$name.$libext"; then
-                found_dir="$additional_libdir"
-                found_a="$additional_libdir/lib$name.$libext"
-                if test -f "$additional_libdir/lib$name.la"; then
-                  found_la="$additional_libdir/lib$name.la"
-                fi
-              fi
-            fi
-          fi
-          if test "X$found_dir" = "X"; then
-            for x in $LDFLAGS $LTLIBLTDL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-              case "$x" in
-                -L*)
-                  dir=`echo "X$x" | sed -e 's/^X-L//'`
-                  if test -n "$shlibext" \
-                     && { test -f "$dir/lib$name.$shlibext" \
-                          || { test "$shlibext" = dll \
-                               && test -f "$dir/lib$name.dll.a"; }; }; then
-                    found_dir="$dir"
-                    if test -f "$dir/lib$name.$shlibext"; then
-                      found_so="$dir/lib$name.$shlibext"
-                    else
-                      found_so="$dir/lib$name.dll.a"
-                    fi
-                    if test -f "$dir/lib$name.la"; then
-                      found_la="$dir/lib$name.la"
-                    fi
-                  else
-                    if test -f "$dir/lib$name.$libext"; then
-                      found_dir="$dir"
-                      found_a="$dir/lib$name.$libext"
-                      if test -f "$dir/lib$name.la"; then
-                        found_la="$dir/lib$name.la"
-                      fi
-                    fi
-                  fi
-                  ;;
-              esac
-              if test "X$found_dir" != "X"; then
-                break
-              fi
-            done
-          fi
-          if test "X$found_dir" != "X"; then
-                        LTLIBLTDL="${LTLIBLTDL}${LTLIBLTDL:+ }-L$found_dir -l$name"
-            if test "X$found_so" != "X"; then
-                                                        if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
-                                LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$found_so"
-              else
-                                                                                haveit=
-                for x in $ltrpathdirs; do
-                  if test "X$x" = "X$found_dir"; then
-                    haveit=yes
-                    break
-                  fi
-                done
-                if test -z "$haveit"; then
-                  ltrpathdirs="$ltrpathdirs $found_dir"
-                fi
-                                if test "$hardcode_direct" = yes; then
-                                                      LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$found_so"
-                else
-                  if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
-                                                            LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$found_so"
-                                                            haveit=
-                    for x in $rpathdirs; do
-                      if test "X$x" = "X$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      rpathdirs="$rpathdirs $found_dir"
-                    fi
-                  else
-                                                                                haveit=
-                    for x in $LDFLAGS $LIBLTDL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                      if test "X$x" = "X-L$found_dir"; then
-                        haveit=yes
-                        break
-                      fi
-                    done
-                    if test -z "$haveit"; then
-                      LIBLTDL="${LIBLTDL}${LIBLTDL:+ }-L$found_dir"
-                    fi
-                    if test "$hardcode_minus_L" != no; then
-                                                                                        LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$found_so"
-                    else
-                                                                                                                                                                                LIBLTDL="${LIBLTDL}${LIBLTDL:+ }-l$name"
-                    fi
-                  fi
-                fi
-              fi
-            else
-              if test "X$found_a" != "X"; then
-                                LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$found_a"
-              else
-                                                LIBLTDL="${LIBLTDL}${LIBLTDL:+ }-L$found_dir -l$name"
-              fi
-            fi
-                        additional_includedir=
-            case "$found_dir" in
-              */$acl_libdirstem | */$acl_libdirstem/)
-                basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
-                additional_includedir="$basedir/include"
-                ;;
-            esac
-            if test "X$additional_includedir" != "X"; then
-                                                                                                                if test "X$additional_includedir" != "X/usr/include"; then
-                haveit=
-                if test "X$additional_includedir" = "X/usr/local/include"; then
-                  if test -n "$GCC"; then
-                    case $host_os in
-                      linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                    esac
-                  fi
-                fi
-                if test -z "$haveit"; then
-                  for x in $CPPFLAGS $INCLTDL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                    if test "X$x" = "X-I$additional_includedir"; then
-                      haveit=yes
-                      break
-                    fi
-                  done
-                  if test -z "$haveit"; then
-                    if test -d "$additional_includedir"; then
-                                            INCLTDL="${INCLTDL}${INCLTDL:+ }-I$additional_includedir"
-                    fi
-                  fi
-                fi
-              fi
-            fi
-                        if test -n "$found_la"; then
-                                                        save_libdir="$libdir"
-              case "$found_la" in
-                */* | *\\*) . "$found_la" ;;
-                *) . "./$found_la" ;;
-              esac
-              libdir="$save_libdir"
-                            for dep in $dependency_libs; do
-                case "$dep" in
-                  -L*)
-                    additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
-                                                                                                                                                                if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
-                      haveit=
-                      if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
-                        if test -n "$GCC"; then
-                          case $host_os in
-                            linux* | gnu* | k*bsd*-gnu) haveit=yes;;
-                          esac
-                        fi
-                      fi
-                      if test -z "$haveit"; then
-                        haveit=
-                        for x in $LDFLAGS $LIBLTDL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LIBLTDL="${LIBLTDL}${LIBLTDL:+ }-L$additional_libdir"
-                          fi
-                        fi
-                        haveit=
-                        for x in $LDFLAGS $LTLIBLTDL; do
-
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-                          if test "X$x" = "X-L$additional_libdir"; then
-                            haveit=yes
-                            break
-                          fi
-                        done
-                        if test -z "$haveit"; then
-                          if test -d "$additional_libdir"; then
-                                                        LTLIBLTDL="${LTLIBLTDL}${LTLIBLTDL:+ }-L$additional_libdir"
-                          fi
-                        fi
-                      fi
-                    fi
-                    ;;
-                  -R*)
-                    dir=`echo "X$dep" | sed -e 's/^X-R//'`
-                    if test "$enable_rpath" != no; then
-                                                                  haveit=
-                      for x in $rpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        rpathdirs="$rpathdirs $dir"
-                      fi
-                                                                  haveit=
-                      for x in $ltrpathdirs; do
-                        if test "X$x" = "X$dir"; then
-                          haveit=yes
-                          break
-                        fi
-                      done
-                      if test -z "$haveit"; then
-                        ltrpathdirs="$ltrpathdirs $dir"
-                      fi
-                    fi
-                    ;;
-                  -l*)
-                                        names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
-                    ;;
-                  *.la)
-                                                                                names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
-                    ;;
-                  *)
-                                        LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$dep"
-                    LTLIBLTDL="${LTLIBLTDL}${LTLIBLTDL:+ }$dep"
-                    ;;
-                esac
-              done
-            fi
-          else
-                                                            LIBLTDL="${LIBLTDL}${LIBLTDL:+ }-l$name"
-            LTLIBLTDL="${LTLIBLTDL}${LTLIBLTDL:+ }-l$name"
-          fi
-        fi
-      fi
-    done
-  done
-  if test "X$rpathdirs" != "X"; then
-    if test -n "$hardcode_libdir_separator"; then
-                        alldirs=
-      for found_dir in $rpathdirs; do
-        alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
-      done
-            acl_save_libdir="$libdir"
-      libdir="$alldirs"
-      eval flag=\"$hardcode_libdir_flag_spec\"
-      libdir="$acl_save_libdir"
-      LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$flag"
-    else
-            for found_dir in $rpathdirs; do
-        acl_save_libdir="$libdir"
-        libdir="$found_dir"
-        eval flag=\"$hardcode_libdir_flag_spec\"
-        libdir="$acl_save_libdir"
-        LIBLTDL="${LIBLTDL}${LIBLTDL:+ }$flag"
-      done
-    fi
-  fi
-  if test "X$ltrpathdirs" != "X"; then
-            for found_dir in $ltrpathdirs; do
-      LTLIBLTDL="${LTLIBLTDL}${LTLIBLTDL:+ }-R$found_dir"
-    done
-  fi
-
-    ac_cv_libltdl_libs="$LIBLTDL"
-    ac_cv_libltdl_ltlibs="$LTLIBLTDL"
-    ac_cv_libltdl_cppflags="$INCLTDL"
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlopen" >&6; }
+if test $ac_cv_lib_ltdl_lt_dlopen = yes; then
+  LTLIB_LIBS="-lltdl"
+else
+  { { echo "$as_me:$LINENO: error: ltdl1 not found, please install libltdl and/or libtool" >&5
+echo "$as_me: error: ltdl1 not found, please install libltdl and/or libtool" >&2;}
+   { (exit 1); exit 1; }; }
 
 fi
-{ echo "$as_me:$LINENO: result: $ac_cv_libltdl_libs" >&5
-echo "${ECHO_T}$ac_cv_libltdl_libs" >&6; }
-  LIBLTDL="$ac_cv_libltdl_libs"
-  LTLIBLTDL="$ac_cv_libltdl_ltlibs"
-  INCLTDL="$ac_cv_libltdl_cppflags"
 
-  for element in $INCLTDL; do
-    haveit=
-    for x in $CPPFLAGS; do
 
-  acl_save_prefix="$prefix"
-  prefix="$acl_final_prefix"
-  acl_save_exec_prefix="$exec_prefix"
-  exec_prefix="$acl_final_exec_prefix"
-  eval x=\"$x\"
-  exec_prefix="$acl_save_exec_prefix"
-  prefix="$acl_save_prefix"
-
-      if test "X$x" = "X$element"; then
-        haveit=yes
-        break
-      fi
-    done
-    if test -z "$haveit"; then
-      CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
-    fi
-  done
-
-
-
-      HAVE_LIBLTDL=yes
-
-
-
-
-saved_LIBS="$LIBS"
-LIBS="$saved_LIBS $LIBLTDL"
-if test "${ac_cv_header_ltdl_h+set}" = set; then
+	if test "${ac_cv_header_ltdl_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for ltdl.h" >&5
 echo $ECHO_N "checking for ltdl.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_ltdl_h+set}" = set; then
@@ -23449,16 +22900,18 @@ echo "${ECHO_T}$ac_cv_header_ltdl_h" >&6; }
 
 fi
 if test $ac_cv_header_ltdl_h = yes; then
-  { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
+  :
 else
-   { { echo "$as_me:$LINENO: error: ltdl.h not found, please install libltdl and/or libtool" >&5
+  { { echo "$as_me:$LINENO: error: ltdl.h not found, please install libltdl and/or libtool" >&5
 echo "$as_me: error: ltdl.h not found, please install libltdl and/or libtool" >&2;}
    { (exit 1); exit 1; }; }
+
+fi
+
+
 fi
 
 
-LIBS="$saved_LIBS"
 
 OPENCT_MSG=no
 if test "x${ENABLE_OPENCT}" = "xyes"; then
@@ -24095,6 +23548,42 @@ if test "${with_plugin_dir+set}" = set; then
 fi
 
 
+# Check whether --enable-nsplugin was given.
+if test "${enable_nsplugin+set}" = set; then
+  enableval=$enable_nsplugin; ENABLE_NSPLUGIN="${enableval}"
+else
+  ENABLE_NSPLUGIN="yes"
+fi
+
+
+if test "x${ASSUAN_MSG}" != "xyes" -o "x${OPENSSL_MSG}" != "xyes"; then
+	ENABLE_NSPLUGIN="no"
+fi
+if test "x${ENABLE_NSPLUGIN}" == "xyes"; then
+
+
+if true; then
+  ENABLE_NSPLUGIN_TRUE=
+  ENABLE_NSPLUGIN_FALSE='#'
+else
+  ENABLE_NSPLUGIN_TRUE='#'
+  ENABLE_NSPLUGIN_FALSE=
+fi
+
+	NSPLUGIN_MSG=yes
+else
+
+
+if false; then
+  ENABLE_NSPLUGIN_TRUE=
+  ENABLE_NSPLUGIN_FALSE='#'
+else
+  ENABLE_NSPLUGIN_TRUE='#'
+  ENABLE_NSPLUGIN_FALSE=
+fi
+
+	NSPLUGIN_MSG=no
+fi
 
 # Check for PIN entry program used by OpenSC Signer
 PIN_ENTRY="/usr/local/bin/gpinentry"
@@ -24313,6 +23802,20 @@ echo "$as_me: error: conditional \"HAVE_ASSUAN\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
+if test -z "${ENABLE_NSPLUGIN_TRUE}" && test -z "${ENABLE_NSPLUGIN_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLE_NSPLUGIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_NSPLUGIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${ENABLE_NSPLUGIN_TRUE}" && test -z "${ENABLE_NSPLUGIN_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"ENABLE_NSPLUGIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"ENABLE_NSPLUGIN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
@@ -24613,7 +24116,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by opensc $as_me 0.11.3, which was
+This file was extended by opensc $as_me 0.11.4, which was
 generated by GNU Autoconf 2.61.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -24666,7 +24169,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
-opensc config.status 0.11.3
+opensc config.status 0.11.4
 configured by $0, generated by GNU Autoconf 2.61,
   with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
@@ -25025,8 +24528,8 @@ PTHREAD_LIBS!$PTHREAD_LIBS$ac_delim
 PTHREAD_CFLAGS!$PTHREAD_CFLAGS$ac_delim
 LIBREADLINE!$LIBREADLINE$ac_delim
 LIBFL!$LIBFL$ac_delim
-LIBLTDL!$LIBLTDL$ac_delim
-LTLIBLTDL!$LTLIBLTDL$ac_delim
+LTLIB_CFLAGS!$LTLIB_CFLAGS$ac_delim
+LTLIB_LIBS!$LTLIB_LIBS$ac_delim
 OPENCT_CFLAGS!$OPENCT_CFLAGS$ac_delim
 OPENCT_LIBS!$OPENCT_LIBS$ac_delim
 HAVE_OPENCT_TRUE!$HAVE_OPENCT_TRUE$ac_delim
@@ -25045,6 +24548,8 @@ HAVE_ASSUAN_FALSE!$HAVE_ASSUAN_FALSE$ac_delim
 LIBASSUAN_CFLAGS!$LIBASSUAN_CFLAGS$ac_delim
 LIBASSUAN_LIBS!$LIBASSUAN_LIBS$ac_delim
 PLUGINDIR!$PLUGINDIR$ac_delim
+ENABLE_NSPLUGIN_TRUE!$ENABLE_NSPLUGIN_TRUE$ac_delim
+ENABLE_NSPLUGIN_FALSE!$ENABLE_NSPLUGIN_FALSE$ac_delim
 LIBSCCONF!$LIBSCCONF$ac_delim
 LIBOPENSC!$LIBOPENSC$ac_delim
 OPENSC_LIBS!$OPENSC_LIBS$ac_delim
@@ -25053,7 +24558,7 @@ pkgdata!$pkgdata$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 46; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 48; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -25670,5 +25175,6 @@ echo "OpenSSL support:          ${OPENSSL_MSG}"
 echo "PC/SC support:            ${PCSC_MSG}"
 echo "OpenCT support:           ${OPENCT_MSG}"
 echo "Assuan support:           ${ASSUAN_MSG}"
+echo "NSPlugin support:         ${NSPLUGIN_MSG}"
 echo ""
 
diff --git a/configure.in b/configure.in
index 36ad15e..2c43237 100644
--- a/configure.in
+++ b/configure.in
@@ -4,7 +4,7 @@ dnl Process this file with autoconf to produce a configure script.
 # Require autoconf 2.52
 AC_PREREQ(2.52)
 
-AC_INIT(opensc, [0.11.3])
+AC_INIT(opensc, [0.11.4])
 AM_INIT_AUTOMAKE
 AM_CONFIG_HEADER(config.h)
 
@@ -195,13 +195,25 @@ AC_CACHE_CHECK([for flex directory], ac_cv_flexdir, [
 ])
 
 dnl use ltdl
-AC_LIB_LINKFLAGS(ltdl)
-
-saved_LIBS="$LIBS"
-LIBS="$saved_LIBS $LIBLTDL"
-AC_CHECK_HEADER([ltdl.h], [AC_MSG_RESULT([yes])],
-   [ AC_MSG_ERROR([ltdl.h not found, please install libltdl and/or libtool]) ])
-LIBS="$saved_LIBS"
+if test -z "${LTLIB_LIBS}"; then
+	AC_ARG_VAR([LTLIB_CFLAGS], [C compiler flags for libltdl])
+	AC_ARG_VAR([LTLIB_LIBS], [linker flags for libltdl])
+
+	AC_CHECK_LIB(
+		[ltdl],
+		[lt_dlopen],
+		[LTLIB_LIBS="-lltdl"],
+		[AC_MSG_ERROR([ltdl1 not found, please install libltdl and/or libtool])]
+	)
+
+	AC_CHECK_HEADER(
+		[ltdl.h],
+		,
+		[AC_MSG_ERROR([ltdl.h not found, please install libltdl and/or libtool])]
+	)
+fi
+AC_SUBST([LTLIB_CFLAGS])
+AC_SUBST([LTLIB_LIBS])
 
 OPENCT_MSG=no
 if test "x${ENABLE_OPENCT}" = "xyes"; then
@@ -318,6 +330,21 @@ AC_ARG_WITH(plugin-dir,
 	]
 )
 AC_SUBST(PLUGINDIR)
+AC_ARG_ENABLE(nsplugin,
+	AC_HELP_STRING([--disable-nsplugin], [disable nsplugin (signer). [[default=no]]]),
+	[ENABLE_NSPLUGIN="${enableval}"],
+	[ENABLE_NSPLUGIN="yes"])
+
+if test "x${ASSUAN_MSG}" != "xyes" -o "x${OPENSSL_MSG}" != "xyes"; then
+	ENABLE_NSPLUGIN="no"
+fi
+if test "x${ENABLE_NSPLUGIN}" == "xyes"; then
+	AM_CONDITIONAL(ENABLE_NSPLUGIN, true)
+	NSPLUGIN_MSG=yes
+else
+	AM_CONDITIONAL(ENABLE_NSPLUGIN, false)
+	NSPLUGIN_MSG=no
+fi
 
 # Check for PIN entry program used by OpenSC Signer
 PIN_ENTRY="/usr/local/bin/gpinentry"
@@ -412,5 +439,6 @@ echo "OpenSSL support:          ${OPENSSL_MSG}"
 echo "PC/SC support:            ${PCSC_MSG}"
 echo "OpenCT support:           ${OPENCT_MSG}"
 echo "Assuan support:           ${ASSUAN_MSG}"
+echo "NSPlugin support:         ${NSPLUGIN_MSG}"
 echo ""
 
diff --git a/doc/AKIS.html b/doc/AKIS.html
new file mode 100644
index 0000000..641f7b4
--- /dev/null
+++ b/doc/AKIS.html
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>AKIS - OpenSC - Trac</title><style type="text/css">
+           @import url(trac.css);
+          </style></head><body><div class="wikipage">
+    <div id="searchable"><h1 id="AKiSSMARTCARDS">AKiS SMARTCARDS</h1>
+<p>
+AKiS is a smart card operating system which can be used in personal identification, digital sign, health care system, smart logon, secure email, etc. It is developed within The National Research Institute Of Electronics And Cryptology (<a class="ext-link" href="http://www.uekae.tubitak.gov.tr/en/" shape="rect"><span class="icon">UEKAE</span></a>), a subsidiary of The Scientific &amp; Technological Research Council of Turkey (<a class="ext-link" href="http://www.tubitak.gov.tr/" shape="rect"><span class="icon">TUBITAK</span></a>).
+</p>
+<p>
+Card is sold to the public by <a class="ext-link" href="http://www.plastkart.com" shape="rect"><span class="icon">http://www.plastkart.com</span></a>
+</p>
+<p>
+AKIS:
+</p>
+<ul><li>Communicates with the PC via card reader according to ISO/IEC 7816-4 T = 1 protocol,
+</li><li>Implements user and interface authentication, 
+</li><li>Is capable of binary file operations (open, write, read),
+</li><li>Supports fixed length linear, variable length linear, fixed length cyclic file structures and file operations (open, write record, read record),  
+</li><li>Follows the  life cycles (activation, manufacturing, initialization, personalization, administration, operation and death) and operates functions according to the present life cycle,
+</li><li>Encrypts, decrypts, digitally signs and verifies with RSA (2048)/DES/3DES cryptographic algorithms,
+</li><li>Calculates SHA-1 hash.
+</li><li>Has Common Criteria EAL4+ assurance level.
+</li></ul><p>
+AKIS support in OpenSC is in development and currently features file level access (select, list, read, write, create, delete, verify), digital signing, and PKCS-15 support (except pkcs15-init).
+</p>
+<p>
+It is also only available in OpenSC svn /trunk/ and not included in any OpenSC release yet.
+</p>
+</div>
+   </div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
diff --git a/doc/AuthorsAndCredits.html b/doc/AuthorsAndCredits.html
index fca2e5e..38de246 100644
--- a/doc/AuthorsAndCredits.html
+++ b/doc/AuthorsAndCredits.html
@@ -23,6 +23,7 @@ OpenSC was written by (or uses code copied from):
 </li><li>Eric Dorland
 </li><li>Franz Brandl
 </li><li>Geoff Thorpe
+</li><li>Gürer Özen for TUBITAK / UEKAE
 </li><li>Jamie Honan
 </li><li>Jean-Pierre Szikora
 </li><li>Joe Phillips
diff --git a/doc/CardOs.html b/doc/CardOs.html
index 8366230..660363d 100644
--- a/doc/CardOs.html
+++ b/doc/CardOs.html
@@ -18,5 +18,12 @@ Siemens CardOS M4 does not allow a key to be used for signing and decryption. Op
 <p>
 Some documentation is available from Aladdin for their eToken PRO, but for an in-depth documentation you need the Siemens card manual, which requires signing an NDA.
 </p>
+<p>
+The versions of CardOS M4 are: M4.0, M4.01, M4.2, M4.3, M4.3b, M4.2b in this order. Yes, M4.2b is the latest and greatest and later than M4.3 and M4.3B. 
+</p>
+<p>
+Also note that M4.0 needs special "packages" (i.e. signed firmware addons by siemens) installed to work properly. Best not to use that ancient version
+if you can.
+</p>
 </div>
    </div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 1615fee..1742ea4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,15 +1,206 @@
+2007-09-10 06:41  aj
+
+	* releases/opensc-0.11.4/NEWS,
+	  releases/opensc-0.11.4/configure.in: Release 0.11.4 without
+	  further changes.
+
+2007-08-22 05:09  aj
+
+	* releases/opensc-0.11.4/configure.in: 2nd rc with versions for
+	  windows fixed.
+
+2007-08-20 20:20  aj
+
+	* releases/opensc-0.11.4/src/include/winconfig.h,
+	  releases/opensc-0.11.4/win32/version.rc: update library versions.
+
+2007-08-19 18:56  aj
+
+	* releases/opensc-0.11.4/configure.in: create release candidate 1.
+
+2007-08-19 18:55  aj
+
+	* releases/opensc-0.11.4: Create new release branch for 0.11.4.
+	* trunk/NEWS: Update news file.
+
+2007-08-19 18:37  aj
+
+	* trunk/aclocal/libassuan.m4: update libassuan m4 macro package to
+	  current version.
+
+2007-08-14 06:17  aj
+
+	* trunk/src/libopensc/Makefile.am: fix typo.
+
+2007-08-14 06:02  aj
+
+	* trunk/src/tools/opensc-explorer.c: restores ability to change
+	  opensc-explorer debug level at runtime, using "debug" command
+	  from opensc prompt. by Jakub Bogusz
+
+2007-08-14 05:55  aj
+
+	* trunk/aclocal/Makefile.am, trunk/aclocal/libassuan.m4: keep
+	  libassuan as most users will not have this.
+
+2007-08-13 19:10  aj
+
+	* trunk/src/libopensc/Makefile.am, trunk/src/pkcs11/Makefile.am:
+	  add cflags for ltdl.h where needed.
+
+2007-08-13 08:32  ludovic.rousseau
+
+	* trunk/src/tests/Makefile.am, trunk/src/tools/Makefile.am: the
+	  commands line tools do not call lt_dlopen() so do not need to
+	  link with libltdl
+
+2007-08-13 08:30  ludovic.rousseau
+
+	* trunk/configure.in, trunk/src/libopensc/Makefile.am,
+	  trunk/src/pkcs11/Makefile.am: use LTLIB_CFLAGS and LTLIB_LIBS
+	  instead of the global LIBS to find and use libltdl thanks to
+	  Alon Bar-Lev for the patch
+
+2007-08-10 13:06  ludovic.rousseau
+
+	* trunk/aclocal/Makefile.am, trunk/aclocal/lib-ld.m4,
+	  trunk/aclocal/lib-link.m4, trunk/aclocal/lib-prefix.m4:
+	  lib-link.m4, lib-prefix.m4 and lib-ld.m4 are provided by gettext
+	  but is no more needed after revision 3239
+
+2007-08-10 13:05  ludovic.rousseau
+
+	* trunk/aclocal/Makefile.am, trunk/aclocal/pkg.m4: pkg.m4 is an
+	  external dependency provided by pkg-config (or similar) package
+
+2007-08-10 13:04  ludovic.rousseau
+
+	* trunk/aclocal/Makefile.am, trunk/aclocal/libassuan.m4:
+	  libassuan.m4 is an external dependency provided by libassuan-dev
+	  (or similar) package
+
+2007-08-10 12:56  ludovic.rousseau
+
+	* trunk/configure.in: do not use AC_LIB_LINKFLAGS() since this
+	  macro is provided by gettext and we do not use gettext. Use
+	  AC_CHECK_LIB() instead
+
+2007-08-10 12:51  ludovic.rousseau
+
+	* trunk/man: propset svn:ignore to ignore unversioned files
+
+2007-08-08 20:06  aj
+
+	* trunk/src/libopensc/card-cardos.c, trunk/src/libopensc/cards.h,
+	  trunk/src/pkcs15init/pkcs15-cardos.c,
+	  trunk/src/tools/cardos-info.c: add information about cardos 4.2b
+	  - latest cardos update.
+
+2007-08-03 07:47  aj
+
+	* trunk/src/libopensc/pkcs15.c: Add same hack for Prime cards.
+
+2007-08-02 13:53  ludovic.rousseau
+
+	* trunk/src/pkcs15init/Makefile.am: AM_LDFLAGS is not used in
+	  libpkcs15init_la_LDFLAGS so explicitly use it
+
+2007-07-28 18:27  aj
+
+	* trunk/aclocal/Makefile.am, trunk/aclocal/lib-ld.m4,
+	  trunk/aclocal/lib-link.m4, trunk/aclocal/lib-prefix.m4,
+	  trunk/aclocal/libassuan.m4, trunk/aclocal/pkg.m4: revert
+	  revision 3403 + 3404, seems to break mac os X.
+
+2007-07-28 18:22  aj
+
+	* trunk/src/tools/pkcs11-tool.c: pkcs11-tool crashes while
+	  printing its usage message. fixed by Ville Skyttä.
+
+2007-07-28 18:18  aj
+
+	* trunk/src/tools/cryptoflex-tool.c: cryptoflex-tool.c:505:
+	  warning: array subscript is above array bounds gcc 4.3 warning,
+	  reported and fixed by novell: Problem found by David Binderman
+	  Patch created by Michal Vaner closes our trac bug #153 and
+	  novell bug 238660
+
+2007-07-24 06:42  aj
+
+	* trunk/src/libopensc/card-akis.c: fix a compiler warning.
+
+2007-07-22 19:56  aj
+
+	* trunk/src/libopensc/card-akis.c: Gürer Özen: * akis_get_data()
+	  implemented * akis_delete_file() implemented *
+	  akis_set_security_env() implemented, pkcs15 signing works now *
+	  life cycle set/get via cardctl implemented * card_ops commented,
+	  so it is clear whether a function is supported via iso7816
+	  implementation or not * mark pin apdu as sensitive in
+	  akis_pin_cmd
+
+2007-07-21 07:31  aj
+
+	* trunk/src/signer/Makefile.am: create plugin directory if it does
+	  not exist.
+
+2007-07-20 18:50  aj
+
+	* trunk/configure.in, trunk/src/signer/Makefile.am: add explicit
+	  option to enable/disable the ns plugin. patch by Alon Bar-Lev.
+
+2007-07-20 14:38  aj
+
+	* trunk/src/libopensc/pkcs15-sec.c: oops, define tmplen at start
+	  of block.
+
+2007-07-20 13:47  aj
+
+	* trunk/src/libopensc/pkcs15-pubkey.c: silence a warning we get
+	  with siemens cards.
+
+2007-07-20 12:30  aj
+
+	* trunk/src/libopensc/asn1.c: asn1_decode_entry() allocates
+	  (objlen - 1) bytes for SC_ASN1_UTF8STRING types with
+	  SC_ASN1_ALLOC flag, then calls the sc_asn1_decode_utf8string()
+	  function which then fails with BUFFER TOO SMALL cause it wants
+	  to end the string with an extra NULL. allocation size was
+	  supposed to be objlen + 1. Patch by Gürer Özen
+
+2007-07-20 12:28  aj
+
+	* trunk/NEWS, trunk/src/libopensc/card-akis.c: Gürer Özen send
+	  another akis update: * create_file implemented * EF(DIR) hack
+	  removed, it is easier to put a real EF(DIR) *
+	  SC_CARDCTL_GET_SERIALNR implemented
+
+2007-07-20 12:19  aj
+
+	* trunk/NEWS, trunk/src/libopensc/pkcs15-sec.c,
+	  trunk/src/libopensc/pkcs15.c, trunk/src/libopensc/pkcs15.h: Sign
+	  by using the decrypt function.
+
+2007-07-17 20:01  aj
+
+	* trunk/src/libopensc/Makefile.am,
+	  trunk/src/libopensc/Makefile.mak,
+	  trunk/src/libopensc/card-akis.c, trunk/src/libopensc/cards.h,
+	  trunk/src/libopensc/ctx.c, trunk/src/libopensc/opensc.h: add
+	  akis support by Gürer Özen.
+
 2007-07-15 15:29  aj
 
-	* releases/opensc-0.11.3/src/libopensc/pkcs15-piv.c: Douglas E.
-	  Engert: The IdAlly CSP calls C_FindObjectsInit looking for
-	  CK_PRIVATE_KEY before C_Login with a pin. If it does not find
-	  any, it fails. The pkcs15-piv.c in 0.11.3 and 0.11.3-pre3 set
-	  the pubkey and prvkey objects as private. This patch removes the
+	* trunk/src/libopensc/pkcs15-piv.c: Douglas E. Engert: The IdAlly
+	  CSP calls C_FindObjectsInit looking for CK_PRIVATE_KEY before
+	  C_Login with a pin. If it does not find any, it fails. The
+	  pkcs15-piv.c in 0.11.3 and 0.11.3-pre3 set the pubkey and prvkey
+	  objects as private. This patch removes the
 	  SC_PKCS15_CO_FLAG_PRIVATE so IdAlly will work with the PIV cards.
 
 2007-07-11 14:47  aj
 
-	* releases/opensc-0.11.3: release opensc 0.11.3
+	* trunk/configure.in: trunk is now post 0.11.3 release.
 
 2007-07-11 14:46  aj
 
diff --git a/doc/Makefile.in b/doc/Makefile.in
index f773428..b585ff6 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -42,7 +42,7 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
 	ChangeLog
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -86,6 +86,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -110,7 +112,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -118,8 +119,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/doc/OperatingSystems.html b/doc/OperatingSystems.html
index 25a91a1..dc06a25 100644
--- a/doc/OperatingSystems.html
+++ b/doc/OperatingSystems.html
@@ -7,7 +7,7 @@
 If you haven't already, please first read the <a class="wiki" href="OverView.html" shape="rect">OverView</a> document and then come back here.
 </p>
 <h2 id="Linux">Linux</h2>
-<ul><li>Most people can use the packages provided by your distribution (in the core or in the contrib section). Below is a list.
+<ul><li>Most people can use the packages provided by your distribution (in the core or in the contrib section).
 You probably want to install <a class="ext-link" href="http://www.openssl.org/" shape="rect"><span class="icon">OpenSSL</span></a>, <a href="http://www.opensc-project.org/openct/" shape="rect">OpenCT</a>, <a href="http://www.opensc-project.org/opensc/" shape="rect">OpenSC</a>, <a href="http://www.opensc-project.org/libp11/" shape="rect">libp11</a>, <a href="http://www.opensc-project.org/enigne_pkcs11" shape="rect">engine_pkcs11</a> and maybe <a href="http://www.opensc-project.org/pam_p11" shape="rect">pam_p11</a> or <a href="http://www.opensc-project.org/pam_pkcs11/" shape="rect">pam_pkcs11</a> for authentication
 (or <a class="ext-link" href="http://pcsclite.alioth.debian.org/" shape="rect"><span class="icon">PCSC-Lite</span></a> and some driver for it instead of OpenCT).
 </li></ul><ul><li>If you want to compile OpenSC, you need to install either OpenCT or PCSC-Lite first, to use those drivers/middleware.
diff --git a/doc/GemplusGpk.html b/doc/PrimeCard.html
similarity index 53%
copy from doc/GemplusGpk.html
copy to doc/PrimeCard.html
index 08bc7dc..4177fa2 100644
--- a/doc/GemplusGpk.html
+++ b/doc/PrimeCard.html
@@ -1,19 +1,9 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>GemplusGpk - OpenSC - Trac</title><style type="text/css">
+<title>PrimeCard - OpenSC - Trac</title><style type="text/css">
            @import url(trac.css);
           </style></head><body><div class="wikipage">
-    <div id="searchable"><h1 id="GemplusGPK16k">Gemplus GPK 16k</h1>
-<p>
-Gemplus GPK 16k cards are fully supported by OpenSC and regularly tested.
-</p>
-<p>
-FIXME: GemSAFE emulation
-</p>
-<p>
-FIXME:Links,Documentation
-</p>
-<p>
-Gemplus obsolete GPK 16k at 2005.
+    <div id="searchable"><p>
+Card produced by the card personalisation system. See <a class="ext-link" href="http://primekey.se/primekey/en/Products/PrimeCard.html" shape="rect"><span class="icon">http://primekey.se/primekey/en/Products/PrimeCard.html</span></a>
 </p>
 </div>
    </div><div class="footer"><hr></hr><p><a href="index.html">Back to Index</a></p></div></body></html>
diff --git a/doc/PuTTYcard.html b/doc/PuTTYcard.html
index 250e4c3..bde32da 100644
--- a/doc/PuTTYcard.html
+++ b/doc/PuTTYcard.html
@@ -4,6 +4,35 @@
           </style></head><body><div class="wikipage">
     <div id="searchable"><h2 id="PuTTYcard">PuTTYcard</h2>
 <p>
+The idea behind PuTTYcard was to extend the capabilities
+of PuTTY without adding dependencies to PuTTY. Therefore
+all smart card routines were realized within a seperate
+DLL (namely PuTTYcard.dll). Pageant.exe would try to open
+this DLL. If it could not find it, it would behave like
+a "normal" Pageant.
+</p>
+<p>
+This only needed about 20 lines of codes within the source
+of pageant.exe and I was hoping that the PuTTY team would
+include this into future PuTTY-packages. They did not :-(
+</p>
+<p>
+Therefore I merged the source code of PuTTYcard.dll with
+the source code of  pageant.exe and released a smart card
+enabled version of pageant.exe. If you are interested you
+may download it at
+<a class="ext-link" href="http://smartcard-auth.de/ssh-en.html" shape="rect"><span class="icon">http://smartcard-auth.de/ssh-en.html</span></a>.
+</p>
+<p>
+You must register your public key if you want to use
+some features (for example secure PIN entry).
+If you used PuTTYcard in the past or are willing to test
+my smart card enabled version of pageant.exe with a new
+card or a new card reader I will send you a free licence.
+Just let me know at <a class="ext-link" href="mailto:pk at opensc-project.org" shape="rect"><span class="icon">pk at opensc-project.org</span></a>.
+</p>
+<h2 id="PuTTYcard1">PuTTYcard</h2>
+<p>
 PuTTYcard is an extension to PuTTY, the free SSH-client
 from Simon Tatham. With this extension PuTTY can use
 RSA-keys from external devices, ie. smart cards, usb-tokens.
diff --git a/doc/ReleaseHowto.html b/doc/ReleaseHowto.html
index 0afbd10..cecafea 100644
--- a/doc/ReleaseHowto.html
+++ b/doc/ReleaseHowto.html
@@ -13,7 +13,7 @@ The OpenSC version must be updated in these files:
 </p>
 <ul><li>configure.in
 </li><li>win32/version.rc
-</li><li>src/include/winversion.h
+</li><li>src/include/winconfig.h
 </li><li>docs/doxygen.conf
 </li></ul><p>
 The News file needs to be edited: put in Name and Date.
diff --git a/doc/CompatiblityIssues.html b/doc/TurkishEid.html
similarity index 84%
copy from doc/CompatiblityIssues.html
copy to doc/TurkishEid.html
index 48d2216..a3282ba 100644
--- a/doc/CompatiblityIssues.html
+++ b/doc/TurkishEid.html
@@ -1,5 +1,5 @@
 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>CompatiblityIssues - OpenSC - Trac</title><style type="text/css">
+<title>TurkishEid - OpenSC - Trac</title><style type="text/css">
            @import url(trac.css);
           </style></head><body><div class="wikipage">
     <div id="searchable"></div>
diff --git a/doc/index.html b/doc/index.html
index ab33185..e40c61f 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -35,6 +35,7 @@ license information see <a class="wiki" href="AuthorsAndCredits.html" shape="rec
 </li><li><a class="wiki" href="AustrianEid.html" shape="rect">Austrian Bürgerkarte, e-card</a>
 </li><li><a class="wiki" href="Australia.html" shape="rect">Australian national ID card</a>
 </li><li><a class="wiki" href="UnitedStatesPIV.html" shape="rect">United States PIV card applet</a>
+</li><li><a class="wiki" href="AKIS.html" shape="rect">Turkish EID Card</a>
 </li></ul><h2 id="SmartCards">Smart Cards</h2>
 <ul><li><a class="wiki" href="Cryptoflex.html" shape="rect">Schlumberger/Axalto Cryptoflex</a>
 </li><li><a class="wiki" href="Cyberflex.html" shape="rect">Schlumberger/Axalto Cyberflex</a>
@@ -49,6 +50,7 @@ license information see <a class="wiki" href="AuthorsAndCredits.html" shape="rec
 </li><li><a class="wiki" href="Starcos.html" shape="rect">Giesecke &amp; Devrient Starcos</a>
 </li><li><a class="wiki" href="Seccos.html" shape="rect">Giesecke &amp; Devrient Seccos</a>
 </li><li><a class="wiki" href="TCOS.html" shape="rect">TCOS based cards (NetKey E4, SignTrust, Smartkey)</a>
+</li><li><a class="wiki" href="AKIS.html" shape="rect">AKIS Smart Cards</a>
 </li></ul><h2 id="USBTokens">USB Tokens</h2>
 <ul><li><a class="wiki" href="AladdinEtokenPro.html" shape="rect">Aladdin eToken Pro</a>
 </li><li><a class="wiki" href="CryptoIdentityItsec.html" shape="rect">Eutron CryptoIdentity ITSEC</a>
diff --git a/etc/Makefile.in b/etc/Makefile.in
index e5dd59a..8aeb775 100644
--- a/etc/Makefile.in
+++ b/etc/Makefile.in
@@ -42,7 +42,7 @@ subdir = etc
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -78,6 +78,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -102,7 +104,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -110,8 +111,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/man/Makefile.in b/man/Makefile.in
index 0dbcbe9..07ac36b 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -41,7 +41,7 @@ subdir = man
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -83,6 +83,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -107,7 +109,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -115,8 +116,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/man/cardos-info.1 b/man/cardos-info.1
index 67580da..1c9e7d2 100644
--- a/man/cardos-info.1
+++ b/man/cardos-info.1
@@ -1,11 +1,11 @@
 .\"     Title: cardos\-info
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "CARDOS\-INFO" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "CARDOS\-INFO" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/cryptoflex-tool.1 b/man/cryptoflex-tool.1
index 661a95f..259f65f 100644
--- a/man/cryptoflex-tool.1
+++ b/man/cryptoflex-tool.1
@@ -1,11 +1,11 @@
 .\"     Title: cryptoflex\-tool
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "CRYPTOFLEX\-TOOL" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "CRYPTOFLEX\-TOOL" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/netkey-tool.1 b/man/netkey-tool.1
index 8083fb1..db9539d 100644
--- a/man/netkey-tool.1
+++ b/man/netkey-tool.1
@@ -1,11 +1,11 @@
 .\"     Title: netkey\-tool
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "NETKEY\-TOOL" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "NETKEY\-TOOL" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/opensc-config.1 b/man/opensc-config.1
index 693faf5..9ad6dca 100644
--- a/man/opensc-config.1
+++ b/man/opensc-config.1
@@ -1,11 +1,11 @@
 .\"     Title: opensc\-config
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "OPENSC\-CONFIG" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "OPENSC\-CONFIG" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/opensc-explorer.1 b/man/opensc-explorer.1
index 547effb..d069be7 100644
--- a/man/opensc-explorer.1
+++ b/man/opensc-explorer.1
@@ -1,11 +1,11 @@
 .\"     Title: opensc\-explorer
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "OPENSC\-EXPLORER" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "OPENSC\-EXPLORER" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/opensc-tool.1 b/man/opensc-tool.1
index aa56aa9..ee5b852 100644
--- a/man/opensc-tool.1
+++ b/man/opensc-tool.1
@@ -1,11 +1,11 @@
 .\"     Title: opensc\-tool
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "OPENSC\-TOOL" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "OPENSC\-TOOL" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/pkcs11-tool.1 b/man/pkcs11-tool.1
index b01e779..231720c 100644
--- a/man/pkcs11-tool.1
+++ b/man/pkcs11-tool.1
@@ -1,11 +1,11 @@
 .\"     Title: pkcs11\-tool
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "PKCS11\-TOOL" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "PKCS11\-TOOL" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/pkcs15-crypt.1 b/man/pkcs15-crypt.1
index 41535d2..c6b5a7b 100644
--- a/man/pkcs15-crypt.1
+++ b/man/pkcs15-crypt.1
@@ -1,11 +1,11 @@
 .\"     Title: pkcs15\-crypt
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "PKCS15\-CRYPT" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "PKCS15\-CRYPT" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/pkcs15-init.1 b/man/pkcs15-init.1
index accb2bc..9637038 100644
--- a/man/pkcs15-init.1
+++ b/man/pkcs15-init.1
@@ -1,11 +1,11 @@
 .\"     Title: pkcs15\-init
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "PKCS15\-INIT" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "PKCS15\-INIT" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/pkcs15-profile.5 b/man/pkcs15-profile.5
index f866808..3100015 100644
--- a/man/pkcs15-profile.5
+++ b/man/pkcs15-profile.5
@@ -1,11 +1,11 @@
 .\"     Title: pkcs15\-profile
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "PKCS15\-PROFILE" "5" "07/16/2007" "opensc" "OpenSC tools"
+.TH "PKCS15\-PROFILE" "5" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/pkcs15-tool.1 b/man/pkcs15-tool.1
index e9a3877..f53fce9 100644
--- a/man/pkcs15-tool.1
+++ b/man/pkcs15-tool.1
@@ -1,11 +1,11 @@
 .\"     Title: pkcs15\-tool
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC tools
 .\"    Source: opensc
 .\"
-.TH "PKCS15\-TOOL" "1" "07/16/2007" "opensc" "OpenSC tools"
+.TH "PKCS15\-TOOL" "1" "09/10/2007" "opensc" "OpenSC tools"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_app_info_t.3 b/man/sc_app_info_t.3
index 9465730..947015c 100644
--- a/man/sc_app_info_t.3
+++ b/man/sc_app_info_t.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_app_info_t
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_APP_INFO_T" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_APP_INFO_T" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_append_record.3 b/man/sc_append_record.3
index 2e22798..e4d4461 100644
--- a/man/sc_append_record.3
+++ b/man/sc_append_record.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_append_record
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_APPEND_RECORD" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_APPEND_RECORD" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_decode.3 b/man/sc_asn1_decode.3
index 2518db8..ea91392 100644
--- a/man/sc_asn1_decode.3
+++ b/man/sc_asn1_decode.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_decode
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_DECODE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_DECODE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_encode.3 b/man/sc_asn1_encode.3
index d2f7443..cece2e3 100644
--- a/man/sc_asn1_encode.3
+++ b/man/sc_asn1_encode.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_encode
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_ENCODE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_ENCODE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_entry.3 b/man/sc_asn1_entry.3
index 090b366..463fa1c 100644
--- a/man/sc_asn1_entry.3
+++ b/man/sc_asn1_entry.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_entry
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_ENTRY" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_ENTRY" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_find_tag.3 b/man/sc_asn1_find_tag.3
index 4ecfcc2..6a04534 100644
--- a/man/sc_asn1_find_tag.3
+++ b/man/sc_asn1_find_tag.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_find_tag
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_FIND_TAG" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_FIND_TAG" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_print_tags.3 b/man/sc_asn1_print_tags.3
index 0d13497..1515636 100644
--- a/man/sc_asn1_print_tags.3
+++ b/man/sc_asn1_print_tags.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_print_tags
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_PRINT_TAGS" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_PRINT_TAGS" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_put_tag.3 b/man/sc_asn1_put_tag.3
index d47dbb8..720d237 100644
--- a/man/sc_asn1_put_tag.3
+++ b/man/sc_asn1_put_tag.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_put_tag
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_PUT_TAG" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_PUT_TAG" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_read_tag.3 b/man/sc_asn1_read_tag.3
index 00d79c9..d8b66b9 100644
--- a/man/sc_asn1_read_tag.3
+++ b/man/sc_asn1_read_tag.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_read_tag
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_READ_TAG" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_READ_TAG" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_skip_tag.3 b/man/sc_asn1_skip_tag.3
index 7535278..f4d9e63 100644
--- a/man/sc_asn1_skip_tag.3
+++ b/man/sc_asn1_skip_tag.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_skip_tag
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_SKIP_TAG" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_SKIP_TAG" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_asn1_verify_tag.3 b/man/sc_asn1_verify_tag.3
index 9189f97..8e93e4c 100644
--- a/man/sc_asn1_verify_tag.3
+++ b/man/sc_asn1_verify_tag.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_asn1_verify_tag
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ASN1_VERIFY_TAG" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ASN1_VERIFY_TAG" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_base64_decode.3 b/man/sc_base64_decode.3
index e07124c..0a9c2ed 100644
--- a/man/sc_base64_decode.3
+++ b/man/sc_base64_decode.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_base64_decode
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_BASE64_DECODE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_BASE64_DECODE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_base64_encode.3 b/man/sc_base64_encode.3
index aca2989..54b7cd3 100644
--- a/man/sc_base64_encode.3
+++ b/man/sc_base64_encode.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_base64_encode
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_BASE64_ENCODE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_BASE64_ENCODE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_card_ctl.3 b/man/sc_card_ctl.3
index 205f754..1e04a86 100644
--- a/man/sc_card_ctl.3
+++ b/man/sc_card_ctl.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_card_ctl
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_CARD_CTL" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_CARD_CTL" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_card_t.3 b/man/sc_card_t.3
index 918f530..09b3dc9 100644
--- a/man/sc_card_t.3
+++ b/man/sc_card_t.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_card_t
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_CARD_T" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_CARD_T" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_card_valid.3 b/man/sc_card_valid.3
index 46d698c..80a6ba7 100644
--- a/man/sc_card_valid.3
+++ b/man/sc_card_valid.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_card_valid
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_CARD_VALID" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_CARD_VALID" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_check_sw.3 b/man/sc_check_sw.3
index 0b85f97..61175fb 100644
--- a/man/sc_check_sw.3
+++ b/man/sc_check_sw.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_check_sw
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_CHECK_SW" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_CHECK_SW" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_connect_card.3 b/man/sc_connect_card.3
index 8aeaf0c..075f768 100644
--- a/man/sc_connect_card.3
+++ b/man/sc_connect_card.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_connect_card
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_CONNECT_CARD" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_CONNECT_CARD" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_copy_asn1_entry.3 b/man/sc_copy_asn1_entry.3
index 9ca46a2..0c2ffe6 100644
--- a/man/sc_copy_asn1_entry.3
+++ b/man/sc_copy_asn1_entry.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_copy_asn1_entry
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_COPY_ASN1_ENTRY" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_COPY_ASN1_ENTRY" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_create_file.3 b/man/sc_create_file.3
index 633e743..00c7181 100644
--- a/man/sc_create_file.3
+++ b/man/sc_create_file.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_create_file
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_CREATE_FILE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_CREATE_FILE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_delete_file.3 b/man/sc_delete_file.3
index ca35193..5708855 100644
--- a/man/sc_delete_file.3
+++ b/man/sc_delete_file.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_delete_file
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_DELETE_FILE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_DELETE_FILE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_delete_record.3 b/man/sc_delete_record.3
index 4366c04..da2893a 100644
--- a/man/sc_delete_record.3
+++ b/man/sc_delete_record.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_delete_record
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_DELETE_RECORD" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_DELETE_RECORD" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_der_clear.3 b/man/sc_der_clear.3
index c477e88..a1f719c 100644
--- a/man/sc_der_clear.3
+++ b/man/sc_der_clear.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_der_clear
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_DER_CLEAR" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_DER_CLEAR" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_der_copy.3 b/man/sc_der_copy.3
index 563169b..4020e98 100644
--- a/man/sc_der_copy.3
+++ b/man/sc_der_copy.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_der_copy
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_DER_COPY" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_DER_COPY" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_detect_card_presence.3 b/man/sc_detect_card_presence.3
index bf08f40..4879536 100644
--- a/man/sc_detect_card_presence.3
+++ b/man/sc_detect_card_presence.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_detect_card_presence
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_DETECT_CARD_PRESE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_DETECT_CARD_PRESE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_disconnect_card.3 b/man/sc_disconnect_card.3
index ffc4b88..280d89d 100644
--- a/man/sc_disconnect_card.3
+++ b/man/sc_disconnect_card.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_disconnect_card
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_DISCONNECT_CARD" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_DISCONNECT_CARD" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_enum_apps.3 b/man/sc_enum_apps.3
index e878422..1efcb19 100644
--- a/man/sc_enum_apps.3
+++ b/man/sc_enum_apps.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_enum_apps
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ENUM_APPS" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ENUM_APPS" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_establish_context.3 b/man/sc_establish_context.3
index 5c3bcb9..7914db4 100644
--- a/man/sc_establish_context.3
+++ b/man/sc_establish_context.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_establish_context
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_ESTABLISH_CONTEXT" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_ESTABLISH_CONTEXT" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_file_dup.3 b/man/sc_file_dup.3
index 7ee67fb..51ceee2 100644
--- a/man/sc_file_dup.3
+++ b/man/sc_file_dup.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_file_dup
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FILE_DUP" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FILE_DUP" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_file_free.3 b/man/sc_file_free.3
index fa87fb3..feafd1f 100644
--- a/man/sc_file_free.3
+++ b/man/sc_file_free.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_file_free
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FILE_FREE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FILE_FREE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_file_new.3 b/man/sc_file_new.3
index 8c9991c..e8db638 100644
--- a/man/sc_file_new.3
+++ b/man/sc_file_new.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_file_new
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FILE_NEW" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FILE_NEW" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_file_t.3 b/man/sc_file_t.3
index f220695..d285a98 100644
--- a/man/sc_file_t.3
+++ b/man/sc_file_t.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_file_t
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FILE_T" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FILE_T" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_find_app_by_aid.3 b/man/sc_find_app_by_aid.3
index a351833..22a8f3d 100644
--- a/man/sc_find_app_by_aid.3
+++ b/man/sc_find_app_by_aid.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_find_app_by_aid
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FIND_APP_BY_AID" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FIND_APP_BY_AID" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_find_pkcs15_app.3 b/man/sc_find_pkcs15_app.3
index 9331207..665e0c8 100644
--- a/man/sc_find_pkcs15_app.3
+++ b/man/sc_find_pkcs15_app.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_find_pkcs15_app
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FIND_PKCS15_APP" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FIND_PKCS15_APP" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_format_apdu.3 b/man/sc_format_apdu.3
index bed4f8e..4b07e77 100644
--- a/man/sc_format_apdu.3
+++ b/man/sc_format_apdu.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_format_apdu
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FORMAT_APDU" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FORMAT_APDU" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_format_asn1_entry.3 b/man/sc_format_asn1_entry.3
index fa8db3e..2c1db99 100644
--- a/man/sc_format_asn1_entry.3
+++ b/man/sc_format_asn1_entry.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_format_asn1_entry
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FORMAT_ASN1_ENTRY" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FORMAT_ASN1_ENTRY" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_free_apps.3 b/man/sc_free_apps.3
index a7f2ff4..8b15d0b 100644
--- a/man/sc_free_apps.3
+++ b/man/sc_free_apps.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_free_apps
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_FREE_APPS" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_FREE_APPS" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_get_cache_dir.3 b/man/sc_get_cache_dir.3
index 6584760..c562a93 100644
--- a/man/sc_get_cache_dir.3
+++ b/man/sc_get_cache_dir.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_get_cache_dir
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_GET_CACHE_DIR" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_GET_CACHE_DIR" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_get_challenge.3 b/man/sc_get_challenge.3
index 51c6e49..4a49b9f 100644
--- a/man/sc_get_challenge.3
+++ b/man/sc_get_challenge.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_get_challenge
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_GET_CHALLENGE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_GET_CHALLENGE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_get_data.3 b/man/sc_get_data.3
index 4b37177..0ac219c 100644
--- a/man/sc_get_data.3
+++ b/man/sc_get_data.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_get_data
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_GET_DATA" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_GET_DATA" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_list_files.3 b/man/sc_list_files.3
index ff74cff..ed9bca0 100644
--- a/man/sc_list_files.3
+++ b/man/sc_list_files.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_list_files
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_LIST_FILES" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_LIST_FILES" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_lock.3 b/man/sc_lock.3
index 5dd7e2f..dae6cdb 100644
--- a/man/sc_lock.3
+++ b/man/sc_lock.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_lock
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_LOCK" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_LOCK" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_make_cache_dir.3 b/man/sc_make_cache_dir.3
index 75bd357..37dea52 100644
--- a/man/sc_make_cache_dir.3
+++ b/man/sc_make_cache_dir.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_make_cache_dir
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_MAKE_CACHE_DIR" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_MAKE_CACHE_DIR" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_put_data.3 b/man/sc_put_data.3
index eaa03eb..d459523 100644
--- a/man/sc_put_data.3
+++ b/man/sc_put_data.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_put_data
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_PUT_DATA" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_PUT_DATA" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_read_binary.3 b/man/sc_read_binary.3
index 76f5b20..0817bfb 100644
--- a/man/sc_read_binary.3
+++ b/man/sc_read_binary.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_read_binary
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_READ_BINARY" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_READ_BINARY" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_read_record.3 b/man/sc_read_record.3
index f705217..4480fd2 100644
--- a/man/sc_read_record.3
+++ b/man/sc_read_record.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_read_record
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_READ_RECORD" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_READ_RECORD" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_release_context.3 b/man/sc_release_context.3
index 6cf8b49..942194c 100644
--- a/man/sc_release_context.3
+++ b/man/sc_release_context.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_release_context
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_RELEASE_CONTEXT" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_RELEASE_CONTEXT" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_select_file.3 b/man/sc_select_file.3
index 20543ca..e9165da 100644
--- a/man/sc_select_file.3
+++ b/man/sc_select_file.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_select_file
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_SELECT_FILE" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_SELECT_FILE" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_set_card_driver.3 b/man/sc_set_card_driver.3
index 04ef5fe..66109f9 100644
--- a/man/sc_set_card_driver.3
+++ b/man/sc_set_card_driver.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_set_card_driver
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_SET_CARD_DRIVER" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_SET_CARD_DRIVER" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_strerror.3 b/man/sc_strerror.3
index eaff3b6..b8711ed 100644
--- a/man/sc_strerror.3
+++ b/man/sc_strerror.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_strerror
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_STRERROR" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_STRERROR" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_transmit_apdu.3 b/man/sc_transmit_apdu.3
index 7c2b6e9..c7d9b59 100644
--- a/man/sc_transmit_apdu.3
+++ b/man/sc_transmit_apdu.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_transmit_apdu
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_TRANSMIT_APDU" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_TRANSMIT_APDU" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_unlock.3 b/man/sc_unlock.3
index b72e3f6..ea28440 100644
--- a/man/sc_unlock.3
+++ b/man/sc_unlock.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_unlock
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_UNLOCK" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_UNLOCK" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_update_binary.3 b/man/sc_update_binary.3
index 89f430e..da514e0 100644
--- a/man/sc_update_binary.3
+++ b/man/sc_update_binary.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_update_binary
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_UPDATE_BINARY" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_UPDATE_BINARY" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_update_dir.3 b/man/sc_update_dir.3
index 42ad1f4..cc37e0e 100644
--- a/man/sc_update_dir.3
+++ b/man/sc_update_dir.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_update_dir
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_UPDATE_DIR" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_UPDATE_DIR" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_update_record.3 b/man/sc_update_record.3
index 7ce81fa..7d8ee32 100644
--- a/man/sc_update_record.3
+++ b/man/sc_update_record.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_update_record
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_UPDATE_RECORD" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_UPDATE_RECORD" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_wait_for_event.3 b/man/sc_wait_for_event.3
index 962b3c9..11b886f 100644
--- a/man/sc_wait_for_event.3
+++ b/man/sc_wait_for_event.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_wait_for_event
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_WAIT_FOR_EVENT" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_WAIT_FOR_EVENT" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_write_binary.3 b/man/sc_write_binary.3
index 502dec3..3da21bf 100644
--- a/man/sc_write_binary.3
+++ b/man/sc_write_binary.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_write_binary
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_WRITE_BINARY" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_WRITE_BINARY" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/man/sc_write_record.3 b/man/sc_write_record.3
index 3125496..a802b9e 100644
--- a/man/sc_write_record.3
+++ b/man/sc_write_record.3
@@ -1,11 +1,11 @@
 .\"     Title: sc_write_record
 .\"    Author: 
 .\" Generator: DocBook XSL Stylesheets v1.71.0 <http://docbook.sf.net/>
-.\"      Date: 07/16/2007
+.\"      Date: 09/10/2007
 .\"    Manual: OpenSC API reference
 .\"    Source: opensc
 .\"
-.TH "SC_WRITE_RECORD" "3" "07/16/2007" "opensc" "OpenSC API reference"
+.TH "SC_WRITE_RECORD" "3" "09/10/2007" "opensc" "OpenSC API reference"
 .\" disable hyphenation
 .nh
 .\" disable justification (adjust text to left margin only)
diff --git a/src/Makefile.in b/src/Makefile.in
index 9c8f432..c1f364e 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -41,7 +41,7 @@ subdir = src
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -85,6 +85,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -109,7 +111,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -117,8 +118,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/common/Makefile.in b/src/common/Makefile.in
index afae5de..e514d53 100644
--- a/src/common/Makefile.in
+++ b/src/common/Makefile.in
@@ -41,7 +41,7 @@ subdir = src/common
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -76,6 +76,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -100,7 +102,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -108,8 +109,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/include/Makefile.in b/src/include/Makefile.in
index 7d67762..fbfa234 100644
--- a/src/include/Makefile.in
+++ b/src/include/Makefile.in
@@ -41,7 +41,7 @@ subdir = src/include
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -85,6 +85,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -109,7 +111,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -117,8 +118,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/include/opensc/Makefile.in b/src/include/opensc/Makefile.in
index 4b45d79..f813cf0 100644
--- a/src/include/opensc/Makefile.in
+++ b/src/include/opensc/Makefile.in
@@ -41,7 +41,7 @@ subdir = src/include/opensc
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -76,6 +76,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -100,7 +102,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -108,8 +109,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/include/winconfig.h b/src/include/winconfig.h
index 3944360..92854c1 100644
--- a/src/include/winconfig.h
+++ b/src/include/winconfig.h
@@ -71,7 +71,7 @@
 #define PATH_MAX _MAX_PATH
 
 #ifndef VERSION
-#define VERSION "0.11.3"
+#define VERSION "0.11.4"
 #endif
 
 /* src/common/getpass.c */
diff --git a/src/libopensc/Makefile.am b/src/libopensc/Makefile.am
index 5772406..24863e6 100644
--- a/src/libopensc/Makefile.am
+++ b/src/libopensc/Makefile.am
@@ -7,7 +7,7 @@ MAINTAINERCLEANFILES = Makefile.in
 EXTRA_DIST = Makefile.mak libopensc.pc.in libpkcs15init.pc.in libscconf.pc.in 
 
 INCLUDES = $(CPPFLAGS) $(OPENSSL_CFLAGS) $(OPENCT_CFLAGS) $(PCSC_CFLAGS) \
-	-I$(top_srcdir)/src/common
+	$(LTLIB_CFLAGS) -I$(top_srcdir)/src/common
 AM_LDFLAGS = 
 
 bin_SCRIPTS = opensc-config
@@ -30,14 +30,14 @@ libopensc_la_SOURCES = \
 	card-mcrd.c card-starcos.c card-openpgp.c card-jcop.c \
 	card-oberthur.c card-belpic.c card-atrust-acos.c \
 	card-incrypto34.c card-piv.c card-muscle.c card-acos5.c \
-	card-asepcos.c \
+	card-asepcos.c card-akis.c\
 	\
 	pkcs15-openpgp.c pkcs15-infocamere.c pkcs15-starcert.c \
 	pkcs15-tcos.c pkcs15-esteid.c pkcs15-postecert.c pkcs15-gemsafe.c \
 	pkcs15-actalis.c pkcs15-atrust-acos.c pkcs15-tccardos.c pkcs15-piv.c \
 	compression.c p15card-helper.c
 libopensc_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@
-libopensc_la_LIBADD = @LIBSCCONF@ $(OPENSSL_LIBS) $(OPENCT_LIBS) $(PCSC_LIBS) $(LTLIBLTDL)
+libopensc_la_LIBADD = @LIBSCCONF@ $(OPENSSL_LIBS) $(OPENCT_LIBS) $(PCSC_LIBS) $(LTLIB_LIBS)
 
 include_HEADERS = \
 	opensc.h pkcs15.h emv.h \
diff --git a/src/libopensc/Makefile.in b/src/libopensc/Makefile.in
index 4897be9..0db5a30 100644
--- a/src/libopensc/Makefile.in
+++ b/src/libopensc/Makefile.in
@@ -48,7 +48,7 @@ DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \
 	$(srcdir)/libscconf.pc.in $(srcdir)/opensc-config.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -80,11 +80,12 @@ am_libopensc_la_OBJECTS = sc.lo ctx.lo ui.lo log.lo errors.lo asn1.lo \
 	card-default.lo card-mcrd.lo card-starcos.lo card-openpgp.lo \
 	card-jcop.lo card-oberthur.lo card-belpic.lo \
 	card-atrust-acos.lo card-incrypto34.lo card-piv.lo \
-	card-muscle.lo card-acos5.lo card-asepcos.lo pkcs15-openpgp.lo \
-	pkcs15-infocamere.lo pkcs15-starcert.lo pkcs15-tcos.lo \
-	pkcs15-esteid.lo pkcs15-postecert.lo pkcs15-gemsafe.lo \
-	pkcs15-actalis.lo pkcs15-atrust-acos.lo pkcs15-tccardos.lo \
-	pkcs15-piv.lo compression.lo p15card-helper.lo
+	card-muscle.lo card-acos5.lo card-asepcos.lo card-akis.lo \
+	pkcs15-openpgp.lo pkcs15-infocamere.lo pkcs15-starcert.lo \
+	pkcs15-tcos.lo pkcs15-esteid.lo pkcs15-postecert.lo \
+	pkcs15-gemsafe.lo pkcs15-actalis.lo pkcs15-atrust-acos.lo \
+	pkcs15-tccardos.lo pkcs15-piv.lo compression.lo \
+	p15card-helper.lo
 libopensc_la_OBJECTS = $(am_libopensc_la_OBJECTS)
 binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
 SCRIPTS = $(bin_SCRIPTS)
@@ -134,6 +135,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -158,7 +161,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -166,8 +168,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
@@ -253,7 +256,7 @@ target_alias = @target_alias@
 MAINTAINERCLEANFILES = Makefile.in
 EXTRA_DIST = Makefile.mak libopensc.pc.in libpkcs15init.pc.in libscconf.pc.in 
 INCLUDES = $(CPPFLAGS) $(OPENSSL_CFLAGS) $(OPENCT_CFLAGS) $(PCSC_CFLAGS) \
-	-I$(top_srcdir)/src/common
+	$(LTLIB_CFLAGS) -I$(top_srcdir)/src/common
 
 AM_LDFLAGS = 
 bin_SCRIPTS = opensc-config
@@ -275,7 +278,7 @@ libopensc_la_SOURCES = \
 	card-mcrd.c card-starcos.c card-openpgp.c card-jcop.c \
 	card-oberthur.c card-belpic.c card-atrust-acos.c \
 	card-incrypto34.c card-piv.c card-muscle.c card-acos5.c \
-	card-asepcos.c \
+	card-asepcos.c card-akis.c\
 	\
 	pkcs15-openpgp.c pkcs15-infocamere.c pkcs15-starcert.c \
 	pkcs15-tcos.c pkcs15-esteid.c pkcs15-postecert.c pkcs15-gemsafe.c \
@@ -283,7 +286,7 @@ libopensc_la_SOURCES = \
 	compression.c p15card-helper.c
 
 libopensc_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@
-libopensc_la_LIBADD = @LIBSCCONF@ $(OPENSSL_LIBS) $(OPENCT_LIBS) $(PCSC_LIBS) $(LTLIBLTDL)
+libopensc_la_LIBADD = @LIBSCCONF@ $(OPENSSL_LIBS) $(OPENCT_LIBS) $(PCSC_LIBS) $(LTLIB_LIBS)
 include_HEADERS = \
 	opensc.h pkcs15.h emv.h \
 	cardctl.h asn1.h log.h ui.h \
@@ -392,6 +395,7 @@ distclean-compile:
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/asn1.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/base64.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/card-acos5.Plo at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/card-akis.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/card-asepcos.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/card-atrust-acos.Plo at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/card-belpic.Plo at am__quote@
diff --git a/src/libopensc/Makefile.mak b/src/libopensc/Makefile.mak
index 4bc0603..9e85b3f 100644
--- a/src/libopensc/Makefile.mak
+++ b/src/libopensc/Makefile.mak
@@ -26,7 +26,7 @@ OBJECTS			= \
 	card-setcos.obj card-miocos.obj card-flex.obj card-gpk.obj \
 	card-cardos.obj card-tcos.obj card-emv.obj card-default.obj \
 	card-mcrd.obj card-starcos.obj card-openpgp.obj card-jcop.obj \
-	card-oberthur.obj card-belpic.obj card-atrust-acos.obj \
+	card-oberthur.obj card-belpic.obj card-atrust-acos.obj card-akis.obj \
 	card-incrypto34.obj card-piv.obj card-acos5.obj card-asepcos.obj \
 	muscle.obj card-muscle.obj muscle-filesystem.obj \
 	compression.obj p15card-helper.obj \
diff --git a/src/libopensc/asn1.c b/src/libopensc/asn1.c
index d6876f5..a0fa785 100644
--- a/src/libopensc/asn1.c
+++ b/src/libopensc/asn1.c
@@ -1054,15 +1054,18 @@ static int asn1_decode_entry(sc_context_t *ctx,struct sc_asn1_entry *entry,
 			assert(len != NULL);
 			if (entry->flags & SC_ASN1_ALLOC) {
 				u8 **buf = (u8 **) parm;
-				*buf = (u8 *) malloc(objlen-1);
+				*buf = (u8 *) malloc(objlen+1);
 				if (*buf == NULL) {
 					r = SC_ERROR_OUT_OF_MEMORY;
 					break;
 				}
-				*len = objlen-1;
+				*len = objlen+1;
 				parm = *buf;
 			}
 			r = sc_asn1_decode_utf8string(obj, objlen, (u8 *) parm, len);
+			if (entry->flags & SC_ASN1_ALLOC) {
+				*len -= 1;
+			}
 		}
 		break;
 	case SC_ASN1_PATH:
diff --git a/src/libopensc/card-akis.c b/src/libopensc/card-akis.c
new file mode 100644
index 0000000..0ae022b
--- /dev/null
+++ b/src/libopensc/card-akis.c
@@ -0,0 +1,525 @@
+/*
+ * card-akis.c: Support for AKIS smart cards
+ *
+ * Copyright (C) 2007 TUBITAK / UEKAE
+ * contact: bilgi at pardus.org.tr
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include <string.h>
+#include <stdlib.h>
+
+#include "internal.h"
+#include "asn1.h"
+#include "cardctl.h"
+
+/* generic iso 7816 operations table */
+static const struct sc_card_operations *iso_ops = NULL;
+
+/* our operations table with overrides */
+static struct sc_card_operations akis_ops;
+
+static struct sc_card_driver akis_drv = {
+	"TUBITAK UEKAE AKIS",
+	"akis",
+	&akis_ops,
+	NULL, 0, NULL
+};
+
+static struct sc_atr_table akis_atrs[] = {
+	{ "3b:ba:11:00:81:31:fe:4d:55:45:4b:41:45:20:56:31:2e:30:ae", NULL, NULL, SC_CARD_TYPE_AKIS_GENERIC, 0, NULL },
+	{ NULL, NULL, NULL, 0, 0, NULL }
+};
+
+static int
+akis_match_card(sc_card_t *card)
+{
+	int i;
+
+	i = _sc_match_atr(card, akis_atrs, &card->type);
+	if (i < 0)
+		return 0;
+	return 1;
+}
+
+static int
+akis_init(sc_card_t *card)
+{
+	unsigned long flags;
+
+	card->name = "AKIS";
+	card->cla = 0x00;
+
+	flags = SC_ALGORITHM_RSA_RAW;
+        _sc_card_add_rsa_alg(card, 2048, flags, 0);
+
+	return 0;
+}
+
+static int
+select_file(sc_card_t *card, sc_apdu_t *apdu, const sc_path_t *path,
+	    int mode, sc_file_t **file_out)
+{
+	int r;
+        u8 rbuf[SC_MAX_APDU_BUFFER_SIZE];
+        sc_file_t *file;
+
+	sc_format_apdu(card, apdu, SC_APDU_CASE_4_SHORT, 0xA4, mode, 0);
+	apdu->resp = rbuf;
+	apdu->resplen = sizeof(rbuf);
+	apdu->datalen = path->len;
+	apdu->data = path->value;
+	apdu->lc = path->len;
+	apdu->le = 256;
+
+	r = sc_transmit_apdu(card, apdu);
+	SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+	r = sc_check_sw(card, apdu->sw1, apdu->sw2);
+	SC_TEST_RET(card->ctx, r, "Card returned error");
+
+	if (file_out == NULL)
+		return 0;
+
+	file = sc_file_new();
+	if (file == NULL)
+		SC_FUNC_RETURN(card->ctx, 0, SC_ERROR_OUT_OF_MEMORY);
+
+	r = card->ops->process_fci(card, file, apdu->resp + 2, apdu->resp[1]);
+	if (r) {
+		sc_file_free(file);
+		return r;
+	}
+
+	*file_out = file;
+	return 0;
+}
+
+static int
+akis_select_file(sc_card_t *card, const sc_path_t *path,
+		 sc_file_t **file_out)
+{
+	int r;
+	sc_apdu_t apdu;
+
+	if (path->type == SC_PATH_TYPE_PATH) {
+		/* FIXME: iso implementation seems already do that
+		*/
+		r = select_file(card, &apdu, path, path->len == 2 ? 0 : 8, file_out);
+
+		SC_TEST_RET(card->ctx, r, "Unable to select DF");
+		return 0;
+	} else if (path->type == SC_PATH_TYPE_FILE_ID) {
+		/* AKIS differentiates between EF and DF files
+		 * when selecting with ID, this workaround tries both
+		 */
+		r = select_file(card, &apdu, path, 2, file_out);
+		if (r)
+			r = select_file(card, &apdu, path, 0, file_out);
+
+		SC_TEST_RET(card->ctx, r, "Unable to select DF");
+		return 0;
+	} else {
+		return iso_ops->select_file(card, path, file_out);
+	}
+}
+
+static int
+akis_list_files(sc_card_t *card, u8 *buf, size_t buflen)
+{
+	/* This AKIS specific command is not provided by generic ISO driver
+	 */
+	sc_apdu_t apdu;
+	u8 rbuf[256];
+	size_t left, fids = 0;
+	u8 *p;
+	int r;
+
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0x18, 0, 0);
+	apdu.cla = 0x80;
+	apdu.le = 256;
+	apdu.resplen = sizeof(rbuf);
+	apdu.resp = rbuf;
+
+	r = sc_transmit_apdu(card, &apdu);
+	SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+	r = sc_check_sw(card, apdu.sw1, apdu.sw2);
+	SC_TEST_RET(card->ctx, r, "DIRECTORY command returned error");
+
+	left = apdu.resplen;
+	p = rbuf;
+
+	while (left > 19) {
+		if (p[0] != 0x2f && p[0] != 0x3d) {
+			sc_error(card->ctx, "Malformatted list reply %02x", p[0]);
+			return SC_ERROR_INTERNAL;
+		}
+		if (buflen >= 2) {
+			buf[fids++] = p[1];
+			buf[fids++] = p[2];
+			buflen -= 2;
+		} else {
+			break;
+		}
+		p += 20;
+		left -= 20;
+	}
+
+	r = fids;
+	SC_FUNC_RETURN(card->ctx, 1, r);
+}
+
+static int
+akis_process_fci(sc_card_t *card, sc_file_t *file,
+		 const u8 *buf, size_t buflen)
+{
+	int r;
+	size_t len;
+	const u8 *p;
+	u8 perms;
+
+	r = iso_ops->process_fci(card, file, buf, buflen);
+	if (r < 0) return r;
+
+	/* AKIS uses a different security model than ISO implementation
+	 */
+	p = sc_asn1_find_tag(card->ctx, buf, buflen, 0x90, &len);
+	if (p == NULL) {
+		sc_error(card->ctx, "Security tag missing");
+		return SC_ERROR_INTERNAL;
+	}
+	perms = p[0];
+	/* Bit definitions:
+	 * 0x01 Encrypted
+	 * 0x02 Valid
+	 * 0x04 PIN needed
+	 * 0x08 New PIN
+	 * 0x10 Read
+	 * 0x20 Write
+	 * 0x40 Wrong PIN entered once
+	 * 0x80 Last try for PIN
+	 */
+
+	if (file->type == SC_FILE_TYPE_DF) {
+		if (perms & 0x04)
+			sc_file_add_acl_entry(file, SC_AC_OP_LIST_FILES, SC_AC_CHV, 0);
+	} else {
+		if (!(perms & 0x04))
+			sc_file_add_acl_entry(file, SC_AC_OP_READ, SC_AC_CHV, 0);
+	}
+
+	return 0;
+}
+
+static int
+akis_create_file(sc_card_t *card, sc_file_t *file)
+{
+	int r;
+	u8 type;
+	u8 acl;
+	u8 fid[4];
+        u8 rbuf[SC_MAX_APDU_BUFFER_SIZE];
+	sc_apdu_t apdu;
+
+	/* AKIS uses different create commands for EF and DF.
+	 * Parameters are not passed as ASN.1 structs but in
+	 * a custom format.
+	 */
+
+	/* FIXME: hardcoded for now, better get it from file acl params */
+	acl = 0xb0;
+
+	fid[0] = (file->id >> 8) & 0xFF;
+	fid[1] = file->id & 0xFF;
+
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x15, 0, acl);
+	apdu.cla = 0x80;
+	apdu.data = fid;
+	apdu.datalen = 2;
+	apdu.lc = 2;
+	apdu.resp = rbuf;
+	apdu.resplen = sizeof(rbuf);
+
+	if (file->type == SC_FILE_TYPE_WORKING_EF) {
+		switch (file->ef_structure) {
+			case SC_FILE_EF_TRANSPARENT:
+				type = 0x80;
+				break;
+			case SC_FILE_EF_LINEAR_FIXED:
+				type = 0x41;
+				break;
+			case SC_FILE_EF_CYCLIC:
+				type = 0x43;
+				break;
+			case SC_FILE_EF_LINEAR_VARIABLE_TLV:
+				type = 0x45;
+				break;
+			default:
+				sc_error(card->ctx, "This EF structure is not supported yet");
+				return SC_ERROR_NOT_SUPPORTED;
+		}
+		apdu.p1 = type;
+		if (type == 0x41 || type == 0x43) {
+			fid[2] = file->record_length;
+			apdu.datalen++;
+			apdu.lc++;
+		}
+	} else if (file->type == SC_FILE_TYPE_DF) {
+		apdu.ins = 0x10;
+	} else {
+		sc_error(card->ctx, "Unknown file type");
+		return SC_ERROR_NOT_SUPPORTED;
+	}
+
+	r = sc_transmit_apdu(card, &apdu);
+	SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+	return sc_check_sw(card, apdu.sw1, apdu.sw2);
+}
+
+static int
+akis_delete_file(sc_card_t *card, const sc_path_t *path)
+{
+	int r;
+	u8 sbuf[2];
+	const u8 *buf;
+	size_t buflen;
+	int type;
+	sc_apdu_t apdu;
+
+	switch (path->type) {
+		case SC_PATH_TYPE_FILE_ID:
+			sbuf[0] = path->value[0];
+			sbuf[1] = path->value[1];
+			buf = sbuf;
+			buflen = 2;
+			type = 0x02;
+			break;
+		case SC_PATH_TYPE_PATH:
+			buf = path->value;
+			buflen = path->len;
+			type = 0x08;
+			break;
+		default:
+			sc_error(card->ctx, "File type has to be FID or PATH");
+			SC_FUNC_RETURN(card->ctx, 1, SC_ERROR_INVALID_ARGUMENTS);
+	}
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x16, type, 0x00);
+        apdu.cla = 0x80;
+	apdu.lc = buflen;
+	apdu.datalen = buflen;
+	apdu.data = buf;
+
+	r = sc_transmit_apdu(card, &apdu);
+	SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+	return sc_check_sw(card, apdu.sw1, apdu.sw2);
+}
+
+static int
+akis_pin_cmd(struct sc_card *card, struct sc_pin_cmd_data *data, int *tries_left)
+{
+	int r;
+	sc_apdu_t apdu;
+
+	if (data->cmd != SC_PIN_CMD_VERIFY) {
+		sc_error(card->ctx, "Other pin cmds not supported yet");
+		return SC_ERROR_NOT_SUPPORTED;
+	}
+
+	/* AKIS VERIFY command uses P2 0x80 while ISO uses 0x00
+	 */
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_3_SHORT, 0x20, 0, 0x80);
+	apdu.data = data->pin1.data;
+	apdu.datalen = data->pin1.len;
+	apdu.lc = apdu.datalen;
+	apdu.sensitive = 1;
+
+	r = sc_transmit_apdu(card, &apdu);
+	SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+	r = sc_check_sw(card, apdu.sw1, apdu.sw2);
+	return r;
+}
+
+static int
+akis_get_data(sc_card_t *card, unsigned int dataid, u8 *buf, size_t len)
+{
+	int r;
+	sc_apdu_t apdu;
+
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_2_SHORT, 0xCA, 0x01, dataid);
+	apdu.resp = buf;
+	apdu.resplen = len;
+	apdu.le = len;
+
+	r = sc_transmit_apdu(card, &apdu);
+	SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+	r = sc_check_sw(card, apdu.sw1, apdu.sw2);
+	return r;
+}
+
+static int
+akis_get_serialnr(sc_card_t *card, sc_serial_number_t *serial)
+{
+	int r;
+	u8 system[128];
+
+	if (!serial)
+		return SC_ERROR_INVALID_ARGUMENTS;
+
+	/* see if we have cached serial number */
+	if (card->serialnr.len) goto end;
+
+	/* read serial number */
+	r = akis_get_data(card, 6, system, 0x4D);
+	SC_TEST_RET(card->ctx, r, "GET_DATA failed");
+
+	card->serialnr.len = 12;
+	memcpy(card->serialnr.value, system+55, 12);
+
+end:
+	memcpy(serial, &card->serialnr, sizeof(*serial));
+	return SC_SUCCESS;
+}
+
+static int
+akis_lifecycle_get(sc_card_t *card, int *mode)
+{
+	int r;
+	u8 memory[10];
+
+	r = akis_get_data(card, 4, memory, 10);
+	SC_TEST_RET(card->ctx, r, "GET_DATA failed");
+
+	switch(memory[6]) {
+		case 0xA0:
+			*mode = SC_CARDCTRL_LIFECYCLE_ADMIN;
+			break;
+		case 0xA5:
+			*mode = SC_CARDCTRL_LIFECYCLE_USER;
+			break;
+		default:
+			*mode = SC_CARDCTRL_LIFECYCLE_OTHER;
+			break;
+	}
+	return SC_SUCCESS;
+}
+
+static int
+akis_lifecycle_set(sc_card_t *card, int *mode)
+{
+	int r;
+	u8 stage;
+	sc_apdu_t apdu;
+
+	switch(*mode) {
+		case SC_CARDCTRL_LIFECYCLE_ADMIN:
+			stage = 0x02;
+			break;
+		case SC_CARDCTRL_LIFECYCLE_USER:
+			stage = 0x01;
+			break;
+		default:
+			return SC_ERROR_INVALID_ARGUMENTS;
+	}
+	sc_format_apdu(card, &apdu, SC_APDU_CASE_1, 0x09, 0x00, stage);
+	apdu.cla = 0x80;
+
+	r = sc_transmit_apdu(card, &apdu);
+	SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+	r = sc_check_sw(card, apdu.sw1, apdu.sw2);
+	return r;
+}
+
+static int
+akis_card_ctl(sc_card_t *card, unsigned long cmd, void *ptr)
+{
+	switch (cmd) {
+	case SC_CARDCTL_GET_SERIALNR:
+		return akis_get_serialnr(card, (sc_serial_number_t *)ptr);
+	case SC_CARDCTL_LIFECYCLE_GET:
+		return akis_lifecycle_get(card, (int *) ptr);
+	case SC_CARDCTL_LIFECYCLE_SET:
+		return akis_lifecycle_set(card, (int *) ptr);
+	}
+	return SC_ERROR_NOT_SUPPORTED;
+}
+
+static int
+akis_set_security_env(sc_card_t *card,
+                      const sc_security_env_t *env,
+                      int se_num)
+{
+	int r;
+	u8 ref;
+	sc_apdu_t apdu;
+
+	/* AKIS uses key references for accessing keys
+	 */
+	if (env->flags & SC_SEC_ENV_KEY_REF_PRESENT) {
+		ref = env->key_ref[0];
+		sc_format_apdu(card, &apdu, SC_APDU_CASE_1, 0x22, 0xC3, ref);
+		r = sc_transmit_apdu(card, &apdu);
+		SC_TEST_RET(card->ctx, r, "APDU transmit failed");
+		r = sc_check_sw(card, apdu.sw1, apdu.sw2);
+		return r;
+	}
+	return SC_SUCCESS;
+}
+
+static struct sc_card_driver *
+sc_get_driver(void)
+{
+	if (iso_ops == NULL)
+		iso_ops = sc_get_iso7816_driver()->ops;
+
+	akis_ops = *iso_ops;
+
+	akis_ops.match_card = akis_match_card;
+	akis_ops.init = akis_init;
+	// read_binary: ISO7816 implementation works
+	// write_binary: ISO7816 implementation works
+	// update_binary: ISO7816 implementation works
+	// erase_binary: Untested
+	// read_record: Untested
+	// write_record: Untested
+	// append_record: Untested
+	// update_record: Untested
+	akis_ops.select_file = akis_select_file;
+	// get_response: Untested
+	// get_challenge: ISO7816 implementation works
+	// restore_security_env: Untested
+	akis_ops.set_security_env = akis_set_security_env;
+	// decipher: Untested
+	// compute_signature: ISO7816 implementation works
+	akis_ops.create_file = akis_create_file;
+	akis_ops.delete_file = akis_delete_file;
+	akis_ops.list_files = akis_list_files;
+	// check_sw: ISO7816 implementation works
+	akis_ops.card_ctl = akis_card_ctl;
+	akis_ops.process_fci = akis_process_fci;
+	// construct_fci: Not needed
+	akis_ops.pin_cmd = akis_pin_cmd;
+	akis_ops.get_data = akis_get_data;
+	// put_data: Not implemented
+	// delete_record: Not implemented
+
+	return &akis_drv;
+}
+
+#if 1
+struct sc_card_driver *
+sc_get_akis_driver(void)
+{
+	return sc_get_driver();
+}
+#endif
diff --git a/src/libopensc/card-cardos.c b/src/libopensc/card-cardos.c
index e529683..6e7ca10 100644
--- a/src/libopensc/card-cardos.c
+++ b/src/libopensc/card-cardos.c
@@ -96,6 +96,9 @@ static int cardos_match_card(sc_card_t *card)
 		} else if (card->atr[11] >= 0x08) {
 			sc_debug(card->ctx, "found cardos v4.3b or higher");
 			card->type = SC_CARD_TYPE_CARDOS_M4_3;
+		} else if (card->atr[11] >= 0x09) {
+			sc_debug(card->ctx, "found cardos v4.2b or higher");
+			card->type = SC_CARD_TYPE_CARDOS_M4_2B;
 		} else {
 			sc_debug(card->ctx, "found cardos m4.2");
 		}
@@ -163,7 +166,8 @@ static int cardos_init(sc_card_t *card)
 		if (r == 1)
 			card->caps |= SC_CARD_CAP_RSA_2048;
 		card->caps |= SC_CARD_CAP_APDU_EXT;
-	} else if (card->type == SC_CARD_TYPE_CARDOS_M4_3) {
+	} else if (card->type == SC_CARD_TYPE_CARDOS_M4_3 
+		|| card->type == SC_CARD_TYPE_CARDOS_M4_2B) {
 		card->caps |= SC_CARD_CAP_RSA_2048;
 		card->caps |= SC_CARD_CAP_APDU_EXT;
 	}
@@ -640,7 +644,8 @@ static int cardos_create_file(sc_card_t *card, sc_file_t *file)
 			return r;
 		return iso_ops->create_file(card, file);
 	} else if (card->type == SC_CARD_TYPE_CARDOS_M4_2 ||
-	           card->type == SC_CARD_TYPE_CARDOS_M4_3) {
+	           card->type == SC_CARD_TYPE_CARDOS_M4_3 ||
+	           card->type == SC_CARD_TYPE_CARDOS_M4_2B) {
 		u8        sbuf[SC_MAX_APDU_BUFFER_SIZE];
 		size_t    len = sizeof(sbuf);
 		sc_apdu_t apdu;
diff --git a/src/libopensc/cards.h b/src/libopensc/cards.h
index 6820efb..6dddcb3 100644
--- a/src/libopensc/cards.h
+++ b/src/libopensc/cards.h
@@ -42,6 +42,7 @@ enum {
 	SC_CARD_TYPE_CARDOS_M4_01,
 	SC_CARD_TYPE_CARDOS_M4_2,
 	SC_CARD_TYPE_CARDOS_M4_3,
+	SC_CARD_TYPE_CARDOS_M4_2B, /* 4.2b is the latest after 4.3b */
 
 	/* flex/cyberflex drivers */
 	SC_CARD_TYPE_FLEX_BASE = 2000,
@@ -130,7 +131,11 @@ enum {
 	/* Athena APCOS cards */
 	SC_CARD_TYPE_ASEPCOS_BASE = 17000,
 	SC_CARD_TYPE_ASEPCOS_GENERIC,
-	SC_CARD_TYPE_ASEPCOS_JAVA
+	SC_CARD_TYPE_ASEPCOS_JAVA,
+
+	/* TUBITAK UEKAE cards */
+	SC_CARD_TYPE_AKIS_BASE = 18000,
+	SC_CARD_TYPE_AKIS_GENERIC
 };
 
 #ifdef __cplusplus
diff --git a/src/libopensc/ctx.c b/src/libopensc/ctx.c
index 00dc121..ddb3b5a 100644
--- a/src/libopensc/ctx.c
+++ b/src/libopensc/ctx.c
@@ -75,9 +75,10 @@ static const struct _sc_driver_entry internal_card_drivers[] = {
 	{ "emv",	(void *(*)(void)) sc_get_emv_driver },
 	{ "incrypto34", (void *(*)(void)) sc_get_incrypto34_driver },
 #ifdef HAVE_OPENSSL
-	{ "PIV-II",(void *) sc_get_piv_driver },
+	{ "PIV-II",	(void *(*)(void)) sc_get_piv_driver },
 #endif
 	{ "acos5",	(void *(*)(void)) sc_get_acos5_driver },
+	{ "akis",	(void *(*)(void)) sc_get_akis_driver },
 	/* The default driver should be last, as it handles all the
 	 * unrecognized cards. */
 	{ "default",	(void *(*)(void)) sc_get_default_driver },
diff --git a/src/libopensc/opensc.h b/src/libopensc/opensc.h
index ff26bc3..eaa15ba 100644
--- a/src/libopensc/opensc.h
+++ b/src/libopensc/opensc.h
@@ -1176,6 +1176,7 @@ extern sc_card_driver_t *sc_get_piv_driver(void);
 extern sc_card_driver_t *sc_get_muscle_driver(void);
 extern sc_card_driver_t *sc_get_acos5_driver(void);
 extern sc_card_driver_t *sc_get_asepcos_driver(void);
+extern sc_card_driver_t *sc_get_akis_driver(void);
 
 #ifdef __cplusplus
 }
diff --git a/src/libopensc/pkcs15-pubkey.c b/src/libopensc/pkcs15-pubkey.c
index 274b7c6..3e32033 100644
--- a/src/libopensc/pkcs15-pubkey.c
+++ b/src/libopensc/pkcs15-pubkey.c
@@ -215,8 +215,10 @@ int sc_pkcs15_encode_pukdf_entry(sc_context_t *ctx,
 	return r;
 }
 
+/* this should be required, not optional. But it is missing in some siemens cards and thus causes warnings */
+/* so we silence these warnings by making it optional - the card works ok without. :/ */
 static struct sc_asn1_entry c_asn1_public_key[2] = {
-	{ "publicKeyCoefficients", SC_ASN1_STRUCT, SC_ASN1_TAG_SEQUENCE | SC_ASN1_CONS, 0, NULL, NULL },
+	{ "publicKeyCoefficients", SC_ASN1_STRUCT, SC_ASN1_TAG_SEQUENCE | SC_ASN1_CONS, SC_ASN1_OPTIONAL, NULL, NULL },
 	{ NULL, 0, 0, 0, NULL, NULL }
 };
 
diff --git a/src/libopensc/pkcs15-sec.c b/src/libopensc/pkcs15-sec.c
index 7d08bc7..86ec3f4 100644
--- a/src/libopensc/pkcs15-sec.c
+++ b/src/libopensc/pkcs15-sec.c
@@ -148,6 +148,31 @@ int sc_pkcs15_compute_signature(struct sc_pkcs15_card *p15card,
 	unsigned long pad_flags = 0, sec_flags = 0;
 
 	SC_FUNC_CALLED(ctx, 1);
+
+	/* some strange cards/setups need decrypt to sign ... */
+	if (p15card->flags & SC_PKCS15_CARD_FLAG_SIGN_WITH_DECRYPT) {
+		size_t tmplen = sizeof(buf);
+		if (flags & SC_ALGORITHM_RSA_RAW) {
+			return sc_pkcs15_decipher(p15card, obj,flags,
+				in, inlen, out, outlen);
+		}
+		if (modlen > tmplen) {
+			sc_error(ctx, "Buffer too small, needs recompile!\n");
+			return SC_ERROR_NOT_ALLOWED;
+		}
+		r = sc_pkcs1_encode(ctx, flags, in, inlen, buf, &tmplen, modlen);
+
+		/* no padding needed - already done */
+		flags &= ~SC_ALGORITHM_RSA_PADS;
+		/* instead use raw rsa */
+		flags |= SC_ALGORITHM_RSA_RAW;
+
+		SC_TEST_RET(ctx, r, "Unable to add padding");
+		r = sc_pkcs15_decipher(p15card, obj,flags, buf, modlen,
+			out, outlen);
+		return r;
+	}
+
 	/* If the key is extractable, the caller should extract the
 	 * key and do the crypto himself */
 	if (!prkey->native)
diff --git a/src/libopensc/pkcs15.c b/src/libopensc/pkcs15.c
index abce78b..b57dbe0 100644
--- a/src/libopensc/pkcs15.c
+++ b/src/libopensc/pkcs15.c
@@ -675,6 +675,12 @@ static int sc_pkcs15_bind_internal(sc_pkcs15_card_t *p15card)
 	p15card->seInfo          = tokeninfo.seInfo;
 	p15card->num_seInfo      = tokeninfo.num_seInfo;
 
+	/* for cardos cards initialized by Siemens: sign with decrypt */
+	if (strcmp(p15card->card->driver->short_name,"cardos") == 0
+                && ( strcmp(p15card->manufacturer_id,"Siemens AG (C)") == 0
+			|| strcmp(p15card->manufacturer_id,"Prime") == 0 ))
+		p15card->flags |= SC_PKCS15_CARD_FLAG_SIGN_WITH_DECRYPT;
+
 	ok = 1;
 end:
 	if(buf != NULL)
diff --git a/src/libopensc/pkcs15.h b/src/libopensc/pkcs15.h
index 0ae73c0..df3a09c 100644
--- a/src/libopensc/pkcs15.h
+++ b/src/libopensc/pkcs15.h
@@ -398,6 +398,7 @@ typedef struct sc_pkcs15_card {
 #define SC_PKCS15_CARD_FLAG_LOGIN_REQUIRED	0x02
 #define SC_PKCS15_CARD_FLAG_PRN_GENERATION	0x04
 #define SC_PKCS15_CARD_FLAG_EID_COMPLIANT	0x08
+#define SC_PKCS15_CARD_FLAG_SIGN_WITH_DECRYPT	0x10
 
 /* sc_pkcs15_bind:  Binds a card object to a PKCS #15 card object
  * and initializes a new PKCS #15 card object.  Will return
diff --git a/src/openssh/Makefile.in b/src/openssh/Makefile.in
index b1444b5..e4070e3 100644
--- a/src/openssh/Makefile.in
+++ b/src/openssh/Makefile.in
@@ -42,7 +42,7 @@ subdir = src/openssh
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -78,6 +78,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -102,7 +104,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -110,8 +111,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/pkcs11/Makefile.am b/src/pkcs11/Makefile.am
index 1d14960..636ac4d 100644
--- a/src/pkcs11/Makefile.am
+++ b/src/pkcs11/Makefile.am
@@ -7,7 +7,7 @@ MAINTAINERCLEANFILES = Makefile.in
 
 EXTRA_DIST = Makefile.mak opensc_pkcs11_install.js
 
-INCLUDES = $(CPPFLAGS) -I${top_srcdir}/src/pkcs15init $(OPENSSL_CFLAGS)
+INCLUDES = $(CPPFLAGS) -I${top_srcdir}/src/pkcs15init $(OPENSSL_CFLAGS) $(LTLIB_CFLAGS)
 
 SRC = pkcs11-global.c pkcs11-session.c pkcs11-object.c misc.c slot.c \
 	mechanism.c openssl.c secretkey.c framework-pkcs15.c \
@@ -33,7 +33,7 @@ libpkcs11_la_LIBADD =
 
 pkcs11_spy_la_SOURCES = pkcs11-spy.c pkcs11-display.c pkcs11-display.h
 pkcs11_spy_la_LDFLAGS = -module -avoid-version
-pkcs11_spy_la_LIBADD = $(OPENSSL_LIBS) libpkcs11.la $(LTLIBLTDL)
+pkcs11_spy_la_LIBADD = $(OPENSSL_LIBS) libpkcs11.la $(LTLIB_LIBS)
 
 include_HEADERS = pkcs11.h
 
diff --git a/src/pkcs11/Makefile.in b/src/pkcs11/Makefile.in
index af2c978..d0bb41b 100644
--- a/src/pkcs11/Makefile.in
+++ b/src/pkcs11/Makefile.in
@@ -44,7 +44,7 @@ DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -129,6 +129,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -153,7 +155,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -161,8 +162,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
@@ -248,7 +250,7 @@ target_alias = @target_alias@
 bundledir = $(BUNDLEDIR)/pkcs11
 MAINTAINERCLEANFILES = Makefile.in
 EXTRA_DIST = Makefile.mak opensc_pkcs11_install.js
-INCLUDES = $(CPPFLAGS) -I${top_srcdir}/src/pkcs15init $(OPENSSL_CFLAGS)
+INCLUDES = $(CPPFLAGS) -I${top_srcdir}/src/pkcs15init $(OPENSSL_CFLAGS) $(LTLIB_CFLAGS)
 SRC = pkcs11-global.c pkcs11-session.c pkcs11-object.c misc.c slot.c \
 	mechanism.c openssl.c secretkey.c framework-pkcs15.c \
 	framework-pkcs15init.c debug.c
@@ -271,7 +273,7 @@ libpkcs11_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@O
 libpkcs11_la_LIBADD = 
 pkcs11_spy_la_SOURCES = pkcs11-spy.c pkcs11-display.c pkcs11-display.h
 pkcs11_spy_la_LDFLAGS = -module -avoid-version
-pkcs11_spy_la_LIBADD = $(OPENSSL_LIBS) libpkcs11.la $(LTLIBLTDL)
+pkcs11_spy_la_LIBADD = $(OPENSSL_LIBS) libpkcs11.la $(LTLIB_LIBS)
 include_HEADERS = pkcs11.h
 all: all-am
 
diff --git a/src/pkcs15init/Makefile.am b/src/pkcs15init/Makefile.am
index e890932..c6dccc9 100644
--- a/src/pkcs15init/Makefile.am
+++ b/src/pkcs15init/Makefile.am
@@ -34,7 +34,7 @@ libpkcs15init_la_SOURCES = \
 	pkcs15-oberthur.c pkcs15-setcos.c pkcs15-incrypto34.c \
 	pkcs15-muscle.c pkcs15-asepcos.c
 
-libpkcs15init_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@
+libpkcs15init_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@ $(AM_LDFLAGS)
 
 include_HEADERS = pkcs15-init.h
 noinst_HEADERS = profile.h keycache.h
diff --git a/src/pkcs15init/Makefile.in b/src/pkcs15init/Makefile.in
index 0e9b910..04b838d 100644
--- a/src/pkcs15init/Makefile.in
+++ b/src/pkcs15init/Makefile.in
@@ -45,7 +45,7 @@ DIST_COMMON = README $(include_HEADERS) $(noinst_HEADERS) \
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -114,6 +114,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -138,7 +140,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -146,8 +147,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
@@ -257,7 +259,7 @@ libpkcs15init_la_SOURCES = \
 	pkcs15-oberthur.c pkcs15-setcos.c pkcs15-incrypto34.c \
 	pkcs15-muscle.c pkcs15-asepcos.c
 
-libpkcs15init_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@
+libpkcs15init_la_LDFLAGS = -version-info @OPENSC_LT_CURRENT@:@OPENSC_LT_REVISION@:@OPENSC_LT_AGE@ $(AM_LDFLAGS)
 include_HEADERS = pkcs15-init.h
 noinst_HEADERS = profile.h keycache.h
 pkgdata_DATA = $(PROFILES)
diff --git a/src/pkcs15init/pkcs15-cardos.c b/src/pkcs15init/pkcs15-cardos.c
index 6957e09..76146fa 100644
--- a/src/pkcs15init/pkcs15-cardos.c
+++ b/src/pkcs15init/pkcs15-cardos.c
@@ -622,7 +622,7 @@ static int cardos_put_key(sc_profile_t *profile, sc_card_t *card,
 		pin_id = 0;
 
 	if (key_info->modulus_length > 1024 && (card->type == SC_CARD_TYPE_CARDOS_M4_2 ||
-	    card->type == SC_CARD_TYPE_CARDOS_M4_3)) {
+	    card->type == SC_CARD_TYPE_CARDOS_M4_3 ||card->type == SC_CARD_TYPE_CARDOS_M4_2B)) {
 		r = cardos_store_key_component(card, algorithm, key_id, pin_id, 0,
 			key->p.data, key->p.len, 0, 0);
 		if (r != SC_SUCCESS)
diff --git a/src/scconf/Makefile.in b/src/scconf/Makefile.in
index 0c94c94..e1fe0ed 100644
--- a/src/scconf/Makefile.in
+++ b/src/scconf/Makefile.in
@@ -46,7 +46,7 @@ DIST_COMMON = $(include_HEADERS) $(noinst_HEADERS) \
 	$(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -113,6 +113,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -137,7 +139,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -145,8 +146,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/signer/Makefile.am b/src/signer/Makefile.am
index 185604e..d3c5589 100644
--- a/src/signer/Makefile.am
+++ b/src/signer/Makefile.am
@@ -10,11 +10,9 @@ EXTRA_DIST = testprog.c
 
 INCLUDES = -I$(srcdir)/npinclude $(CPPFLAGS) $(OPENSSL_CFLAGS) $(LIBASSUAN_CFLAGS)
 
-if HAVE_OPENSSL
-if HAVE_ASSUAN
+if ENABLE_NSPLUGIN
 lib_LTLIBRARIES = opensc-signer.la
 endif
-endif
 
 opensc_signer_la_LDFLAGS = -module -avoid-version
 opensc_signer_la_LIBADD = @LIBOPENSC@ $(OPENSSL_LIBS) $(LIBASSUAN_LIBS)
@@ -25,8 +23,7 @@ noinst_HEADERS = \
 	opensc-crypto.h opensc-support.h signer.h 
 
 install-exec-local: install-libLTLIBRARIES
-if HAVE_OPENSSL
-if HAVE_ASSUAN
+if ENABLE_NSPLUGIN
+	-$(mkdir_p) $(DESTDIR)$(plugindir)/
 	-$(LN_S) -f $(libdir)/opensc-signer.so $(DESTDIR)$(plugindir)/
 endif
-endif
diff --git a/src/signer/Makefile.in b/src/signer/Makefile.in
index ffd6905..babae93 100644
--- a/src/signer/Makefile.in
+++ b/src/signer/Makefile.in
@@ -44,7 +44,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -66,8 +66,7 @@ am_opensc_signer_la_OBJECTS = opensc_signer_la-opensc-crypto.lo \
 	opensc_signer_la-opensc-support.lo opensc_signer_la-signer.lo \
 	opensc_signer_la-stubs.lo opensc_signer_la-dialog.lo
 opensc_signer_la_OBJECTS = $(am_opensc_signer_la_OBJECTS)
- at HAVE_ASSUAN_TRUE@@HAVE_OPENSSL_TRUE at am_opensc_signer_la_rpath =  \
- at HAVE_ASSUAN_TRUE@@HAVE_OPENSSL_TRUE@	-rpath $(libdir)
+ at ENABLE_NSPLUGIN_TRUE@am_opensc_signer_la_rpath = -rpath $(libdir)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/depcomp
 am__depfiles_maybe = depfiles
@@ -118,6 +117,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -142,7 +143,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -150,8 +150,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
@@ -239,7 +240,7 @@ MAINTAINERCLEANFILES = Makefile.in
 SUBDIRS = . npinclude
 EXTRA_DIST = testprog.c
 INCLUDES = -I$(srcdir)/npinclude $(CPPFLAGS) $(OPENSSL_CFLAGS) $(LIBASSUAN_CFLAGS)
- at HAVE_ASSUAN_TRUE@@HAVE_OPENSSL_TRUE at lib_LTLIBRARIES = opensc-signer.la
+ at ENABLE_NSPLUGIN_TRUE@lib_LTLIBRARIES = opensc-signer.la
 opensc_signer_la_LDFLAGS = -module -avoid-version
 opensc_signer_la_LIBADD = @LIBOPENSC@ $(OPENSSL_LIBS) $(LIBASSUAN_LIBS)
 opensc_signer_la_CFLAGS = $(AM_CFLAGS) -DXP_UNIX
@@ -668,7 +669,8 @@ uninstall-info: uninstall-info-recursive
 
 
 install-exec-local: install-libLTLIBRARIES
- at HAVE_ASSUAN_TRUE@@HAVE_OPENSSL_TRUE@	-$(LN_S) -f $(libdir)/opensc-signer.so $(DESTDIR)$(plugindir)/
+ at ENABLE_NSPLUGIN_TRUE@	-$(mkdir_p) $(DESTDIR)$(plugindir)/
+ at ENABLE_NSPLUGIN_TRUE@	-$(LN_S) -f $(libdir)/opensc-signer.so $(DESTDIR)$(plugindir)/
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/src/signer/npinclude/Makefile.in b/src/signer/npinclude/Makefile.in
index 0f552ab..fc85763 100644
--- a/src/signer/npinclude/Makefile.in
+++ b/src/signer/npinclude/Makefile.in
@@ -41,7 +41,7 @@ subdir = src/signer/npinclude
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -76,6 +76,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -100,7 +102,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -108,8 +109,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/tests/Makefile.am b/src/tests/Makefile.am
index 9f168f8..66ddd4e 100644
--- a/src/tests/Makefile.am
+++ b/src/tests/Makefile.am
@@ -6,7 +6,7 @@ SUBDIRS = . regression
 
 EXTRA_DIST = Makefile.mak
 
-AM_LDFLAGS = @LIBOPENSC@ $(LTLIBLTDL)
+AM_LDFLAGS = @LIBOPENSC@
 AM_CFLAGS = -I$(top_srcdir)/src/common
 
 noinst_PROGRAMS = base64 lottery p15dump pintest prngtest
diff --git a/src/tests/Makefile.in b/src/tests/Makefile.in
index 42e806c..e73f26e 100644
--- a/src/tests/Makefile.in
+++ b/src/tests/Makefile.in
@@ -44,7 +44,7 @@ subdir = src/tests
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -123,6 +123,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -147,7 +149,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -155,8 +156,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
@@ -242,7 +244,7 @@ target_alias = @target_alias@
 MAINTAINERCLEANFILES = Makefile.in
 SUBDIRS = . regression
 EXTRA_DIST = Makefile.mak
-AM_LDFLAGS = @LIBOPENSC@ $(LTLIBLTDL)
+AM_LDFLAGS = @LIBOPENSC@
 AM_CFLAGS = -I$(top_srcdir)/src/common
 SRC = sc-test.c $(top_srcdir)/src/common/my_getopt.c
 INC = sc-test.h
diff --git a/src/tests/regression/Makefile.in b/src/tests/regression/Makefile.in
index 1fef6fe..4ded285 100644
--- a/src/tests/regression/Makefile.in
+++ b/src/tests/regression/Makefile.in
@@ -41,7 +41,7 @@ subdir = src/tests/regression
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -76,6 +76,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -100,7 +102,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -108,8 +109,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index 3e202ee..e5f6248 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -22,7 +22,7 @@ opensc_explorer_LDADD = $(LIBREADLINE)
 pkcs15_tool_SOURCES = pkcs15-tool.c util.c $(top_srcdir)/src/common/my_getopt.c
 pkcs15_tool_LDADD = $(OPENSSL_LIBS)
 pkcs11_tool_SOURCES = pkcs11-tool.c util.c $(top_srcdir)/src/common/my_getopt.c
-pkcs11_tool_LDADD = ../pkcs11/libpkcs11.la $(OPENSSL_LIBS) $(LTLIBLTDL)
+pkcs11_tool_LDADD = ../pkcs11/libpkcs11.la $(OPENSSL_LIBS)
 pkcs15_crypt_SOURCES = pkcs15-crypt.c util.c $(top_srcdir)/src/common/my_getopt.c
 pkcs15_crypt_LDADD = $(OPENSSL_LIBS)
 cryptoflex_tool_SOURCES = cryptoflex-tool.c util.c $(top_srcdir)/src/common/my_getopt.c
diff --git a/src/tools/Makefile.in b/src/tools/Makefile.in
index 8fc524b..c712578 100644
--- a/src/tools/Makefile.in
+++ b/src/tools/Makefile.in
@@ -48,7 +48,7 @@ DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
 	$(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -91,7 +91,7 @@ am_pkcs11_tool_OBJECTS = pkcs11-tool.$(OBJEXT) util.$(OBJEXT) \
 	my_getopt.$(OBJEXT)
 pkcs11_tool_OBJECTS = $(am_pkcs11_tool_OBJECTS)
 pkcs11_tool_DEPENDENCIES = ../pkcs11/libpkcs11.la \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1)
 am_pkcs15_crypt_OBJECTS = pkcs15-crypt.$(OBJEXT) util.$(OBJEXT) \
 	my_getopt.$(OBJEXT)
 pkcs15_crypt_OBJECTS = $(am_pkcs15_crypt_OBJECTS)
@@ -158,6 +158,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -182,7 +184,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -190,8 +191,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
@@ -286,7 +288,7 @@ opensc_explorer_LDADD = $(LIBREADLINE)
 pkcs15_tool_SOURCES = pkcs15-tool.c util.c $(top_srcdir)/src/common/my_getopt.c
 pkcs15_tool_LDADD = $(OPENSSL_LIBS)
 pkcs11_tool_SOURCES = pkcs11-tool.c util.c $(top_srcdir)/src/common/my_getopt.c
-pkcs11_tool_LDADD = ../pkcs11/libpkcs11.la $(OPENSSL_LIBS) $(LTLIBLTDL)
+pkcs11_tool_LDADD = ../pkcs11/libpkcs11.la $(OPENSSL_LIBS)
 pkcs15_crypt_SOURCES = pkcs15-crypt.c util.c $(top_srcdir)/src/common/my_getopt.c
 pkcs15_crypt_LDADD = $(OPENSSL_LIBS)
 cryptoflex_tool_SOURCES = cryptoflex-tool.c util.c $(top_srcdir)/src/common/my_getopt.c
diff --git a/src/tools/cardos-info.c b/src/tools/cardos-info.c
index 5bbcf06..fd3898d 100644
--- a/src/tools/cardos-info.c
+++ b/src/tools/cardos-info.c
@@ -63,6 +63,15 @@ static int cardos_info(void)
 	u8 rbuf[SC_MAX_APDU_BUFFER_SIZE];
 	int r;
 
+	if (verbose) {
+		printf("Card ATR:\n");
+		hex_dump_asc(stdout, card->atr, card->atr_len, -1);      
+	} else {
+		char tmp[SC_MAX_ATR_SIZE*3];
+		sc_bin_to_hex(card->atr, card->atr_len, tmp, sizeof(tmp) - 1, ':');
+		fprintf(stdout,"%s\n",tmp);
+	}
+
 	memset(&apdu, 0, sizeof(apdu));
 	apdu.cla = 0x00;
 	apdu.ins = 0xca;
@@ -141,6 +150,8 @@ static int cardos_info(void)
 		printf(" (that's CardOS M4.3)\n");
 	} else if (apdu.resp[0] == 0xc8 && apdu.resp[1] == 0x08) {
 		printf(" (that's CardOS M4.3b)\n");
+	} else if (apdu.resp[0] == 0xc8 && apdu.resp[1] == 0x09) {
+		printf(" (that's CardOS M4.2b)\n");
 	} else {
 		printf(" (unknown Version)\n");
 	}
diff --git a/src/tools/cryptoflex-tool.c b/src/tools/cryptoflex-tool.c
index f08134e..571b44f 100644
--- a/src/tools/cryptoflex-tool.c
+++ b/src/tools/cryptoflex-tool.c
@@ -501,7 +501,7 @@ static int list_keys(void)
 		if (keysize == 0)
 			break;
 		idx += keysize;
-		for (i = 0; i < sizeof(sizes)/sizeof(int); i++)
+		for (i = 0; i < sizeof(sizes)/sizeof(sizes[ 0]); i++)
 			if (sizes[i] == keysize)
 				mod_len = mod_lens[i];
 		if (mod_len < 0)
diff --git a/src/tools/opensc-explorer.c b/src/tools/opensc-explorer.c
index 78b6bfb..af7e2cf 100644
--- a/src/tools/opensc-explorer.c
+++ b/src/tools/opensc-explorer.c
@@ -1148,7 +1148,6 @@ usage:
 	return -1;
 }
 
-#if 0
 static int do_debug(int argc, char **argv)
 {
 	int i;
@@ -1170,7 +1169,6 @@ static int do_debug(int argc, char **argv)
 	}
 	return 0;
 }
-#endif
 
 
 static int do_pksign(int argc, char **argv)
@@ -1454,6 +1452,7 @@ static struct command	cmds[] = {
  { "exit",	do_quit,	"quit this program"			},
  { "update_record", do_update_record, "update record"			},
  { "update_binary", do_update_binary, "update binary"			},
+ { "debug",	do_debug,	"set the debug level"			},
  { NULL, NULL, NULL }
 };
 
diff --git a/src/tools/pkcs11-tool.c b/src/tools/pkcs11-tool.c
index 0450e9d..2178e14 100644
--- a/src/tools/pkcs11-tool.c
+++ b/src/tools/pkcs11-tool.c
@@ -117,6 +117,7 @@ static const char *option_help[] = {
 	"Specify the type and length of the key to create, for example rsa:1024",
 	"Write an object (key, cert, data) to the card",
 	"Get object's CKA_VALUE attribute (use with --type)",
+	"Delete an object",
 	"Specify the application label of the data object (use with --type data)",
 	"Specify the application id of the data object (use with --type data)",
 	"Specify the type of object (e.g. cert, privkey, pubkey, data)",
diff --git a/win32/Makefile.in b/win32/Makefile.in
index b2493b8..760ee11 100644
--- a/win32/Makefile.in
+++ b/win32/Makefile.in
@@ -41,7 +41,7 @@ subdir = win32
 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/aclocal/acx_pthread.m4 \
-	$(top_srcdir)/configure.in
+	$(top_srcdir)/aclocal/libassuan.m4 $(top_srcdir)/configure.in
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
 	$(ACLOCAL_M4)
 mkinstalldirs = $(install_sh) -d
@@ -76,6 +76,8 @@ ECHO_C = @ECHO_C@
 ECHO_N = @ECHO_N@
 ECHO_T = @ECHO_T@
 EGREP = @EGREP@
+ENABLE_NSPLUGIN_FALSE = @ENABLE_NSPLUGIN_FALSE@
+ENABLE_NSPLUGIN_TRUE = @ENABLE_NSPLUGIN_TRUE@
 EXEEXT = @EXEEXT@
 F77 = @F77@
 FFLAGS = @FFLAGS@
@@ -100,7 +102,6 @@ LIBASSUAN_CFLAGS = @LIBASSUAN_CFLAGS@
 LIBASSUAN_CONFIG = @LIBASSUAN_CONFIG@
 LIBASSUAN_LIBS = @LIBASSUAN_LIBS@
 LIBFL = @LIBFL@
-LIBLTDL = @LIBLTDL@
 LIBOBJS = @LIBOBJS@
 LIBOPENSC = @LIBOPENSC@
 LIBREADLINE = @LIBREADLINE@
@@ -108,8 +109,9 @@ LIBS = @LIBS@
 LIBSCCONF = @LIBSCCONF@
 LIBTOOL = @LIBTOOL@
 LN_S = @LN_S@
-LTLIBLTDL = @LTLIBLTDL@
 LTLIBOBJS = @LTLIBOBJS@
+LTLIB_CFLAGS = @LTLIB_CFLAGS@
+LTLIB_LIBS = @LTLIB_LIBS@
 MAINT = @MAINT@
 MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
 MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
diff --git a/win32/version.rc b/win32/version.rc
index 53dd974..31aa82f 100644
--- a/win32/version.rc
+++ b/win32/version.rc
@@ -19,8 +19,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
 #endif
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,11,3,0
- PRODUCTVERSION 0,11,3,0
+ FILEVERSION 0,11,4,0
+ PRODUCTVERSION 0,11,4,0
  FILEFLAGSMASK 0x3fL
  FILEFLAGS 0x0L
  FILEOS 0x40004L
@@ -32,8 +32,8 @@ BEGIN
         BLOCK "080904b0"
         BEGIN
             VALUE "Description", "OpenSC PKCS#11 library\0"
-            VALUE "FileVersion", "0, 11, 3, 0\0"
-            VALUE "ProductVersion", "0, 11, 3, 0\0"
+            VALUE "FileVersion", "0, 11, 4, 0\0"
+            VALUE "ProductVersion", "0, 11, 4, 0\0"
             VALUE "Licence", "LGPL\0"
             VALUE "Info", "http://www.opensc-project.org/\0"
         END

-- 
OpenSC packaging



More information about the pkg-opensc-commit mailing list