jlink libusb-1.0 driver.
[openocd.git] / configure.ac
index 1bbc97696e0632727d5470ed88d30ec8ce90dd5b..22d6193c4913ae5c423372953a7fbf5c0dd60387 100644 (file)
@@ -1,6 +1,6 @@
 AC_PREREQ(2.60)
 AC_INIT([openocd], [0.6.0-dev],
-  [OpenOCD Mailing List <openocd-development@lists.berlios.de>])
+  [OpenOCD Mailing List <openocd-devel@lists.sourceforge.net>])
 AC_CONFIG_SRCDIR([src/openocd.c])
 
 m4_include(config_subdir.m4)dnl
@@ -486,6 +486,10 @@ AC_ARG_ENABLE(internal-jimtcl,
   AS_HELP_STRING([--disable-internal-jimtcl], [Disable building internal jimtcl]),
   [use_internal_jimtcl=$enableval], [use_internal_jimtcl=yes])
 
+AC_ARG_ENABLE(libusb0,
+  AS_HELP_STRING([--enable-libusb0], [Use libusb-0.1 library for USB JTAG devices]),
+  [check_libusb0=$enableval], [check_libusb0=no])
+
 build_minidriver=no
 AC_MSG_CHECKING([whether to enable ZY1000 minidriver])
 if test $build_zy1000 = yes; then
@@ -498,6 +502,10 @@ if test $build_zy1000 = yes; then
 fi
 AC_MSG_RESULT($build_zy1000)
 
+AC_ARG_ENABLE(remote-bitbang,
+  AS_HELP_STRING([--enable-remote-bitbang], [Enable building support for the Remote Bitbang jtag driver]),
+  [build_remote_bitbang=$enableval], [build_remote_bitbang=no])
+
 
 AC_MSG_CHECKING([whether to enable dummy minidriver])
 if test $build_minidriver_dummy = yes; then
@@ -567,6 +575,10 @@ case $host in
     fi
     parport_use_giveio=yes
 
+    if test x$build_buspirate = xyes; then
+      AC_MSG_ERROR([buspirate currently not supported by MinGW32 hosts])
+    fi
+
     CFLAGS="$CFLAGS -D__USE_MINGW_ANSI_STDIO"
 
     AC_DEFINE(IS_MINGW, 1, [1 if building for MinGW.])
@@ -768,12 +780,19 @@ fi
 
 if test "$use_internal_jimtcl" = yes; then
   if test -f "$srcdir/jimtcl/configure.ac"; then
-    AX_CONFIG_SUBDIR_OPTION([jimtcl], [--with-jim-ext=nvp --disable-lineedit --disable-install-jim])
+    AX_CONFIG_SUBDIR_OPTION([jimtcl], [--disable-install-jim])
   else
     AC_MSG_ERROR([jimtcl not found, run git submodule init and git submodule update.])
   fi
 fi
 
+if test $build_remote_bitbang = yes; then
+  build_bitbang=yes
+  AC_DEFINE(BUILD_REMOTE_BITBANG, 1, [1 if you want the Remote Bitbang JTAG driver.])
+else
+  AC_DEFINE(BUILD_REMOTE_BITBNAG, 0, [0 if you don't want the Remote Bitbang JTAG driver.])
+fi
+
 #-- Deal with MingW/Cygwin FTD2XX issues
 
 if test $is_win32 = yes; then
@@ -1037,14 +1056,34 @@ fi
 
 # check for usb.h when a driver will require it
 build_usb=no
-if test $build_jlink = yes -o $build_vsllink = yes -o $build_usbprog = yes -o \
+if test $build_vsllink = yes -o $build_usbprog = yes -o \
   $build_rlink = yes -o $build_ulink = yes -o $build_armjtagew = yes
 then
-  AC_CHECK_HEADERS([usb.h],[],
-  [AC_MSG_ERROR([usb.h is required to build some OpenOCD driver(s)])])
   build_usb=yes
 fi
 
+# Check for libusb1 ported drivers.
+build_usb_ng=no
+if test $build_jlink = 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_HEADERS(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)
@@ -1071,8 +1110,12 @@ 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(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 = yes)
 AM_CONDITIONAL(IS_WIN32, test $is_win32 = yes)

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)