diff --git a/configure b/configure index 2056550f83a..455e62a87f3 100755 --- a/configure +++ b/configure @@ -5450,9 +5450,10 @@ then 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) diff --git a/configure.in b/configure.in index 07ec3e20874..95fb8c5dddc 100644 --- a/configure.in +++ b/configure.in @@ -907,9 +907,10 @@ then 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)