configure.ac: Cleanup and refactoring

Make the formatting consistent across the entire file. In particular:

  - Always quote strings whose values are derived
  - Use tabs consistently
  - Wrap all arguments with square brackets

Replace the use of '-a' with '&&' to be more portable.

Rearrange some of the feature checks to be conditional upon the platform
or backend. For example, there is no need to check for nfds_t on Windows
because poll() doesn't exist there. Similarly we now only check for
timerfd on Linux and Solaris. This translates into slightly faster
configure times.

Explicitly define tokens for both the poll and thread implementations.
This makes the preprocessor conditionals much nicer since it is not
necessary to enumerate all possible OS_* tokens. Also replace
POLL_NFDS_TYPE with a proper typedef that is based on the availability
of the nfds_t type.

Migrate to config definition names that are more consistent with
autoconf. The check for timerfd actually verifies the presence of the
library function instead of just the header definitions, and the token
USBI_TIMERFD_AVAILABLE is now HAVE_TIMERFD. Similarly the check for
syslog results in a definition of HAVE_SYSLOG.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
15 files changed
tree: db651da15f518b5cb0ab260bfab85c326586c931
  1. .private/
  2. android/
  3. doc/
  4. examples/
  5. libusb/
  6. msvc/
  7. tests/
  8. Xcode/
  9. .gitattributes
  10. .gitignore
  11. .travis.yml
  12. appveyor.yml
  13. appveyor_cygwin.bat
  14. appveyor_minGW.bat
  15. AUTHORS
  16. autogen.sh
  17. bootstrap.sh
  18. Brewfile
  19. ChangeLog
  20. configure.ac
  21. COPYING
  22. INSTALL_WIN.txt
  23. libusb-1.0.pc.in
  24. Makefile.am
  25. NEWS
  26. PORTING
  27. README.git
  28. README.md
  29. TODO
  30. travis-autogen.sh
README.md

libusb

Build Status Build status Coverity Scan Build Status

libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD and Haiku userspace. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).

libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.

libusb homepage: http://libusb.info/

Developers will wish to consult the API documentation: http://api.libusb.info

Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info

(Please use the mailing list rather than mailing developers directly)