Peter, similar to the OpenSSL test and "with_ssl", can we make the libusb test in configure.in depend on "with_usb=yes"? It's not as important as not linking against OpenSSL unless requested, but it caused a bit of confusion when I was trying to rebuild. I forgot that "--with-drivers=all" does not imply "--with-usb", and it was not registering that the libusb checks might be called regardless of whether --with-usb was set. I will do the testing and such, but I wanted to ask you before I work on a patch (especially since there is that "innocent until proven guilty" comment in there). -- - Charles Lepple
By the way, the "innocent until proven guilty" comment just refers to the fact that nut_have_libusb defaults to "yes" unless one of the tests fail. This simplifies the logic, which would otherwise have to be a big nasty nested statement. If you want to change the logic for --with-usb and the libusb checks, then perhaps you should do the same with --with-snmp and the the net-snmp checks. The checks would have to be moved after the test for --with-snmp. -- Peter Charles Lepple wrote:> > Peter, > > similar to the OpenSSL test and "with_ssl", can we make the libusb > test in configure.in depend on "with_usb=yes"? > > It's not as important as not linking against OpenSSL unless requested, > but it caused a bit of confusion when I was trying to rebuild. I > forgot that "--with-drivers=all" does not imply "--with-usb", and it > was not registering that the libusb checks might be called regardless > of whether --with-usb was set. > > I will do the testing and such, but I wanted to ask you before I work > on a patch (especially since there is that "innocent until proven > guilty" comment in there). > > -- > - Charles Lepple >
Sure, that's as easy as enclosing lines 447-526 in an "if" test for with_usb. The reason I tested for the USB libraries unconditionally is that I thought in the future, we may want to go the opposite route: if neither --with-usb nor --without-usb is given, then check for the requisite libraries and enable USB drivers by default if they are found. --with-drivers=all is the default, so there should not be a need to specify this option explicitly. Perhaps we should get rid of the "all" terminology and just use the empty string instead. The point is that "all" means "the user has not requested any particular specific drivers". If you really want to build all drivers, then specify --with-all. -- Peter Charles Lepple wrote:> > Peter, > > similar to the OpenSSL test and "with_ssl", can we make the libusb > test in configure.in depend on "with_usb=yes"? > > It's not as important as not linking against OpenSSL unless requested, > but it caused a bit of confusion when I was trying to rebuild. I > forgot that "--with-drivers=all" does not imply "--with-usb", and it > was not registering that the libusb checks might be called regardless > of whether --with-usb was set. > > I will do the testing and such, but I wanted to ask you before I work > on a patch (especially since there is that "innocent until proven > guilty" comment in there). > > -- > - Charles Lepple >