Hello community, here is the log from the commit of package tpm2.0-abrmd for openSUSE:Factory checked in at 2018-09-28 08:53:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tpm2.0-abrmd (Old) and /work/SRC/openSUSE:Factory/.tpm2.0-abrmd.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "tpm2.0-abrmd" Fri Sep 28 08:53:20 2018 rev:9 rq:638481 version:2.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/tpm2.0-abrmd/tpm2.0-abrmd.changes 2018-09-19 14:32:45.687327953 +0200 +++ /work/SRC/openSUSE:Factory/.tpm2.0-abrmd.new/tpm2.0-abrmd.changes 2018-09-28 08:53:23.717729534 +0200 @@ -1,0 +2,9 @@ +Wed Sep 26 15:51:01 UTC 2018 - matthias.gerstner@suse.com + +- update to version 2.0.2: + - --enable-integration option to configure script now works as documented. + - Format specifier with wrong size in util module. + - Initialize TCTI context to 0 before setting values. This will cause all + members that aren't explicitly initialized by be 0. + +------------------------------------------------------------------- Old: ---- tpm2-abrmd-2.0.1.tar.gz New: ---- tpm2-abrmd-2.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tpm2.0-abrmd.spec ++++++ --- /var/tmp/diff_new_pack.0eYhDR/_old 2018-09-28 08:53:24.213728817 +0200 +++ /var/tmp/diff_new_pack.0eYhDR/_new 2018-09-28 08:53:24.217728811 +0200 @@ -17,13 +17,13 @@ Name: tpm2.0-abrmd -Version: 2.0.1 +Version: 2.0.2 Release: 0 Summary: Intel's TCG Software Stack Access Broker & Resource Manager for TPM 2.0 chips License: BSD-2-Clause Group: Productivity/Security Url: https://github.com/tpm2-software/tpm2-abrmd -Source0: https://github.com/tpm2-software/tpm2-abrmd/releases/download/2.0.1/tpm2-abrmd-%{version}.tar.gz +Source0: https://github.com/tpm2-software/tpm2-abrmd/releases/download/%{version}/tpm2-abrmd-%{version}.tar.gz Source1: tpm2.0-abrmd.rpmlintrc BuildRequires: autoconf-archive BuildRequires: automake ++++++ tpm2-abrmd-2.0.1.tar.gz -> tpm2-abrmd-2.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/AUTHORS new/tpm2-abrmd-2.0.2/AUTHORS --- old/tpm2-abrmd-2.0.1/AUTHORS 2018-07-26 01:54:07.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/AUTHORS 2018-09-11 05:55:11.000000000 +0200 @@ -1,8 +1,8 @@ Philip Tricca <philip.b.tricca@intel.com> Philip Tricca <flihp@twobit.us> +Matthias Gerstner <matthias.gerstner@suse.de> Javier Martinez Canillas <javierm@redhat.com> dantpm <daniel.anderson@intel.com> -Matthias Gerstner <matthias.gerstner@suse.de> Philip Tricca <flihp@twobit.org> William Roberts <william.c.roberts@intel.com> Alex Lam <alex.c.lam@intel.com> @@ -10,11 +10,12 @@ Jia Zhang <qianyue.zj@alibaba-inc.com> danintel <daniel.anderson@intel.com> Peter Huewe <peterhuewe@gmx.de> +Safayet Ahmed <Safayet.Ahmed@ge.com> Lukas Vrabec <lvrabec@redhat.com> Jia Zhang <zhang.jia@linux.alibaba.com> Thomas Furtner <t.furtner@gmail.com> -Safayet Ahmed <Safayet.Ahmed@ge.com> Lu Gong <lu.gong@intel.com> Joshua Lock <joshua.g.lock@intel.com> +Imran Desai <imran.desai@intel.com> dguerri <davide.guerri@gmail.com> Davide Guerri <davide.guerri@gmail.com> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/CHANGELOG.md new/tpm2-abrmd-2.0.2/CHANGELOG.md --- old/tpm2-abrmd-2.0.1/CHANGELOG.md 2018-07-26 01:52:15.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/CHANGELOG.md 2018-09-11 05:50:55.000000000 +0200 @@ -3,6 +3,17 @@ The format is based on [Keep a CHANGELOG](http://keepachangelog.com/) +## 2.0.2 - 2018-09-10 +### Fixed +- Merge fixes from 1.3.2 +- --enable-integration option to configure script now works as documented. + +## 1.3.2 - 2018-09-10 +### Fixed +- Format specifier with wrong size in util module. +- Initialize TCTI context to 0 before setting values. This will cause all + members that aren't explicitly initialized by be 0. + ## 2.0.1 - 2018-07-25 ### Fixed - Default shared object name for dynamic TCTI loading now includes major diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/Makefile.am new/tpm2-abrmd-2.0.2/Makefile.am --- old/tpm2-abrmd-2.0.1/Makefile.am 2018-07-11 03:53:41.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/Makefile.am 2018-09-11 05:50:28.000000000 +0200 @@ -66,7 +66,9 @@ TESTS_INTEGRATION_NOHW = test/integration/tcti-connect-multiple.int -TESTS = $(TESTS_INTEGRATION) +# empty init for these since they're manipulated by conditionals +TESTS = +noinst_LTLIBRARIES = XFAIL_TESTS = \ test/integration/start-auth-session.int TEST_EXTENSIONS = .int @@ -76,14 +78,16 @@ INT_LOG_COMPILER = $(srcdir)/scripts/int-test-setup.sh INT_LOG_FLAGS = --tabrmd-tcti=$(TABRMD_TCTI) +if ENABLE_INTEGRATION +noinst_LTLIBRARIES += $(libtest) +TESTS += $(TESTS_INTEGRATION) if HWTPM TABRMD_TCTI = device -endif - -if ENABLE_INTEGRATION +else TABRMD_TCTI = mssim TESTS += $(TESTS_INTEGRATION_NOHW) endif +endif if UNIT TESTS += $(TESTS_UNIT) @@ -99,9 +103,8 @@ libutil = src/libutil.la lib_LTLIBRARIES = $(libtss2_tcti_tabrmd) -noinst_LTLIBRARIES = \ +noinst_LTLIBRARIES += \ $(libtss2_tcti_echo) \ - $(libtest) \ $(libutil) man3_MANS = man/man3/Tss2_Tcti_Tabrmd_Init.3 man7_MANS = man/man7/tss2-tcti-tabrmd.7 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/Makefile.in new/tpm2-abrmd-2.0.2/Makefile.in --- old/tpm2-abrmd-2.0.1/Makefile.in 2018-07-26 01:54:03.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/Makefile.in 2018-09-11 05:55:07.000000000 +0200 @@ -90,12 +90,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -TESTS = $(am__EXEEXT_2) $(am__EXEEXT_4) $(am__EXEEXT_6) +TESTS = $(am__EXEEXT_3) $(am__EXEEXT_5) $(am__EXEEXT_7) XFAIL_TESTS = test/integration/start-auth-session.int$(EXEEXT) -@ENABLE_INTEGRATION_TRUE@am__append_1 = $(TESTS_INTEGRATION_NOHW) -@UNIT_TRUE@am__append_2 = $(TESTS_UNIT) +@ENABLE_INTEGRATION_TRUE@am__append_1 = $(libtest) +@ENABLE_INTEGRATION_TRUE@am__append_2 = $(TESTS_INTEGRATION) +@ENABLE_INTEGRATION_TRUE@@HWTPM_FALSE@am__append_3 = $(TESTS_INTEGRATION_NOHW) +@UNIT_TRUE@am__append_4 = $(TESTS_UNIT) sbin_PROGRAMS = src/tpm2-abrmd$(EXEEXT) -check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_7) +check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_8) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/flags.m4 \ @@ -212,6 +214,7 @@ test/integration/test-options.lo test_integration_libtest_la_OBJECTS = \ $(am_test_integration_libtest_la_OBJECTS) +@ENABLE_INTEGRATION_TRUE@am_test_integration_libtest_la_rpath = am__EXEEXT_1 = src/tpm2-abrmd$(EXEEXT) am__EXEEXT_2 = test/integration/auth-session-max.int$(EXEEXT) \ test/integration/auth-session-start-flush.int$(EXEEXT) \ @@ -233,9 +236,10 @@ test/integration/password-authorization.int$(EXEEXT) \ test/integration/tpm2-command-flush-no-handle.int$(EXEEXT) \ test/integration/util-buf-max-upper-bound.int$(EXEEXT) -am__EXEEXT_3 = test/integration/tcti-connect-multiple.int$(EXEEXT) -@ENABLE_INTEGRATION_TRUE@am__EXEEXT_4 = $(am__EXEEXT_3) -am__EXEEXT_5 = test/access-broker_unit$(EXEEXT) \ +@ENABLE_INTEGRATION_TRUE@am__EXEEXT_3 = $(am__EXEEXT_2) +am__EXEEXT_4 = test/integration/tcti-connect-multiple.int$(EXEEXT) +@ENABLE_INTEGRATION_TRUE@@HWTPM_FALSE@am__EXEEXT_5 = $(am__EXEEXT_4) +am__EXEEXT_6 = test/access-broker_unit$(EXEEXT) \ test/command-attrs_unit$(EXEEXT) test/connection_unit$(EXEEXT) \ test/connection-manager_unit$(EXEEXT) \ test/logging_unit$(EXEEXT) test/message-queue_unit$(EXEEXT) \ @@ -253,8 +257,8 @@ test/tpm2-response_unit$(EXEEXT) \ test/tss2-tcti-tabrmd_unit$(EXEEXT) \ test/tss2-tcti-echo_unit$(EXEEXT) test/util_unit$(EXEEXT) -@UNIT_TRUE@am__EXEEXT_6 = $(am__EXEEXT_5) -am__EXEEXT_7 = $(am__EXEEXT_2) $(am__EXEEXT_4) $(am__EXEEXT_6) +@UNIT_TRUE@am__EXEEXT_7 = $(am__EXEEXT_6) +am__EXEEXT_8 = $(am__EXEEXT_3) $(am__EXEEXT_5) $(am__EXEEXT_7) PROGRAMS = $(sbin_PROGRAMS) am_src_tpm2_abrmd_OBJECTS = src/tabrmd.$(OBJEXT) src_tpm2_abrmd_OBJECTS = $(am_src_tpm2_abrmd_OBJECTS) @@ -1277,6 +1281,7 @@ test/integration/util-buf-max-upper-bound.int TESTS_INTEGRATION_NOHW = test/integration/tcti-connect-multiple.int +noinst_LTLIBRARIES = $(am__append_1) $(libtss2_tcti_echo) $(libutil) TEST_EXTENSIONS = .int AM_TESTS_ENVIRONMENT = \ TEST_FUNC_LIB=$(srcdir)/scripts/int-test-funcs.sh \ @@ -1284,8 +1289,8 @@ INT_LOG_COMPILER = $(srcdir)/scripts/int-test-setup.sh INT_LOG_FLAGS = --tabrmd-tcti=$(TABRMD_TCTI) -@ENABLE_INTEGRATION_TRUE@TABRMD_TCTI = mssim -@HWTPM_TRUE@TABRMD_TCTI = device +@ENABLE_INTEGRATION_TRUE@@HWTPM_FALSE@TABRMD_TCTI = mssim +@ENABLE_INTEGRATION_TRUE@@HWTPM_TRUE@TABRMD_TCTI = device # libraries libtss2_tcti_tabrmd = src/libtss2-tcti-tabrmd.la @@ -1293,11 +1298,6 @@ libtest = test/integration/libtest.la libutil = src/libutil.la lib_LTLIBRARIES = $(libtss2_tcti_tabrmd) -noinst_LTLIBRARIES = \ - $(libtss2_tcti_echo) \ - $(libtest) \ - $(libutil) - man3_MANS = man/man3/Tss2_Tcti_Tabrmd_Init.3 man7_MANS = man/man7/tss2-tcti-tabrmd.7 man8_MANS = man/man8/tpm2-abrmd.8 @@ -1799,7 +1799,7 @@ test/integration/$(DEPDIR)/$(am__dirstamp) test/integration/libtest.la: $(test_integration_libtest_la_OBJECTS) $(test_integration_libtest_la_DEPENDENCIES) $(EXTRA_test_integration_libtest_la_DEPENDENCIES) test/integration/$(am__dirstamp) - $(AM_V_CCLD)$(LINK) $(test_integration_libtest_la_OBJECTS) $(test_integration_libtest_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(am_test_integration_libtest_la_rpath) $(test_integration_libtest_la_OBJECTS) $(test_integration_libtest_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/VERSION new/tpm2-abrmd-2.0.2/VERSION --- old/tpm2-abrmd-2.0.1/VERSION 2018-07-26 01:53:50.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/VERSION 2018-09-11 05:54:55.000000000 +0200 @@ -1 +1 @@ -2.0.1 +2.0.2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/aclocal.m4 new/tpm2-abrmd-2.0.2/aclocal.m4 --- old/tpm2-abrmd-2.0.1/aclocal.m4 2018-07-26 01:54:02.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/aclocal.m4 2018-09-11 05:55:05.000000000 +0200 @@ -20,284 +20,8 @@ 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'.])]) -dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -dnl serial 11 (pkg-config-0.29) -dnl -dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. -dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> -dnl -dnl This program is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 2 of the License, or -dnl (at your option) any later version. -dnl -dnl This program is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this program; if not, write to the Free Software -dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -dnl 02111-1307, USA. -dnl -dnl As a special exception to the GNU General Public License, if you -dnl distribute this file as part of a program that contains a -dnl configuration script generated by Autoconf, you may include it under -dnl the same distribution terms that you use for the rest of that -dnl program. - -dnl PKG_PREREQ(MIN-VERSION) -dnl ----------------------- -dnl Since: 0.29 -dnl -dnl Verify that the version of the pkg-config macros are at least -dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's -dnl installed version of pkg-config, this checks the developer's version -dnl of pkg.m4 when generating configure. -dnl -dnl To ensure that this macro is defined, also add: -dnl m4_ifndef([PKG_PREREQ], -dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) -dnl -dnl See the "Since" comment for each macro you use to see what version -dnl of the macros you require. -m4_defun([PKG_PREREQ], -[m4_define([PKG_MACROS_VERSION], [0.29]) -m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, - [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) -])dnl PKG_PREREQ - -dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) -dnl ---------------------------------- -dnl Since: 0.16 -dnl -dnl Search for the pkg-config tool and set the PKG_CONFIG variable to -dnl first found in the path. Checks that the version of pkg-config found -dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is -dnl used since that's the first version where most current features of -dnl pkg-config existed. -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) -m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) -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 -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])dnl PKG_PROG_PKG_CONFIG - -dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------------------------------- -dnl Since: 0.18 -dnl -dnl Check to see whether a particular set of modules exists. Similar to -dnl PKG_CHECK_MODULES(), but does not set variables or print errors. -dnl -dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -dnl only at the first occurence in configure.ac, so if the first place -dnl it's called might be skipped (such as if it is within an "if", you -dnl 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_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -dnl --------------------------------------------- -dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting -dnl pkg_failed based on the result. -m4_define([_PKG_CONFIG], -[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` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])dnl _PKG_CONFIG - -dnl _PKG_SHORT_ERRORS_SUPPORTED -dnl --------------------------- -dnl Internal check to see if pkg-config supports short errors. -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])dnl _PKG_SHORT_ERRORS_SUPPORTED - - -dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl -------------------------------------------------------------- -dnl Since: 0.4.0 -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES might not happen, you should be sure to include an -dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -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 --print-errors --cflags --libs "$2" 2>&1` - else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - 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 <http://pkg-config.freedesktop.org/>.])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])dnl PKG_CHECK_MODULES - - -dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -dnl [ACTION-IF-NOT-FOUND]) -dnl --------------------------------------------------------------------- -dnl Since: 0.29 -dnl -dnl Checks for existence of MODULES and gathers its build flags with -dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags -dnl and VARIABLE-PREFIX_LIBS from --libs. -dnl -dnl Note that if there is a possibility the first call to -dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to -dnl include an explicit call to PKG_PROG_PKG_CONFIG in your -dnl configure.ac. -AC_DEFUN([PKG_CHECK_MODULES_STATIC], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -_save_PKG_CONFIG=$PKG_CONFIG -PKG_CONFIG="$PKG_CONFIG --static" -PKG_CHECK_MODULES($@) -PKG_CONFIG=$_save_PKG_CONFIG[]dnl -])dnl PKG_CHECK_MODULES_STATIC - - -dnl PKG_INSTALLDIR([DIRECTORY]) -dnl ------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable pkgconfigdir as the location where a module -dnl should install pkg-config .pc files. By default the directory is -dnl $libdir/pkgconfig, but the default can be changed by passing -dnl DIRECTORY. The user can override through the --with-pkgconfigdir -dnl parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([pkgconfigdir], - [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, - [with_pkgconfigdir=]pkg_default) -AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_INSTALLDIR - - -dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) -dnl -------------------------------- -dnl Since: 0.27 -dnl -dnl Substitutes the variable noarch_pkgconfigdir as the location where a -dnl module should install arch-independent pkg-config .pc files. By -dnl default the directory is $datadir/pkgconfig, but the default can be -dnl changed by passing DIRECTORY. The user can override through the -dnl --with-noarch-pkgconfigdir parameter. -AC_DEFUN([PKG_NOARCH_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) -AC_ARG_WITH([noarch-pkgconfigdir], - [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, - [with_noarch_pkgconfigdir=]pkg_default) -AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) -m4_popdef([pkg_default]) -m4_popdef([pkg_description]) -])dnl PKG_NOARCH_INSTALLDIR - - -dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, -dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -dnl ------------------------------------------- -dnl Since: 0.28 -dnl -dnl Retrieves the value of the pkg-config variable for the given module. -AC_DEFUN([PKG_CHECK_VAR], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl - -_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -AS_VAR_COPY([$1], [pkg_cv_][$1]) - -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])dnl PKG_CHECK_VAR - # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html +# http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS @@ -338,7 +62,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see <https://www.gnu.org/licenses/>. +# with this program. If not, see <http://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -353,7 +77,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 5 +#serial 4 AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF @@ -372,7 +96,7 @@ ])dnl AX_CHECK_COMPILE_FLAGS # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html +# http://www.gnu.org/software/autoconf-archive/ax_check_link_flag.html # =========================================================================== # # SYNOPSIS @@ -413,7 +137,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see <https://www.gnu.org/licenses/>. +# with this program. If not, see <http://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -428,7 +152,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 5 +#serial 4 AC_DEFUN([AX_CHECK_LINK_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF @@ -447,7 +171,7 @@ ])dnl AX_CHECK_LINK_FLAGS # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html +# http://www.gnu.org/software/autoconf-archive/ax_check_preproc_flag.html # =========================================================================== # # SYNOPSIS @@ -488,7 +212,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see <https://www.gnu.org/licenses/>. +# with this program. If not, see <http://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -503,7 +227,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 5 +#serial 4 AC_DEFUN([AX_CHECK_PREPROC_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF @@ -522,7 +246,7 @@ ])dnl AX_CHECK_PREPROC_FLAGS # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_code_coverage.html +# http://www.gnu.org/software/autoconf-archive/ax_code_coverage.html # =========================================================================== # # SYNOPSIS @@ -544,7 +268,7 @@ # Test also for gcov program and create GCOV variable that could be # substituted. # -# Note that all optimization flags in CFLAGS must be disabled when code +# Note that all optimisation flags in CFLAGS must be disabled when code # coverage is enabled. # # Usage example: @@ -596,9 +320,9 @@ # General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License -# along with this program. If not, see <https://www.gnu.org/licenses/>. +# along with this program. If not, see <http://www.gnu.org/licenses/>. -#serial 25 +#serial 17 AC_DEFUN([AX_CODE_COVERAGE],[ dnl Check for --enable-code-coverage @@ -634,13 +358,35 @@ AC_MSG_ERROR([not compiling with gcc, which is required for gcov code coverage]) ]) + # List of supported lcov versions. + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" + AC_CHECK_PROG([LCOV], [lcov], [lcov]) AC_CHECK_PROG([GENHTML], [genhtml], [genhtml]) - AS_IF([ test -z "$LCOV" ], [ - AC_MSG_ERROR([To enable code coverage reporting you must have lcov installed]) + AS_IF([ test "$LCOV" ], [ + AC_CACHE_CHECK([for lcov version], ax_cv_lcov_version, [ + ax_cv_lcov_version=invalid + lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` + for lcov_check_version in $lcov_version_list; do + if test "$lcov_version" = "$lcov_check_version"; then + ax_cv_lcov_version="$lcov_check_version (ok)" + fi + done + ]) + ], [ + lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" + AC_MSG_ERROR([$lcov_msg]) ]) + case $ax_cv_lcov_version in + ""|invalid[)] + lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." + AC_MSG_ERROR([$lcov_msg]) + LCOV="exit 0;" + ;; + esac + AS_IF([ test -z "$GENHTML" ], [ AC_MSG_ERROR([Could not find genhtml from the lcov package]) ]) @@ -650,7 +396,7 @@ CODE_COVERAGE_CPPFLAGS="-DNDEBUG" CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_LIBS="-lgcov" + CODE_COVERAGE_LDFLAGS="-lgcov" CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" AC_SUBST([CODE_COVERAGE_CPPFLAGS]) @@ -658,32 +404,6 @@ AC_SUBST([CODE_COVERAGE_CXXFLAGS]) AC_SUBST([CODE_COVERAGE_LIBS]) AC_SUBST([CODE_COVERAGE_LDFLAGS]) - - [CODE_COVERAGE_RULES_CHECK=' - -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check - $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture -'] - [CODE_COVERAGE_RULES_CAPTURE=' - $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) - $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) - -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) - @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" -'] - [CODE_COVERAGE_RULES_CLEAN=' -clean: code-coverage-clean -distclean: code-coverage-clean -code-coverage-clean: - -$(LCOV) --directory $(top_builddir) -z - -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete -'] - ], [ - [CODE_COVERAGE_RULES_CHECK=' - @echo "Need to reconfigure with --enable-code-coverage" -'] - CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" - CODE_COVERAGE_RULES_CLEAN='' ]) [CODE_COVERAGE_RULES=' @@ -741,12 +461,9 @@ CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ --rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) CODE_COVERAGE_IGNORE_PATTERN ?= -GITIGNOREFILES ?= -GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) - code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ @@ -766,15 +483,40 @@ code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) # Use recursive makes in order to ignore errors during check -check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif # Capture code coverage data -code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif # Hook rule executed before code-coverage-capture, overridable by the user code-coverage-capture-hook: -'"$CODE_COVERAGE_RULES_CLEAN"' +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) A''M_DISTCHECK_CONFIGURE_FLAGS ?= A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage @@ -787,7 +529,7 @@ ]) # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_normalize_path.html +# http://www.gnu.org/software/autoconf-archive/ax_normalize_path.html # =========================================================================== # # SYNOPSIS @@ -868,7 +610,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see <https://www.gnu.org/licenses/>. +# with this program. If not, see <http://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -883,7 +625,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 8 +#serial 5 AU_ALIAS([ADL_NORMALIZE_PATH], [AX_NORMALIZE_PATH]) AC_DEFUN([AX_NORMALIZE_PATH], @@ -894,7 +636,7 @@ :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;; :*:) ;; esac -# squeeze repeated slashes +# squeze repeated slashes case ifelse($2,,"[$]$1",$2) in # if the path contains any backslashes, turn slashes into backslashes *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;; @@ -903,7 +645,7 @@ esac]) # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_pthread.html +# http://www.gnu.org/software/autoconf-archive/ax_pthread.html # =========================================================================== # # SYNOPSIS @@ -971,7 +713,7 @@ # Public License for more details. # # You should have received a copy of the GNU General Public License along -# with this program. If not, see <https://www.gnu.org/licenses/>. +# with this program. If not, see <http://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure @@ -986,7 +728,7 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 24 +#serial 23 AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) AC_DEFUN([AX_PTHREAD], [ @@ -1389,7 +1131,7 @@ ])dnl AX_PTHREAD # =========================================================================== -# https://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html +# http://www.gnu.org/software/autoconf-archive/ax_valgrind_check.html # =========================================================================== # # SYNOPSIS @@ -1426,19 +1168,21 @@ # AX_VALGRIND_DFLT([sgcheck], [off]) # AX_VALGRIND_CHECK # -# in each Makefile.am with tests: +# Makefile.am: # # @VALGRIND_CHECK_RULES@ # VALGRIND_SUPPRESSIONS_FILES = my-project.supp # EXTRA_DIST = my-project.supp # -# This results in a "check-valgrind" rule being added. Running `make -# check-valgrind` in that directory will recursively run the module's test -# suite (`make check`) once for each of the available Valgrind tools (out -# of memcheck, helgrind and drd) while the sgcheck will be skipped unless -# enabled again on the commandline with --enable-valgrind-sgcheck. The -# results for each check will be output to test-suite-$toolname.log. The -# target will succeed if there are zero errors and fail otherwise. +# This results in a "check-valgrind" rule being added to any Makefile.am +# which includes "@VALGRIND_CHECK_RULES@" (assuming the module has been +# configured with --enable-valgrind). Running `make check-valgrind` in +# that directory will run the module's test suite (`make check`) once for +# each of the available Valgrind tools (out of memcheck, helgrind and drd) +# while the sgcheck will be skipped unless enabled again on the +# commandline with --enable-valgrind-sgcheck. The results for each check +# will be output to test-suite-$toolname.log. The target will succeed if +# there are zero errors and fail otherwise. # # Alternatively, a "check-valgrind-$TOOL" rule will be added, for $TOOL in # memcheck, helgrind, drd and sgcheck. These are useful because often only @@ -1455,7 +1199,7 @@ # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 17 +#serial 13 dnl Configured tools m4_define([valgrind_tool_list], [[memcheck], [helgrind], [drd], [sgcheck]]) @@ -1467,10 +1211,6 @@ m4_define([en_dflt_valgrind_$1], [$2]) ])dnl -AM_EXTRA_RECURSIVE_TARGETS([check-valgrind]) -m4_foreach([vgtool], [valgrind_tool_list], - [AM_EXTRA_RECURSIVE_TARGETS([check-valgrind-]vgtool)]) - AC_DEFUN([AX_VALGRIND_CHECK],[ dnl Check for --enable-valgrind AC_ARG_ENABLE([valgrind], @@ -1567,7 +1307,7 @@ valgrind_quiet_0 = --quiet valgrind_v_use = $(valgrind_v_use_$(V)) valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) -valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%-am,%,$''@):; +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; # Support running with and without libtool. ifneq ($(LIBTOOL),) @@ -1577,10 +1317,11 @@ endif # Use recursive makes in order to ignore errors during check -check-valgrind-am: +check-valgrind: ifeq ($(VALGRIND_ENABLED),yes) - $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \ - $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool)) + -$(A''M_V_at)$(foreach tool,$(valgrind_enabled_tools), \ + $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ + ) else @echo "Need to reconfigure with --enable-valgrind" endif @@ -1596,16 +1337,14 @@ $(valgrind_lt) \ $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) -define valgrind_tool_rule -check-valgrind-$(1)-am: +define valgrind_tool_rule = +check-valgrind-$(1): ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) -ifneq ($$(TESTS),) $$(valgrind_v_use)$$(MAKE) check-TESTS \ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ LOG_FLAGS="$$(valgrind_$(1)_flags)" \ TEST_SUITE_LOG=test-suite-$(1).log -endif else ifeq ($$(VALGRIND_ENABLED),yes) @echo "Need to reconfigure with --enable-valgrind-$(1)" else @@ -1628,6 +1367,282 @@ m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([VALGRIND_CHECK_RULES])]) ]) +dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- +dnl serial 11 (pkg-config-0.29) +dnl +dnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. +dnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> +dnl +dnl This program is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU General Public License as published by +dnl the Free Software Foundation; either version 2 of the License, or +dnl (at your option) any later version. +dnl +dnl This program is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl General Public License for more details. +dnl +dnl You should have received a copy of the GNU General Public License +dnl along with this program; if not, write to the Free Software +dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +dnl 02111-1307, USA. +dnl +dnl As a special exception to the GNU General Public License, if you +dnl distribute this file as part of a program that contains a +dnl configuration script generated by Autoconf, you may include it under +dnl the same distribution terms that you use for the rest of that +dnl program. + +dnl PKG_PREREQ(MIN-VERSION) +dnl ----------------------- +dnl Since: 0.29 +dnl +dnl Verify that the version of the pkg-config macros are at least +dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's +dnl installed version of pkg-config, this checks the developer's version +dnl of pkg.m4 when generating configure. +dnl +dnl To ensure that this macro is defined, also add: +dnl m4_ifndef([PKG_PREREQ], +dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) +dnl +dnl See the "Since" comment for each macro you use to see what version +dnl of the macros you require. +m4_defun([PKG_PREREQ], +[m4_define([PKG_MACROS_VERSION], [0.29]) +m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, + [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) +])dnl PKG_PREREQ + +dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) +dnl ---------------------------------- +dnl Since: 0.16 +dnl +dnl Search for the pkg-config tool and set the PKG_CONFIG variable to +dnl first found in the path. Checks that the version of pkg-config found +dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is +dnl used since that's the first version where most current features of +dnl pkg-config existed. +AC_DEFUN([PKG_PROG_PKG_CONFIG], +[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) +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 +if test -n "$PKG_CONFIG"; then + _pkg_min_version=m4_default([$1], [0.9.0]) + AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + PKG_CONFIG="" + fi +fi[]dnl +])dnl PKG_PROG_PKG_CONFIG + +dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------------------------------- +dnl Since: 0.18 +dnl +dnl Check to see whether a particular set of modules exists. Similar to +dnl PKG_CHECK_MODULES(), but does not set variables or print errors. +dnl +dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +dnl only at the first occurence in configure.ac, so if the first place +dnl it's called might be skipped (such as if it is within an "if", you +dnl 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_default([$2], [:]) +m4_ifvaln([$3], [else + $3])dnl +fi]) + +dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) +dnl --------------------------------------------- +dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting +dnl pkg_failed based on the result. +m4_define([_PKG_CONFIG], +[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` + test "x$?" != "x0" && pkg_failed=yes ], + [pkg_failed=yes]) + else + pkg_failed=untried +fi[]dnl +])dnl _PKG_CONFIG + +dnl _PKG_SHORT_ERRORS_SUPPORTED +dnl --------------------------- +dnl Internal check to see if pkg-config supports short errors. +AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi[]dnl +])dnl _PKG_SHORT_ERRORS_SUPPORTED + + +dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl -------------------------------------------------------------- +dnl Since: 0.4.0 +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES might not happen, you should be sure to include an +dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac +AC_DEFUN([PKG_CHECK_MODULES], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl +AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl + +pkg_failed=no +AC_MSG_CHECKING([for $1]) + +_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) +_PKG_CONFIG([$1][_LIBS], [libs], [$2]) + +m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS +and $1[]_LIBS to avoid the need to call pkg-config. +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 --print-errors --cflags --libs "$2" 2>&1` + else + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD + + m4_default([$4], [AC_MSG_ERROR( +[Package requirements ($2) were not met: + +$$1_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +_PKG_TEXT])[]dnl + ]) +elif test $pkg_failed = untried; then + 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 <http://pkg-config.freedesktop.org/>.])[]dnl + ]) +else + $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS + $1[]_LIBS=$pkg_cv_[]$1[]_LIBS + AC_MSG_RESULT([yes]) + $3 +fi[]dnl +])dnl PKG_CHECK_MODULES + + +dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], +dnl [ACTION-IF-NOT-FOUND]) +dnl --------------------------------------------------------------------- +dnl Since: 0.29 +dnl +dnl Checks for existence of MODULES and gathers its build flags with +dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags +dnl and VARIABLE-PREFIX_LIBS from --libs. +dnl +dnl Note that if there is a possibility the first call to +dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to +dnl include an explicit call to PKG_PROG_PKG_CONFIG in your +dnl configure.ac. +AC_DEFUN([PKG_CHECK_MODULES_STATIC], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +_save_PKG_CONFIG=$PKG_CONFIG +PKG_CONFIG="$PKG_CONFIG --static" +PKG_CHECK_MODULES($@) +PKG_CONFIG=$_save_PKG_CONFIG[]dnl +])dnl PKG_CHECK_MODULES_STATIC + + +dnl PKG_INSTALLDIR([DIRECTORY]) +dnl ------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable pkgconfigdir as the location where a module +dnl should install pkg-config .pc files. By default the directory is +dnl $libdir/pkgconfig, but the default can be changed by passing +dnl DIRECTORY. The user can override through the --with-pkgconfigdir +dnl parameter. +AC_DEFUN([PKG_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_INSTALLDIR + + +dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) +dnl -------------------------------- +dnl Since: 0.27 +dnl +dnl Substitutes the variable noarch_pkgconfigdir as the location where a +dnl module should install arch-independent pkg-config .pc files. By +dnl default the directory is $datadir/pkgconfig, but the default can be +dnl changed by passing DIRECTORY. The user can override through the +dnl --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +])dnl PKG_NOARCH_INSTALLDIR + + +dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +dnl ------------------------------------------- +dnl Since: 0.28 +dnl +dnl Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])dnl PKG_CHECK_VAR + # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/configure new/tpm2-abrmd-2.0.2/configure --- old/tpm2-abrmd-2.0.1/configure 2018-07-26 01:54:02.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/configure 2018-09-11 05:55:06.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tpm2-abrmd 2.0.1. +# Generated by GNU Autoconf 2.69 for tpm2-abrmd 2.0.2. # # Report bugs to <https://github.com/tpm2-software/tpm2-abrmd/issues>. # @@ -591,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='tpm2-abrmd' PACKAGE_TARNAME='tpm2-abrmd' -PACKAGE_VERSION='2.0.1' -PACKAGE_STRING='tpm2-abrmd 2.0.1' +PACKAGE_VERSION='2.0.2' +PACKAGE_STRING='tpm2-abrmd 2.0.2' PACKAGE_BUGREPORT='https://github.com/tpm2-software/tpm2-abrmd/issues' PACKAGE_URL='https://github.com/tpm2-software/tpm2-abrmd' @@ -1416,7 +1416,7 @@ # 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 tpm2-abrmd 2.0.1 to adapt to many kinds of systems. +\`configure' configures tpm2-abrmd 2.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1487,7 +1487,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tpm2-abrmd 2.0.1:";; + short | recursive ) echo "Configuration of tpm2-abrmd 2.0.2:";; esac cat <<\_ACEOF @@ -1647,7 +1647,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tpm2-abrmd configure 2.0.1 +tpm2-abrmd configure 2.0.2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1925,7 +1925,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tpm2-abrmd $as_me 2.0.1, which was +It was created by tpm2-abrmd $as_me 2.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -11785,7 +11785,7 @@ # Define the identity of the package. PACKAGE='tpm2-abrmd' - VERSION='2.0.1' + VERSION='2.0.2' cat >>confdefs.h <<_ACEOF @@ -13628,6 +13628,9 @@ fi + # List of supported lcov versions. + lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12" + # Extract the first word of "lcov", so it can be a program name with args. set dummy lcov; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -13703,11 +13706,40 @@ - if test -z "$LCOV" ; then : + if test "$LCOV" ; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lcov version" >&5 +$as_echo_n "checking for lcov version... " >&6; } +if ${ax_cv_lcov_version+:} false; then : + $as_echo_n "(cached) " >&6 +else - as_fn_error $? "To enable code coverage reporting you must have lcov installed" "$LINENO" 5 + ax_cv_lcov_version=invalid + lcov_version=`$LCOV -v 2>/dev/null | $SED -e 's/^.* //'` + for lcov_check_version in $lcov_version_list; do + if test "$lcov_version" = "$lcov_check_version"; then + ax_cv_lcov_version="$lcov_check_version (ok)" + fi + done fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_lcov_version" >&5 +$as_echo "$ax_cv_lcov_version" >&6; } + +else + + lcov_msg="To enable code coverage reporting you must have one of the following lcov versions installed: $lcov_version_list" + as_fn_error $? "$lcov_msg" "$LINENO" 5 + +fi + + case $ax_cv_lcov_version in + ""|invalid) + lcov_msg="You must have one of the following versions of lcov: $lcov_version_list (found: $lcov_version)." + as_fn_error $? "$lcov_msg" "$LINENO" 5 + LCOV="exit 0;" + ;; + esac if test -z "$GENHTML" ; then : @@ -13718,7 +13750,7 @@ CODE_COVERAGE_CPPFLAGS="-DNDEBUG" CODE_COVERAGE_CFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" CODE_COVERAGE_CXXFLAGS="-O0 -g -fprofile-arcs -ftest-coverage" - CODE_COVERAGE_LIBS="-lgcov" + CODE_COVERAGE_LDFLAGS="-lgcov" CODE_COVERAGE_LDFLAGS="$CODE_COVERAGE_LIBS" @@ -13727,34 +13759,6 @@ - CODE_COVERAGE_RULES_CHECK=' - -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check - $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture -' - CODE_COVERAGE_RULES_CAPTURE=' - $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) - $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) - -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp - $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) - @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" -' - CODE_COVERAGE_RULES_CLEAN=' -clean: code-coverage-clean -distclean: code-coverage-clean -code-coverage-clean: - -$(LCOV) --directory $(top_builddir) -z - -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) - -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete -' - -else - - CODE_COVERAGE_RULES_CHECK=' - @echo "Need to reconfigure with --enable-code-coverage" -' - CODE_COVERAGE_RULES_CAPTURE="$CODE_COVERAGE_RULES_CHECK" - CODE_COVERAGE_RULES_CLEAN='' - fi CODE_COVERAGE_RULES=' @@ -13812,12 +13816,9 @@ CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT ?=\ $(if $(CODE_COVERAGE_BRANCH_COVERAGE),\ --rc genhtml_branch_coverage=$(CODE_COVERAGE_BRANCH_COVERAGE)) -CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULT) +CODE_COVERAGE_GENHTML_OPTIONS ?= $(CODE_COVERAGE_GENHTML_OPTIONS_DEFAULTS) CODE_COVERAGE_IGNORE_PATTERN ?= -GITIGNOREFILES ?= -GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) - code_coverage_v_lcov_cap = $(code_coverage_v_lcov_cap_$(V)) code_coverage_v_lcov_cap_ = $(code_coverage_v_lcov_cap_$(AM_DEFAULT_VERBOSITY)) code_coverage_v_lcov_cap_0 = @echo " LCOV --capture"\ @@ -13837,15 +13838,40 @@ code_coverage_sanitize = $(subst -,_,$(subst .,_,$(1))) # Use recursive makes in order to ignore errors during check -check-code-coverage:'"$CODE_COVERAGE_RULES_CHECK"' +check-code-coverage: +ifeq ($(CODE_COVERAGE_ENABLED),yes) + -$(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k check + $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) code-coverage-capture +else + @echo "Need to reconfigure with --enable-code-coverage" +endif # Capture code coverage data -code-coverage-capture: code-coverage-capture-hook'"$CODE_COVERAGE_RULES_CAPTURE"' +code-coverage-capture: code-coverage-capture-hook +ifeq ($(CODE_COVERAGE_ENABLED),yes) + $(code_coverage_v_lcov_cap)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --capture --output-file "$(CODE_COVERAGE_OUTPUT_FILE).tmp" --test-name "$(call code_coverage_sanitize,$(PACKAGE_NAME)-$(PACKAGE_VERSION))" --no-checksum --compat-libtool $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_OPTIONS) + $(code_coverage_v_lcov_ign)$(LCOV) $(code_coverage_quiet) $(addprefix --directory ,$(CODE_COVERAGE_DIRECTORY)) --remove "$(CODE_COVERAGE_OUTPUT_FILE).tmp" "/tmp/*" $(CODE_COVERAGE_IGNORE_PATTERN) --output-file "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_LCOV_SHOPTS) $(CODE_COVERAGE_LCOV_RMOPTS) + -@rm -f $(CODE_COVERAGE_OUTPUT_FILE).tmp + $(code_coverage_v_genhtml)LANG=C $(GENHTML) $(code_coverage_quiet) $(addprefix --prefix ,$(CODE_COVERAGE_DIRECTORY)) --output-directory "$(CODE_COVERAGE_OUTPUT_DIRECTORY)" --title "$(PACKAGE_NAME)-$(PACKAGE_VERSION) Code Coverage" --legend --show-details "$(CODE_COVERAGE_OUTPUT_FILE)" $(CODE_COVERAGE_GENHTML_OPTIONS) + @echo "file://$(abs_builddir)/$(CODE_COVERAGE_OUTPUT_DIRECTORY)/index.html" +else + @echo "Need to reconfigure with --enable-code-coverage" +endif # Hook rule executed before code-coverage-capture, overridable by the user code-coverage-capture-hook: -'"$CODE_COVERAGE_RULES_CLEAN"' +ifeq ($(CODE_COVERAGE_ENABLED),yes) +clean: code-coverage-clean +distclean: code-coverage-clean +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_FILE).tmp $(CODE_COVERAGE_OUTPUT_DIRECTORY) + -find . \( -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" \) -delete +endif + +GITIGNOREFILES ?= +GITIGNOREFILES += $(CODE_COVERAGE_OUTPUT_FILE) $(CODE_COVERAGE_OUTPUT_DIRECTORY) A''M_DISTCHECK_CONFIGURE_FLAGS ?= A''M_DISTCHECK_CONFIGURE_FLAGS += --disable-code-coverage @@ -14210,7 +14236,7 @@ valgrind_quiet_0 = --quiet valgrind_v_use = $(valgrind_v_use_$(V)) valgrind_v_use_ = $(valgrind_v_use_$(AM_DEFAULT_VERBOSITY)) -valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%-am,%,$''@):; +valgrind_v_use_0 = @echo " USE " $(patsubst check-valgrind-%,%,$''@):; # Support running with and without libtool. ifneq ($(LIBTOOL),) @@ -14220,10 +14246,11 @@ endif # Use recursive makes in order to ignore errors during check -check-valgrind-am: +check-valgrind: ifeq ($(VALGRIND_ENABLED),yes) - $(A''M_V_at)$(MAKE) $(AM_MAKEFLAGS) -k \ - $(foreach tool, $(valgrind_enabled_tools), check-valgrind-$(tool)) + -$(A''M_V_at)$(foreach tool,$(valgrind_enabled_tools), \ + $(MAKE) $(AM_MAKEFLAGS) -k check-valgrind-$(tool); \ + ) else @echo "Need to reconfigure with --enable-valgrind" endif @@ -14239,16 +14266,14 @@ $(valgrind_lt) \ $(VALGRIND) $(VALGRIND_SUPPRESSIONS) --error-exitcode=1 $(VALGRIND_FLAGS) -define valgrind_tool_rule -check-valgrind-$(1)-am: +define valgrind_tool_rule = +check-valgrind-$(1): ifeq ($$(VALGRIND_ENABLED)-$$(ENABLE_VALGRIND_$(1)),yes-yes) -ifneq ($$(TESTS),) $$(valgrind_v_use)$$(MAKE) check-TESTS \ TESTS_ENVIRONMENT="$$(VALGRIND_TESTS_ENVIRONMENT)" \ LOG_COMPILER="$$(VALGRIND_LOG_COMPILER)" \ LOG_FLAGS="$$(valgrind_$(1)_flags)" \ TEST_SUITE_LOG=test-suite-$(1).log -endif else ifeq ($$(VALGRIND_ENABLED),yes) @echo "Need to reconfigure with --enable-valgrind-$(1)" else @@ -14350,7 +14375,7 @@ :*[\\/]:) with_dbuspolicydir=`echo "$with_dbuspolicydir" | sed 's,[\\/]*$,,'` ;; :*:) ;; esac -# squeeze repeated slashes +# squeze repeated slashes case "$with_dbuspolicydir" in # if the path contains any backslashes, turn slashes into backslashes *\\*) with_dbuspolicydir=`echo "$with_dbuspolicydir" | sed 's,\(.\)[\\/][\\/]*,\1\\\\,g'` ;; @@ -16099,7 +16124,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tpm2-abrmd $as_me 2.0.1, which was +This file was extended by tpm2-abrmd $as_me 2.0.2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16157,7 +16182,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -tpm2-abrmd config.status 2.0.1 +tpm2-abrmd config.status 2.0.2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/src/random.c new/tpm2-abrmd-2.0.2/src/random.c --- old/tpm2-abrmd-2.0.1/src/random.c 2018-06-22 14:41:40.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/src/random.c 2018-09-11 05:50:28.000000000 +0200 @@ -120,7 +120,9 @@ goto close_out; } g_debug ("seeding rand with %ld", rand_seed); - srand48_r (rand_seed, &random->rand_state); + random->rand_state[0] = 0x330E; + random->rand_state[1] = rand_seed & 0xffff; + random->rand_state[2] = (rand_seed >> 16) & 0xffff; close_out: if (close (rand_fd) != 0) @@ -148,7 +150,7 @@ g_debug ("random_get_bytes: %p", random); g_assert_nonnull (random); for (i = 0; i < count; ++i) { - lrand48_r (&random->rand_state, (long int*)&rand[0]); + *(&rand[0]) = nrand48 (random->rand_state); memcpy (&dest[i], &rand[0], sizeof (uint8_t)); } return i; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/src/random.h new/tpm2-abrmd-2.0.2/src/random.h --- old/tpm2-abrmd-2.0.1/src/random.h 2018-06-22 14:41:43.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/src/random.h 2018-09-11 05:50:28.000000000 +0200 @@ -40,7 +40,7 @@ typedef struct _Random { GObject parent_instance; - struct drand48_data rand_state; + unsigned short rand_state[3]; } Random; #define TYPE_RANDOM (random_get_type ()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/src/tcti-tabrmd.c new/tpm2-abrmd-2.0.2/src/tcti-tabrmd.c --- old/tpm2-abrmd-2.0.1/src/tcti-tabrmd.c 2018-07-19 06:04:52.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/src/tcti-tabrmd.c 2018-09-11 05:50:28.000000000 +0200 @@ -390,6 +390,8 @@ void init_tcti_data (TSS2_TCTI_CONTEXT *context) { + memset (context, 0, sizeof (TSS2_TCTI_TABRMD_CONTEXT)); + TSS2_TCTI_MAGIC (context) = TSS2_TCTI_TABRMD_MAGIC; TSS2_TCTI_VERSION (context) = TSS2_TCTI_TABRMD_VERSION; TSS2_TCTI_TABRMD_STATE (context) = TABRMD_STATE_TRANSMIT; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tpm2-abrmd-2.0.1/src/util.c new/tpm2-abrmd-2.0.2/src/util.c --- old/tpm2-abrmd-2.0.1/src/util.c 2018-06-22 14:41:40.000000000 +0200 +++ new/tpm2-abrmd-2.0.2/src/util.c 2018-09-11 05:50:28.000000000 +0200 @@ -100,7 +100,7 @@ g_debug ("writing %zu bytes starting at 0x%" PRIxPTR " to socket 0x%" PRIxPTR, size - written_total, - (uintptr_t)buf + written_total, + (uintptr_t)(buf + written_total), (uintptr_t)socket); written = g_output_stream_write (ostream, (const gchar*)&buf [written_total], @@ -155,7 +155,7 @@ g_assert (index != NULL); do { - g_debug ("reading %zd bytes socket 0x%" PRIxPTR", to 0x%" PRIxPTR, + g_debug ("reading %zu bytes socket 0x%" PRIxPTR", to 0x%" PRIxPTR, bytes_left, (uintptr_t)socket, (uintptr_t)&buf [*index]); num_read = g_input_stream_read (istream, (gchar*)&buf [*index],