diff options
author | Nathan Hjelm <hjelmn@google.com> | 2022-04-15 09:28:29 -0600 |
---|---|---|
committer | Nathan Hjelm <hjelmn@google.com> | 2022-04-15 21:41:08 -0600 |
commit | ba698478afc3d3a72644eef9fc4cd24ce8383a4c (patch) | |
tree | ab2e3675573ef13ba7796d52c611b9ba86692ada | |
parent | 4e2de881cf0f8b38b1e19c078d19b4628f38c732 (diff) | |
download | libusb-ba698478afc3d3a72644eef9fc4cd24ce8383a4c.tar.gz |
config: allow configure to continue without pkg-config installed
libusb only uses pkg-config macros in configure to check for umockdev. Since
this is only required for testing it makes sense to protect the usage of these
macros to only be used when pkg-config is installed. This will be the case for
maintainers and testers.
Signed-off-by: Nathan Hjelm <hjelmn@google.com>
-rw-r--r-- | configure.ac | 14 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index d4f1251..07ec17e 100644 --- a/configure.ac +++ b/configure.ac @@ -181,12 +181,14 @@ linux) AC_CHECK_LIB([udev], [udev_new], [], [AC_MSG_ERROR([udev support requested but libudev not installed])]) # We can build umockdev tests (if available) - PKG_PROG_PKG_CONFIG - PKG_CHECK_MODULES(UMOCKDEV, umockdev-1.0 >= 0.16.0, ac_have_umockdev=yes, ac_have_umockdev=no) - PKG_CHECK_MODULES(UMOCKDEV_HOTPLUG, umockdev-1.0 >= 0.17.7, ac_umockdev_hotplug=yes, ac_umockdev_hotplug=no) - if test "x$ac_umockdev_hotplug" = xyes; then - AC_DEFINE([UMOCKDEV_HOTPLUG], [1], [UMockdev hotplug code is not racy]) - fi + m4_ifdef([PKG_PROG_PKG_CONFIG],[ + PKG_PROG_PKG_CONFIG + PKG_CHECK_MODULES([UMOCKDEV], [umockdev-1.0 >= 0.16.0], [ac_have_umockdev=yes], [ac_have_umockdev=no]) + PKG_CHECK_MODULES([UMOCKDEV_HOTPLUG], [umockdev-1.0 >= 0.17.7], [ac_umockdev_hotplug=yes], [ac_umockdev_hotplug=no]) + if test $ac_umockdev_hotplug = yes; then + AC_DEFINE([UMOCKDEV_HOTPLUG], [1], [UMockdev hotplug code is not racy]) + fi + ], []) else AC_CHECK_HEADERS([asm/types.h]) AC_CHECK_HEADER([linux/netlink.h], [], [AC_MSG_ERROR([Linux netlink header not found])]) diff --git a/libusb/version_nano.h b/libusb/version_nano.h index e1d64a3..7830159 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11726 +#define LIBUSB_NANO 11727 |