From 8475dfe26dcef6a647942bf75e4b58189091d9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Mon, 10 May 2021 14:55:34 +0200 Subject: [PATCH] Build system: update m4 macros from autoconf-archive --- license.txt | 3 +++ m4/ax_blas.m4 | 15 +++++++++------ m4/ax_cxx_compile_stdcxx.m4 | 15 +++++++++++++-- m4/ax_lapack.m4 | 9 ++++++--- preprocessor | 2 +- 5 files changed, 32 insertions(+), 12 deletions(-) diff --git a/license.txt b/license.txt index 43f6280eb..c45679977 100644 --- a/license.txt +++ b/license.txt @@ -246,6 +246,7 @@ License: GPL-3+ Files: m4/ax_blas.m4 m4/ax_lapack.m4 Copyright: 2008-2009 Steven G. Johnson + 2019 Geoffrey M. Oxberry License: GPL-3+ with Autoconf exception Files: m4/ax_compare_version.m4 @@ -262,6 +263,7 @@ Copyright: 2008 Benjamin Kosnik 2015 Moritz Klammler 2016, 2018 Krzesimir Nowak 2019 Enji Cooper + 2020 Jason Merrill License: FSFAP Files: m4/ax_latex_class.m4 m4/ax_latex_test.m4 @@ -311,6 +313,7 @@ Copyright: 2008 Benjamin Kosnik 2015 Moritz Klammler 2016, 2018 Krzesimir Nowak 2019 Enji Cooper + 2020 Jason Merrill License: FSFAP Files: preprocessor/m4/ax_latex_class.m4 diff --git a/m4/ax_blas.m4 b/m4/ax_blas.m4 index bf9f29c62..95719050a 100644 --- a/m4/ax_blas.m4 +++ b/m4/ax_blas.m4 @@ -36,6 +36,7 @@ # LICENSE # # Copyright (c) 2008 Steven G. Johnson +# Copyright (c) 2019 Geoffrey M. Oxberry # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -63,11 +64,11 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 15 +#serial 17 AU_ALIAS([ACX_BLAS], [AX_BLAS]) AC_DEFUN([AX_BLAS], [ -AC_PREREQ(2.50) +AC_PREREQ([2.55]) AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS]) AC_REQUIRE([AC_CANONICAL_HOST]) ax_blas_ok=no @@ -77,7 +78,9 @@ AC_ARG_WITH(blas, case $with_blas in yes | "") ;; no) ax_blas_ok=disable ;; - -* | */* | *.a | *.so | *.so.* | *.o) BLAS_LIBS="$with_blas" ;; + -* | */* | *.a | *.so | *.so.* | *.dylib | *.dylib.* | *.o) + BLAS_LIBS="$with_blas" + ;; *) BLAS_LIBS="-l$with_blas" ;; esac @@ -93,7 +96,7 @@ if test $ax_blas_ok = no; then if test "x$BLAS_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$BLAS_LIBS $LIBS" AC_MSG_CHECKING([for $sgemm in $BLAS_LIBS]) - AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes], [BLAS_LIBS=""]) + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes], [BLAS_LIBS=""]) AC_MSG_RESULT($ax_blas_ok) LIBS="$save_LIBS" fi @@ -103,7 +106,7 @@ fi if test $ax_blas_ok = no; then save_LIBS="$LIBS"; LIBS="$LIBS" AC_MSG_CHECKING([if $sgemm is being linked in already]) - AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes]) + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes]) AC_MSG_RESULT($ax_blas_ok) LIBS="$save_LIBS" fi @@ -174,7 +177,7 @@ fi if test $ax_blas_ok = no; then save_LIBS="$LIBS"; LIBS="-framework vecLib $LIBS" AC_MSG_CHECKING([for $sgemm in -framework vecLib]) - AC_TRY_LINK_FUNC($sgemm, [ax_blas_ok=yes;BLAS_LIBS="-framework vecLib"]) + AC_LINK_IFELSE([AC_LANG_CALL([], [$sgemm])], [ax_blas_ok=yes;BLAS_LIBS="-framework vecLib"]) AC_MSG_RESULT($ax_blas_ok) LIBS="$save_LIBS" fi diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4 index 43087b2e6..9413da624 100644 --- a/m4/ax_cxx_compile_stdcxx.m4 +++ b/m4/ax_cxx_compile_stdcxx.m4 @@ -16,7 +16,7 @@ # The second argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with -# preference for an extended mode. +# preference for no added switch, and then for an extended mode. # # The third argument, if specified 'mandatory' or if left unspecified, # indicates that baseline support for the specified C++ standard is @@ -35,13 +35,14 @@ # Copyright (c) 2015 Moritz Klammler # Copyright (c) 2016, 2018 Krzesimir Nowak # Copyright (c) 2019 Enji Cooper +# Copyright (c) 2020 Jason Merrill # # 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 11 +#serial 12 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro dnl (serial version number 13). @@ -62,6 +63,16 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl AC_LANG_PUSH([C++])dnl ac_success=no + m4_if([$2], [], [dnl + AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, + ax_cv_cxx_compile_cxx$1, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], + [ax_cv_cxx_compile_cxx$1=yes], + [ax_cv_cxx_compile_cxx$1=no])]) + if test x$ax_cv_cxx_compile_cxx$1 = xyes; then + ac_success=yes + fi]) + m4_if([$2], [noext], [], [dnl if test x$ac_success = xno; then for alternative in ${ax_cxx_compile_alternatives}; do diff --git a/m4/ax_lapack.m4 b/m4/ax_lapack.m4 index e7eadd17b..abaff9d17 100644 --- a/m4/ax_lapack.m4 +++ b/m4/ax_lapack.m4 @@ -37,6 +37,7 @@ # LICENSE # # Copyright (c) 2009 Steven G. Johnson +# Copyright (c) 2019 Geoffrey M. Oxberry # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the @@ -64,7 +65,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 10 AU_ALIAS([ACX_LAPACK], [AX_LAPACK]) AC_DEFUN([AX_LAPACK], [ @@ -76,7 +77,9 @@ AC_ARG_WITH(lapack, case $with_lapack in yes | "") ;; no) ax_lapack_ok=disable ;; - -* | */* | *.a | *.so | *.so.* | *.o) LAPACK_LIBS="$with_lapack" ;; + -* | */* | *.a | *.so | *.so.* | *.dylib | *.dylib.* | *.o) + LAPACK_LIBS="$with_lapack" + ;; *) LAPACK_LIBS="-l$with_lapack" ;; esac @@ -93,7 +96,7 @@ fi if test "x$LAPACK_LIBS" != x; then save_LIBS="$LIBS"; LIBS="$LAPACK_LIBS $BLAS_LIBS $LIBS $FLIBS" AC_MSG_CHECKING([for $cheev in $LAPACK_LIBS]) - AC_TRY_LINK_FUNC($cheev, [ax_lapack_ok=yes], [LAPACK_LIBS=""]) + AC_LINK_IFELSE([AC_LANG_CALL([], [$cheev])], [ax_lapack_ok=yes], [LAPACK_LIBS=""]) AC_MSG_RESULT($ax_lapack_ok) LIBS="$save_LIBS" if test $ax_lapack_ok = no; then diff --git a/preprocessor b/preprocessor index 80e109025..0c0ea6b8d 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit 80e109025719014fe2ca06d9e0d9c80af15ebdc4 +Subproject commit 0c0ea6b8d2e0761ddcdf55115ecbe3ab6c08770e