hamlib/hamlib.pc.in
Nate Bargmann d04364e685
Use pkgconf/pkg-config to test for libusb-1.0
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.
2025-09-17 21:31:37 -05:00

13 lines
378 B
PkgConfig

prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: @PACKAGE_NAME@
Description: Library to control radio and rotator equipment.
URL: @PACKAGE_URL@
Version: @PACKAGE_VERSION@
Requires.private: @HAMLIB_PC_LIBUSB@
Cflags: -I${includedir} @PTHREAD_CFLAGS@
Libs: -L${libdir} -lhamlib
Libs.private: @MATH_LIBS@ @DL_LIBS@ @NET_LIBS@ @PTHREAD_LIBS@