diff --git a/configure b/configure
index 22df1d5e6f1b39bb32d42f504a67a6e35f4032ab..342f78d2d329a3c2995f17880f69f15487840f57 100755
--- a/configure
+++ b/configure
@@ -7067,6 +7067,7 @@ server/Makefile
 tools/Makefile
 tools/cvdump/Makefile
 tools/specmaker/Makefile
+tools/winapi/Makefile
 tools/winebuild/Makefile
 tools/winelauncher
 tools/wmc/Makefile
@@ -7320,6 +7321,7 @@ server/Makefile
 tools/Makefile
 tools/cvdump/Makefile
 tools/specmaker/Makefile
+tools/winapi/Makefile
 tools/winebuild/Makefile
 tools/winelauncher
 tools/wmc/Makefile
diff --git a/configure.in b/configure.in
index 739eaf583161baa8a61f34bbefa0cd310be382eb..8eedc640d1683b680be9ceac4e0752943a93ded1 100644
--- a/configure.in
+++ b/configure.in
@@ -1341,6 +1341,7 @@ server/Makefile
 tools/Makefile
 tools/cvdump/Makefile
 tools/specmaker/Makefile
+tools/winapi/Makefile
 tools/winebuild/Makefile
 tools/winelauncher
 tools/wmc/Makefile
diff --git a/tools/winapi/.cvsignore b/tools/winapi/.cvsignore
new file mode 100644
index 0000000000000000000000000000000000000000..f3c7a7c5da68804a1bdf391127ba34aed33c3cca
--- /dev/null
+++ b/tools/winapi/.cvsignore
@@ -0,0 +1 @@
+Makefile
diff --git a/tools/winapi/Makefile.in b/tools/winapi/Makefile.in
new file mode 100644
index 0000000000000000000000000000000000000000..f7aa1880d0d63f855f09cec84c018aa359e90bed
--- /dev/null
+++ b/tools/winapi/Makefile.in
@@ -0,0 +1,27 @@
+DEFS      = -D__WINE__
+TOPSRCDIR = @top_srcdir@
+TOPOBJDIR = ../..
+SRCDIR    = @srcdir@
+VPATH     = @srcdir@
+
+PROGRAMS =
+MODULE   = none
+
+all: $(PROGRAMS)
+
+@MAKE_RULES@
+
+install:: $(PROGRAMS)
+	[ -d $(bindir) ] || $(MKDIR) $(bindir)
+	$(INSTALL_SCRIPT) $(SRCDIR)/trampoline $(bindir)/make_filter
+	$(INSTALL_SCRIPT) $(SRCDIR)/trampoline $(bindir)/winapi_check
+	$(INSTALL_SCRIPT) $(SRCDIR)/trampoline $(bindir)/winapi_extract
+	$(INSTALL_SCRIPT) $(SRCDIR)/trampoline $(bindir)/winapi_fixup
+
+uninstall::
+	$(RM) $(bindir)/make_filter
+	$(RM) $(bindir)/winapi_check
+	$(RM) $(bindir)/winapi_extract
+	$(RM) $(bindir)/winapi_fixup
+
+### Dependencies:
diff --git a/tools/winapi/trampoline b/tools/winapi/trampoline
new file mode 100755
index 0000000000000000000000000000000000000000..166c3497e8b6d060f6be89d72dfffac10f00c043
--- /dev/null
+++ b/tools/winapi/trampoline
@@ -0,0 +1,18 @@
+#! /usr/bin/perl -w
+
+use strict;
+
+require Cwd;
+
+my $tool = $0; 
+$tool =~ s%^(?:.*?/)?([^/]+)$%$1%;
+
+$_ = Cwd::cwd();
+while($_) {
+    my $file = "$_/tools/winapi/$tool";
+    if(-e $file) {
+	exec("$file @ARGV");
+    }
+    s%/[^/]*$%%;
+}
+print STDERR "$0: $tool: can't link to command\n";
diff --git a/tools/winapi/winapi_check b/tools/winapi/winapi_check
new file mode 100755
index 0000000000000000000000000000000000000000..0adab85fb3492a8244aa743848bfc909b68ee5c0
--- /dev/null
+++ b/tools/winapi/winapi_check
@@ -0,0 +1,8 @@
+#! /usr/bin/perl -w
+
+use strict;
+
+$0 =~ m%^(.*?/?tools)/winapi/winapi_check$%;
+exec "$1/winapi_check/winapi_check @ARGV";
+
+