diff options
author | Gabriel Dos Reis <GabrielDosReis@users.noreply.github.com> | 2022-08-13 17:28:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-13 17:28:12 -0700 |
commit | d4bc50891cb647222057e3659e9fe08e7cdd8dc4 (patch) | |
tree | 4a1cef16e28426eb449003d1987e03dd0e805dc8 | |
parent | 0e77f21581331cc69e1ec5515a6ecb87b3effe67 (diff) | |
parent | b1be06125ea355e15555d79f0a63022f9bb7704e (diff) | |
download | open-axiom-d4bc50891cb647222057e3659e9fe08e7cdd8dc4.tar.gz |
Merge pull request #11 from GabrielDosReis/gdr/cxx-version-requirement
Refactor Autconf macro for requiring C++ version.
-rw-r--r-- | config/open-axiom.m4 | 12 | ||||
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | configure.ac | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index fce469bd..34fcaa6d 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -257,17 +257,17 @@ case $host in esac ]) -dnl ----------------------------- -dnl -- OPENAXIOM_REQUIRE_CXX17 -- -dnl ----------------------------- -AC_DEFUN([OPENAXIOM_REQUIRE_CXX17],[ +dnl --------------------------- +dnl -- OPENAXIOM_REQUIRE_CXX -- +dnl --------------------------- +AC_DEFUN([OPENAXIOM_REQUIRE_CXX],[ oa_saved_cxxflags=$CXXFLAGS -CXXFLAGS="-std=c++17" +CXXFLAGS="-std=c++$1" AC_MSG_CHECKING([whether $CXX supports $CXXFLAGS]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], [AC_MSG_RESULT([yes])] [CXXFLAGS="$CXXFLAGS $oa_saved_cxxflags"], - [AC_MSG_ERROR([OpenAxiom requires a C++17 compiler])]) + [AC_MSG_ERROR([OpenAxiom requires a C++$1 compiler])]) ]) dnl ------------------------------- @@ -6374,7 +6374,7 @@ fi oa_saved_cxxflags=$CXXFLAGS -CXXFLAGS="-std=c++17" +CXXFLAGS="-std=c++20" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports $CXXFLAGS" >&5 printf %s "checking whether $CXX supports $CXXFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -6394,7 +6394,7 @@ then : printf "%s\n" "yes" >&6; } CXXFLAGS="$CXXFLAGS $oa_saved_cxxflags" else $as_nop - as_fn_error $? "OpenAxiom requires a C++17 compiler" "$LINENO" 5 + as_fn_error $? "OpenAxiom requires a C++20 compiler" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext diff --git a/configure.ac b/configure.ac index 9ffdd62b..8d324d9f 100644 --- a/configure.ac +++ b/configure.ac @@ -90,7 +90,7 @@ AC_LANG([C++]) OPENAXIOM_HOST_COMPILERS AM_CONDITIONAL([OA_USE_LLVM], [test -n $oa_use_llvm]) -OPENAXIOM_REQUIRE_CXX17 +OPENAXIOM_REQUIRE_CXX([20]) OPENAXIOM_EXTRA_CXX_OPTIONS AM_CONDITIONAL([OA_BUILD_GCL], [test x$oa_include_gcl = xyes]) AM_CONDITIONAL([OA_ECL_RT], [test x$oa_lisp_flavor = xecl]) |