--- avrdude-6.2-orig/configure.ac
+++ avrdude-6.2/configure.ac
@@ -185,6 +185,8 @@
 AC_CHECK_HEADERS([fcntl.h sys/ioctl.h sys/time.h termios.h unistd.h])
 AC_CHECK_HEADERS([ddk/hidsdi.h],,,[#include <windows.h>
 #include <setupapi.h>])
+AC_CHECK_HEADERS([hidsdi.h],,,[#include <windows.h>
+#include <setupapi.h>])
 
 
 # Checks for typedefs, structures, and compiler characteristics.
@@ -202,9 +204,12 @@
 case $target in
         *-*-mingw32* | *-*-cygwin* | *-*-windows*)
 		LIBHID="-lhid -lsetupapi"
-		if test $ac_cv_header_ddk_hidsdi_h = yes
+		if test x$ac_cv_header_ddk_hidsdi_h = xyes
 		then
 			HIDINCLUDE="#include <ddk/hidsdi.h>"
+		elif test x$ac_cv_header_hidsdi_h = xyes
+		then
+			HIDINCLUDE="#include <hidsdi.h>"
 		else
 			HIDINCLUDE="#include \"my_ddk_hidsdi.h\""
 		fi
--- avrdude-6.2-orig/pickit2.c
+++ avrdude-6.2/pickit2.c
@@ -60,6 +60,8 @@
 #include <windows.h>
 #if defined(HAVE_DDK_HIDSDI_H)
 #  include <ddk/hidsdi.h>
+#elif defined(HAVE_HIDSDI_H)
+#  include <hidsdi.h>
 #else
 #  include "my_ddk_hidsdi.h"
 #endif
--- avrdude-6.2-orig/ser_avrdoper.c
+++ avrdude-6.2/ser_avrdoper.c
@@ -71,10 +71,13 @@
 
 #if defined(HAVE_DDK_HIDSDI_H)
 #  include <ddk/hidsdi.h>
+#  include <ddk/hidpi.h>
+#elif defined (HAVE_HIDSDI_H)
+#  include <hidsdi.h>
+#  include <hidpi.h>
 #else
 #  include "my_ddk_hidsdi.h"
 #endif
-#include <ddk/hidpi.h>
 
 #ifdef USB_DEBUG
 #define DEBUG_PRINT(arg)    printf arg
--- avrdude-6.2-orig/Makefile.am
+++ avrdude-6.2/Makefile.am
@@ -138,7 +138,6 @@
 	linuxgpio.h \
 	linux_ppdev.h \
 	lists.c \
-	my_ddk_hidsdi.h \
 	par.c \
 	par.h \
 	pgm.c \
