From c39857b72000583036208220cda661638843d1b1 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 23 Oct 2024 14:56:25 -0700 Subject: [PATCH 1/3] Adding the m4 macro for stdcxx_17 and removing the macro for stdcxx_11 --- ...tdcxx_11.m4 => ax_cxx_compile_stdcxx_17.m4} | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) rename m4/{ax_cxx_compile_stdcxx_11.m4 => ax_cxx_compile_stdcxx_17.m4} (67%) diff --git a/m4/ax_cxx_compile_stdcxx_11.m4 b/m4/ax_cxx_compile_stdcxx_17.m4 similarity index 67% rename from m4/ax_cxx_compile_stdcxx_11.m4 rename to m4/ax_cxx_compile_stdcxx_17.m4 index 1733fd8..a683417 100644 --- a/m4/ax_cxx_compile_stdcxx_11.m4 +++ b/m4/ax_cxx_compile_stdcxx_17.m4 @@ -1,19 +1,19 @@ # ============================================================================= -# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html +# https://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_17.html # ============================================================================= # # SYNOPSIS # -# AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) +# AX_CXX_COMPILE_STDCXX_17([ext|noext], [mandatory|optional]) # # DESCRIPTION # -# Check for baseline language coverage in the compiler for the C++11 +# Check for baseline language coverage in the compiler for the C++17 # standard; if necessary, add switches to CXX and CXXCPP to enable # support. # # This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX -# macro with the version set to C++11. The two optional arguments are +# macro with the version set to C++17. The two optional arguments are # forwarded literally as the second and third argument respectively. # Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for # more information. If you want to use this macro, you also need to @@ -21,19 +21,15 @@ # # LICENSE # -# Copyright (c) 2008 Benjamin Kosnik -# Copyright (c) 2012 Zack Weinberg -# Copyright (c) 2013 Roy Stogner -# Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov -# Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler +# Copyright (c) 2016 Krzesimir Nowak # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. -#serial 18 +#serial 2 AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX]) -AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) +AC_DEFUN([AX_CXX_COMPILE_STDCXX_17], [AX_CXX_COMPILE_STDCXX([17], [$1], [$2])]) From ca21748b36be32f11773a5ef99fef2a980c58043 Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 23 Oct 2024 15:02:51 -0700 Subject: [PATCH 2/3] configure.ac: checking the compiler for support for c++17 --- configure.ac | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index a27d807..87c6b13 100644 --- a/configure.ac +++ b/configure.ac @@ -21,14 +21,10 @@ dnl used to keep command lines short. AC_CONFIG_HEADERS([config.h]) AM_INIT_AUTOMAKE([subdir-objects foreign]) -dnl Less output to the terminal. Use "--disable-silent-rules" when -dnl running ./configure to reverse this. -AM_SILENT_RULES([yes]) - AC_CONFIG_MACRO_DIR([m4]) AC_LANG(C++) AC_PROG_CXX -AX_CXX_COMPILE_STDCXX_11([noext], [mandatory]) +AX_CXX_COMPILE_STDCXX_17([noext], [mandatory]) AC_OPENMP([C++]) dnl make sure we have openmp for multi-core in falco dnl check for the Zlib library From b3b701bdf15f624df06c16b7e1a77d36e25e1b6b Mon Sep 17 00:00:00 2001 From: Andrew D Smith Date: Wed, 23 Oct 2024 15:03:02 -0700 Subject: [PATCH 3/3] Makefile.am: disabling debug when optimization turned on --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index ba939b3..a8837df 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,7 @@ EXTRA_DIST = README.md LICENSE Configuration example.fq test ACLOCAL_AMFLAGS = -I m4 AM_CPPFLAGS = -I $(top_srcdir)/src -CXXFLAGS = -O3 # default has optimization on +CXXFLAGS = -O3 -DNDEBUG # default optimization on; override on cli TESTS = test/falco.test TEST_EXTENSIONS = .test