Skip to content

Commit 2db1e51

Browse files
committed
recognize libraries even if compiled statically
1 parent b28aa2d commit 2db1e51

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
--- configure.ac
2+
+++ configure.ac
3+
@@ -81,7 +81,7 @@ AC_CHECK_LIB([ncurses], [tputs])
4+
AC_CHECK_LIB([readline], [readline])
5+
AH_TEMPLATE([HAVE_LIBELF],
6+
[Define if ELF support is enabled via libelf])
7+
-AC_CHECK_LIB([elf], [elf_getshdrstrndx], [have_libelf=yes])
8+
+AC_CHECK_HEADERS([libelf.h libelf/libelf.h], [have_libelf=yes])
9+
if test x$have_libelf = xyes; then
10+
case $target in
11+
*)
12+
@@ -97,7 +97,7 @@ AC_SEARCH_LIBS([gethostent], [nsl])
13+
AC_SEARCH_LIBS([setsockopt], [socket])
14+
AH_TEMPLATE([HAVE_LIBUSB],
15+
[Define if USB support is enabled via libusb])
16+
-AC_CHECK_LIB([usb], [usb_get_string_simple], [have_libusb=yes])
17+
+AC_CHECK_HEADERS([lusb0_usb.h usb.h], [have_libusb=yes])
18+
if test x$have_libusb = xyes; then
19+
case $target in
20+
*-*-darwin*)
21+
@@ -115,7 +115,7 @@ AC_SUBST(LIBUSB, $LIBUSB)
22+
23+
AH_TEMPLATE([HAVE_LIBUSB_1_0],
24+
[Define if USB support is enabled via libusb 1.0])
25+
-AC_CHECK_LIB([usb-1.0], [libusb_init], [have_libusb_1_0=yes])
26+
+AC_CHECK_HEADERS([libusb-1.0/libusb.h libusb.h], [have_libusb_1_0=yes])
27+
if test x$have_libusb_1_0 = xyes; then
28+
case $target in
29+
*-*-darwin*)
30+

libusb-compat-0.1.5.build.bash

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if [[ $OS == "Msys" || $OS == "Cygwin" || $CROSS_COMPILE_HOST == "i686-w64-mingw
2727
wget http://download.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip
2828
fi
2929
unzip libusb-win32-bin-1.2.6.0.zip
30-
cp libusb-win32-bin-1.2.6.0/bin/x86/libusb0_x86.dll $PREFIX/bin/libusb0.dll
30+
#cp libusb-win32-bin-1.2.6.0/bin/x86/libusb0_x86.dll $PREFIX/bin/libusb0.dll
3131
cp libusb-win32-bin-1.2.6.0/include/lusb0_usb.h $PREFIX/include
3232
cp libusb-win32-bin-1.2.6.0/lib/gcc/libusb.a $PREFIX/lib
3333
exit 0

0 commit comments

Comments
 (0)