Backport second fix for issue #11149.
diff --git a/configure b/configure
index 72a758e..3948080 100755
--- a/configure
+++ b/configure
@@ -5413,9 +5413,10 @@
         fi
 
         # Clang also needs -fwrapv
-        if test "$CC" = "clang" ; then
-            WRAP="-fwrapv"
-        fi
+        case $CC in
+            *clang*) WRAP="-fwrapv"
+            ;;
+        esac
 
 	case $ac_cv_prog_cc_g in
 	yes)