--- configure.orig 2023-06-15 17:12:01.000000000 +0800 +++ configure 2023-06-15 17:16:24.000000000 +0800 @@ -1799,8 +1799,9 @@ if test `uname -s` = "Darwin" then OPENMP_CXXFLAGS='-Xclang -fopenmp' +if clang --version | grep -i "clang" >/dev/null; then OPENMP_LIB='-lomp' - +fi # libomp 15.0+ from brew is keg-only (i.e. not symlinked into the standard paths search by the linker), # so need to search in other locations. # See https://github.com/Homebrew/homebrew-core/issues/112107#issuecomment-1278042927.