On Sat, Oct 13, 2012 at 10:24 AM, Peter Stuge <pe...@stuge.se> wrote: > Xiaofan Chen wrote: >> Maybe you want to fix the OpenOCD scripts. > > Of course I do. > >> I understand you do not like the libusb-1.0 situation under OpenOCD >> but the build scripts are not really related to that issue. > > Yes, they are, they are half of the problem.
So you want to use similar method of urjtag, right? It seems to be quite complicated as well since you need to check libusb-0.1, libusb-1.0, with or without pkg-config. 188 dnl check for libusb 189 190 AC_ARG_WITH([libusb], 191 [AS_HELP_STRING([--with-libusb], [lib for USB JTAG cables @<:@default=detect 1.0 0.1@:>@])],, 192 [with_libusb=detect]) 193 194 HAVELIBUSB=no 195 LIBUSB_LIBS= 196 AS_IF([test "x$with_libusb" != xno], [ 197 AS_IF([test "x$with_libusb" != x0.1 -a \ 198 "x$with_libusb" != x1.0 -a \ 199 "x$with_libusb" != xdetect -a \ 200 "x$with_libusb" != xyes], [ 201 HAVELIBUSB=manual 202 LIBUSB_LIBS="-L$with_libusb -L$with_libusb/lib -lusb" 203 LIBUSB_CFLAGS="-I$with_libusb -I$with_libusb/include" 204 ], [ 205 AS_IF([test "x$with_libusb" != x0.1 -a "x$HAVELIBUSB" = xno], [ 206 PKG_CHECK_MODULES(LIBUSB, libusb-1.0, [ 207 HAVELIBUSB=1.0 208 AC_DEFINE(HAVE_LIBUSB1, 1, [Define if you have libusb-1.0]) 209 ], [:]) 210 ]) 211 AS_IF([test "x$with_libusb" != x1.0 -a "x$HAVELIBUSB" = xno], [ 212 PKG_CHECK_MODULES(LIBUSB, libusb, [HAVELIBUSB=0.1], [:]) 213 ]) 214 AS_IF([test "x$HAVELIBUSB" = xno], [ 215 AS_IF([test "x$with_libusb" != xdetect], [ 216 AC_MSG_ERROR([*** libusb not detected]) 217 ], [ 218 AC_MSG_WARN([*** libusb not detected. No support for USB JTAG cables via libusb.]) 219 ]) 220 ],[ 221 AC_DEFINE(HAVE_LIBUSB, 1, [Define if you have libusb]) 222 ]) 223 ]) 224 AS_VAR_APPEND([CPPFLAGS], " $LIBUSB_CFLAGS") 225 ]) 226 AC_SUBST(LIBUSB_LIBS) 227 AM_CONDITIONAL(HAVE_LIBUSB, [test "x$HAVELIBUSB" != "xno"]) -- Xiaofan ------------------------------------------------------------------------------ Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev _______________________________________________ OpenOCD-devel mailing list OpenOCD-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openocd-devel