From b63b2926cbed5e379c77db36f4a55a049f623540 Mon Sep 17 00:00:00 2001 From: Jaroslav Fowkes Date: Mon, 30 Oct 2023 14:20:24 +0000 Subject: [PATCH 1/2] Make configure use -lc++ for clang --- configure.ac | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 7b43a705..016c1963 100644 --- a/configure.ac +++ b/configure.ac @@ -70,11 +70,15 @@ SPRAL_NO_FORT_MAIN # Establish -lstdc++ or equivalent if test "x$CXXLIB" == "x"; then - if test "x$CXX" == "xifort"; then - CXXLIB="-cxxlib" - else - CXXLIB="-lstdc++" - fi +if test "x$CXX" == "xifort"; then + CXXLIB="-cxxlib" +else +if test "x$CXX" == "xclang"; then + CXXLIB="-lc++" +else + CXXLIB="-lstdc++" +fi +fi fi AC_SUBST(CXXLIB) From 0498c713ec978a15d6cb28d93d995933dc852bf3 Mon Sep 17 00:00:00 2001 From: Jari Date: Tue, 31 Oct 2023 08:57:20 +0000 Subject: [PATCH 2/2] Test CXX for clang++ not clang --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 016c1963..351993b0 100644 --- a/configure.ac +++ b/configure.ac @@ -73,7 +73,7 @@ if test "x$CXXLIB" == "x"; then if test "x$CXX" == "xifort"; then CXXLIB="-cxxlib" else -if test "x$CXX" == "xclang"; then +if test "x$CXX" == "xclang++"; then CXXLIB="-lc++" else CXXLIB="-lstdc++"