# fix OSX build issue
# see issue #20874 for more info
diff -ruN c++/src/build-system/configure c++/src/build-system/configure
--- c++/src/build-system/configure	2023-05-03 08:56:44.398601956 +0200
+++ c++/src/build-system/configure	2023-05-03 09:34:41.470127549 +0200
@@ -9573,10 +9573,12 @@
       CONF_loadable_ext=".dylib"
    fi
    if test "$compiler" = AppleClang \
-      ||  ("$compiler" = GCC  &&  $CXX -v 2>&1 | grep -q Apple) ; then
+      ||  test "$compiler" = LLVMClang \
+      ||  (test "$compiler" = GCC  &&  $CXX -v 2>&1 | grep -i -q Apple) ; then
       CFLAGS="-fpascal-strings $CFLAGS"
       CXXFLAGS="-fpascal-strings $CXXFLAGS"
-      if test "$compiler" = AppleClang; then
+      if test "$compiler" = AppleClang \
+        || test "$compiler" = LLVMClang; then
          try_old_sdks=no
       else
          try_old_sdks=$with_ncbi_public
@@ -9983,7 +9985,7 @@
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -rf conftest*
 
 fi
 
@@ -10000,7 +10002,7 @@
 else
   ac_cv_header_stdc=no
 fi
-rm -f conftest*
+rm -rf conftest*
 
 fi
