case " $ccflags " in
*" $opt "*) ;; # Skip if already there.
*) rm -f _cflags$_exe
- case "`$cc $cflags $warn $stdflags $opt _cflags.c -o _cflags$_exe 2>&1`" in
+ case "`$cc -DPERL_NO_INLINE_FUNCTIONS $cflags $warn $stdflags $opt _cflags.c -o _cflags$_exe 2>&1`" in
*"unrecognized"*) ;;
*"implicit declaration"*) ;; # Was something useful hidden?
*"Invalid"*) ;;
cppflags=`echo $cppflags|sed 's/-Wdeclaration-after-statement/ /'`
case "$cc" in
- *clang)
+ *clang*)
# clang complains a lot about -Wunused-value which are not fixable
warn="$warn -Wno-unused-value"
;;
esac
done
;;
+ *)
+ # clang may not be called clang
+ case "`$cc -v 2>&1`" in
+ *clang*)
+ case "$warn" in
+ *-Wno-unused-value) ;;
+ *) warn="$warn -Wno-unused-value"
+ esac
+ esac
esac