python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / hplip / 0001-build-use-pkg-config-to-discover-libusb.patch
blob59b89a4a327fe4777c4eb38eb2b80743b954244a
1 From 1eed2b65eff4c66b80eab0ec46c6705de19bdb9d Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Thu, 21 Jan 2016 23:54:03 +0100
4 Subject: [PATCH] build: use pkg-config to discover libusb
6 This allows to remove hardcoded paths to libusb headers.
8 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
9 ---
10 Makefile.am | 4 ++--
11 configure.in | 3 +--
12 2 files changed, 3 insertions(+), 4 deletions(-)
14 diff --git a/Makefile.am b/Makefile.am
15 index 73fed2e..3a4e899 100644
16 --- a/Makefile.am
17 +++ b/Makefile.am
18 @@ -92,8 +92,8 @@ libhpmud_la_SOURCES += io/hpmud/musb_libusb01.c
19 libhpmud_la_LDFLAGS += -lusb
20 else
21 libhpmud_la_SOURCES += io/hpmud/musb.c
22 -libhpmud_la_CFLAGS += -I/usr/include/libusb-1.0
23 -libhpmud_la_LDFLAGS += -lusb-1.0
24 +libhpmud_la_CFLAGS += $(LIBUSB_CFLAGS)
25 +libhpmud_la_LDFLAGS += $(LIBUSB_LIBS)
26 endif
28 if NETWORK_BUILD
29 diff --git a/configure.in b/configure.in
30 index 3706645..8b06428 100755
31 --- a/configure.in
32 +++ b/configure.in
33 @@ -542,8 +542,7 @@ if test "$hpijs_only_build" = "no" && test "$hpcups_only_build" = "no"; then
34 AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
35 AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
36 else
37 - AC_CHECK_LIB([usb-1.0], [libusb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb 1.0 support], 2)])
38 - AC_CHECK_HEADERS(libusb-1.0/libusb.h, ,[AC_MSG_ERROR([cannot find libusb-1.0-devel support], 11)])
39 + PKG_CHECK_MODULES([LIBUSB], [libusb-1.0])
43 --
44 2.6.4