Test for Watcom C presence

This adds checks for Watcom C DOS cross-compiler in a manner analogous to mingw
compiler for Windows. The compiler is not commonly present in Linux distributions
due to a non-free license.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
diff --git a/dosutil/Makefile b/dosutil/Makefile
index 9dc88d1..69fc58a 100644
--- a/dosutil/Makefile
+++ b/dosutil/Makefile
@@ -7,6 +7,9 @@
 WCL	= wcl
 WCLOPT	= -6 -osx -mt -bt=DOS -l=COM
 
+WCL_IS_GOOD := $(shell $(WCL) $(WCLOPT) \
+        -o hello.exe $(SRC)/../win/hello.c >/dev/null 2>&1 ; echo $$?)
+
 UPX     = upx
 
 NASM    = nasm
@@ -45,7 +48,12 @@
 	rm -f $*.0*
 	chmod a-x $@
 
+ifeq ($(WCL_IS_GOOD),0)
 all: $(TARGETS)
+else
+all: $(NSTARGETS)
+	rm -f $(WCTARGETS)
+endif
 
 tidy dist:
 	-rm -f *.obj *.lst *.o *.0*