m4/libusb: search for "libusb-legacy" module if "libusb" module is not found
This commit is contained in:
parent
1372c1df19
commit
57db10acf0
1 changed files with 14 additions and 1 deletions
|
@ -20,7 +20,7 @@ AC_DEFUN([LIBNFC_CHECK_LIBUSB],
|
||||||
HAVE_LIBUSB=1
|
HAVE_LIBUSB=1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Search using pkg-config
|
# Search using libusb module using pkg-config
|
||||||
if test x"$HAVE_LIBUSB" = "x0"; then
|
if test x"$HAVE_LIBUSB" = "x0"; then
|
||||||
if test x"$PKG_CONFIG" != "x"; then
|
if test x"$PKG_CONFIG" != "x"; then
|
||||||
PKG_CHECK_MODULES([libusb], [libusb], [HAVE_LIBUSB=1], [HAVE_LIBUSB=0])
|
PKG_CHECK_MODULES([libusb], [libusb], [HAVE_LIBUSB=1], [HAVE_LIBUSB=0])
|
||||||
|
@ -33,6 +33,19 @@ AC_DEFUN([LIBNFC_CHECK_LIBUSB],
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Search using libusb-legacy module using pkg-config
|
||||||
|
if test x"$HAVE_LIBUSB" = "x0"; then
|
||||||
|
if test x"$PKG_CONFIG" != "x"; then
|
||||||
|
PKG_CHECK_MODULES([libusb], [libusb-legacy], [HAVE_LIBUSB=1], [HAVE_LIBUSB=0])
|
||||||
|
if test x"$HAVE_LIBUSB" = "x1"; then
|
||||||
|
if test x"$PKG_CONFIG_REQUIRES" != x""; then
|
||||||
|
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES,"
|
||||||
|
fi
|
||||||
|
PKG_CONFIG_REQUIRES="$PKG_CONFIG_REQUIRES libusb"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Search using libusb-config
|
# Search using libusb-config
|
||||||
if test x"$HAVE_LIBUSB" = "x0"; then
|
if test x"$HAVE_LIBUSB" = "x0"; then
|
||||||
AC_PATH_PROG(libusb_CONFIG,libusb-config)
|
AC_PATH_PROG(libusb_CONFIG,libusb-config)
|
||||||
|
|
Loading…
Reference in a new issue