As reported in GitHub issue #1892, configure on FreeBSD failed to search
for the name of the library correctly which is libusb. As pkg-config
correctly holds the library name for linking, modify the search for
libusb-1.0 to use the pkg-config capability. If pkg-config (now largely
replaced by pkgconf) is not installed or found, the modules depending on
it will be gracefull disabled, i.e. the configure script will complete
with those modules disabled.
Modify the output summary to use spaces instead of tabs as things were
not lining up nicely in my FreeBSD terminal.
Rename the Automake substituted variable 'HAVE_LIBUSB' to
'TESTS_HAVE_LIBUSB' to avoid confusion with identically named variable
written to include/hamlib/config.h.
Likewise, rename the AutoConf substituted name 'LIBUSB' to
'HAMLIB_PC_LIBUSB' to avoid confusion with the 'LIBUSB' string passed to
PKG_CHECK_MODULES.
Update hamlib.pc.in and tests/Makefile.am to use the new variable names.
Make sure all source files no longer reference HAVE_LIBUSB_H or
HAVE_LIBUSB_1_0_LIBUSB_H as these variables no longer exist.
Fix src/Makefile.am to provide include path for usb_port.c.
Some distributions--Debian and Alpine tested--put libusb.h under the
libusb-1.0 directory. Test for its presence and if found define
HAVE_LIBUSB_1_0_LIBUSB_H. Also test for HAVE_LIBUSB or
HAVE_LIBUSB_1_0_LIBUSB_H and conditionally include the correct header
file in the sources.
Android makefile fragments are distributed as extra distribution files
by the GNU build system but are otherwise ignored. The Android build
support is independent and does not rely on the GNU build system.
See android/README.android for more info.
Signed-off-by: Nate Bargmann <n0nb@n0nb.us>