diff --git a/ChangeLog b/ChangeLog
index 139758ac..79f4b335 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-01-17  Joerg Wunsch <j.gnu@uriah.heep.sax.de>
+
+	* configure.ac (libhid): Turn from AC_TRY_RUN into
+	AC_TRY_COMPILE, so it also works for cross-compilation
+	setups.
+
 2014-01-16  Joerg Wunsch <j.gnu@uriah.heep.sax.de>
 
 	* dfu.c (dfu_init): Move the descriptor checks up into the
diff --git a/configure.ac b/configure.ac
index a3a3739c..283d7efb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -215,11 +215,10 @@ LIBS="${LIBS} ${LIBHID}"
 
 AH_TEMPLATE([HAVE_LIBHID],
             [Define if HID support is enabled via the Win32 DDK])
-AC_TRY_RUN([#include <windows.h>
+AC_TRY_LINK([#include <windows.h>
 #include <setupapi.h>
-$HIDINCLUDE
-
-int
+$HIDINCLUDE],
+[int
 main(void)
 {
     GUID hidGuid;
@@ -227,7 +226,7 @@ main(void)
 
     return 0;
 }
-], [have_libhid=yes], [have_libhid=no], [have_libhid=no])
+], [have_libhid=yes], [have_libhid=no])
 AC_MSG_RESULT([$have_libhid])
 if test x$have_libhid = xyes; then
    AC_DEFINE([HAVE_LIBHID])