-dnl ** Try to add -mno-cygwin to the C compiler options for mingw32 targets
-if test x"$TargetOS_CPP" = x"mingw32"; then
- FPTOOLS_CC_FLAG(-mno-cygwin,CC_SUPPORTS_MNO_CYGWIN)
- SRC_CC_OPTS="$CC_SUPPORTS_MNO_CYGWIN $SRC_CC_OPTS"
- CPPFLAGS="$CC_SUPPORTS_MNO_CYGWIN $CPPFLAGS"
-fi
+dnl ** Try to add -mno-cygwin to the C compiler options
+FP_CHECK_FLAG([-mno-cygwin], [
+SRC_CC_OPTS="-mno-cygwin $SRC_CC_OPTS"
+CPPFLAGS="-mno-cygwin $CPPFLAGS"])