summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Hjelm <hjelmn@google.com>2022-04-15 09:28:29 -0600
committerNathan Hjelm <hjelmn@google.com>2022-04-15 21:41:08 -0600
commitba698478afc3d3a72644eef9fc4cd24ce8383a4c (patch)
treeab2e3675573ef13ba7796d52c611b9ba86692ada
parent4e2de881cf0f8b38b1e19c078d19b4628f38c732 (diff)
downloadlibusb-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.ac14
-rw-r--r--libusb/version_nano.h2
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