On Mon, Aug 2, 2010 at 6:26 PM, Peter Stuge <pe...@stuge.se> wrote:
> The libusb-1.0 dir in CFLAGS is a workaround for a bug in how libftdi
> uses libusb-1.0. libftdi should do #include <libusb-1.0/libusb.h> but
> does #include <libusb.h> which is wrong. This forces all libftdi
> users to mess with include paths, to add the directory that libftdi
> happened to be built with, and this is clearly *not* how things are
> supposed to work. libftdi should be fixed.

This may not be quite true. libftdi-1.0 will try to get libusb-1.0 CFLAGS
from pkg-config data (libusb-1.0.pc). libftdi (0.1) will try to get
libusb CFLAGS from pkg-config data (libusb.pc) or libusb-config.
I think it should work fine.

> The two seds are neccessary since OpenOCD assumes that libftdi is
> built against libusb-0.1. I'm not sure about the best fix for the
> configure.in test, but for build time libtool will always do the
> right thing if -lusb is simply removed from src/Makefile.am.
>

What if I need both libusb-1.0 (for libftdi-1.0) and
libusb-0.1 (say for J-Link)?

Probably it is the time for OpenOCD to start to
offer the options for libusb-1.0 and libftdi-1.0
and may migrate the libusb-0.1 based files to
libusb-1.0.

-- 
Xiaofan
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to