From 8985f1a5e85ae486b7e3074338aea3b2bd6b5e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20W=C3=A4ckerlin?= Date: Fri, 19 Aug 2016 16:07:23 +0000 Subject: [PATCH] fix C++11 detection --- COPYING | 2 +- ChangeLog | 14 ++++++++++++++ INSTALL | 2 +- ax_cxx_compile_stdcxx_11.m4 | 4 +++- ax_init_standard_project.m4 | 4 ++++ makefile_test.inc.am | 4 ++++ 6 files changed, 27 insertions(+), 3 deletions(-) diff --git a/COPYING b/COPYING index caeca07..88798ab 120000 --- a/COPYING +++ b/COPYING @@ -1 +1 @@ -/usr/share/automake-1.14/COPYING \ No newline at end of file +/usr/share/automake-1.15/COPYING \ No newline at end of file diff --git a/ChangeLog b/ChangeLog index 9112906..4f78bb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2016-08-19 14:52 + + * COPYING, INSTALL, ax_cxx_compile_stdcxx_11.m4, + ax_init_standard_project.m4, bootstrap.sh, makefile_test.inc.am, + src/matrix.hxx, test/basic.cxx: more operators more tests + +2016-08-18 22:03 + + * COPYING, ChangeLog, INSTALL, src/matrix.hxx: more operators + +2016-08-17 07:26 + + * configure.ac: only requires c++11 + 2016-08-16 14:41 * COPYING, INSTALL, ax_init_standard_project.m4, configure.ac, diff --git a/INSTALL b/INSTALL index f812f5a..ddcdb76 120000 --- a/INSTALL +++ b/INSTALL @@ -1 +1 @@ -/usr/share/automake-1.14/INSTALL \ No newline at end of file +/usr/share/automake-1.15/INSTALL \ No newline at end of file diff --git a/ax_cxx_compile_stdcxx_11.m4 b/ax_cxx_compile_stdcxx_11.m4 index e3c8d75..4c831e0 100644 --- a/ax_cxx_compile_stdcxx_11.m4 +++ b/ax_cxx_compile_stdcxx_11.m4 @@ -201,15 +201,17 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX_14], [dnl AC_MSG_ERROR([*** A compiler with support for C++14 language features is required.]) fi else - HAVE_CXX11=${HAVE_CXX14} if test x$ac_success = xno; then HAVE_CXX14=0 AC_MSG_NOTICE([No compiler with C++14 support was found]) AX_CXX_COMPILE_STDCXX_11([$1], [optional]) else + HAVE_CXX11=1 HAVE_CXX14=1 AC_DEFINE(HAVE_CXX14,1, [define if the compiler supports basic C++14 syntax]) + AC_DEFINE(HAVE_CXX11,1, + [define if the compiler supports basic C++14 syntax]) fi AC_SUBST(HAVE_CXX11) AC_SUBST(HAVE_CXX14) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index 04f89ac..ab87e67 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -252,6 +252,10 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ if test "$GCOV" == "yes"; then GCOV=gcov fi + AC_CHECK_PROG(has_gcov, [$GCOV], [yes], [no]) + if test "$has_gcov" != "yes"; then + AC_MSG_ERROR([gcov: program $GCOV not found]) + fi AC_MSG_NOTICE([Coverage tests enabled, using ${GCOV}]); AM_CXXFLAGS="${AM_CXXFLAGS:-} -O0 --coverage -fprofile-arcs -ftest-coverage" AM_LDFLAGS="${AM_LDFLAGS} -O0 --coverage -fprofile-arcs" diff --git a/makefile_test.inc.am b/makefile_test.inc.am index a4e05fa..baf81c4 100644 --- a/makefile_test.inc.am +++ b/makefile_test.inc.am @@ -3,3 +3,7 @@ ## 1 2 3 4 5 6 7 8 ## 45678901234567890123456789012345678901234567890123456789012345678901234567890 +%.gcda: % + gcov $< + +CLEANFILES += ${CLEANFILES} ${TEST:%=%.gcno} ${TEST:%=%.gcda} *.gcov