From 2e1568ff598de94efdaa37a5b504cbd70db0a358 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 18 Jan 2011 22:37:39 +0100 Subject: fix compile error with -Wall --- tools/adk/pkgrebuild.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/adk/pkgrebuild.c b/tools/adk/pkgrebuild.c index e6497b8c7..0a91834e7 100644 --- a/tools/adk/pkgrebuild.c +++ b/tools/adk/pkgrebuild.c @@ -50,7 +50,7 @@ static void iter_disabled(const char *key, const char *value, const void *obj) { //fprintf(stderr, "Symbol is a flavour/choice: %s\n", hvalue); if (snprintf(tfile, 256, ".rebuild.%s", hvalue) < 0) perror("can not create file variable."); - fd = open(tfile, O_RDWR | O_CREAT); + fd = open(tfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); close(fd); } } @@ -70,7 +70,7 @@ static void iter_enabled(const char *key, const char *value, const void *obj) { //fprintf(stderr, "Symbol is a flavour/choice\n"); if (snprintf(tfile, 256, ".rebuild.%s", hvalue) < 0) perror("can not create file variable."); - fd = open(tfile, O_RDWR | O_CREAT); + fd = open(tfile, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR); close(fd); } } -- cgit v1.2.3 From 543317246450d28830c36dd9489e9d8c0efc0755 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 18 Jan 2011 22:38:13 +0100 Subject: handle ssp support for glibc/eglibc/gcc --- toolchain/eglibc/Makefile | 2 ++ toolchain/gcc/Makefile | 3 +++ toolchain/glibc/Makefile | 7 +++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/toolchain/eglibc/Makefile b/toolchain/eglibc/Makefile index c5f2a5653..a72141f5a 100644 --- a/toolchain/eglibc/Makefile +++ b/toolchain/eglibc/Makefile @@ -9,6 +9,8 @@ include ${TOPDIR}/mk/buildhlp.mk ifneq ($(ADK_DEBUG),) TARGET_CFLAGS+= -O2 endif +# ssp partially supported +TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS)) EGLIBC_CONFOPTS:= --build=$(GNU_HOST_NAME) \ --host=$(REAL_GNU_TARGET_NAME) \ diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index b1ce84f98..190cdf689 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -3,6 +3,9 @@ include $(TOPDIR)/rules.mk include ../rules.mk + +TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS)) + include Makefile.inc GCC_CONFOPTS= --prefix=$(STAGING_HOST_DIR) \ diff --git a/toolchain/glibc/Makefile b/toolchain/glibc/Makefile index d492b9837..f466021a7 100644 --- a/toolchain/glibc/Makefile +++ b/toolchain/glibc/Makefile @@ -5,11 +5,14 @@ include $(TOPDIR)/rules.mk include ../rules.mk # glibc does not compile with Os -TARGET_CFLAGS:=$(subst Os,O2,$(TARGET_CFLAGS)) +TARGET_CFLAGS:= $(subst Os,O2,$(TARGET_CFLAGS)) ifneq ($(ADK_DEBUG),) -TARGET_CFLAGS+=-O2 +TARGET_CFLAGS+= -O2 endif +# ssp partially supported +TARGET_CFLAGS:= $(filter-out -fstack-protector,$(TARGET_CFLAGS)) + include Makefile.inc include ${TOPDIR}/mk/buildhlp.mk -- cgit v1.2.3 From 8e90927c2d602219ad15fa916c3f8cb14f700a42 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Tue, 18 Jan 2011 22:38:45 +0100 Subject: fix dependencies --- package/dbus-glib/Makefile | 4 ++-- package/libXcomposite/Makefile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package/dbus-glib/Makefile b/package/dbus-glib/Makefile index 0db8b64bc..8ee9e7b97 100644 --- a/package/dbus-glib/Makefile +++ b/package/dbus-glib/Makefile @@ -9,8 +9,8 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= cd0ab148fb0c786fc88be49d19971f50 PKG_DESCR:= DBUS glib bindings PKG_SECTION:= libs -PKG_DEPENDS:= dbus -PKG_BUILDDEP:= dbus +PKG_DEPENDS:= dbus glib +PKG_BUILDDEP:= dbus glib PKG_URL:= http://www.freedesktop.org/wiki/Software/DBusBindings PKG_SITES:= http://dbus.freedesktop.org/releases/dbus-glib/ diff --git a/package/libXcomposite/Makefile b/package/libXcomposite/Makefile index 48b1e3c82..a48137b64 100644 --- a/package/libXcomposite/Makefile +++ b/package/libXcomposite/Makefile @@ -9,7 +9,7 @@ PKG_RELEASE:= 1 PKG_MD5SUM:= b93dac50c86db6eba3f72e949f5bed2a PKG_DESCR:= X composite library PKG_SECTION:= x11/libs -PKG_BUILDDEP:= libX11 compositeproto +PKG_BUILDDEP:= libX11 compositeproto libXfixes PKG_SITES:= ${MASTER_SITE_XORG} PKG_SUBPKGS:= LIBXCOMPOSITE LIBXCOMPOSITE_DEV -- cgit v1.2.3 From bb9166da2c88e66d93b862626ba878c348452edf Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 19 Jan 2011 12:48:38 +0100 Subject: disable experimental java/objc compiler on bulk builds --- mk/build.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mk/build.mk b/mk/build.mk index 156555af3..dcc720138 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -17,6 +17,8 @@ DEFCONFIG= ADK_DEBUG=n \ ADK_PACKAGE_GRUB=n \ ADK_PACKAGE_BASE_FILES=y \ ADK_PACKAGE_PYTHON=n \ + ADK_TOOLCHAIN_GCC_JAVA \ + ADK_TOOLCHAIN_GCC_OBJC \ ADK_TOOLCHAIN_GCC_USE_SSP=n \ ADK_TOOLCHAIN_GCC_USE_LTO=n \ BUSYBOX_BBCONFIG=n \ -- cgit v1.2.3 From 8519e56e04bbb3e5aaec150a35cfaeb9df60fb91 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 19 Jan 2011 17:44:43 +0100 Subject: disable hardware i never seen or use, fix previos commit --- mk/build.mk | 4 ++-- target/linux/config/Config.in.crypto | 35 ++--------------------------------- 2 files changed, 4 insertions(+), 35 deletions(-) diff --git a/mk/build.mk b/mk/build.mk index dcc720138..43f209923 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -17,8 +17,8 @@ DEFCONFIG= ADK_DEBUG=n \ ADK_PACKAGE_GRUB=n \ ADK_PACKAGE_BASE_FILES=y \ ADK_PACKAGE_PYTHON=n \ - ADK_TOOLCHAIN_GCC_JAVA \ - ADK_TOOLCHAIN_GCC_OBJC \ + ADK_TOOLCHAIN_GCC_JAVA=n \ + ADK_TOOLCHAIN_GCC_OBJC=n \ ADK_TOOLCHAIN_GCC_USE_SSP=n \ ADK_TOOLCHAIN_GCC_USE_LTO=n \ BUSYBOX_BBCONFIG=n \ diff --git a/target/linux/config/Config.in.crypto b/target/linux/config/Config.in.crypto index 1a62db2f8..ee8d65c20 100644 --- a/target/linux/config/Config.in.crypto +++ b/target/linux/config/Config.in.crypto @@ -57,11 +57,10 @@ config ADK_KPACKAGE_KMOD_CRYPTO_DEV_HIFN_795X help This option allows you to have support for HIFN 795x crypto adapters. -endmenu +comment "OpenBSD Cryptographic framework" -menu "OpenBSD Cryptographic framework" config ADK_KPACKAGE_KMOD_OCF_HIFN - prompt "kmod-ocf-hifn..................... hifn engine" + prompt "kmod-ocf-hifn.......................... HIFN crypto engine" tristate default n select ADK_KERNEL_OCF_OCF @@ -71,36 +70,6 @@ config ADK_KPACKAGE_KMOD_OCF_HIFN Engine for cryptodev that uses Hifn based accelerators such as the 7951, 7955, 7956, 7751, 7811. -config ADK_KPACKAGE_KMOD_OCF_SAFE - prompt "kmod-ocf-safe..................... safenet engine" - tristate - default n - select ADK_KERNEL_OCF_OCF - depends on ADK_TARGET_WITH_PCI || ADK_TARGET_WITH_MINIPCI - select ADK_KPACKAGE_KMOD_CRYPTO_AES - help - Engine for cryptodev that uses a number of the safenet Excel - crypto accelerators. Currently for the 1141 and 1741. - -config ADK_KPACKAGE_KMOD_OCF_IXP4XX - prompt "kmod-ocf-ixp4xx................... IXP4xx engine" - tristate - default n - select ADK_KERNEL_OCF_OCF - depends on ADK_arm - help - Engine for cryptodev that uses XScale IXP4xx. - Requires the Intel Access library. - -config ADK_KPACKAGE_KMOD_OCF_TALITOS - prompt "kmod-ocf-talitos.................. talitos engine" - tristate - default n - select ADK_KERNEL_OCF_OCF - depends on ADK_ppc - help - Engine for cryptodev that uses Freescale's security engine (SEC/talitos). - endmenu comment "Software cryptography" -- cgit v1.2.3 From f1f248c37ecc81107bba79c637e3c8e542723606 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 19 Jan 2011 17:58:44 +0100 Subject: install libssp --- package/eglibc/Makefile | 3 +++ package/glibc/Makefile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/package/eglibc/Makefile b/package/eglibc/Makefile index 844b49876..e3603353f 100644 --- a/package/eglibc/Makefile +++ b/package/eglibc/Makefile @@ -65,6 +65,9 @@ do-install: ln -sf "../usr/share/zoneinfo/$$tz" \ ${IDIR_EGLIBC}/etc/localtime; \ fi +ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y) + $(CP) $(STAGING_TARGET_DIR)/lib/libssp.so* $(IDIR_EGLIBC)/lib/ +endif $(CP) $(STAGING_TARGET_DIR)/lib/ld* $(IDIR_EGLIBC)/lib/ -for file in libc libcrypt libdl libm libresolv librt libutil libnss_dns libnss_files; do \ $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_EGLIBC)/lib/; \ diff --git a/package/glibc/Makefile b/package/glibc/Makefile index 9d890c18b..7733cf7ca 100644 --- a/package/glibc/Makefile +++ b/package/glibc/Makefile @@ -42,6 +42,9 @@ do-install: ${CP} ${STAGING_TARGET_DIR}/etc/gai.conf ${IDIR_GLIBC}/etc/ ${CP} ${STAGING_TARGET_DIR}/etc/nscd.conf ${IDIR_GLIBC}/etc/ ${CP} ${STAGING_TARGET_DIR}/etc/nsswitch.conf ${IDIR_GLIBC}/etc/ +ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y) + $(CP) $(STAGING_TARGET_DIR)/lib/libssp.so* $(IDIR_GLIBC)/lib/ +endif $(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/lib/ -for file in libc libcrypt libdl libm libresolv librt libutil libnss_compat libnss_dns libnss_files; do \ $(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/lib/; \ -- cgit v1.2.3 From d787c28412cfd2bef52eb51bce33671caa6a8da2 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 19 Jan 2011 18:24:27 +0100 Subject: remove autoreconf from package build, add a pregenerated patch --- TODO | 1 - package/opensc/Makefile | 8 +- package/opensc/patches/autotool.patch | 19349 +++++++++++++++++++++++++ package/opensc/patches/patch-ltmain_sh | 39 - package/opensc/patches/patch-src_Makefile_in | 13 - 5 files changed, 19352 insertions(+), 58 deletions(-) create mode 100644 package/opensc/patches/autotool.patch delete mode 100644 package/opensc/patches/patch-ltmain_sh delete mode 100644 package/opensc/patches/patch-src_Makefile_in diff --git a/TODO b/TODO index 2b0525cfb..893a80421 100644 --- a/TODO +++ b/TODO @@ -5,7 +5,6 @@ - GCC SSP evaluation - LTO GCC evaluation - finish qemu package -- fix autoreconf usage in opensc - openssl ocf support check - locales support - new package minidlna diff --git a/package/opensc/Makefile b/package/opensc/Makefile index 88a85939e..4957b9fe4 100644 --- a/package/opensc/Makefile +++ b/package/opensc/Makefile @@ -5,11 +5,12 @@ include ${TOPDIR}/rules.mk PKG_NAME:= opensc PKG_VERSION:= 0.11.13 -PKG_RELEASE:= 2 +PKG_RELEASE:= 3 PKG_MD5SUM:= 98fa151e947941f9c3f27420fdf47c11 PKG_DESCR:= utilities to access smart cards PKG_SECTION:= crypto -PKG_DEPENDS:= libopensc +PKG_BUILDDEP:= openct pcsc-lite openssl +PKG_DEPENDS:= libopensc libopenct pcsc-lite libopenssl PKG_URL:= http://www.opensc-project.org/opensc/ PKG_SITES:= http://www.opensc-project.org/files/opensc/ @@ -32,9 +33,6 @@ CONFIGURE_ARGS+= --disable-man \ --enable-pcsc \ --enable-openct -post-extract: - cd ${WRKBUILD} && autoreconf -vif - post-install: ${INSTALL_DIR} ${IDIR_OPENSC}/usr/bin ${INSTALL_DIR} ${IDIR_OPENSC}/usr/share/opensc diff --git a/package/opensc/patches/autotool.patch b/package/opensc/patches/autotool.patch new file mode 100644 index 000000000..b3f779489 --- /dev/null +++ b/package/opensc/patches/autotool.patch @@ -0,0 +1,19349 @@ +diff -Nur opensc-0.11.13.orig/Makefile.in opensc-0.11.13/Makefile.in +--- opensc-0.11.13.orig/Makefile.in 2010-02-16 10:32:19.000000000 +0100 ++++ opensc-0.11.13/Makefile.in 2011-01-19 18:20:22.000000000 +0100 +@@ -1,4 +1,4 @@ +-# Makefile.in generated by automake 1.11 from Makefile.am. ++# Makefile.in generated by automake 1.11.1 from Makefile.am. + # @configure_input@ + + # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +@@ -180,6 +180,7 @@ + LTLIB_CFLAGS = @LTLIB_CFLAGS@ + LTLIB_LIBS = @LTLIB_LIBS@ + MAKEINFO = @MAKEINFO@ ++MANIFEST_TOOL = @MANIFEST_TOOL@ + MKDIR_P = @MKDIR_P@ + NM = @NM@ + NMEDIT = @NMEDIT@ +@@ -220,6 +221,8 @@ + PCSC_CFLAGS = @PCSC_CFLAGS@ + PCSC_LIBS = @PCSC_LIBS@ + PKG_CONFIG = @PKG_CONFIG@ ++PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ ++PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ + PTHREAD_CC = @PTHREAD_CC@ + PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ + PTHREAD_LIBS = @PTHREAD_LIBS@ +@@ -244,6 +247,7 @@ + abs_srcdir = @abs_srcdir@ + abs_top_builddir = @abs_top_builddir@ + abs_top_srcdir = @abs_top_srcdir@ ++ac_ct_AR = @ac_ct_AR@ + ac_ct_CC = @ac_ct_CC@ + ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ + acx_pthread_config = @acx_pthread_config@ +@@ -277,7 +281,6 @@ + libexecdir = @libexecdir@ + localedir = @localedir@ + localstatedir = @localstatedir@ +-lt_ECHO = @lt_ECHO@ + mandir = @mandir@ + mkdir_p = @mkdir_p@ + oldincludedir = @oldincludedir@ +@@ -313,7 +316,7 @@ + $(srcdir)/packaged + + EXTRA_DIST = Makefile.mak svnignore +-SUBDIRS = etc src win32 doc ++SUBDIRS = etc src win32 + dist_noinst_SCRIPTS = bootstrap + dist_noinst_DATA = README \ + solaris/Makefile solaris/README solaris/checkinstall.in \ +@@ -412,7 +415,7 @@ + # (which will cause the Makefiles to be regenerated when you run `make'); + # (2) otherwise, pass the desired values on the `make' command line. + $(RECURSIVE_TARGETS): +- @failcom='exit 1'; \ ++ @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ +@@ -437,7 +440,7 @@ + fi; test -z "$$fail" + + $(RECURSIVE_CLEAN_TARGETS): +- @failcom='exit 1'; \ ++ @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ +@@ -604,7 +607,8 @@ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -test -n "$(am__skip_mode_fix)" \ +- || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ++ || find "$(distdir)" -type d ! -perm -755 \ ++ -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ +@@ -648,17 +652,17 @@ + distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ +- GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ ++ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ +- bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ ++ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ +- unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ ++ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ +- GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ ++ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac +diff -Nur opensc-0.11.13.orig/aclocal.m4 opensc-0.11.13/aclocal.m4 +--- opensc-0.11.13.orig/aclocal.m4 2010-02-16 10:32:15.000000000 +0100 ++++ opensc-0.11.13/aclocal.m4 2011-01-19 18:18:09.000000000 +0100 +@@ -1,4 +1,4 @@ +-# generated automatically by aclocal 1.11 -*- Autoconf -*- ++# generated automatically by aclocal 1.11.1 -*- Autoconf -*- + + # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, + # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +@@ -13,13 +13,14 @@ + + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.64],, +-[m4_warning([this file was generated for autoconf 2.64. ++m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, ++[m4_warning([this file was generated for autoconf 2.68. + You have another version of autoconf. It may work, but is not guaranteed to. + If you have problems, you may need to regenerate the build system entirely. + To do so, use the procedure documented by the package, typically `autoreconf'.])]) + + # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- ++# serial 1 (pkg-config-0.24) + # + # Copyright © 2004 Scott James Remnant . + # +@@ -47,7 +48,10 @@ + AC_DEFUN([PKG_PROG_PKG_CONFIG], + [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) + m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +-AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl ++AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) ++AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) ++AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) ++ + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) + fi +@@ -60,7 +64,6 @@ + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +- + fi[]dnl + ])# PKG_PROG_PKG_CONFIG + +@@ -69,34 +72,31 @@ + # Check to see whether a particular set of modules exists. Similar + # to PKG_CHECK_MODULES(), but does not set variables or print errors. + # +-# +-# Similar to PKG_CHECK_MODULES, make sure that the first instance of +-# this or PKG_CHECK_MODULES is called, or make sure to call +-# PKG_CHECK_EXISTS manually ++# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) ++# only at the first occurence in configure.ac, so if the first place ++# it's called might be skipped (such as if it is within an "if", you ++# have to call PKG_CHECK_EXISTS manually + # -------------------------------------------------------------- + AC_DEFUN([PKG_CHECK_EXISTS], + [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl + if test -n "$PKG_CONFIG" && \ + AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then +- m4_ifval([$2], [$2], [:]) ++ m4_default([$2], [:]) + m4_ifvaln([$3], [else + $3])dnl + fi]) + +- + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) + # --------------------------------------------- + m4_define([_PKG_CONFIG], +-[if test -n "$PKG_CONFIG"; then +- if test -n "$$1"; then +- pkg_cv_[]$1="$$1" +- else +- PKG_CHECK_EXISTS([$3], +- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], +- [pkg_failed=yes]) +- fi +-else +- pkg_failed=untried ++[if test -n "$$1"; then ++ pkg_cv_[]$1="$$1" ++ elif test -n "$PKG_CONFIG"; then ++ PKG_CHECK_EXISTS([$3], ++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], ++ [pkg_failed=yes]) ++ else ++ pkg_failed=untried + fi[]dnl + ])# _PKG_CONFIG + +@@ -138,16 +138,17 @@ + See the pkg-config man page for more details.]) + + if test $pkg_failed = yes; then ++ AC_MSG_RESULT([no]) + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then +- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else +- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + +- ifelse([$4], , [AC_MSG_ERROR(dnl ++ m4_default([$4], [AC_MSG_ERROR( + [Package requirements ($2) were not met: + + $$1_PKG_ERRORS +@@ -155,25 +156,24 @@ + Consider adjusting the PKG_CONFIG_PATH environment variable if you + installed software in a non-standard prefix. + +-_PKG_TEXT +-])], +- [AC_MSG_RESULT([no]) +- $4]) ++_PKG_TEXT])[]dnl ++ ]) + elif test $pkg_failed = untried; then +- ifelse([$4], , [AC_MSG_FAILURE(dnl ++ AC_MSG_RESULT([no]) ++ m4_default([$4], [AC_MSG_FAILURE( + [The pkg-config script could not be found or is too old. Make sure it + is in your PATH or set the PKG_CONFIG environment variable to the full + path to pkg-config. + + _PKG_TEXT + +-To get pkg-config, see .])], +- [$4]) ++To get pkg-config, see .])dnl ++ ]) + else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) +- ifelse([$3], , :, [$3]) ++ $3 + fi[]dnl + ])# PKG_CHECK_MODULES + +@@ -192,7 +192,7 @@ + [am__api_version='1.11' + dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to + dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.11], [], ++m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl + ]) + +@@ -208,7 +208,7 @@ + # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. + # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. + AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.11])dnl ++[AM_AUTOMAKE_VERSION([1.11.1])dnl + m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl + _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +diff -Nur opensc-0.11.13.orig/config.guess opensc-0.11.13/config.guess +--- opensc-0.11.13.orig/config.guess 2010-02-16 10:32:17.000000000 +0100 ++++ opensc-0.11.13/config.guess 2011-01-19 18:18:11.000000000 +0100 +@@ -1,10 +1,10 @@ + #! /bin/sh + # Attempt to guess a canonical system name. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + # Free Software Foundation, Inc. + +-timestamp='2009-04-27' ++timestamp='2009-11-20' + + # This file is free software; you can redistribute it and/or modify it + # under the terms of the GNU General Public License as published by +@@ -27,16 +27,16 @@ + # the same distribution terms that you use for the rest of that program. + + +-# Originally written by Per Bothner . +-# Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# Originally written by Per Bothner. Please send patches (context ++# diff format) to and include a ChangeLog ++# entry. + # + # This script attempts to guess a canonical system name similar to + # config.sub. If it succeeds, it prints the system name on stdout, and + # exits with 0. Otherwise, it exits with 1. + # +-# The plan is that this can be called by configure scripts if you +-# don't specify an explicit build system type. ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD + + me=`echo "$0" | sed -e 's,.*/,,'` + +@@ -170,7 +170,7 @@ + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ +- | grep __ELF__ >/dev/null ++ | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? +@@ -333,6 +333,9 @@ + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; ++ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) ++ echo i386-pc-auroraux${UNAME_RELEASE} ++ exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" +@@ -656,7 +659,7 @@ + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | +- grep __LP64__ >/dev/null ++ grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else +@@ -807,12 +810,12 @@ + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; +- *:Interix*:[3456]*) ++ *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; +- EM64T | authenticamd | genuineintel) ++ authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) +@@ -822,6 +825,9 @@ + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; ++ 8664:Windows_NT:*) ++ echo x86_64-pc-mks ++ exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we +@@ -851,6 +857,20 @@ + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; ++ alpha:Linux:*:*) ++ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in ++ EV5) UNAME_MACHINE=alphaev5 ;; ++ EV56) UNAME_MACHINE=alphaev56 ;; ++ PCA56) UNAME_MACHINE=alphapca56 ;; ++ PCA57) UNAME_MACHINE=alphapca56 ;; ++ EV6) UNAME_MACHINE=alphaev6 ;; ++ EV67) UNAME_MACHINE=alphaev67 ;; ++ EV68*) UNAME_MACHINE=alphaev68 ;; ++ esac ++ objdump --private-headers /bin/sh | grep -q ld.so.1 ++ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi ++ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ++ exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ +@@ -873,6 +893,17 @@ + frv:Linux:*:*) + echo frv-unknown-linux-gnu + exit ;; ++ i*86:Linux:*:*) ++ LIBC=gnu ++ eval $set_cc_for_build ++ sed 's/^ //' << EOF >$dummy.c ++ #ifdef __dietlibc__ ++ LIBC=dietlibc ++ #endif ++EOF ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ++ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" ++ exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; +@@ -882,78 +913,34 @@ + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; +- mips:Linux:*:*) +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #undef CPU +- #undef mips +- #undef mipsel +- #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mipsel +- #else +- #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips +- #else +- CPU= +- #endif +- #endif +-EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^CPU/{ +- s: ::g +- p +- }'`" +- test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } +- ;; +- mips64:Linux:*:*) ++ mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU +- #undef mips64 +- #undef mips64el ++ #undef ${UNAME_MACHINE} ++ #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) +- CPU=mips64el ++ CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) +- CPU=mips64 ++ CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif + EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^CPU/{ +- s: ::g +- p +- }'`" ++ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + ;; + or32:Linux:*:*) + echo or32-unknown-linux-gnu + exit ;; +- ppc:Linux:*:*) +- echo powerpc-unknown-linux-gnu +- exit ;; +- ppc64:Linux:*:*) +- echo powerpc64-unknown-linux-gnu +- exit ;; +- alpha:Linux:*:*) +- case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in +- EV5) UNAME_MACHINE=alphaev5 ;; +- EV56) UNAME_MACHINE=alphaev56 ;; +- PCA56) UNAME_MACHINE=alphapca56 ;; +- PCA57) UNAME_MACHINE=alphapca56 ;; +- EV6) UNAME_MACHINE=alphaev6 ;; +- EV67) UNAME_MACHINE=alphaev67 ;; +- EV68*) UNAME_MACHINE=alphaev68 ;; +- esac +- objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null +- if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi +- echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} +- exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-gnu + exit ;; ++ parisc64:Linux:*:* | hppa64:Linux:*:*) ++ echo hppa64-unknown-linux-gnu ++ exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in +@@ -962,8 +949,11 @@ + *) echo hppa-unknown-linux-gnu ;; + esac + exit ;; +- parisc64:Linux:*:* | hppa64:Linux:*:*) +- echo hppa64-unknown-linux-gnu ++ ppc64:Linux:*:*) ++ echo powerpc64-unknown-linux-gnu ++ exit ;; ++ ppc:Linux:*:*) ++ echo powerpc-unknown-linux-gnu + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux +@@ -986,66 +976,6 @@ + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; +- i*86:Linux:*:*) +- # The BFD linker knows what the default object file format is, so +- # first see if it will tell us. cd to the root directory to prevent +- # problems with other programs or directories called `ld' in the path. +- # Set LC_ALL=C to ensure ld outputs messages in English. +- ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ +- | sed -ne '/supported targets:/!d +- s/[ ][ ]*/ /g +- s/.*supported targets: *// +- s/ .*// +- p'` +- case "$ld_supported_targets" in +- elf32-i386) +- TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" +- ;; +- a.out-i386-linux) +- echo "${UNAME_MACHINE}-pc-linux-gnuaout" +- exit ;; +- "") +- # Either a pre-BFD a.out linker (linux-gnuoldld) or +- # one that does not give us useful --help. +- echo "${UNAME_MACHINE}-pc-linux-gnuoldld" +- exit ;; +- esac +- # Determine whether the default compiler is a.out or elf +- eval $set_cc_for_build +- sed 's/^ //' << EOF >$dummy.c +- #include +- #ifdef __ELF__ +- # ifdef __GLIBC__ +- # if __GLIBC__ >= 2 +- LIBC=gnu +- # else +- LIBC=gnulibc1 +- # endif +- # else +- LIBC=gnulibc1 +- # endif +- #else +- #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +- LIBC=gnu +- #else +- LIBC=gnuaout +- #endif +- #endif +- #ifdef __dietlibc__ +- LIBC=dietlibc +- #endif +-EOF +- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' +- /^LIBC/{ +- s: ::g +- p +- }'`" +- test x"${LIBC}" != x && { +- echo "${UNAME_MACHINE}-pc-linux-${LIBC}" +- exit +- } +- test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } +- ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both +@@ -1074,7 +1004,7 @@ + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; +- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) ++ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) +@@ -1182,7 +1112,7 @@ + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; +- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) ++ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) +@@ -1275,6 +1205,16 @@ + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + case $UNAME_PROCESSOR in ++ i386) ++ eval $set_cc_for_build ++ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then ++ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ ++ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ ++ grep IS_64BIT_ARCH >/dev/null ++ then ++ UNAME_PROCESSOR="x86_64" ++ fi ++ fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} +diff -Nur opensc-0.11.13.orig/config.h.in~ opensc-0.11.13/config.h.in~ +--- opensc-0.11.13.orig/config.h.in~ 1970-01-01 01:00:00.000000000 +0100 ++++ opensc-0.11.13/config.h.in~ 2010-02-16 10:32:17.000000000 +0100 +@@ -0,0 +1,224 @@ ++/* config.h.in. Generated from configure.ac by autoheader. */ ++ ++/* Define if building universal (internal helper macro) */ ++#undef AC_APPLE_UNIVERSAL_BUILD ++ ++/* Default PC/SC provider */ ++#undef DEFAULT_PCSC_PROVIDER ++ ++/* Use iconv libraries and header files */ ++#undef ENABLE_ICONV ++ ++/* Have OpenCT libraries and header files */ ++#undef ENABLE_OPENCT ++ ++/* Have OpenSSL libraries and header files */ ++#undef ENABLE_OPENSSL ++ ++/* Define if PC/SC is to be enabled */ ++#undef ENABLE_PCSC ++ ++/* Use readline libraries and header files */ ++#undef ENABLE_READLINE ++ ++/* Use zlib libraries and header files */ ++#undef ENABLE_ZLIB ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_DLFCN_H ++ ++/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ ++#undef HAVE_DOPRNT ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_ERRNO_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_FCNTL_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_GETOPT_H ++ ++/* Define to 1 if you have the `getopt_long' function. */ ++#undef HAVE_GETOPT_LONG ++ ++/* Define to 1 if you have the `getpass' function. */ ++#undef HAVE_GETPASS ++ ++/* Define to 1 if you have the `gettimeofday' function. */ ++#undef HAVE_GETTIMEOFDAY ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_ICONV_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_INTTYPES_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_LOCALE_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_MALLOC_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_MEMORY_H ++ ++/* Define to 1 if you have the `memset' function. */ ++#undef HAVE_MEMSET ++ ++/* Define to 1 if you have the `mkdir' function. */ ++#undef HAVE_MKDIR ++ ++/* Define if you have POSIX threads libraries and header files. */ ++#undef HAVE_PTHREAD ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_READLINE_READLINE_H ++ ++/* Define to 1 if you have the `setlocale' function. */ ++#undef HAVE_SETLOCALE ++ ++/* Define to 1 if you have the `setutent' function. */ ++#undef HAVE_SETUTENT ++ ++/* Define to 1 if `stat' has the bug that it succeeds when given the ++ zero-length file name argument. */ ++#undef HAVE_STAT_EMPTY_STRING_BUG ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDINT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STDLIB_H ++ ++/* Define to 1 if you have the `strdup' function. */ ++#undef HAVE_STRDUP ++ ++/* Define to 1 if you have the `strerror' function. */ ++#undef HAVE_STRERROR ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRINGS_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_STRING_H ++ ++/* Define to 1 if you have the `strlcpy' function. */ ++#undef HAVE_STRLCPY ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_STAT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TIME_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_SYS_TYPES_H ++ ++/* Define to 1 if you have that is POSIX.1 compatible. */ ++#undef HAVE_SYS_WAIT_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_UNISTD_H ++ ++/* Define to 1 if you have the `vprintf' function. */ ++#undef HAVE_VPRINTF ++ ++/* Define to 1 if you have the `vsyslog' function. */ ++#undef HAVE_VSYSLOG ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_WINSCARD_H ++ ++/* Define to 1 if you have the header file. */ ++#undef HAVE_ZLIB_H ++ ++/* Define to 1 if `lstat' dereferences a symlink specified with a trailing ++ slash. */ ++#undef LSTAT_FOLLOWS_SLASHED_SYMLINK ++ ++/* Define to the sub-directory in which libtool stores uninstalled libraries. ++ */ ++#undef LT_OBJDIR ++ ++/* Enabled OpenSC features */ ++#undef OPENSC_FEATURES ++ ++/* OpenSC version fix component */ ++#undef OPENSC_VERSION_FIX ++ ++/* OpenSC version major component */ ++#undef OPENSC_VERSION_MAJOR ++ ++/* OpenSC version minor component */ ++#undef OPENSC_VERSION_MINOR ++ ++/* Name of package */ ++#undef PACKAGE ++ ++/* Define to the address where bug reports for this package should be sent. */ ++#undef PACKAGE_BUGREPORT ++ ++/* Define to the full name of this package. */ ++#undef PACKAGE_NAME ++ ++/* Define to the full name and version of this package. */ ++#undef PACKAGE_STRING ++ ++/* Define to the one symbol short name of this package. */ ++#undef PACKAGE_TARNAME ++ ++/* Define to the home page for this package. */ ++#undef PACKAGE_URL ++ ++/* Define to the version of this package. */ ++#undef PACKAGE_VERSION ++ ++/* PIN-entry program for OpenSC Signer */ ++#undef PIN_ENTRY ++ ++/* Define to necessary symbol if this constant uses a non-standard name on ++ your system. */ ++#undef PTHREAD_CREATE_JOINABLE ++ ++/* Define to 1 if you have the ANSI C header files. */ ++#undef STDC_HEADERS ++ ++/* Define to 1 if you can safely include both and . */ ++#undef TIME_WITH_SYS_TIME ++ ++/* Define if you are on Cygwin */ ++#undef USE_CYGWIN ++ ++/* Version number of package */ ++#undef VERSION ++ ++/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most ++ significant byte first (like Motorola and SPARC, unlike Intel). */ ++#if defined AC_APPLE_UNIVERSAL_BUILD ++# if defined __BIG_ENDIAN__ ++# define WORDS_BIGENDIAN 1 ++# endif ++#else ++# ifndef WORDS_BIGENDIAN ++# undef WORDS_BIGENDIAN ++# endif ++#endif ++ ++/* Define to empty if `const' does not conform to ANSI C. */ ++#undef const ++ ++/* Define to `int' if doesn't define. */ ++#undef gid_t ++ ++/* Define to `__inline__' or `__inline' if that's what the C compiler ++ calls it, or to nothing if 'inline' is not supported under any name. */ ++#ifndef __cplusplus ++#undef inline ++#endif ++ ++/* Define to `unsigned int' if does not define. */ ++#undef size_t ++ ++/* Define to `int' if doesn't define. */ ++#undef uid_t +diff -Nur opensc-0.11.13.orig/config.sub opensc-0.11.13/config.sub +--- opensc-0.11.13.orig/config.sub 2010-02-16 10:32:17.000000000 +0100 ++++ opensc-0.11.13/config.sub 2011-01-19 18:18:11.000000000 +0100 +@@ -1,10 +1,10 @@ + #! /bin/sh + # Configuration validation subroutine script. + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 ++# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + # Free Software Foundation, Inc. + +-timestamp='2009-04-17' ++timestamp='2009-11-20' + + # This file is (in principle) common to ALL GNU software. + # The presence of a machine in this file suggests that SOME GNU software +@@ -32,13 +32,16 @@ + + + # Please send patches to . Submit a context +-# diff and a properly formatted ChangeLog entry. ++# diff and a properly formatted GNU ChangeLog entry. + # + # Configuration subroutine to validate and canonicalize a configuration type. + # Supply the specified configuration type as an argument. + # If it is invalid, we print an error message on stderr and exit with code 1. + # Otherwise, we print the canonical config type on stdout and succeed. + ++# You can get the latest version of this script from: ++# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD ++ + # This file is supposed to be the same for all GNU packages + # and recognize all the CPU types, system types and aliases + # that are meaningful with *any* GNU software. +@@ -149,10 +152,13 @@ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ +- -apple | -axis | -knuth | -cray) ++ -apple | -axis | -knuth | -cray | -microblaze) + os= + basic_machine=$1 + ;; ++ -bluegene*) ++ os=-cnk ++ ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 +@@ -281,6 +287,7 @@ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ ++ | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ +@@ -288,13 +295,14 @@ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ ++ | ubicom32 \ + | v850 | v850e \ + | we32k \ + | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; +- m6811 | m68hc11 | m6812 | m68hc12) ++ m6811 | m68hc11 | m6812 | m68hc12 | picochip) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none +@@ -337,7 +345,7 @@ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ +- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ ++ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ +@@ -365,7 +373,7 @@ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ +- | romp-* | rs6000-* \ ++ | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ +@@ -374,6 +382,7 @@ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | tron-* \ ++ | ubicom32-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ +@@ -467,6 +476,10 @@ + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; ++ bluegene*) ++ basic_machine=powerpc-ibm ++ os=-cnk ++ ;; + c90) + basic_machine=c90-cray + os=-unicos +@@ -719,6 +732,9 @@ + basic_machine=ns32k-utek + os=-sysv + ;; ++ microblaze) ++ basic_machine=microblaze-xilinx ++ ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 +@@ -1240,6 +1256,9 @@ + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. ++ -auroraux) ++ os=-auroraux ++ ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; +@@ -1260,9 +1279,9 @@ + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ +- | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ +- | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ +- | -kopensolaris* \ ++ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ ++ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ ++ | -sym* | -kopensolaris* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ +@@ -1283,7 +1302,7 @@ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ +- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) ++ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) +@@ -1613,7 +1632,7 @@ + -sunos*) + vendor=sun + ;; +- -aix*) ++ -cnk*|-aix*) + vendor=ibm + ;; + -beos*) +diff -Nur opensc-0.11.13.orig/configure opensc-0.11.13/configure +--- opensc-0.11.13.orig/configure 2010-02-16 10:32:16.000000000 +0100 ++++ opensc-0.11.13/configure 2011-01-19 18:18:10.000000000 +0100 +@@ -1,11 +1,13 @@ + #! /bin/sh + # Guess values for system-dependent variables and create Makefiles. +-# Generated by GNU Autoconf 2.64 for opensc 0.11.13. ++# Generated by GNU Autoconf 2.68 for opensc 0.11.13. ++# + # + # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software ++# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software + # Foundation, Inc. + # ++# + # This configure script is free software; the Free Software Foundation + # gives unlimited permission to copy, distribute and modify it. + ## -------------------- ## +@@ -87,6 +89,7 @@ + IFS=" "" $as_nl" + + # Find who we are. Look in the path if we contain no directory separator. ++as_myself= + case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +@@ -169,7 +172,15 @@ + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +-test \$(( 1 + 1 )) = 2 || exit 1" ++test \$(( 1 + 1 )) = 2 || exit 1 ++ ++ test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ++ ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ++ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ++ ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ++ PATH=/empty FPATH=/empty; export PATH FPATH ++ test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ ++ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes + else +@@ -212,11 +223,18 @@ + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. ++ # Preserve -v and -x to the replacement shell. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL +- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} ++ case $- in # (((( ++ *v*x* | *x*v* ) as_opts=-vx ;; ++ *v* ) as_opts=-v ;; ++ *x* ) as_opts=-x ;; ++ * ) as_opts= ;; ++ esac ++ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + fi + + if test x$as_have_required = xno; then : +@@ -314,7 +332,7 @@ + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" +- } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" ++ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + + } # as_fn_mkdir_p +@@ -354,19 +372,19 @@ + fi # as_fn_arith + + +-# as_fn_error ERROR [LINENO LOG_FD] +-# --------------------------------- ++# as_fn_error STATUS ERROR [LINENO LOG_FD] ++# ---------------------------------------- + # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are + # provided, also output the error to LOG_FD, referencing LINENO. Then exit the +-# script with status $?, using 1 if that was 0. ++# script with STATUS, using 1 if that was 0. + as_fn_error () + { +- as_status=$?; test $as_status -eq 0 && as_status=1 +- if test "$3"; then +- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack +- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 ++ as_status=$1; test $as_status -eq 0 && as_status=1 ++ if test "$4"; then ++ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack ++ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi +- $as_echo "$as_me: error: $1" >&2 ++ $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status + } # as_fn_error + +@@ -523,160 +541,14 @@ + # Sed expression to map a string onto a valid variable name. + as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +- +- +-# Check that we are running under the correct shell. + SHELL=${CONFIG_SHELL-/bin/sh} + +-case X$lt_ECHO in +-X*--fallback-echo) +- # Remove one level of quotation (which was required for Make). +- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` +- ;; +-esac +- +-ECHO=${lt_ECHO-echo} +-if test "X$1" = X--no-reexec; then +- # Discard the --no-reexec flag, and continue. +- shift +-elif test "X$1" = X--fallback-echo; then +- # Avoid inline document here, it may be left over +- : +-elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then +- # Yippee, $ECHO works! +- : +-else +- # Restart under the correct shell. +- exec $SHELL "$0" --no-reexec ${1+"$@"} +-fi +- +-if test "X$1" = X--fallback-echo; then +- # used as fallback echo +- shift +- cat <<_LT_EOF +-$* +-_LT_EOF +- exit 0 +-fi +- +-# The HP-UX ksh and POSIX shell print the target directory to stdout +-# if CDPATH is set. +-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH +- +-if test -z "$lt_ECHO"; then +- if test "X${echo_test_string+set}" != Xset; then +- # find a string as large as possible, as long as the shell can cope with it +- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do +- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... +- if { echo_test_string=`eval $cmd`; } 2>/dev/null && +- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null +- then +- break +- fi +- done +- fi +- +- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && +- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && +- test "X$echo_testing_string" = "X$echo_test_string"; then +- : +- else +- # The Solaris, AIX, and Digital Unix default echo programs unquote +- # backslashes. This makes it impossible to quote backslashes using +- # echo "$something" | sed 's/\\/\\\\/g' +- # +- # So, first we look for a working echo in the user's PATH. +- +- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +- for dir in $PATH /usr/ucb; do +- IFS="$lt_save_ifs" +- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && +- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && +- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && +- test "X$echo_testing_string" = "X$echo_test_string"; then +- ECHO="$dir/echo" +- break +- fi +- done +- IFS="$lt_save_ifs" +- +- if test "X$ECHO" = Xecho; then +- # We didn't find a better echo, so look for alternatives. +- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && +- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && +- test "X$echo_testing_string" = "X$echo_test_string"; then +- # This shell has a builtin print -r that does the trick. +- ECHO='print -r' +- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && +- test "X$CONFIG_SHELL" != X/bin/ksh; then +- # If we have ksh, try running configure again with it. +- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} +- export ORIGINAL_CONFIG_SHELL +- CONFIG_SHELL=/bin/ksh +- export CONFIG_SHELL +- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} +- else +- # Try using printf. +- ECHO='printf %s\n' +- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && +- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && +- test "X$echo_testing_string" = "X$echo_test_string"; then +- # Cool, printf works +- : +- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && +- test "X$echo_testing_string" = 'X\t' && +- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && +- test "X$echo_testing_string" = "X$echo_test_string"; then +- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL +- export CONFIG_SHELL +- SHELL="$CONFIG_SHELL" +- export SHELL +- ECHO="$CONFIG_SHELL $0 --fallback-echo" +- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && +- test "X$echo_testing_string" = 'X\t' && +- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && +- test "X$echo_testing_string" = "X$echo_test_string"; then +- ECHO="$CONFIG_SHELL $0 --fallback-echo" +- else +- # maybe with a smaller string... +- prev=: +- +- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do +- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null +- then +- break +- fi +- prev="$cmd" +- done +- +- if test "$prev" != 'sed 50q "$0"'; then +- echo_test_string=`eval $prev` +- export echo_test_string +- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} +- else +- # Oops. We lost completely, so just stick with echo. +- ECHO=echo +- fi +- fi +- fi +- fi +- fi +-fi +- +-# Copy echo and quote the copy suitably for passing to libtool from +-# the Makefile, instead of quoting the original, which is used later. +-lt_ECHO=$ECHO +-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then +- lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +-fi +- +- +- + +-exec 7<&0 &1 ++test -n "$DJDIR" || exec 7<&0 &1 + + # Name of the host. +-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, ++# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, + # so uname gets run too. + ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +@@ -820,8 +692,9 @@ + LIPO + NMEDIT + DSYMUTIL +-lt_ECHO ++MANIFEST_TOOL + RANLIB ++ac_ct_AR + AR + NM + ac_ct_DUMPBIN +@@ -837,6 +710,8 @@ + EGREP + GREP + CPP ++PKG_CONFIG_LIBDIR ++PKG_CONFIG_PATH + PKG_CONFIG + am__fastdepCC_FALSE + am__fastdepCC_TRUE +@@ -948,6 +823,7 @@ + with_pic + enable_fast_install + with_gnu_ld ++with_sysroot + enable_libtool_lock + with_libassuan_prefix + ' +@@ -960,6 +836,10 @@ + LIBS + CPPFLAGS + PKG_CONFIG ++PKG_CONFIG_PATH ++PKG_CONFIG_LIBDIR ++CPP ++CPPFLAGS + CPP + XSLTPROC + SVN +@@ -976,6 +856,7 @@ + ICONV_LIBS + OPENSSL_CFLAGS + OPENSSL_LIBS ++OPENSSL_LIBS + OPENCT_CFLAGS + OPENCT_LIBS + PCSC_CFLAGS +@@ -1042,8 +923,9 @@ + fi + + case $ac_option in +- *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; +- *) ac_optarg=yes ;; ++ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; ++ *=) ac_optarg= ;; ++ *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. +@@ -1088,7 +970,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid feature name: $ac_useropt" ++ as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1114,7 +996,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid feature name: $ac_useropt" ++ as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1318,7 +1200,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid package name: $ac_useropt" ++ as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1334,7 +1216,7 @@ + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && +- as_fn_error "invalid package name: $ac_useropt" ++ as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in +@@ -1364,8 +1246,8 @@ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + +- -*) as_fn_error "unrecognized option: \`$ac_option' +-Try \`$0 --help' for more information." ++ -*) as_fn_error $? "unrecognized option: \`$ac_option' ++Try \`$0 --help' for more information" + ;; + + *=*) +@@ -1373,7 +1255,7 @@ + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) +- as_fn_error "invalid variable name: \`$ac_envvar'" ;; ++ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; +@@ -1383,7 +1265,7 @@ + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 +- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ++ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +@@ -1391,13 +1273,13 @@ + + if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` +- as_fn_error "missing argument to $ac_option" ++ as_fn_error $? "missing argument to $ac_option" + fi + + if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; +- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; ++ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac + fi +@@ -1420,7 +1302,7 @@ + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac +- as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" ++ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" + done + + # There might be people who depend on the old broken behavior: `$host' +@@ -1434,8 +1316,8 @@ + if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe +- $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. +- If a cross compiler is detected then cross compile mode will be used." >&2 ++ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. ++ If a cross compiler is detected then cross compile mode will be used" >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +@@ -1450,9 +1332,9 @@ + ac_pwd=`pwd` && test -n "$ac_pwd" && + ac_ls_di=`ls -di .` && + ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || +- as_fn_error "working directory cannot be determined" ++ as_fn_error $? "working directory cannot be determined" + test "X$ac_ls_di" = "X$ac_pwd_ls_di" || +- as_fn_error "pwd does not report name of working directory" ++ as_fn_error $? "pwd does not report name of working directory" + + + # Find the source files, if location was not specified. +@@ -1491,11 +1373,11 @@ + fi + if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." +- as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" ++ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" + fi + ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" + ac_abs_confdir=`( +- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" ++ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` + # When building in place, set srcdir=. + if test "$ac_abs_confdir" = "$ac_pwd"; then +@@ -1535,7 +1417,7 @@ + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit +- -q, --quiet, --silent do not print \`checking...' messages ++ -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files +@@ -1634,6 +1516,8 @@ + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-gnu-ld assume the C compiler uses GNU ld [default=no] ++ --with-sysroot=DIR Search for dependent libraries within DIR ++ (or the compiler's sysroot if not specified). + --with-libassuan-prefix=PFX + prefix where LIBASSUAN is installed (optional) + +@@ -1643,9 +1527,13 @@ + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l +- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if ++ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + PKG_CONFIG path to pkg-config utility ++ PKG_CONFIG_PATH ++ directories to add to pkg-config's search path ++ PKG_CONFIG_LIBDIR ++ path overriding pkg-config's built-in search path + CPP C preprocessor + XSLTPROC xsltproc utility + SVN subversion utility +@@ -1741,9 +1629,9 @@ + if $ac_init_version; then + cat <<\_ACEOF + opensc configure 0.11.13 +-generated by GNU Autoconf 2.64 ++generated by GNU Autoconf 2.68 + +-Copyright (C) 2009 Free Software Foundation, Inc. ++Copyright (C) 2010 Free Software Foundation, Inc. + This configure script is free software; the Free Software Foundation + gives unlimited permission to copy, distribute and modify it. + _ACEOF +@@ -1787,8 +1675,8 @@ + + ac_retval=1 + fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- return $ac_retval ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + + } # ac_fn_c_try_compile + +@@ -1829,8 +1717,8 @@ + ac_retval=$ac_status + fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- return $ac_retval ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + + } # ac_fn_c_try_run + +@@ -1855,7 +1743,7 @@ + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 +- test $ac_status = 0; } >/dev/null && { ++ test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : +@@ -1866,8 +1754,8 @@ + + ac_retval=1 + fi +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- return $ac_retval ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + + } # ac_fn_c_try_cpp + +@@ -1880,7 +1768,7 @@ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +@@ -1898,7 +1786,7 @@ + eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 + $as_echo "$ac_res" >&6; } +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + + } # ac_fn_c_check_header_compile + +@@ -1943,8 +1831,8 @@ + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo +- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} +- return $ac_retval ++ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno ++ as_fn_set_status $ac_retval + + } # ac_fn_c_try_link + +@@ -1956,7 +1844,7 @@ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 + $as_echo_n "checking for $2... " >&6; } +-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : ++if eval \${$3