configure.ac: Cleanup and refactoring
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 23 Jan 2020 01:39:14 +0000 (17:39 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Fri, 24 Jan 2020 19:22:49 +0000 (11:22 -0800)
commitd5bb64b3dc438a0a03c66d08a7fd12de5543f538
treedb651da15f518b5cb0ab260bfab85c326586c931
parent21a163a3954a0f8ae647283f48215e3e3c8caaa2
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:
Xcode/config.h
android/config.h
configure.ac
libusb/Makefile.am
libusb/core.c
libusb/io.c
libusb/libusbi.h
libusb/os/linux_usbfs.c
libusb/os/poll_posix.h
libusb/os/poll_windows.c
libusb/os/poll_windows.h
libusb/os/sunos_usb.c
libusb/os/windows_common.c
libusb/version_nano.h
msvc/config.h