-AC_MSG_CHECKING([for libftdi FT232H device support])
-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <stdio.h>
-#include <ftdi.h>
- ]], [[
-enum ftdi_chip_type x = TYPE_232H;
- ]])], [
- AC_DEFINE([HAS_ENUM_FT232H], [1],
- [Support FT232H with FTD2XX or libftdi.])
- has_enum_ft232h=yes
- ], [
- has_enum_ft232h=no
- ])
- AC_MSG_RESULT([$has_enum_ft232h])
-
- if test $has_enum_ft232h = no; then
- AC_MSG_WARN([You need a newer libftdi version (0.20 or later).])
- fi
-
- # Restore the 'unexpanded ldflags'
- LDFLAGS=$LDFLAGS_SAVE
- CFLAGS=$CFLAGS_SAVE
-fi
-
-# check for usb.h when a driver will require it
-build_usb=no
-if test $build_vsllink = yes -o $build_usbprog = yes -o \
- $build_rlink = yes -o $build_ulink = yes -o $build_armjtagew = yes
-then
- build_usb=yes
-fi
-
-# Check for libusb1 ported drivers.
-build_usb_ng=no
-if test $build_jlink = yes -o $build_stlink = yes -o $build_osbdm = yes -o \
- $build_opendous = yes -o $build_ftdi = yes
-then
- build_usb_ng=yes
-fi
-
-# check for libusb library if necessary
-use_libusb0=no
-use_libusb1=no
-if test $build_usb = yes -o $build_usb_ng = yes; then
- if test $check_libusb0 = no -a $build_usb_ng = yes; then
- AC_CHECK_HEADER([libusb-1.0/libusb.h],
- [AC_DEFINE(HAVE_LIBUSB1, 1, [Define if you have libusb-1.0]) check_libusb0=no use_libusb1=yes ],
- [ check_libusb0=yes use_libusb1=no ])
- fi
-
- if test $check_libusb0 = yes -o $build_usb = yes; then
- AC_CHECK_HEADERS([usb.h], [use_libusb0=yes],
- [AC_MSG_ERROR([libusb or libusb-1.0 are required to build some OpenOCD driver(s)])])
- fi
-fi
-
-AM_CONDITIONAL([RELEASE], [test $build_release = yes])
-AM_CONDITIONAL([PARPORT], [test $build_parport = yes])
-AM_CONDITIONAL([DUMMY], [test $build_dummy = yes])
-AM_CONDITIONAL([GIVEIO], [test x$parport_use_giveio = xyes])
-AM_CONDITIONAL([EP93XX], [test $build_ep93xx = yes])
-AM_CONDITIONAL([ZY1000], [test $build_zy1000 = yes])
-AM_CONDITIONAL([ZY1000_MASTER], [test $build_zy1000_master = yes])
-AM_CONDITIONAL([IOUTIL], [test $build_ioutil = yes])
-AM_CONDITIONAL([AT91RM9200], [test $build_at91rm9200 = yes])
-AM_CONDITIONAL([BITBANG], [test $build_bitbang = yes])
-AM_CONDITIONAL([FT2232_LIBFTDI], [test $build_ft2232_libftdi = yes])
-AM_CONDITIONAL([FT2232_DRIVER], [test $build_ft2232_ftd2xx = yes -o $build_ft2232_libftdi = yes])
-AM_CONDITIONAL([FTDI_DRIVER], [test $build_ftdi = yes])
-AM_CONDITIONAL([USB_BLASTER_LIBFTDI], [test $build_usb_blaster_libftdi = yes])
-AM_CONDITIONAL([USB_BLASTER_DRIVER], [test $build_usb_blaster_ftd2xx = yes -o $build_usb_blaster_libftdi = yes])
-AM_CONDITIONAL([AMTJTAGACCEL], [test $build_amtjtagaccel = yes])
-AM_CONDITIONAL([GW16012], [test $build_gw16012 = yes])
-AM_CONDITIONAL([PRESTO_LIBFTDI], [test $build_presto_libftdi = yes])
-AM_CONDITIONAL([PRESTO_DRIVER], [test $build_presto_ftd2xx = yes -o $build_presto_libftdi = yes])
-AM_CONDITIONAL([USBPROG], [test $build_usbprog = yes])
-AM_CONDITIONAL([OOCD_TRACE], [test $build_oocd_trace = yes])
-AM_CONDITIONAL([JLINK], [test $build_jlink = yes])
-AM_CONDITIONAL([VSLLINK], [test $build_vsllink = yes])
-AM_CONDITIONAL([RLINK], [test $build_rlink = yes])
-AM_CONDITIONAL([ULINK], [test $build_ulink = yes])
-AM_CONDITIONAL([ARMJTAGEW], [test $build_armjtagew = yes])
-AM_CONDITIONAL([REMOTE_BITBANG], [test $build_remote_bitbang = yes])
-AM_CONDITIONAL([BUSPIRATE], [test $build_buspirate = yes])
-AM_CONDITIONAL([STLINK], [test $build_stlink = yes])
-AM_CONDITIONAL([OSBDM], [test $build_osbdm = yes])
-AM_CONDITIONAL([OPENDOUS], [test $build_opendous = yes])
-AM_CONDITIONAL([SYSFSGPIO], [test $build_sysfsgpio = yes])
-AM_CONDITIONAL([USB], [test $build_usb = yes])
-AM_CONDITIONAL([USB_NG], [test $build_usb_ng = yes])
-AM_CONDITIONAL([USE_LIBUSB0], [test $use_libusb0 = yes])
-AM_CONDITIONAL([USE_LIBUSB1], [test $use_libusb1 = yes])
-AM_CONDITIONAL([IS_CYGWIN], [test $is_cygwin = yes])
-AM_CONDITIONAL([IS_MINGW], [test $is_mingw = ye]s)
-AM_CONDITIONAL([IS_WIN32], [test $is_win32 = ye]s)
-AM_CONDITIONAL([IS_DARWIN], [test $is_darwin = ye]s)
-AM_CONDITIONAL([BITQ], [test $build_bitq = yes])
-
-AM_CONDITIONAL([MINIDRIVER], [test $build_minidriver = ye]s)
-AM_CONDITIONAL([MINIDRIVER_DUMMY], [test $build_minidriver_dummy = yes])
-
-AM_CONDITIONAL([INTERNAL_JIMTCL], [test $use_internal_jimtcl = yes])
+AM_CONDITIONAL([RELEASE], [test "x$build_release" = "xyes"])
+AM_CONDITIONAL([PARPORT], [test "x$build_parport" = "xyes"])
+AM_CONDITIONAL([DUMMY], [test "x$build_dummy" = "xyes"])
+AM_CONDITIONAL([GIVEIO], [test "x$parport_use_giveio" = "xyes"])
+AM_CONDITIONAL([EP93XX], [test "x$build_ep93xx" = "xyes"])
+AM_CONDITIONAL([ZY1000], [test "x$build_zy1000" = "xyes"])
+AM_CONDITIONAL([ZY1000_MASTER], [test "x$build_zy1000_master" = "xyes"])
+AM_CONDITIONAL([IOUTIL], [test "x$build_ioutil" = "xyes"])
+AM_CONDITIONAL([AT91RM9200], [test "x$build_at91rm9200" = "xyes"])
+AM_CONDITIONAL([BCM2835GPIO], [test "x$build_bcm2835gpio" = "xyes"])
+AM_CONDITIONAL([IMX_GPIO], [test "x$build_imx_gpio" = "xyes"])
+AM_CONDITIONAL([BITBANG], [test "x$build_bitbang" = "xyes"])
+AM_CONDITIONAL([JTAG_VPI], [test "x$build_jtag_vpi" = "xyes" -o "x$build_jtag_vpi" = "xyes"])
+AM_CONDITIONAL([USB_BLASTER_DRIVER], [test "x$enable_usb_blaster" != "xno" -o "x$enable_usb_blaster_2" != "xno"])
+AM_CONDITIONAL([AMTJTAGACCEL], [test "x$build_amtjtagaccel" = "xyes"])
+AM_CONDITIONAL([GW16012], [test "x$build_gw16012" = "xyes"])
+AM_CONDITIONAL([OOCD_TRACE], [test "x$build_oocd_trace" = "xyes"])
+AM_CONDITIONAL([REMOTE_BITBANG], [test "x$build_remote_bitbang" = "xyes"])
+AM_CONDITIONAL([BUSPIRATE], [test "x$build_buspirate" = "xyes"])
+AM_CONDITIONAL([SYSFSGPIO], [test "x$build_sysfsgpio" = "xyes"])
+AM_CONDITIONAL([USE_LIBUSB0], [test "x$use_libusb0" = "xyes"])
+AM_CONDITIONAL([USE_LIBUSB1], [test "x$use_libusb1" = "xyes"])
+AM_CONDITIONAL([IS_CYGWIN], [test "x$is_cygwin" = "xyes"])
+AM_CONDITIONAL([IS_MINGW], [test "x$is_mingw" = "xyes"])
+AM_CONDITIONAL([IS_WIN32], [test "x$is_win32" = "xyes"])
+AM_CONDITIONAL([IS_DARWIN], [test "x$is_darwin" = "xyes"])
+AM_CONDITIONAL([BITQ], [test "x$build_bitq" = "xyes"])
+AM_CONDITIONAL([USE_LIBFTDI], [test "x$use_libftdi" = "xyes"])
+AM_CONDITIONAL([USE_HIDAPI], [test "x$use_hidapi" = "xyes"])
+AM_CONDITIONAL([USE_LIBJAYLINK], [test "x$use_libjaylink" = "xyes"])
+AM_CONDITIONAL([TARGET64], [test "x$build_target64" = "xyes"])
+
+AM_CONDITIONAL([MINIDRIVER], [test "x$build_minidriver" = "xyes"])
+AM_CONDITIONAL([MINIDRIVER_DUMMY], [test "x$build_minidriver_dummy" = "xyes"])
+
+AM_CONDITIONAL([INTERNAL_JIMTCL], [test "x$use_internal_jimtcl" = "xyes"])
+AM_CONDITIONAL([INTERNAL_LIBJAYLINK], [test "x$use_internal_libjaylink" = "xyes"])