summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael <mlk@alum.mit.edu>2009-10-27 12:13:59 -0400
committerMichael <mlk@alum.mit.edu>2009-10-27 12:13:59 -0400
commitb4dce8e6a46af1ced503ca662b3c46f88e257db1 (patch)
tree312554adb73eefd1b8676d30f1bedaedb42bfa98
parent41526cd4c2f33b437840e077efb14eae8c34df0c (diff)
updated usrp.pc file to reflect the correct version of libusb
-rwxr-xr-xconfig/usrp_libusb.m413
-rw-r--r--usrp/usrp.pc.in2
2 files changed, 12 insertions, 3 deletions
diff --git a/config/usrp_libusb.m4 b/config/usrp_libusb.m4
index 428a579923..251f7df101 100755
--- a/config/usrp_libusb.m4
+++ b/config/usrp_libusb.m4
@@ -30,6 +30,7 @@ AC_DEFUN([USRP_LIBUSB], [
libusbok=no
have_libusb1=no
+ LIBUSB_PKG_CONFIG_NAME=''
if test x$1 = xyes; then
PKG_CHECK_MODULES(USB, libusb-1.0, [
libusbok=yes
@@ -37,6 +38,7 @@ AC_DEFUN([USRP_LIBUSB], [
usb_header='libusb-1.0/libusb.h'
usb_lib_func='libusb_bulk_transfer'
usb_lib_name='usb-1.0'
+ LIBUSB_PKG_CONFIG_NAME='libusb-1.0'
])
else
dnl not using libusb1 (for now); see if legacy version is found.
@@ -45,17 +47,24 @@ AC_DEFUN([USRP_LIBUSB], [
dnl user's shell environment
dnl see if the pkgconfig module 'libusb' is available
- PKG_CHECK_MODULES(USB, libusb, [libusbok=yes], [libusbok=no])
+ PKG_CHECK_MODULES(USB, libusb, [
+ libusbok=yes
+ LIBUSB_PKG_CONFIG_NAME='libusb'
+ ], [libusbok=no])
dnl PKG_CHECK_MODULES does not work correctly when embedded
if test $libusbok = no; then
dnl if not, see if the pkgconfig module 'libusb-legacy' is available
- PKG_CHECK_MODULES(USB, [libusb-legacy], [libusbok=yes], [libusbok=no])
+ PKG_CHECK_MODULES(USB, [libusb-legacy], [
+ libusbok=yes
+ LIBUSB_PKG_CONFIG_NAME='libusb-legacy'
+ ], [libusbok=no])
fi
dnl set variables for further testing
usb_header='usb.h'
usb_lib_func='usb_bulk_write'
usb_lib_name='usb'
fi
+ AC_SUBST(LIBUSB_PKG_CONFIG_NAME)
if test x$1 != xyes || test $have_libusb1 = yes; then
dnl Either (1) libusb1 was specified and found; or
dnl (2) libusb1 was not specified. Restart checking.
diff --git a/usrp/usrp.pc.in b/usrp/usrp.pc.in
index 297775fb1d..2a15a05fda 100644
--- a/usrp/usrp.pc.in
+++ b/usrp/usrp.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
Name: usrp
Description: USRP Client Side C++ interface
-Requires: libusb @usrp_darwin_omnithread_pc_requires@
+Requires: @LIBUSB_PKG_CONFIG_NAME@ @usrp_darwin_omnithread_pc_requires@
Version: @VERSION@
Libs: -L${libdir} -lusrp
Cflags: -I${includedir}