--- ft2232h_0/README	Thu Aug 13 12:41:58 2009
+++ ft2232h_1/README	Wed Aug 12 08:33:26 2009
@@ -217,7 +217,8 @@
                           using the FTD2XX driver from ftdichip.com
   --enable-ftd2xx-highspeed
                           Enable building support for FT2232H and
-                          FT4232H-based devices (requires >=libftd2xx-0.4.16)
+                          FT4232H-based devices (requires >=libftd2xx-0.4.16
+                          or >=libftdi-0.16)
 
   --enable-gw16012        Enable building support for the Gateworks GW16012
                           JTAG Programmer
--- ft2232h_0/configure.in	Thu Aug 13 12:41:58 2009
+++ ft2232h_1/configure.in	Thu Aug 13 11:26:40 2009
@@ -324,7 +324,7 @@
   [build_ft2232_ftd2xx=$enableval], [build_ft2232_ftd2xx=no])
 
 AC_ARG_ENABLE(ftd2xx_highspeed,
-  AS_HELP_STRING([--enable-ftd2xx-highspeed], [Enable building support for FT2232H and FT4232H-based devices (requires >=libftd2xx-0.4.16)]), 
+  AS_HELP_STRING([--enable-ftd2xx-highspeed], [Enable building support for FT2232H and FT4232H-based devices (requires >=libftd2xx-0.4.16 or >=libftdi-0.16)]), 
   [want_ftd2xx_highspeed=$enableval], [want_ftd2xx_highspeed=no])
  
 AC_ARG_ENABLE(amtjtagaccel,
@@ -848,7 +848,7 @@
 DWORD x = FT_DEVICE_4232H;
     ], [
       AC_DEFINE(BUILD_FTD2XX_HIGHSPEED, [1],
-        [Support FT2232H/FT4232HS with FTD2XX.])
+        [Support FT2232H/FT4232HS with FTD2XX or libftdi.])
       build_ftd2xx_highspeed=yes
     ], [
       build_ftd2xx_highspeed=no
@@ -902,6 +902,28 @@
     ], [
       AC_MSG_RESULT([Skipping as we are cross-compiling])
     ])
+
+  AC_MSG_CHECKING([whether to build libftdi highspeed device support])
+  AC_MSG_RESULT([$want_ftd2xx_highspeed])
+  if test $want_ftd2xx_highspeed != no; then
+    AC_MSG_CHECKING([for libftdi highspeed device support])
+    AC_COMPILE_IFELSE([
+#include <stdio.h>
+#include <ftdi.h>
+enum ftdi_chip_type x = TYPE_2232H;
+    ], [
+      AC_DEFINE(BUILD_FTD2XX_HIGHSPEED, [1],
+        [Support FT2232H/FT4232HS with FTD2XX or libftdi.])
+      build_ftd2xx_highspeed=yes
+    ], [
+      build_ftd2xx_highspeed=no
+    ])
+    AC_MSG_RESULT([$build_ftd2xx_highspeed])
+
+    if test $want_ftd2xx_highspeed = yes -a $build_ftd2xx_highspeed = no; then
+      AC_MSG_ERROR([You need a newer libftdi version (0.16 or later).])
+    fi
+  fi
 
   # Restore the 'unexpanded ldflags'
   LDFLAGS=$LDFLAGS_SAVE
